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

pulibrary / pdc_describe / b1776731-62d7-41a7-882d-6a5b4760db75

14 May 2024 12:28PM UTC coverage: 79.223% (-16.7%) from 95.9%
b1776731-62d7-41a7-882d-6a5b4760db75

push

circleci

carolyncole
Adding a submission completion page

fixes #1791

9 of 9 new or added lines in 2 files covered. (100.0%)

567 existing lines in 42 files now uncovered.

2692 of 3398 relevant lines covered (79.22%)

60.03 hits per line

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

90.0
/app/models/orcid.rb
1
# frozen_string_literal: true
2
require "ezid-client"
1✔
3

4
class Orcid
1✔
5
  # Notice that we allow for an "X" as the last digit.
6
  # Source https://gist.github.com/asencis/644f174855899b873131c2cabcebeb87
7
  ORCID_REGEX = /^(\d{4}-){3}\d{3}(\d|X)$/
1✔
8

9
  def self.valid?(orcid)
1✔
10
    return false if orcid.blank?
49✔
11
    ORCID_REGEX.match(orcid).to_s == orcid
49✔
12
  end
13

14
  def self.invalid?(orcid)
1✔
15
    !valid?(orcid)
49✔
16
  end
17

18
  def self.url(orcid)
1✔
UNCOV
19
    "https://orcid.org/#{orcid}"
×
20
  end
21
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