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 +4 -4
- data/lib/uc3-dmp-id/updater.rb +7 -1
- 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: 11de25d7e0745bdf275b6376dcffa9a5d77edff86e50c8e518d70019b403ee91
|
4
|
+
data.tar.gz: d571d63e40edb7941f3d3e4eef76476ce2dd6dae62f600de8ca1e0ed15d7f5b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d94e13789f31d6681b40028137001d8747627369728c57faa6b14d155ce0187ffe630f4184ef9ab98ad39f568485045cd53cd9e811cfc90bef89df68c56b454
|
7
|
+
data.tar.gz: 7cb53f7d0e216940652f030f0f615409ddada0492c87eb4ffea793162a68876e04d2a5913b2036aa85e7d5c03e975478905797d5aa49c9cdb0db60b76eadca46
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/uc3-dmp-id/version.rb
CHANGED