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

pulibrary / allsearch_api / 93455990-ca6b-4aa4-bb7b-c77568bb5653

01 Aug 2025 03:42PM UTC coverage: 86.395% (-13.1%) from 99.514%
93455990-ca6b-4aa4-bb7b-c77568bb5653

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)

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

889 of 1029 relevant lines covered (86.39%)

33.24 hits per line

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

88.89
/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
1✔
6
  include Parsed
1✔
7
  attr_reader :query_terms, :service_response
1✔
8

9
  def initialize(query_terms:)
1✔
10
    @query_terms = query_terms
5✔
11
    @service_response = library_database_service_response
5✔
12
  end
13

14
  def library_database_service_response
1✔
15
    LibraryDatabaseRecord.query(unescaped_terms)
8✔
16
  end
17

18
  def unescaped_terms
1✔
19
    @unescaped_terms ||= URI::DEFAULT_PARSER.unescape(query_terms)
11✔
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
1✔
25
    URI::DEFAULT_PARSER.escape(Normalizer.new(unescaped_terms).without_diacritics)
3✔
26
  end
27

28
  def number
1✔
29
    service_response.count
×
30
  end
31

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

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