uc3-dmp-id 0.0.104 → 0.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/updater.rb +6 -10
- 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: 4e989d8d3d5932bb292a7116d479b6ccaf57611741d0af54e6e31a9177a0a5fa
|
4
|
+
data.tar.gz: 10bef83307a97389e8cb512fb83a6558259f569c4e69225c023c77553060fca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0afbd3c9861c4d26d0b9002c28cea9443522e77300ceb24c80d15812725637508312cbcae33bf355c4386fe9aa51b34ccf4f52275a18e910363e7ff46b77b71b
|
7
|
+
data.tar.gz: 8c79f4ac8d1ed0f44ee13512d006488b52af89983f5835a70fc80e773f8c92311bd66b286a2abba2a4a963dd3fa1891c2258a03a2574e15ea51bc958c3ae8bbe
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -49,6 +49,9 @@ puts version
|
|
49
49
|
version = _process_modifications(owner: owner, updater: updater, version: version, mods: mods, note: note,
|
50
50
|
logger: logger)
|
51
51
|
|
52
|
+
puts "AFTER PROCESING MODS:"
|
53
|
+
puts version
|
54
|
+
|
52
55
|
# Save the changes
|
53
56
|
resp = client.put_item(json: version, logger: logger)
|
54
57
|
raise UpdaterError, MSG_DMP_UNABLE_TO_VERSION if resp.nil?
|
@@ -107,21 +110,14 @@ puts version
|
|
107
110
|
end
|
108
111
|
|
109
112
|
def _process_modifications(owner:, updater:, version:, mods:, note: nil, logger: nil)
|
110
|
-
|
111
|
-
puts "OWNER: #{owner}, UPDATER #{updater}, Version is Hash? #{version.is_a?(Hash)}, Mods is Hash? #{mods.is_a?(Hash)}"
|
112
|
-
|
113
|
-
puts "Returning version? #{!mods.is_a?(Hash) || updater.nil?}"
|
114
|
-
puts "Returning mods? #{!version.is_a?(Hash) || owner.nil?}"
|
115
|
-
|
116
113
|
return version unless mods.is_a?(Hash) && !updater.nil?
|
117
114
|
return mods unless version.is_a?(Hash) && !owner.nil?
|
118
115
|
|
119
|
-
puts "Asserting!"
|
120
|
-
|
121
116
|
# Splice together any assertions that may have been made while the user was editing the DMP ID
|
122
|
-
Asserter.splice(latest_version: version, modified_version: mods, logger: logger) if owner == updater
|
117
|
+
return Asserter.splice(latest_version: version, modified_version: mods, logger: logger) if owner == updater
|
118
|
+
|
123
119
|
# Attach the incoming changes as an assertion to the DMP ID since the updater is NOT the owner
|
124
|
-
Asserter.add(updater: provenance['PK'], dmp: version, mods: mods, note: note, logger: logger)
|
120
|
+
Asserter.add(updater: provenance['PK'], dmp: version, mods: mods, note: note, logger: logger)
|
125
121
|
end
|
126
122
|
|
127
123
|
# Once the DMP has been updated, we need to update it's DOI metadata
|
data/lib/uc3-dmp-id/version.rb
CHANGED