• 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

50.0
/marc_to_solr/lib/composite_cache_map.rb
1
# Composite of CacheMaps
2
# Provides the ability to build a cache from multiple Solr endpoints
3
class CompositeCacheMap
1✔
4
  # Constructor
5
  # @param cache_maps [Array<CacheMap>] the CacheMap instances for each endpoint
6
  def initialize(cache_maps:)
1✔
UNCOV
7
    @cache_maps = cache_maps
×
8
  end
9

10
  # Seed the cache
11
  # @param page [Integer] the page number at which to start the caching
12
  def seed!(page: 1)
1✔
13
    @cache_maps.each { |cache_map| cache_map.seed!(page:) }
×
14
  end
15

16
  # Retrieve the cached values
17
  # @return [Hash] the values cached from the Solr response
18
  def values
1✔
19
    @values ||= @cache_maps.map { |cache_map| cache_map.values }.reduce(&:merge)
×
20
  end
21

22
  # Fetch the first BibID mapped to an ARK from the cache
23
  # @param ark [String] the ARK mapped to the BibID
24
  # @return [String, nil] the BibID (or nil if it has not been mapped)
25
  def fetch(ark)
1✔
UNCOV
26
    bib_ids = @cache_maps.map { |cache_map| cache_map.fetch(ark) }
×
UNCOV
27
    bib_ids.compact.first
×
28
  end
29
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