uc3-dmp-id 0.0.62 → 0.0.63

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: 8d86231b0d9bbba113c84fca3f8496f7a1d09eb07386b13f3a8082d1b79d9cd5
4
- data.tar.gz: 4c5bdfeda6ad713e7a77e6bb6cc27f5942dc170fe477920a40f42da43ff00f40
3
+ metadata.gz: f83d0a009fdbffc97f8725896fb33492c6444ac2f12d798a5b221f879f4d0d32
4
+ data.tar.gz: 49287ecaa021b356bf48eafbe79135b4dbcc5172b7ddb918d837fdfb8aea0856
5
5
  SHA512:
6
- metadata.gz: 55a11fcf0cae95da912fde23d91b10a4cb0b0aed0fe607bab4a6db267e59030faa1c7d53b40bb9780888646bf530c296c9d9532a5b2ed77ab892af4606579ba2
7
- data.tar.gz: b305efdd75d24efc03ed9a792b7c8b04c3c530618071440c651a65f46f1a60b68d73e01185acbb65f928f4d34dfe35d733ee8ee39ef5af3afc41a23c7ca55b65
6
+ metadata.gz: 318c39772d51a114597438aef45e84d9a627f3132b6ac2d091254fa5e674bc0bc133701829cec11b667e92e367cc07f83e925c5f07cf2332defe7c6e7163eb27
7
+ data.tar.gz: b987744fdbb5aa0dce30538be6d58e68b9b0e00b03de5b58fb817906fdcbed9a5c47f62a49092ec21e736e67dc1d1f5451a13b13136c50f3a08328e24c8b34e6
@@ -47,7 +47,7 @@ module Uc3DmpId
47
47
  raise CreatorError, Uc3DmpId::MSG_DMP_NO_DMP_ID if resp.nil?
48
48
 
49
49
  _post_process(json: annotated, debug: debug)
50
- annotated
50
+ Helper.cleanse_dmp_json(json: annotated)
51
51
  end
52
52
 
53
53
  private
@@ -155,7 +155,7 @@ module Uc3DmpId
155
155
  annotated['SK'] = DMP_LATEST_VERSION
156
156
 
157
157
  # Ensure that the :dmp_id matches the :PK
158
- annotated['dmp_id'] = pk_to_dmp_id(p_key: annotated['PK'])
158
+ annotated['dmp_id'] = pk_to_dmp_id(p_key: remove_pk_prefix(p_key: annotated['PK']))
159
159
 
160
160
  # Update the modification timestamps
161
161
  annotated['dmphub_modification_day'] = Time.now.strftime('%Y-%m-%d')
@@ -182,6 +182,9 @@ module Uc3DmpId
182
182
  def cleanse_dmp_json(json:)
183
183
  return json unless json.is_a?(Hash) || json.is_a?(Array)
184
184
 
185
+ puts "Cleansing DMP JSON:"
186
+ puts json
187
+
185
188
  # If it's an array clean each of the objects individually
186
189
  return json.map { |obj| cleanse_dmp_json(json: obj) }.compact if json.is_a?(Array)
187
190
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.62'
4
+ VERSION = '0.0.63'
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.0.62
4
+ version: 0.0.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley