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

pulibrary / bibdata / 1dcebae2-3318-4e77-bc53-82276e293354

02 May 2025 04:45PM UTC coverage: 28.256% (-63.9%) from 92.189%
1dcebae2-3318-4e77-bc53-82276e293354

push

circleci

sandbergja
Add basic infrastructure for compiling rust code

* Add a rake compile task to compile
* Run the rake task in CI
* Run the rake task before rspec tests with the rust tag, to provide quick feedback on rust changes in TDD cycles

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

2467 existing lines in 97 files now uncovered.

1089 of 3854 relevant lines covered (28.26%)

0.29 hits per line

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

25.0
/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✔
UNCOV
8
    @ark_cache = ark_cache
×
UNCOV
9
    @service_host = service_host
×
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✔
UNCOV
16
    if url.is_a? URI::ARK
×
UNCOV
17
      cached_values = @ark_cache.fetch("ark:/#{url.naan}/#{url.name}")
×
UNCOV
18
      return if cached_values.nil?
×
19

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

UNCOV
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