uc3-dmp-id 0.0.65 → 0.0.67

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: d4d8cadb560081925dec360c3e5915a3c211f75ca821ce6df00333e5848f30e1
4
+ data.tar.gz: 2338fed516beee598ca8d8e98cd71d22c5d521c1fa9eed3d6e97557d4a6c74b1
5
5
  SHA512:
6
- metadata.gz: 90b610e9567a9cb0d08c5e40cc3909964c868cfec58ffe963c598cf187e715259114a719019c616099ebe243714d29de3b99f52e9e5a701bd900f410fcf923a9
7
- data.tar.gz: 134f3d56152ef9b2db4e01bdd79a9ac458a5ee4bde3cc23121148e6be26b3403e38a11b4cf4a4d27ae80a246d9ba8e5601aadb5edb1d97344dca50452c5af9e3
6
+ metadata.gz: ab2b07a1dae559c3dc8600a8441db376ae6d9badbe6971588a136e60058b7933dee052f71c592d630079703474ece421972530ba69ce2ff92ec85a130ea31639
7
+ data.tar.gz: 7189facf0e52c45617b4c4e2231ffad72e596f088f0694fd7197529351608e6fd7e656000c53641465b2c5c543e461d963674752bc719311c320b108c57b1764
@@ -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 { |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.67'
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.67
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley