uc3-dmp-id 0.0.65 → 0.0.66

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: 69ff32208dd9d65b179b6caaf8cb91e7b346733cb487913f7d25b7126fb8a7cd
4
- data.tar.gz: d8252a3ee862afc836c4c724f5a64a23287dc35b49d44d0b65bba9fe730d6725
3
+ metadata.gz: b2d9a4bba715adc0eb2b0101d9484d8a57ea7f3643a3cd63088191fa82da5157
4
+ data.tar.gz: b42b00fa9a0bfae9c4f69539ebb612f9c2ab063fe20b1d96987a62cbe35cae60
5
5
  SHA512:
6
- metadata.gz: 90b610e9567a9cb0d08c5e40cc3909964c868cfec58ffe963c598cf187e715259114a719019c616099ebe243714d29de3b99f52e9e5a701bd900f410fcf923a9
7
- data.tar.gz: 134f3d56152ef9b2db4e01bdd79a9ac458a5ee4bde3cc23121148e6be26b3403e38a11b4cf4a4d27ae80a246d9ba8e5601aadb5edb1d97344dca50452c5af9e3
6
+ metadata.gz: aba3791e3f85c77c3b1fce370e8d4c62e441148c2ea399074ad794505165fb9475488b552001f29613eaf5540e300a3271fe66b83af55bb6410679526828906b
7
+ data.tar.gz: e5d2470504ff9dbc2d9c61552c69a20229de6ae29d32361df1cf197b4ca97252bfb2d353c3126f42ab2a9b5f601e18a39ef1d6b4ccb6949caa1b2cfdeb7dcdb5
@@ -140,8 +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
- orgs = dmp.fetch('contributor').map do { |contributor| contributor.fetch('contact_id', {})['identifier'] }
144
- orgs.first
143
+ dmp.fetch('contributor', []).map do { |contributor| contributor.fetch('contact_id', {})['identifier'] }.first
145
144
  end
146
145
 
147
146
  # Extract the Contact's affiliaiton ROR ID
@@ -152,7 +151,7 @@ module Uc3DmpId
152
151
  owner_org = dmp.fetch('contact', {}).fetch('dmproadmap_affiliation', {}).fetch('affiliation_id', {})['identifier']
153
152
  return owner_org unless owner_org.nil?
154
153
 
155
- orgs = dmp.fetch('contributor').map do |contributor|
154
+ orgs = dmp.fetch('contributor', []).map do |contributor|
156
155
  contributor.fetch('dmproadmap_affiliation', {}).fetch('affiliation_id', {})['identifier']
157
156
  end
158
157
  orgs.compact.max_by { |i| orgs.count(i) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.65'
4
+ VERSION = '0.0.66'
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.65
4
+ version: 0.0.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley