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

pulibrary / orangelight / 00dbc10b-d747-4ad7-b211-7b26d753abbb

14 Aug 2025 01:25PM UTC coverage: 0.483% (-94.9%) from 95.343%
00dbc10b-d747-4ad7-b211-7b26d753abbb

push

circleci

web-flow
Merge pull request #5181 from pulibrary/dependabot/bundler/activestorage-7.2.2.2

Bump activestorage from 7.2.2.1 to 7.2.2.2

47 of 9721 relevant lines covered (0.48%)

0.01 hits per line

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

0.0
/app/models/requests/holding_group.rb
1
# frozen_string_literal: true
2

3
# This class represents a group of physical holdings that
4
# are grouped together for display
5
class Requests::HoldingGroup
×
6
  include Comparable
×
7

8
  def initialize(group_name:, holdings:)
×
9
    @group_name = group_name
×
10
    @holdings = holdings
×
11
  end
×
12

13
  # rubocop:disable Lint/DuplicateBranch
14
  # :reek:DuplicateMethodCall
15
  def <=>(other)
×
16
    if firestone? && !other.firestone?
×
17
      -1 # Firestone should go first
×
18
    elsif !firestone? && other.firestone?
×
19
      1
×
20
    elsif off_site? && !other.off_site?
×
21
      1 # Off site locations should go last
×
22
    elsif !off_site? && other.off_site?
×
23
      -1
×
24
    else
×
25
      group_name <=> other.group_name
×
26
    end
×
27
  end
×
28
  # rubocop:enable Lint/DuplicateBranch
29

30
  def firestone?
×
31
    group_name.start_with? 'Firestone'
×
32
  end
×
33

34
  def off_site?
×
35
    group_name.start_with?('Annex', 'Forrestal') || group_name.include?('Remote Storage') || group_name.downcase.include?('(off-site)')
×
36
  end
×
37

38
  attr_reader :group_name, :holdings
×
39
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