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

pulibrary / pdc_describe / 4e4e59fc-9df4-4838-9fd4-6c7ea33cdb7c

07 Apr 2025 06:36PM UTC coverage: 1.283% (-94.6%) from 95.862%
4e4e59fc-9df4-4838-9fd4-6c7ea33cdb7c

Pull #1994

circleci

hectorcorrea
Switched to use the autocomplete that we aleady use for ROR. Integrated it with the existing logic for creators
Pull Request #1994: Started adding auto complete to contributors

0 of 46 new or added lines in 2 files covered. (0.0%)

4806 existing lines in 74 files now uncovered.

65 of 5065 relevant lines covered (1.28%)

0.01 hits per line

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

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

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

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

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