uc3-dmp-id 0.0.116 → 0.0.118

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: 20c3e60dfbd5a819f44fe8fd78a09b50345f1fc6b644d9cc7ee7cfea98726a39
4
- data.tar.gz: 1ad1b693ae5cb83072b1a9bc9aacbb3eace45b914de830ca86daa6cf7db4d2e6
3
+ metadata.gz: d8c6957a44305c0672094337dece821e95d6717789f7287964879c5bf1f79899
4
+ data.tar.gz: b370d9a55508323ff2eb8602cdf216d975221cd802594188cdd2f7d1976155a9
5
5
  SHA512:
6
- metadata.gz: 458ed74908c7df99bdb8a0246291aa4ddecdbef1344345a280677158cdf67f8a9542079d5e2b01b9b409b00c1df6bb7158dc19e8f68629e8a2881dc2b2de2d6b
7
- data.tar.gz: c554609da1680be4969c1b7467ed6b39a20fb3662e8cba719467076e40a030eef0c36a3ebf98aceabeae85a30f42d179bd8d9359952696a4dc90e62ff625ca05
6
+ metadata.gz: 573a61ed707f036719d3cd96720c257cdab95d12474c9072ba2eeccfde1f86470acb8b717b4fff725be2a43275df891f9d8622d8d4597250c5993f3e25c3713b
7
+ data.tar.gz: 1dec43e2f2247a3da2299170418a430edae5778b96a2313354f82a8930c68e02ea20a9b4b85bedacf7e774ae8665e6c37502e121037d0a73e7ce18f685caf142
@@ -187,7 +187,7 @@ module Uc3DmpId
187
187
  annotated['dmphub_modification_day'] = Time.now.strftime('%Y-%m-%d')
188
188
  annotated['dmphub_owner_id'] = owner_id unless owner_id.nil?
189
189
  annotated['dmphub_owner_org'] = owner_org unless owner_org.nil?
190
- annotated['dmphub_updated_at'] = Time.now.iso8601
190
+ annotated['dmphub_updated_at'] = Time.now.iso8601 if annotated['dmphub_updated_at'].nil?
191
191
  # Only add the Creation date if it is blank
192
192
  annotated['dmphub_created_at'] = Time.now.iso8601 if json['dmphub_created_at'].nil?
193
193
  return annotated unless json['dmphub_provenance_id'].nil?
@@ -218,7 +218,7 @@ module Uc3DmpId
218
218
  return json.map { |obj| cleanse_dmp_json(json: obj) }.compact if json.is_a?(Array)
219
219
 
220
220
  cleansed = {}
221
- allowable = %w[dmphub_versions dmphub_updated_at]
221
+ allowable = %w[dmphub_created_at dmphub_updated_at dmphub_versions]
222
222
  json.each_key do |key|
223
223
  next if (key.to_s.start_with?('dmphub') && !allowable.include?(key)) || %w[PK SK].include?(key.to_s)
224
224
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.116'
4
+ VERSION = '0.0.118'
5
5
  end
@@ -58,7 +58,9 @@ module Uc3DmpId
58
58
 
59
59
  msg = "#{SOURCE} created version PK: #{prior['PK']} SK: #{prior['SK']}"
60
60
  logger.info(message: msg, details: prior) if logger.respond_to?(:debug)
61
- # Return the latest version
61
+
62
+ # Set the modification dates to now and then return the latest version
63
+ latest_version['dmphub_modified_at'] = Time.now.iso8601
62
64
  latest_version
63
65
  end
64
66
  # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
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.116
4
+ version: 0.0.118
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley