• 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

27.27
/marc_to_solr/lib/orangelight_url_builder.rb
1
# Class for building instances of URI::HTTPS for Orangelight URL's
2
class OrangelightUrlBuilder
1✔
3
  # Constructor
4
  # @param ark_cache [CompositeCacheMap] composite of caches for mapping ARK's to BibID's
5
  # @param service_host [String] the host name for the Orangelight instance
6
  def initialize(ark_cache:, fragment: 'view', service_host: 'catalog.princeton.edu')
1✔
UNCOV
7
    @ark_cache = ark_cache
×
UNCOV
8
    @service_host = service_host
×
UNCOV
9
    @fragment = fragment
×
10
  end
11

12
  # Generates an Orangelight 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
      cached_bib_id = cached_values.fetch :source_metadata_identifier
×
21

UNCOV
22
      URI::HTTPS.build(host: @service_host, path: "/catalog/#{cached_bib_id}", fragment: @fragment)
×
23
    end
24
  end
25
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