• 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/linked_fields_extractor.rb
1
# This class is responsible for extracting and validating
2
# Alma MMS IDs from the 773 and 774 MARC fields
3
class LinkedFieldsExtractor
1✔
4
  def initialize(record, field_tag)
1✔
UNCOV
5
    @record = record
×
UNCOV
6
    @field_tag = field_tag
×
7
  end
8

9
  def mms_ids
1✔
UNCOV
10
    valid_fields.map { |field| field['w'].delete_prefix('(NjP)') }
×
11
  end
12

13
  private
1✔
14

15
    attr_accessor :record, :field_tag
1✔
16

17
    def valid_fields
1✔
UNCOV
18
      @valid_fields ||= record.fields(field_tag).select do |field|
×
UNCOV
19
        value = field['w']
×
20
        # The regular expression /99[0-9]+6421/ ensures that an mms id is present in a $w
UNCOV
21
        value =~ /99[0-9]+6421/ && value.start_with?(/(\(NjP\))?99/) && value.end_with?('06421')
×
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