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

pulibrary / bibdata / ac92e576-8ceb-4c37-a6e8-ab6d63dd085a

29 May 2025 02:31PM UTC coverage: 91.682% (-0.02%) from 91.704%
ac92e576-8ceb-4c37-a6e8-ab6d63dd085a

push

circleci

sandbergja
Address rubocop TODOs in indexer.rb

12 of 13 new or added lines in 1 file covered. (92.31%)

3494 of 3811 relevant lines covered (91.68%)

385.82 hits per line

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

92.31
/app/services/alma/indexer.rb
1
module Alma
1✔
2
  class Indexer
1✔
3
    attr_reader :solr_url
1✔
4

5
    def initialize(solr_url:)
1✔
6
      @solr_url = solr_url
32✔
7
    end
8

9
    def index_file(file_path, flags = '')
1✔
10
      # nosemgrep
11
      stdout, stderr, status = Open3.capture3("RUBY_YJIT_ENABLE=yes traject #{flags} -c marc_to_solr/lib/traject_config.rb #{file_path} -u #{solr_url} -w Traject::PulSolrJsonWriter")
34✔
12
      if stderr.include?('FATAL') && !status.success?
34✔
13
        Rails.logger.error(stderr)
2✔
14
        raise "Traject indexing failed for #{file_path}: #{stderr}"
2✔
15
      else
16
        Rails.logger.info("Successfully indexed file #{file_path}")
32✔
17
      end
18
    end
19

20
    def index_file_debug(file_path, flags = '')
1✔
NEW
21
      index_file file_path, "--debug-mode #{flags}"
×
22
    end
23
  end
24
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