• 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/concerns/requests/aeon.rb
1
# frozen_string_literal: true
UNCOV
2
module Requests
×
UNCOV
3
  module Aeon
×
4
    # for Aeon Related Bibliographic Helpers
UNCOV
5
    extend ActiveSupport::Concern
×
6

UNCOV
7
    def aeon_mapped_params
×
UNCOV
8
      params = {
×
UNCOV
9
        Action: '10',
×
UNCOV
10
        Form: '21',
×
UNCOV
11
        ItemTitle: aeon_title.truncate(247),
×
UNCOV
12
        ItemAuthor: author,
×
UNCOV
13
        ItemDate: pub_date,
×
UNCOV
14
        ItemVolume: item_volume
×
UNCOV
15
      }
×
UNCOV
16
      params[:ItemNumber] = item[:barcode] if barcode?
×
UNCOV
17
      params.merge! aeon_basic_params
×
UNCOV
18
      params.reject { |_k, v| v.nil? }
×
UNCOV
19
    end
×
20

21
    ## params shared by both alma and non-alma aeon requests
UNCOV
22
    def aeon_basic_params
×
UNCOV
23
      {
×
UNCOV
24
        ReferenceNumber: bib[:id],
×
UNCOV
25
        CallNumber: call_number,
×
UNCOV
26
        Site: site,
×
UNCOV
27
        Location: shelf_location_code,
×
UNCOV
28
        SubLocation: sub_location,
×
UNCOV
29
        ItemInfo1: bib[:access_restrictions_note_display]&.first || I18n.t("requests.aeon.access_statement")
×
UNCOV
30
      }.compact
×
UNCOV
31
    end
×
32

UNCOV
33
    def aeon_request_url
×
UNCOV
34
      AeonUrl.new(document: bib, holding: holding.to_h, item:).to_s
×
UNCOV
35
    end
×
36

UNCOV
37
    def site
×
UNCOV
38
      if location[:holding_library].present?
×
UNCOV
39
        holding_location_to_site(location['holding_library']['code'])
×
UNCOV
40
      elsif location['library']['code'] == 'eastasian' && aeon_location?
×
41
        'EAL'
×
UNCOV
42
      elsif location['library']['code'] == 'marquand'  && aeon_location?
×
43
        'MARQ'
×
UNCOV
44
      elsif location['library']['code'] == 'mudd'
×
UNCOV
45
        'MUDD'
×
UNCOV
46
      else
×
UNCOV
47
        "FIRE"
×
UNCOV
48
      end
×
UNCOV
49
    end
×
50

UNCOV
51
    private
×
52

UNCOV
53
      def holding_location_to_site(location_code)
×
UNCOV
54
        if  location_code == 'eastasian' && aeon_location?
×
55
          'EAL'
×
UNCOV
56
        elsif location_code == 'marquand' && aeon_location?
×
UNCOV
57
          'MARQ'
×
UNCOV
58
        elsif location_code == 'mudd' && aeon_location?
×
59
          'MUDD'
×
UNCOV
60
        else
×
UNCOV
61
          'FIRE'
×
UNCOV
62
        end
×
UNCOV
63
      end
×
64

UNCOV
65
      def aeon_location?
×
UNCOV
66
        location['aeon_location'] == true
×
UNCOV
67
      end
×
68

UNCOV
69
      def call_number
×
UNCOV
70
        holding.holding_data['call_number']
×
UNCOV
71
      end
×
72

UNCOV
73
      def pub_date
×
UNCOV
74
        bib[:pub_date_start_sort]
×
UNCOV
75
      end
×
76

UNCOV
77
      def shelf_location_code
×
UNCOV
78
        holding.holding_data['location_code']
×
UNCOV
79
      end
×
80

UNCOV
81
      def item_volume
×
UNCOV
82
        item.description if item.present? && enumerated?
×
UNCOV
83
      end
×
84

UNCOV
85
      def sub_location
×
UNCOV
86
        holding.holding_data['sub_location']&.first
×
UNCOV
87
      end
×
88

UNCOV
89
      def aeon_title
×
UNCOV
90
        "#{bib[:title_display]}#{genre}"
×
UNCOV
91
      end
×
92

93
      ## Don T requested this be appended when present
UNCOV
94
      def genre
×
UNCOV
95
        " [ #{bib[:form_genre_display].first} ]" unless bib[:form_genre_display].nil?
×
UNCOV
96
      end
×
97

UNCOV
98
      def author
×
UNCOV
99
        bib[:author_display]&.join(" AND ")
×
UNCOV
100
      end
×
UNCOV
101
  end
×
UNCOV
102
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