• 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
/app/models/requests/alma_patron.rb
1
# frozen_string_literal: true
UNCOV
2
module Requests
×
3
  # Create a Patron from the Alma gem API directly, rather than via Bibdata
UNCOV
4
  class AlmaPatron
×
UNCOV
5
    def initialize(uid:)
×
UNCOV
6
      @uid = uid
×
UNCOV
7
    end
×
8

UNCOV
9
    def patron_hash
×
UNCOV
10
      {
×
UNCOV
11
        last_name:,
×
UNCOV
12
        active_email:,
×
UNCOV
13
        barcode:,
×
UNCOV
14
        barcode_status: 1,
×
UNCOV
15
        netid: "ALMA",
×
UNCOV
16
        university_id: uid,
×
UNCOV
17
        patron_group:
×
UNCOV
18
      }.with_indifferent_access
×
UNCOV
19
    end
×
20

UNCOV
21
    private
×
22

UNCOV
23
      def alma_user
×
UNCOV
24
        @alma_user ||= Alma::User.find(uid)
×
UNCOV
25
      end
×
26

UNCOV
27
      def barcode
×
UNCOV
28
        active_barcode || "ALMA"
×
UNCOV
29
      end
×
30

UNCOV
31
      def active_barcode
×
UNCOV
32
        alma_user["user_identifier"].find do |id|
×
UNCOV
33
          id["id_type"]["value"] == "BARCODE" && id["status"] == "ACTIVE"
×
UNCOV
34
        end["value"]
×
UNCOV
35
      end
×
36

UNCOV
37
      def last_name
×
UNCOV
38
        alma_user.preferred_last_name
×
UNCOV
39
      end
×
40

UNCOV
41
      def active_email
×
UNCOV
42
        alma_user.preferred_email
×
UNCOV
43
      end
×
44

UNCOV
45
      def patron_group
×
UNCOV
46
        alma_user["user_group"]["value"]
×
UNCOV
47
      end
×
48

UNCOV
49
      attr_reader :uid
×
UNCOV
50
  end
×
UNCOV
51
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