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

pulibrary / orcid_princeton_hanami / 5de34809-9ff7-4539-99f9-19d4f8f7f3dc

25 Jun 2025 03:48PM UTC coverage: 95.536% (+0.2%) from 95.37%
5de34809-9ff7-4539-99f9-19d4f8f7f3dc

Pull #5

circleci

carolyncole
Adding the health page with the ORCID API Status
original code for the OCRID API Status came from https://github.com/pulibrary/orcid_princeton/blob/main/app/models/orcid_api_status.rb
We can no longer leverage https://github.com/lbeder/health-monitor-rails, so I generated a simple action to display the health status
Pull Request #5: Adding the health page with the ORCID API Status

110 of 115 new or added lines in 11 files covered. (95.65%)

428 of 448 relevant lines covered (95.54%)

1.7 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
      class Status < OrcidPrinceton::View
1✔
7
        include Deps["operations.orcid_api_status"]
1✔
8

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

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