uc3-dmp-id 0.0.85 → 0.0.87
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 -4
- 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: 5157b046943c0704a73d9b1c203dd7f88489a31c22dc0711f857b8b1c2320290
|
4
|
+
data.tar.gz: 7d0d5d498654e4203b37537c760f61c20bc0647ba785193fc253b745cfd21287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3030a6a421a5e5e1e461b5861cc802e6f3851a0759c6783fac640978a6af755cad965728a7e5b77ca6f31d17e7069e087a2fb6ea7563a10ed3f49a036911c3c6
|
7
|
+
data.tar.gz: 0a41e25fc8b3f9eff0d19620de10a953e0c062472508b3f048d7796dd7ed4d6f91458907f3ee16417d55bca2f9c2a77ae5732a820260f5e5cd883ab3f381f320
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -16,7 +16,7 @@ module Uc3DmpId
|
|
16
16
|
p_key = Helper.append_pk_prefix(p_key: p_key)
|
17
17
|
|
18
18
|
# Add the DMPHub specific attributes
|
19
|
-
annotated = Helper.
|
19
|
+
annotated = Helper.annotate_dmp_json(provenance: provenance, p_key: p_key, json: dmp['dmp'])
|
20
20
|
|
21
21
|
puts 'Annotated:'
|
22
22
|
puts annotated
|
@@ -28,7 +28,7 @@ puts annotated
|
|
28
28
|
puts 'EXISTING:'
|
29
29
|
puts existing
|
30
30
|
|
31
|
-
errs = _updateable?(provenance: provenance, p_key: p_key, json:
|
31
|
+
errs = _updateable?(provenance: provenance, p_key: p_key, json: annotated)
|
32
32
|
raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
|
33
33
|
# Don't continue if nothing has changed!
|
34
34
|
raise UpdaterError, MSG_NO_CHANGE if Helper.eql?(dmp_a: existing, dmp_b: annotated)
|
@@ -93,8 +93,6 @@ puts "Provenance: #{provenance['PK']}, DMP_ID to PK #{Helper.dmp_id_to_pk(json:
|
|
93
93
|
# Verify that the JSON is for the same DMP in the PK
|
94
94
|
dmp_id = json['dmp'].fetch('dmp_id', {})
|
95
95
|
return [MSG_DMP_FORBIDDEN] unless Helper.dmp_id_to_pk(json: dmp_id) == p_key
|
96
|
-
# Make sure they're not trying to update a historical copy of the DMP
|
97
|
-
return [MSG_DMP_NO_HISTORICALS] if json['SK'] != Helper::DMP_LATEST_VERSION
|
98
96
|
end
|
99
97
|
|
100
98
|
# Once the DMP has been updated, we need to register it's DMP ID and download any PDF if applicable
|
data/lib/uc3-dmp-id/version.rb
CHANGED