• 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/models/solr_document/identifier.rb
1
# frozen_string_literal: true
2

3
class SolrDocument
×
4
  class Identifier
×
5
    attr_reader :identifier_type, :value
×
6
    def initialize(identifier_type, value)
×
7
      @identifier_type = identifier_type
×
8
      @value = value
×
9
    end
×
10

11
    def to_html
×
12
      helper.tag :meta, property:, itemprop:, content: value
×
13
    end
×
14

15
    # @return [String] RDF property either absolute or relative to
16
    #   http://id.loc.gov/vocabulary/identifiers/
17
    def property
×
18
      property_mapping[identifier_type]
×
19
    end
×
20

21
    # @return [String] Schema.org item property.
22
    def itemprop
×
23
      itemprop_mapping[identifier_type]
×
24
    end
×
25

26
    def data_key
×
27
      identifier_type.gsub('_s', '')
×
28
    end
×
29

30
    private
×
31

32
      def property_mapping
×
33
        {
×
34
          'isbn_s' => 'isbn',
×
35
          'lccn_s' => 'lccn',
×
36
          'oclc_s' => 'http://purl.org/library/oclcnum'
×
37
        }
×
38
      end
×
39

40
      def itemprop_mapping
×
41
        {
×
42
          'isbn_s' => 'isbn'
×
43
        }
×
44
      end
×
45

46
      def helper
×
47
        @helper ||= ActionController::Base.helpers
×
48
      end
×
49
  end
×
50
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