• 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/controllers/users/omniauth_callbacks_controller.rb
1
# frozen_string_literal: true
2

UNCOV
3
module Users
×
UNCOV
4
  class OmniauthCallbacksController < Devise::OmniauthCallbacksController
×
UNCOV
5
    def cas
×
UNCOV
6
      @user = User.from_cas access_token_in_request_params
×
7

UNCOV
8
      sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated
×
UNCOV
9
      if is_navigational_format?
×
UNCOV
10
        set_flash_message(:notice, :success, kind: 'from Princeton Central Authentication '\
×
UNCOV
11
                                                   'Service')
×
UNCOV
12
      end
×
UNCOV
13
    end
×
14

UNCOV
15
    def alma
×
UNCOV
16
      if Alma::User.authenticate(user_id: ERB::Util.url_encode(alma_params[:username]), password: alma_params[:password])
×
UNCOV
17
        @user ||= User.from_alma(access_token_in_request_params)
×
UNCOV
18
        @user.save
×
UNCOV
19
        sign_in_and_redirect @user, event: :authentication # this will throw if @user not activated
×
UNCOV
20
        set_flash_message(:notice, :success, kind: 'with alma account') if is_navigational_format?
×
UNCOV
21
      else
×
UNCOV
22
        set_flash_message(:error, :failure,
×
UNCOV
23
          reason: 'username or password did not match an alma account')
×
UNCOV
24
        redirect_to user_alma_omniauth_authorize_path(origin: omniauth_origin)
×
UNCOV
25
      end
×
UNCOV
26
    end
×
27

UNCOV
28
    private
×
29

UNCOV
30
      def omniauth_origin
×
UNCOV
31
        request.env['omniauth.origin']
×
UNCOV
32
      end
×
33

34
      # Accesses the access token passed within the request headers
35
      # @return [OmniAuth::AuthHash,nil] the access token
UNCOV
36
      def access_token_in_request_params
×
UNCOV
37
        request.env['omniauth.auth']
×
UNCOV
38
      end
×
39

UNCOV
40
      def alma_params
×
UNCOV
41
        params.permit(:username, :password)
×
UNCOV
42
      end
×
UNCOV
43
  end
×
UNCOV
44
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

© 2026 Coveralls, Inc