uc3-dmp-id 0.1.44 → 0.1.46

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: 63803c8aabd262a7357675e4880942f3348a695fbdfbf58fd3aa388338a628eb
4
- data.tar.gz: be773b2721b562d535c421c40ae1a8a5269db6d82a30972b50bf4111f1508dbb
3
+ metadata.gz: '0797fef8b7ad115c55bcb7d094cde92501a7dbae0be7aee717e8667de6dafbda'
4
+ data.tar.gz: 477a4dff24dbbc996e46839cfef1bcebaf939107bff88f7dc81a2ec07bcded24
5
5
  SHA512:
6
- metadata.gz: edd0735cda459672643482cbab54413fc8e65afda95b9390e0d194c5b97721040e849f2d8ae2ddf8fbe8df96f63148ded1ea47c594ecc9b69bb16bcb113013e7
7
- data.tar.gz: 0614471fb7c7b39b10a3f94f90f419279efb90e1854ec1e182ece01e0c676e11cc4d0985fe8c579809729008104612ff1702cc67285d2540994d2f5de9d22f9d
6
+ metadata.gz: 25c7c648411b5c060885e1a5675c8ee5d9f31f6d62c36bf253f34db140259c9f3e0f50b36232805bd34fee21feec10aa6cc21ed474f4b689ef5cde597ea7416c
7
+ data.tar.gz: a333bc778904f1658e7863d32b9239b01e647a4db8fb8a7c8251f8525515a463b6df5e38c4d37ca56912ec681edf5c1802428d85770fec7bb0dcfc3673892ac9
@@ -89,10 +89,10 @@ module Uc3DmpId
89
89
  )
90
90
  raise UpdaterError, Helper::MSG_DMP_INVALID_DMP_ID unless resp.is_a?(Hash)
91
91
 
92
- dmp = resp['dmp'].nil? ? JSON.parse({ dmp: resp }.to_json) : resp
92
+ dmp = resp['dmp'].nil? ? resp : resp['dmp']
93
93
  logger.info(message: 'Existing latest record', details: dmp) if logger.respond_to?(:debug)
94
94
  raise UpdaterError, Helper::MSG_DMP_FORBIDDEN unless provenance.is_a?(Hash) && !provenance['PK'].nil? &&
95
- provenance['PK'] == dmp['dmp']['dmphub_provenance_id']
95
+ provenance['PK'] == dmp['dmphub_provenance_id']
96
96
 
97
97
  logger&.debug(message: "DMP Prior to narrative attachment", details: dmp)
98
98
 
@@ -103,10 +103,11 @@ module Uc3DmpId
103
103
  }.to_json)
104
104
 
105
105
  # Save the changes without creating a new version!
106
+ logger&.debug(message: "DMP After narrative attachment", details: dmp)
106
107
  resp = client.put_item(json: dmp, logger:)
107
108
  raise UpdaterError, Helper::MSG_DMP_UNABLE_TO_VERSION if resp.nil?
108
109
 
109
- logger&.debug(message: "Added DMP ID narrative for PK: #{p_key}, Narrative: #{url}", details: dmp)
110
+ logger&.debug(message: "Added DMP ID narrative for PK: #{p_key}, Narrative: #{url}")
110
111
  true
111
112
  end
112
113
  # rubocop:enable Metrics/AbcSize
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.44'
4
+ VERSION = '0.1.46'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.44
4
+ version: 0.1.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley