uc3-dmp-id 0.0.56 → 0.0.58

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: f1aafa930278b99e50df087691c0bacc305af75bf449b67e64e82e8031e2711d
4
- data.tar.gz: 8f81d11cf31acb8afcea0adb1171b03f8c39f88cb1471125dc34c95f8faedd92
3
+ metadata.gz: 89e288b9f1ca8dbbdc9696732303aa480fcfa003a3cbb9bdb398abf736fb146f
4
+ data.tar.gz: 8a96ebca3f45a06f498b2a2af3fa9a5f0831dff5e5c48049b64109308a0c8b5f
5
5
  SHA512:
6
- metadata.gz: 2145330c697fdc2c9d3ebbd52a9cf4130725c9e9e1a9bab724758198b90e6f9f5c897442c1244d26848fa118269665891aefbc3f696a89a919eb9fcd629b100f
7
- data.tar.gz: d7ba392936d2ab33b810455c4bb1ba530b346e1b618f22d311ec75eb0ab471b038def5ca0fe171d2f28950bab8327d176fd56bcd3e03e2265e3863e89cdbc0a3
6
+ metadata.gz: 5e601be486758f86c56e430ef1d3b154c34f775b0b8ae345e78eb37e8ef8976532ce885fa403b51d0e91d4cdd080bf06be388bade02e465cd2526a4a4ade2525
7
+ data.tar.gz: cc2b2a727c0fe43df07931072df6a95a0aff7b32bed1dc9924a27d3e24a8977111d212c532028d1b2724200bcd482052c936235e0ab8443576c95101c15eb4e2
@@ -49,11 +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
- errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp)
52
+ errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp['dmp'])
53
53
  raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
54
54
 
55
55
  # Add the DMPHub specific attributes
56
- annotated = Helper.annotate_dmp(provenance: provenance, json: dmp['dmp'], p_key: p_key)
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'])
57
58
  annotated['dmproadmap_related_identifiers'] = [] if annotated['dmproadmap_related_identifiers'].nil?
58
59
  annotated << { descriptor: 'is_metadata_for', work_type: 'output_management_plan', type: 'url', identifier: url }
59
60
 
@@ -75,9 +76,6 @@ puts annotated
75
76
  errs = Validator.validate(mode: 'author', json: json)
76
77
  return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
77
78
 
78
- puts "Prov: #{provenance['PK']}, PK IN: #{p_key}, DMP ID: #{json.fetch('dmp_id', {})['identifier']}, PK: #{json['PK']}"
79
- puts "Processed DMP ID: '#{Helper.dmp_id_to_pk(json: dmp_id)}' == '#{p_key}'"
80
-
81
79
  # Fail if the provenance is not defined
82
80
  return [MSG_DMP_FORBIDDEN] unless provenance.is_a?(Hash) && !provenance['PK'].nil?
83
81
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.56'
4
+ VERSION = '0.0.58'
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.56
4
+ version: 0.0.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley