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

pulibrary / allsearch_api / 69a58078-7c74-46c7-a70c-36d7ba34ec41

01 Dec 2025 11:31PM UTC coverage: 99.903%. Remained the same
69a58078-7c74-46c7-a70c-36d7ba34ec41

push

circleci

web-flow
Merge pull request #413 from pulibrary/rom-repo

Update ROM-related gems

1035 of 1036 relevant lines covered (99.9%)

108.64 hits per line

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

100.0
/app/models/library_staff.rb
1
# frozen_string_literal: true
2

3
# This class is responsible for translating LibraryStaffRecords
4
# into an API response
5
class LibraryStaff
3✔
6
  include Parsed
3✔
7

8
  attr_reader :query_terms, :service_response
3✔
9

10
  def initialize(query_terms:)
3✔
11
    @query_terms = query_terms
10✔
12
    @service_response = library_staff_service_response
10✔
13
  end
14

15
  def library_staff_service_response
3✔
16
    unescaped_terms = URI::DEFAULT_PARSER.unescape(query_terms)
12✔
17
    LibraryStaffRecord.query(unescaped_terms)
12✔
18
  end
19

20
  def number
3✔
21
    service_response.count
8✔
22
  end
23

24
  def more_link
3✔
25
    URI::HTTPS.build(host: 'library.princeton.edu', path: '/about/staff-directory',
17✔
26
                     query: "combine=#{query_terms}")
27
  end
28

29
  def documents
3✔
30
    service_response.first(3)
8✔
31
  end
32
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