uc3-dmp-id 0.0.57 → 0.0.58
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/updater.rb +2 -7
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89e288b9f1ca8dbbdc9696732303aa480fcfa003a3cbb9bdb398abf736fb146f
|
4
|
+
data.tar.gz: 8a96ebca3f45a06f498b2a2af3fa9a5f0831dff5e5c48049b64109308a0c8b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e601be486758f86c56e430ef1d3b154c34f775b0b8ae345e78eb37e8ef8976532ce885fa403b51d0e91d4cdd080bf06be388bade02e465cd2526a4a4ade2525
|
7
|
+
data.tar.gz: cc2b2a727c0fe43df07931072df6a95a0aff7b32bed1dc9924a27d3e24a8977111d212c532028d1b2724200bcd482052c936235e0ab8443576c95101c15eb4e2
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -49,14 +49,12 @@ module Uc3DmpId
|
|
49
49
|
# Don't continue if nothing has changed!
|
50
50
|
raise UpdaterError, MSG_DMP_NOT_FOUND if dmp.nil?
|
51
51
|
|
52
|
-
puts "Found DMP:"
|
53
|
-
puts dmp
|
54
|
-
|
55
52
|
errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp['dmp'])
|
56
53
|
raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
|
57
54
|
|
58
55
|
# Add the DMPHub specific attributes
|
59
|
-
|
56
|
+
owner_org = dmp['dmp']['dmphub_owner_org']
|
57
|
+
annotated = Helper.annotate_dmp_json(provenance: provenance, owner_org: owner_org, p_key: p_key, json: dmp['dmp'])
|
60
58
|
annotated['dmproadmap_related_identifiers'] = [] if annotated['dmproadmap_related_identifiers'].nil?
|
61
59
|
annotated << { descriptor: 'is_metadata_for', work_type: 'output_management_plan', type: 'url', identifier: url }
|
62
60
|
|
@@ -78,9 +76,6 @@ puts annotated
|
|
78
76
|
errs = Validator.validate(mode: 'author', json: json)
|
79
77
|
return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
|
80
78
|
|
81
|
-
puts "Prov: #{provenance['PK']}, PK IN: #{p_key}, DMP ID: #{json.fetch('dmp_id', {})['identifier']}, PK: #{json['PK']}"
|
82
|
-
puts "Processed DMP ID: '#{Helper.dmp_id_to_pk(json: dmp_id)}' == '#{p_key}'"
|
83
|
-
|
84
79
|
# Fail if the provenance is not defined
|
85
80
|
return [MSG_DMP_FORBIDDEN] unless provenance.is_a?(Hash) && !provenance['PK'].nil?
|
86
81
|
|
data/lib/uc3-dmp-id/version.rb
CHANGED