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

pulibrary / allsearch_api / 5a396437-9686-455f-bc17-ac568b0d1e8f

01 Dec 2025 06:12PM UTC coverage: 99.903%. Remained the same
5a396437-9686-455f-bc17-ac568b0d1e8f

Pull #410

circleci

sandbergja
Update rubocop, run automated fixes
Pull Request #410: Update rubocop, run automated fixes

1031 of 1032 relevant lines covered (99.9%)

112.35 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