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

pulibrary / orcid_princeton_hanami / ba7c53c4-899d-4640-b611-b5e0cc149e14

25 Jun 2025 05:42PM UTC coverage: 96.46% (+1.1%) from 95.37%
ba7c53c4-899d-4640-b611-b5e0cc149e14

push

circleci

web-flow
Merge pull request #5 from pulibrary/health-page

Adding the health page with the ORCID API Status

118 of 119 new or added lines in 11 files covered. (99.16%)

436 of 452 relevant lines covered (96.46%)

1.71 hits per line

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

90.91
/app/views/health/status.rb
1
# frozen_string_literal: true
2

3
module OrcidPrinceton
1✔
4
  module Views
1✔
5
    module Health
1✔
6
      # combines all the dependencies statuses into a single JSON object
7
      class Status < OrcidPrinceton::View
1✔
8
        include Deps['operations.orcid_api_status']
1✔
9

10
        expose :current_status do
1✔
11
          json_status
2✔
12
        end
13

14
        def json_status
1✔
15
          case orcid_api_status.call
4✔
16
          in Dry::Monads::Result::Success(orcid_status)
17
            { status: 'OK', results: [{ name: 'ORCID', message: '', status: 'OK' }] }
4✔
18
          in Dry::Monads::Result::Failure[:invalid, error]
NEW
19
            { status: 'ERROR', results: [{ name: 'ORCID', message: error, status: 'ERROR' }] }
×
20
          end
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