uc3-dmp-id 0.1.40 → 0.1.42
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 +6 -5
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 695e328f070a7c67f18304d29b91bd6eb02b4e4b8837920251992a8d4fb9f45e
|
4
|
+
data.tar.gz: 4b56c89bdac914e542632609197eeae093cf3044bbe042022fc854099fc4a7ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73df59ca0477908042b4856e133722141a1c34b6e5827e32984adcbce1b5073dd1a6aa2403c77386ec4cdfaecf5c9e7199fe0fa8b5980ffe21dd3961aade44a5
|
7
|
+
data.tar.gz: e3e1b86005ae9df9c6cf6e1438964fb6f4e0df1639ecec99d6568c7ffcee92767fd076a8b78900f1af941dbe776011f0904bed4aa2713ce55e316573c95081e5
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -87,18 +87,19 @@ module Uc3DmpId
|
|
87
87
|
raise UpdaterError, Helper::MSG_DMP_FORBIDDEN unless provenance.is_a?(Hash) && !provenance['PK'].nil? &&
|
88
88
|
provenance['PK'] == dmp['dmp']['dmphub_provenance_id']
|
89
89
|
|
90
|
+
logger&.debug(message: "DMP Prior to narrative attachment", details: dmp)
|
91
|
+
|
90
92
|
# Add the download URl for the PDF as a related identifier on the DMP ID record
|
91
|
-
|
92
|
-
|
93
|
-
annotated['dmproadmap_related_identifiers'] << JSON.parse({
|
93
|
+
dmp['dmproadmap_related_identifiers'] = [] if dmp['dmproadmap_related_identifiers'].nil?
|
94
|
+
dmp['dmproadmap_related_identifiers'] << JSON.parse({
|
94
95
|
descriptor: 'is_metadata_for', work_type: 'output_management_plan', type: 'url', identifier: url
|
95
96
|
}.to_json)
|
96
97
|
|
97
98
|
# Save the changes without creating a new version!
|
98
|
-
resp = client.put_item(json:
|
99
|
+
resp = client.put_item(json: dmp, logger:)
|
99
100
|
raise UpdaterError, Helper::MSG_DMP_UNABLE_TO_VERSION if resp.nil?
|
100
101
|
|
101
|
-
logger
|
102
|
+
logger&.debug(message: "Added DMP ID narrative for PK: #{p_key}, Narrative: #{url}", details: dmp)
|
102
103
|
true
|
103
104
|
end
|
104
105
|
# rubocop:enable Metrics/AbcSize
|
data/lib/uc3-dmp-id/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05
|
11
|
+
date: 2024-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|