uc3-dmp-id 0.0.66 → 0.0.68

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2d9a4bba715adc0eb2b0101d9484d8a57ea7f3643a3cd63088191fa82da5157
4
- data.tar.gz: b42b00fa9a0bfae9c4f69539ebb612f9c2ab063fe20b1d96987a62cbe35cae60
3
+ metadata.gz: b94c8ef3d724aa5d75d88a1f58f8180c8aa9021b11b56c7f431ce0c68a250aaa
4
+ data.tar.gz: 160e795437ca56d665d5c1a67b515c191a976954c4132198fd8ae5c402e771cd
5
5
  SHA512:
6
- metadata.gz: aba3791e3f85c77c3b1fce370e8d4c62e441148c2ea399074ad794505165fb9475488b552001f29613eaf5540e300a3271fe66b83af55bb6410679526828906b
7
- data.tar.gz: e5d2470504ff9dbc2d9c61552c69a20229de6ae29d32361df1cf197b4ca97252bfb2d353c3126f42ab2a9b5f601e18a39ef1d6b4ccb6949caa1b2cfdeb7dcdb5
6
+ metadata.gz: 6f7052975061b7d34e12ef319c9581b0738f8525f7fe8fead743ebc0546d21e01078435f31d9907363aa5539b7a33fd03c8f85a34c1d02246feebaa977e41ae1
7
+ data.tar.gz: e1b9537db7d56889619d9bb2feca761aac0441822203a3507effa36f35510a2c2a2b819a277895fd2703baa1308ee4adb2788a902782fb3909489d4e5e058ebe
@@ -11,7 +11,7 @@ module Uc3DmpId
11
11
  MSG_UNABLE_TO_MINT = 'Unable to mint a unique DMP ID.'
12
12
 
13
13
  class << self
14
- def create(provenance:, owner_org:, json:, debug: false)
14
+ def create(provenance:, json:, debug: false)
15
15
  raise CreatorError, MSG_NO_SHOULDER if ENV['DMP_ID_SHOULDER'].nil?
16
16
  raise CreatorError, MSG_NO_BASE_URL if ENV['DMP_ID_BASE_URL'].nil?
17
17
 
@@ -24,8 +24,7 @@ module Uc3DmpId
24
24
  raise CreatorError, errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
25
25
 
26
26
  # Fail if the provenance or owner affiliation are not defined
27
- raise CreatorError, MSG_NO_PROVENANCE_OWNER if provenance.nil? || owner_org.nil?
28
- raise CreatorError, MSG_NO_OWNER_ORG unless owner_org.is_a?(String) && !owner_org.strip.empty?
27
+ raise CreatorError, MSG_NO_PROVENANCE_OWNER if provenance.nil?
29
28
 
30
29
  # TODO: Swap this out with the Finder search once the Dynamo indexes are working
31
30
  # Try to find it first and Fail if found
@@ -140,7 +140,7 @@ module Uc3DmpId
140
140
  dmp = json['dmp'].nil? ? json : json['dmp']
141
141
  owner_org = dmp.fetch('contact', {}).fetch('contact_id', {})['identifier']
142
142
 
143
- dmp.fetch('contributor', []).map do { |contributor| contributor.fetch('contact_id', {})['identifier'] }.first
143
+ dmp.fetch('contributor', []).map { |contributor| contributor.fetch('contact_id', {})['identifier'] }.first
144
144
  end
145
145
 
146
146
  # Extract the Contact's affiliaiton ROR ID
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.66'
4
+ VERSION = '0.0.68'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.66
4
+ version: 0.0.68
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley