uc3-dmp-id 0.0.102 → 0.0.104
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 +10 -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: f281a066200306c56a78470094fe5924fab333221e1bcdd4dcaade896d0e02ff
|
4
|
+
data.tar.gz: fa4b3f82159d32df245267596f3dd9d559f82c4faf07175a712448e2b2d7dd6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a35bccc8f9a1b3a4bd475ba63151c082d5a263594454f0670e5b90800bc525d381e5191054102924c4220303648904d5c11562313360b4638def9b3aea98234e
|
7
|
+
data.tar.gz: ebbbef1978d20fad47c45bb75f1e242e4d583fc8f3107b7370a187679ce77d8adf2679178399ab85339ba1ec2ca6e7026345dd3ebfae0534343feec270ce9b9f
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -33,7 +33,7 @@ module Uc3DmpId
|
|
33
33
|
|
34
34
|
# Version the DMP ID record (if applicable).
|
35
35
|
|
36
|
-
puts "
|
36
|
+
puts "DMPHub PROV: #{latest_version['dmphub_provenance_id']}, DMP BURIED: #{latest_version.fetch('dmp', {})['dmphub_provenance_id']}"
|
37
37
|
|
38
38
|
owner = latest_version['dmphub_provenance_id']
|
39
39
|
updater = provenance['PK']
|
@@ -41,6 +41,10 @@ puts "OWNER: #{owner}, DMPHub PROV: #{latest_version['dmphub_provenance_id']}, D
|
|
41
41
|
logger: logger)
|
42
42
|
raise UpdaterError, MSG_DMP_UNABLE_TO_VERSION if version.nil?
|
43
43
|
|
44
|
+
puts "OWNER AFTER VERSION: #{owner}"
|
45
|
+
puts version
|
46
|
+
|
47
|
+
|
44
48
|
# Splice the assertions
|
45
49
|
version = _process_modifications(owner: owner, updater: updater, version: version, mods: mods, note: note,
|
46
50
|
logger: logger)
|
@@ -106,9 +110,14 @@ puts "OWNER: #{owner}, DMPHub PROV: #{latest_version['dmphub_provenance_id']}, D
|
|
106
110
|
|
107
111
|
puts "OWNER: #{owner}, UPDATER #{updater}, Version is Hash? #{version.is_a?(Hash)}, Mods is Hash? #{mods.is_a?(Hash)}"
|
108
112
|
|
113
|
+
puts "Returning version? #{!mods.is_a?(Hash) || updater.nil?}"
|
114
|
+
puts "Returning mods? #{!version.is_a?(Hash) || owner.nil?}"
|
115
|
+
|
109
116
|
return version unless mods.is_a?(Hash) && !updater.nil?
|
110
117
|
return mods unless version.is_a?(Hash) && !owner.nil?
|
111
118
|
|
119
|
+
puts "Asserting!"
|
120
|
+
|
112
121
|
# Splice together any assertions that may have been made while the user was editing the DMP ID
|
113
122
|
Asserter.splice(latest_version: version, modified_version: mods, logger: logger) if owner == updater
|
114
123
|
# Attach the incoming changes as an assertion to the DMP ID since the updater is NOT the owner
|
data/lib/uc3-dmp-id/version.rb
CHANGED