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

pulibrary / bibdata / 97cbe92d-c54f-45de-a4c8-e506299fcc4d

21 Dec 2023 09:42PM UTC coverage: 90.834% (-0.5%) from 91.287%
97cbe92d-c54f-45de-a4c8-e506299fcc4d

Pull #2284

circleci

sandbergja
Upgrade old gem dependencies

Removes the rerun gem, since it is no longer used.  Also, remove some leftover files from the spring gem.
Pull Request #2284: Upgrade old gem dependencies

3409 of 3753 relevant lines covered (90.83%)

334.45 hits per line

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

66.67
/marc_to_solr/lib/iiif_manifest_url_builder.rb
1
# Class for building instances of URI::HTTPS for IIIF Manifest URL's
2
class IIIFManifestUrlBuilder
1✔
3
  # Constructor
4
  # @param ark_cache [CompositeCacheMap] composite of caches for mapping ARK's to repository resource ID's
5
  # @param service_host [String] the host name for the repository instance
6
  # @todo Resolve the service_host default parameter properly (please @see https://github.com/pulibrary/marc_liberation/issues/313)
7
  def initialize(ark_cache:, service_host:)
1✔
8
    @ark_cache = ark_cache
14✔
9
    @service_host = service_host
14✔
10
  end
11

12
  # Generates an IIIF Manifest URL using an ARK
13
  # @param ark [URI::ARK] the archival resource key
14
  # @return URI::HTTPS the URL
15
  def build(url:)
1✔
16
    if url.is_a? URI::ARK
14✔
17
      cached_values = @ark_cache.fetch("ark:/#{url.naan}/#{url.name}")
14✔
18
      return if cached_values.nil?
14✔
19

20
      id = cached_values.fetch :id
×
21
      resource_type = cached_values.fetch :internal_resource
×
22
      human_readable_type = resource_type.underscore
×
23

24
      URI::HTTPS.build(host: @service_host, path: "/concern/#{human_readable_type.pluralize}/#{id}/manifest")
×
25
    end
26
  end
27
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