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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71f7824aeb77ace2a14faf556f4c81a7e055dc47cfd090ccb6258f48d454d4dd
4
- data.tar.gz: b78324f2ef823c9754708844559ac3a315990f217ca2845b8c5e6f667f1a2c2d
3
+ metadata.gz: 695e328f070a7c67f18304d29b91bd6eb02b4e4b8837920251992a8d4fb9f45e
4
+ data.tar.gz: 4b56c89bdac914e542632609197eeae093cf3044bbe042022fc854099fc4a7ec
5
5
  SHA512:
6
- metadata.gz: 7bd3293de14bc2965fd9de7cb36d2998f184291648bac9814d6779c46babee4ae961ad36220a672583d811b38258958c09f3d31c881807db231c285d378e287c
7
- data.tar.gz: 7b0896421ceefe1c096cb3bf452e3fb95887cace2ec9ff433eae8b17699721b592633aeb9695faddc39828010c2ed9ff7c9e47eff95f047bad1d7b64456db7ae
6
+ metadata.gz: 73df59ca0477908042b4856e133722141a1c34b6e5827e32984adcbce1b5073dd1a6aa2403c77386ec4cdfaecf5c9e7199fe0fa8b5980ffe21dd3961aade44a5
7
+ data.tar.gz: e3e1b86005ae9df9c6cf6e1438964fb6f4e0df1639ecec99d6568c7ffcee92767fd076a8b78900f1af941dbe776011f0904bed4aa2713ce55e316573c95081e5
@@ -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
- annotated = Helper.annotate_dmp_json(provenance:, p_key:, json: dmp['dmp'])
92
- annotated['dmproadmap_related_identifiers'] = [] if annotated['dmproadmap_related_identifiers'].nil?
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: annotated, logger:)
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.info(message: "Added DMP ID narrative for PK: #{p_key}, Narrative: #{url}") if logger.respond_to?(:debug)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.40'
4
+ VERSION = '0.1.42'
5
5
  end
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.40
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-29 00:00:00.000000000 Z
11
+ date: 2024-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json