uc3-dmp-id 0.0.55 → 0.0.57

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: 1d2311f35cbb8b833394919ecad0432d096db0a9b4344f817cdacd62399a97ec
4
- data.tar.gz: 7ecdaf2b92b718d69ff0bc102df2fd366e6f9a2701a92a66c61aeb6e2997381a
3
+ metadata.gz: 11de25d7e0745bdf275b6376dcffa9a5d77edff86e50c8e518d70019b403ee91
4
+ data.tar.gz: d571d63e40edb7941f3d3e4eef76476ce2dd6dae62f600de8ca1e0ed15d7f5b6
5
5
  SHA512:
6
- metadata.gz: 302e438282cc47e54ad94c7f1072c6c3f6bb130881c23f2d8c22bed34f17e6b2eb7919e4f17b137e3adc97963316a9fb0e97c651046362e42ae24781fb2318cd
7
- data.tar.gz: 37c8ee0465b0cd2b398cb40be0aa6b56494a141cacd0161db127d867dd6bb867be5c0b663e5a51cf1eca2803ac3a28dec37ca7a938c5a780f4c48927db4a1e24
6
+ metadata.gz: 1d94e13789f31d6681b40028137001d8747627369728c57faa6b14d155ce0187ffe630f4184ef9ab98ad39f568485045cd53cd9e811cfc90bef89df68c56b454
7
+ data.tar.gz: 7cb53f7d0e216940652f030f0f615409ddada0492c87eb4ffea793162a68876e04d2a5913b2036aa85e7d5c03e975478905797d5aa49c9cdb0db60b76eadca46
@@ -49,7 +49,10 @@ 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
+ puts "Found DMP:"
53
+ puts dmp
54
+
55
+ errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp['dmp'])
53
56
  raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
54
57
 
55
58
  # Add the DMPHub specific attributes
@@ -75,6 +78,9 @@ puts annotated
75
78
  errs = Validator.validate(mode: 'author', json: json)
76
79
  return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
77
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
+
78
84
  # Fail if the provenance is not defined
79
85
  return [MSG_DMP_FORBIDDEN] unless provenance.is_a?(Hash) && !provenance['PK'].nil?
80
86
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.55'
4
+ VERSION = '0.0.57'
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.55
4
+ version: 0.0.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley