• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / orangelight / 02649431-281b-44ee-8562-bdcbcb814fd1

07 Mar 2025 10:09PM UTC coverage: 95.329% (-0.07%) from 95.4%
02649431-281b-44ee-8562-bdcbcb814fd1

Pull #3386

circleci

christinach
Update lib/orangelight/browse_lists.rb#browse_subject with the extra vocabularies

Co-authored-by: Mark Zelesky <mzelesky@users.noreply.github.com>
Pull Request #3386: Adds vocabulary column to subject table

7 of 12 new or added lines in 2 files covered. (58.33%)

8 existing lines in 2 files now uncovered.

6000 of 6294 relevant lines covered (95.33%)

1516.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/app/helpers/orangelight/browsables_helper.rb
1
# frozen_string_literal: true
2

3
module Orangelight
3✔
4
  module BrowsablesHelper
3✔
5
    def scsb_id?(bib_id)
3✔
6
      /^SCSB-\d+/ =~ bib_id
463✔
7
    end
8

9
    def bib_for_availability(bib_id)
3✔
10
      bib_id.to_i.to_s
455✔
11
    end
12

13
    def valid_bib_id?(bib_id)
3✔
14
      bib_for_availability(bib_id) == bib_id
223✔
15
    end
16

17
    def should_check_availability?(bib_id)
3✔
18
      !scsb_id?(bib_id) && valid_bib_id?(bib_id) && render_availability?
233✔
19
    end
20

21
    def current_browse_per_page
3✔
22
      params[:rpp].present? ? params[:rpp].to_i : 10
10✔
23
    end
24

25
    def vocab_type(vocab)
3✔
26
      case vocab
50✔
27
      when 'Art & architecture thesaurus'
NEW
28
        'aat_s'
×
29
      when 'Homosaurus: an international LGBTQ linked data vocabulary'
NEW
30
        'homoit_genre_s'
×
31
      when 'Library of Congress genre/form terms for library and archival materials'
NEW
32
        'lcgft_s'
×
33
      when 'Locally assigned term'
NEW
34
        'local_subject_display'
×
35
      when 'Rare books genre term'
NEW
36
        'rbgenr_s'
×
37
      else
38
        # use new field subject_lc
39
        'subject_facet'
50✔
40
      end
41
    end
42
  end
43
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc