uc3-dmp-id 0.0.96 → 0.0.97
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 +3 -3
- 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: 1b18b3d95b39f2da88fa37724c6fda10a5b52ca9f12c846a931d2437c2d765ba
|
4
|
+
data.tar.gz: bf97c7cd424030c19c720fff5011f9f6605aa375d6c9bf0f962f4ffd10174742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 791986d2bf6e7382ad4f1bf84a7e4c6c7d501609a1dfe4d0d3aec0d3554496a5637231db298a01481ec18f0e1055b82c95158cd203a53a6aecbbf8ba4ddb6109
|
7
|
+
data.tar.gz: f0baea87de3fb99225c98bbce5df28adf9ef32fc90593c32334d5094acf2314ea5c9d01d53088bbf1bc5529cdd9f496061aa8544b40687f7624cdde7991e59a0
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -40,7 +40,7 @@ module Uc3DmpId
|
|
40
40
|
raise UpdaterError, MSG_DMP_UNABLE_TO_VERSION if resp.nil?
|
41
41
|
|
42
42
|
# Send the updates to EZID, notify the provenance and download the PDF if applicable
|
43
|
-
_post_process(json: dmp, logger: logger)
|
43
|
+
_post_process(provenance: provenance, json: dmp, logger: logger)
|
44
44
|
# Return the new version record
|
45
45
|
logger.info(message: "Updated DMP ID: #{p_key}") if logger.respond_to?(:debug)
|
46
46
|
Helper.cleanse_dmp_json(json: JSON.parse({ dmp: new_version }.to_json))
|
@@ -90,11 +90,11 @@ module Uc3DmpId
|
|
90
90
|
|
91
91
|
# Once the DMP has been updated, we need to register it's DMP ID and download any PDF if applicable
|
92
92
|
# -------------------------------------------------------------------------
|
93
|
-
def _post_process(json:, logger: nil)
|
93
|
+
def _post_process(provenance:, json:, logger: nil)
|
94
94
|
return false unless json.is_a?(Hash)
|
95
95
|
|
96
96
|
# Indicate whether or not the updater is the provenance system
|
97
|
-
json['dmphub_updater_is_provenance'] =
|
97
|
+
json['dmphub_updater_is_provenance'] = provenance['PK'] == json['dmphub_provenance_id']
|
98
98
|
# Publish the change to the EventBridge
|
99
99
|
publisher = Uc3DmpEventBridge::Publisher.new
|
100
100
|
publisher.publish(source: 'DmpUpdater', dmp: json, logger: logger)
|
data/lib/uc3-dmp-id/version.rb
CHANGED