uc3-dmp-id 0.0.101 → 0.0.103
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 +4 -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: f8e56bba58989f2a6e008036dc36bc43febb01ef0ac2625c0c87246a710fee52
|
4
|
+
data.tar.gz: 32d1a18e7aa3f8c23c41c1f5ab0e5d10e291e540c27b487180272abf5906532f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aa690c41fc7ed0311f219ef6063499822dbe9d0bd7504f9c422aa814438e62dc8cf7d1947b898f4c086e9f71850b533c03fab6235b9e57cf10bb49e5a3d40e4
|
7
|
+
data.tar.gz: 4ce8052ee0ca147cd008a8610f95eb2dea34e1e33d50ee35f4d4b91d7ad93d8838d54ffa8d1911133d6e79b886ee3261de5bac2df53aa0c30459f5f432cd42b9
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -21,7 +21,7 @@ module Uc3DmpId
|
|
21
21
|
# Fetch the latest version of the DMP ID
|
22
22
|
client = Uc3DmpDynamo::Client.new
|
23
23
|
latest_version = Finder.by_pk(p_key: p_key, client: client, logger: logger, cleanse: false)
|
24
|
-
latest_version = latest_version.nil? ?
|
24
|
+
latest_version = latest_version['dmp'].nil? ? latest_version : latest_version.fetch('dmp', {})
|
25
25
|
logger.debug(message: "Latest version for PK #{p_key}", details: latest_version) if logger.respond_to?(:debug)
|
26
26
|
|
27
27
|
# Verify that the DMP ID is updateable with the info passed in
|
@@ -32,6 +32,9 @@ module Uc3DmpId
|
|
32
32
|
raise UpdaterError, MSG_NO_CHANGE if Helper.eql?(dmp_a: latest_version, dmp_b: mods)
|
33
33
|
|
34
34
|
# Version the DMP ID record (if applicable).
|
35
|
+
|
36
|
+
puts "DMPHub PROV: #{latest_version['dmphub_provenance_id']}, DMP BURIED: #{latest_version.fetch('dmp', {})['dmphub_provenance_id']}"
|
37
|
+
|
35
38
|
owner = latest_version['dmphub_provenance_id']
|
36
39
|
updater = provenance['PK']
|
37
40
|
version = Versioner.generate_version(client: client, latest_version: latest_version, owner: owner, updater: updater,
|
data/lib/uc3-dmp-id/version.rb
CHANGED