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

pulibrary / orangelight / 62bad3f1-d46d-40af-822c-403d653da2a8

17 Jun 2025 05:30PM UTC coverage: 0.447% (-94.9%) from 95.337%
62bad3f1-d46d-40af-822c-403d653da2a8

push

circleci

maxkadel
Install chrome & chromedriver for smoke specs

43 of 9610 relevant lines covered (0.45%)

0.01 hits per line

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

0.0
/app/services/stackmap_location_factory.rb
1
# frozen_string_literal: true
2

3
class StackmapLocationFactory
×
4
  # Constructor
5
  # @param resolver_service [Class] API for the resolution service
6
  def initialize(resolver_service:)
×
7
    @resolver_service = resolver_service
×
8
  end
×
9

10
  # Checks to see if provided holding info should resolve to a stackmap url
11
  # @param call_number [String] the call number for the holding
12
  # @param library [String] the library in which the holding is located
13
  # @return [Boolean] Exclude stackmap url if return value is true
14
  def exclude?(call_number:, library:)
×
15
    excluded?(library) || call_number?(call_number, library)
×
16
  end
×
17

18
  private
×
19

20
    # Whether or not a library should exclude a holding from having its location resolved
21
    # @param library [String] the library in which the holding resides
22
    # @return [TrueClass, FalseClass]
23
    def excluded?(library)
×
24
      [
×
25
        'Fine Annex',
×
26
        'Forrestal Annex',
×
27
        'Mudd Manuscript Library',
×
28
        'Online',
×
29
        'Rare Books and Special Collections',
×
30
        'ReCAP',
×
31
        'Marquand Library'
×
32
      ].include?(library)
×
33
    end
×
34

35
    # Exclude the stackmap link for records without call numbers,
36
    # unless they are in Firestone (other locator works without a call number)
37
    def call_number?(call_number, library)
×
38
      call_number.nil? && library != 'Firestone Library'
×
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