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

pulibrary / orangelight / 0e37073d-109c-440c-949f-49d2aa86311b

18 Aug 2025 09:05PM UTC coverage: 0.482% (-94.9%) from 95.343%
0e37073d-109c-440c-949f-49d2aa86311b

push

circleci

web-flow
Replace per_page_options_for_select with custom component to avoid deprecation issue (#5186)

* Start creating new component to address deprecaton warning

* Replace per_page_options_for_select with custom component to avoid deprecation issue

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

---------

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

0 of 33 new or added lines in 1 file covered. (0.0%)

9374 existing lines in 213 files now uncovered.

47 of 9753 relevant lines covered (0.48%)

0.01 hits per line

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

0.0
/lib/orangelight/illiad_account.rb
1
# frozen_string_literal: true
2

UNCOV
3
require 'faraday'
×
UNCOV
4
require 'faraday-cookie_jar'
×
UNCOV
5
module Orangelight
×
UNCOV
6
  class IlliadAccount
×
UNCOV
7
    def initialize(patron)
×
UNCOV
8
      @patron = patron
×
UNCOV
9
      @barcode = patron['barcode']
×
UNCOV
10
      @last_name = patron['last_name']
×
UNCOV
11
      @patron_id = patron['patron_id']
×
UNCOV
12
      @netid = patron['netid']
×
UNCOV
13
      @illiad_api_key = Requests.config["illiad_api_key"]
×
UNCOV
14
      @illiad_api_base = Requests.config["illiad_api_base"]
×
UNCOV
15
    end
×
16

UNCOV
17
    def verify_user?
×
UNCOV
18
      return false if illiad_patron_response == false
×
19

UNCOV
20
      illiad_patron_response&.success?
×
UNCOV
21
    end
×
22

UNCOV
23
    def illiad_patron_response
×
UNCOV
24
      @illiad_patron_response ||= begin
×
UNCOV
25
        url = "/ILLiadWebPlatform/Users/#{netid}"
×
UNCOV
26
        Rails.logger.debug { "Illiad Get #{@illiad_api_base}/#{url}" }
×
UNCOV
27
        response = conn.get do |req|
×
UNCOV
28
          req.url url
×
UNCOV
29
          req.headers['Accept'] = 'application/json'
×
UNCOV
30
          req.headers['ApiKey'] = @illiad_api_key
×
UNCOV
31
        end
×
UNCOV
32
        Rails.logger.debug { "Illiad Get Response #{@illiad_api_base}/#{url} #{response.status} #{response.body}" }
×
UNCOV
33
        response
×
UNCOV
34
      end
×
UNCOV
35
    rescue Faraday::ConnectionFailed
×
UNCOV
36
      Rails.logger.warn("Unable to Connect to #{@illiad_api_base}")
×
UNCOV
37
      false
×
UNCOV
38
    end
×
39

UNCOV
40
    private
×
41

UNCOV
42
      attr_reader :patron, :netid
×
43

UNCOV
44
      def conn
×
UNCOV
45
        @conn ||= IlliadPatronClient.new(patron).conn
×
UNCOV
46
      end
×
UNCOV
47
  end
×
UNCOV
48
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