• 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

60.0
/app/models/holding_location.rb
1
# frozen_string_literal: true
2

3
class HoldingLocation < ActiveRecord::Base
1✔
4
  include Coded
1✔
5
  include WithLibrary
1✔
6

7
  # TODO: Remove after migrating to non-prefixed tables
8
  self.table_name_prefix = 'locations_'
1✔
9

10
  belongs_to :holding_library, class_name: 'Library', optional: true
1✔
11

12
  has_and_belongs_to_many :delivery_locations, -> { distinct },
1✔
13
                          class_name: 'DeliveryLocation',
14
                          join_table: 'locations_holdings_delivery',
15
                          foreign_key: 'locations_delivery_location_id',
16
                          association_foreign_key: 'locations_holding_location_id'
17

18
  validates :aeon_location, :recap_electronic_delivery_location, :open,
1✔
19
            :requestable, :always_requestable, :circulates, inclusion: { in: [true, false] }
20

21
  after_initialize :associate_non_staff_only_delivery_locations, if: :new_record?
1✔
22
  after_create :set_defaults
1✔
23

24
  private
1✔
25

26
    def set_defaults
1✔
UNCOV
27
      self.aeon_location = false if aeon_location.blank?
×
UNCOV
28
      self.recap_electronic_delivery_location = false if recap_electronic_delivery_location.blank?
×
UNCOV
29
      self.open = true if open.blank?
×
UNCOV
30
      self.requestable = true if requestable.blank?
×
UNCOV
31
      self.always_requestable = false if always_requestable.blank?
×
UNCOV
32
      self.circulates = true if circulates.blank?
×
33
    end
34

35
    def associate_non_staff_only_delivery_locations
1✔
UNCOV
36
      DeliveryLocation.all.reject(&:staff_only?).each do |public_dl|
×
UNCOV
37
        delivery_locations << public_dl
×
38
      end
39
    end
40
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