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

pulibrary / allsearch_api / aa1cbf92-a6e7-4ca9-bad6-dfcce6f1afbc

01 Aug 2025 03:44PM UTC coverage: 99.514%. Remained the same
aa1cbf92-a6e7-4ca9-bad6-dfcce6f1afbc

push

circleci

sandbergja
Explicitly include Rake in Gemfile

When we deployed, it gave various errors:
* can't find executable rake for gem rake.
* cannot load such file -- net/ssh/proxy/command (LoadError)
* cannot load such file -- net/scp (LoadError)

This commit explicitly includes rake, net-scp, and net-ssh in the Gemfile
to see if it resolves the issue.

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_database.rb
1
# frozen_string_literal: true
2

3
# This class is responsible for translating LibraryDatabaseRecords, originally from LibGuides,
4
# into an API response
5
class LibraryDatabase
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
24✔
11
    @service_response = library_database_service_response
24✔
12
  end
13

14
  def library_database_service_response
3✔
15
    LibraryDatabaseRecord.query(unescaped_terms)
27✔
16
  end
17

18
  def unescaped_terms
3✔
19
    @unescaped_terms ||= URI::DEFAULT_PARSER.unescape(query_terms)
68✔
20
  end
21

22
  # The libguides search does not treat accented characters consistently
23
  # Always use the unaccented version for the "more_link"
24
  def transliterated_escaped_terms
3✔
25
    URI::DEFAULT_PARSER.escape(Normalizer.new(unescaped_terms).without_diacritics)
41✔
26
  end
27

28
  def number
3✔
29
    service_response.count
19✔
30
  end
31

32
  def more_link
3✔
33
    URI::HTTPS.build(host: 'libguides.princeton.edu', path: '/az/databases',
41✔
34
                     query: "q=#{transliterated_escaped_terms}")
35
  end
36

37
  def documents
3✔
38
    service_response.first(3)
19✔
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