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

pulibrary / orangelight / 00dbc10b-d747-4ad7-b211-7b26d753abbb

14 Aug 2025 01:25PM UTC coverage: 0.483% (-94.9%) from 95.343%
00dbc10b-d747-4ad7-b211-7b26d753abbb

push

circleci

web-flow
Merge pull request #5181 from pulibrary/dependabot/bundler/activestorage-7.2.2.2

Bump activestorage from 7.2.2.1 to 7.2.2.2

47 of 9721 relevant lines covered (0.48%)

0.01 hits per line

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

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

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

9
    def bib_for_availability(bib_id)
×
10
      bib_id.to_i.to_s
×
11
    end
×
12

13
    def valid_bib_id?(bib_id)
×
14
      bib_for_availability(bib_id) == bib_id
×
15
    end
×
16

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

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

25
    def vocab_type(vocab)
×
26
      vocab_types = {
×
27
        'Library of Congress subject heading' => 'lc_subject_facet',
×
28
        'Library of Congress genre/form terms for library and archival materials' => 'lcgft_genre_facet',
×
29
        'Art & architecture thesaurus' => 'aat_genre_facet',
×
30
        'Homosaurus terms' => 'homoit_subject_facet',
×
31
        'Homosaurus genres' => 'homoit_genre_facet',
×
32
        'Rare books genre term' => 'rbgenr_genre_facet',
×
33
        'Chinese traditional subjects' => 'siku_subject_facet',
×
34
        'Locally assigned term' => 'local_subject_facet'
×
35
      }
×
36
      vocab_types.fetch(vocab, 'subject_facet')
×
37
    end
×
38
  end
×
39
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