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

pulibrary / allsearch_api / 2edd1296-888c-4592-8789-a3202a060f6a

14 Oct 2025 05:48PM UTC coverage: 99.9% (+0.6%) from 99.32%
2edd1296-888c-4592-8789-a3202a060f6a

push

circleci

web-flow
Merge pull request #398 from pulibrary/replace-all-controllers

Replace all of our Rails controllers with Rack applications

12 of 12 new or added lines in 6 files covered. (100.0%)

116 existing lines in 19 files now uncovered.

995 of 996 relevant lines covered (99.9%)

115.81 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
  attr_reader :query_terms, :service_response
3✔
8

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

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

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

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

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