uc3-dmp-id 0.0.57 → 0.0.59

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: 11de25d7e0745bdf275b6376dcffa9a5d77edff86e50c8e518d70019b403ee91
4
- data.tar.gz: d571d63e40edb7941f3d3e4eef76476ce2dd6dae62f600de8ca1e0ed15d7f5b6
3
+ metadata.gz: a7f1d4153e4af1ce9ef49c831f2c65d995e177100def3bfc473c10e25647cbf4
4
+ data.tar.gz: 18d148667df1d518ed423d087d9732c28142691a77ecb74a42e54de2ad544615
5
5
  SHA512:
6
- metadata.gz: 1d94e13789f31d6681b40028137001d8747627369728c57faa6b14d155ce0187ffe630f4184ef9ab98ad39f568485045cd53cd9e811cfc90bef89df68c56b454
7
- data.tar.gz: 7cb53f7d0e216940652f030f0f615409ddada0492c87eb4ffea793162a68876e04d2a5913b2036aa85e7d5c03e975478905797d5aa49c9cdb0db60b76eadca46
6
+ metadata.gz: f698bfcb7fff04d14481a5a7e4e4c500fe76e88bdbfe13f1791111fc0c0bffa26751786d9ee647774fc1c6a1a1b6675daa27d158c32479bdc387500b535a2b47
7
+ data.tar.gz: bc0e02218ed69278a5fa3b3a479b396d8b344505809cd4a4a2938bbe4afde9e1db80ec0776e0bac03dd794d04169b52e8ba078534b00d11ed64b387d2a541503
@@ -49,16 +49,16 @@ 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
- 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'])
60
58
  annotated['dmproadmap_related_identifiers'] = [] if annotated['dmproadmap_related_identifiers'].nil?
61
- annotated << { descriptor: 'is_metadata_for', work_type: 'output_management_plan', type: 'url', identifier: url }
59
+ annotated['dmproadmap_related_identifiers'] << {
60
+ descriptor: 'is_metadata_for', work_type: 'output_management_plan', type: 'url', identifier: url
61
+ }
62
62
 
63
63
  puts "Attached:"
64
64
  puts annotated
@@ -78,9 +78,6 @@ puts annotated
78
78
  errs = Validator.validate(mode: 'author', json: json)
79
79
  return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
80
80
 
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
81
  # Fail if the provenance is not defined
85
82
  return [MSG_DMP_FORBIDDEN] unless provenance.is_a?(Hash) && !provenance['PK'].nil?
86
83
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.57'
4
+ VERSION = '0.0.59'
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.57
4
+ version: 0.0.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley