• 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
/app/services/index_functions.rb
1
module IndexFunctions
1✔
2
  def self.update_records(dump)
1✔
3
    file_paths = []
×
4
    dump['files']['updated_records'].each_with_index do |update, i|
×
5
      File.binwrite("/tmp/update_#{i}.gz", Faraday.get(update['dump_file']).body)
×
6
      file_paths << "/tmp/update_#{i}"
×
7
    end
8
    file_paths
×
9
  end
10

11
  def self.delete_ids(dump)
1✔
UNCOV
12
    dump['ids']['delete_ids']
×
13
  end
14

15
  def self.logger
1✔
UNCOV
16
    return Rails.logger if defined?(Rails)
×
17

18
    @logger ||= Logger.new(STDOUT)
×
19
  end
20

21
  def self.rsolr_connection(solr_url)
1✔
UNCOV
22
    RSolr.connect(url: solr_url, timeout: 300, open_timeout: 300)
×
23
  rescue StandardError => e
UNCOV
24
    logger.error "Failed to connect to Solr: #{e.message}"
×
UNCOV
25
    nil
×
26
  end
27

28
  def self.process_scsb_dumps(dumps, solr_url)
1✔
UNCOV
29
    solr = rsolr_connection(solr_url)
×
UNCOV
30
    return if solr.nil?
×
31

UNCOV
32
    dumps.each do |dump|
×
UNCOV
33
      dump.dump_files.each do |df|
×
UNCOV
34
        next unless df.recap_record_type?
×
35

UNCOV
36
        Index::DumpFileJob.perform_async(df.id, solr_url)
×
37
      end
UNCOV
38
      solr.delete_by_id(dump.delete_ids) if dump.delete_ids.present?
×
39
    end
40
  end
41
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