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

pulibrary / allsearch_api / 687b4f97-c486-48ab-852e-e006b1c694d3

14 Jul 2025 01:49PM UTC coverage: 99.514%. Remained the same
687b4f97-c486-48ab-852e-e006b1c694d3

push

circleci

sandbergja
Remove actionview gem

We don't use it.

1024 of 1029 relevant lines covered (99.51%)

92.23 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✔
10
    @query_terms = query_terms
20✔
11
    @service_response = library_staff_service_response
20✔
12
  end
13

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

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

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

28
  def documents
3✔
29
    service_response.first(3)
18✔
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