uc3-dmp-id 0.0.83 → 0.0.84
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 -5
- 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: 7f2e3b8a5707e78a6d60993c8abc1605b5562ec1e2d0979b5d2ae31fff86c410
|
4
|
+
data.tar.gz: ac67878bb4ab3ba29733cc45b0f96b047bd81ac55f15a1b5a642648e017f1c50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11d4c6faf29896ab3f76984bb90acfa00ae399cfcd5f97ac2272d2ef475345ec3453422d67f0cfc6f8c80bc39fb5cc41d1e38ba7c7196da809c21837f9ff2131
|
7
|
+
data.tar.gz: 30dba39ba29e5c9518e208cbfd0afec2ac7fbfc81ccb0d6c2868baf679a21ee34a9dd37a57d589230db02f073705a7ddcb28c2ecc52333d9524e9d2aadd4c624
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -14,11 +14,6 @@ module Uc3DmpId
|
|
14
14
|
|
15
15
|
dmp = Helper.parse_json(json: json)
|
16
16
|
p_key = Helper.append_pk_prefix(p_key: p_key)
|
17
|
-
errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp)
|
18
|
-
|
19
|
-
puts "Updateable? #{errs}"
|
20
|
-
|
21
|
-
raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
|
22
17
|
|
23
18
|
# Add the DMPHub specific attributes
|
24
19
|
annotated = Helper.annotate_dmp(provenance: provenance, json: dmp['dmp'], p_key: p_key)
|
@@ -29,6 +24,8 @@ puts annotated
|
|
29
24
|
# fetch the existing latest version of the DMP ID
|
30
25
|
client = Uc3DmpDynamo::Client.new(debug: debug)
|
31
26
|
existing = Finder.by_pk(p_key: p_key, client: client, debug: debug)
|
27
|
+
errs = _updateable?(provenance: provenance, p_key: p_key, json: existing)
|
28
|
+
raise UpdaterError, errs if errs.is_a?(Array) && errs.any?
|
32
29
|
# Don't continue if nothing has changed!
|
33
30
|
raise UpdaterError, MSG_NO_CHANGE if Helper.eql?(dmp_a: existing, dmp_b: annotated)
|
34
31
|
|
data/lib/uc3-dmp-id/version.rb
CHANGED