• 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

94.74
/app/models/pdc_metadata/affiliation.rb
1
# frozen_string_literal: true
2
# Class for storing an affiliation in our local representation
3
module PDCMetadata
1✔
4
  # value:      "datacite"
5
  # identifier: "https://ror.org/04aj4c181"
6
  # scheme:     "ROR"
7
  # scheme_uri: "https://ror.org/"
8
  class Affiliation
1✔
9
    attr_accessor :value, :identifier, :scheme, :scheme_uri
1✔
10
    def initialize(value: nil, identifier: nil, scheme: nil, scheme_uri: nil)
1✔
11
      @value = value
10✔
12
      @identifier = identifier
10✔
13
      @scheme = scheme
10✔
14
      @scheme_uri = scheme_uri
10✔
15
    end
16

17
    def datacite_attributes
1✔
18
      {
UNCOV
19
        value:,
×
20
        identifier:,
21
        identifier_scheme: scheme,
22
        scheme_uri:
23
      }
24
    end
25

26
    def compare_value
1✔
27
      "[#{scheme}:#{value}(#{scheme_uri})](#{identifier})"
2✔
28
    end
29

30
    def self.new_affiliation(value:, ror: nil)
1✔
31
      scheme = nil
2✔
32
      identifier = nil
2✔
33
      if ror.present?
2✔
34
        scheme = "ROR"
2✔
35
        identifier = ror
2✔
36
      end
37
      new(value:, scheme:, identifier:, scheme_uri: nil)
2✔
38
    end
39
  end
40
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