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

pulibrary / orcid_princeton_hanami / fc91ec04-17e3-41a9-ab4b-9c4c1cc2d9bb

25 Jul 2025 05:17PM UTC coverage: 96.539% (-3.5%) from 100.0%
fc91ec04-17e3-41a9-ab4b-9c4c1cc2d9bb

push

circleci

carolyncole
Orcid url for the sandbox

1 of 1 new or added line in 1 file covered. (100.0%)

19 existing lines in 4 files now uncovered.

530 of 549 relevant lines covered (96.54%)

8.44 hits per line

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

93.33
/app/actions/orcid/create.rb
1
# frozen_string_literal: true
2

3
module OrcidPrinceton
1✔
4
  module Actions
1✔
5
    module Orcid
1✔
6
      # Callback action for creating ORCID token records in the system
7
      class Create < OrcidPrinceton::Action
1✔
8
        include Deps['repos.user_repo']
1✔
9
        include Deps['repos.token_repo']
1✔
10

11
        before :require_authentication # make sure there is a user logged in before serving the report
1✔
12

13
        def handle(request, response)
1✔
14
          omniauth = request.env['omniauth.auth']
1✔
15
          current_user = response[:current_user]
1✔
16
          user_attributes = current_user.attributes
1✔
17
          user_attributes[:orcid] = omniauth.uid
1✔
18
          current_user = user_repo.update(current_user.id, user_attributes)
1✔
19
          token_repo.create_from_omniauth(omniauth.credentials, current_user)
1✔
UNCOV
20
          response.redirect_to routes.path(:user, id: current_user.id)
×
21
        end
22
      end
23
    end
24
  end
25
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