dmp-dynamo_adapter 0.2.8 → 0.2.9

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: 1fde969438aa9681c5213d60e441b3187de1ed2141c7b244419ba47a007d39fc
4
- data.tar.gz: a4a9722f607edf91644043c4adbcb3af7bfe81f33d254da104a0223a27fd6c40
3
+ metadata.gz: d66690b743822deb2db2a047370660b2cd7ec3206844534facbaf04f7f98474c
4
+ data.tar.gz: a2d9f06124324415cb5128d6f9f11b305c70d14656788fc38fe4f72bf9af1bc1
5
5
  SHA512:
6
- metadata.gz: 0ba67f79d6cdf0b4d29f416301e88b8b4453f85b7381a82280f5389dde4c12bb5446e59bdd21290d04203dbcdaefc73f08c1bd8ffd5221b945a19e514e4f1c2b
7
- data.tar.gz: 8c2a12ccd6b1049a12f254a6ae5f634c63aa2c3b82870778fd541482d6888cd720426ac6cb213d72b6fb3605ad38a3b948abf7393f63b90cc3898fa72f60966e
6
+ metadata.gz: aaba013e38394e8f547a2002eb7c27b9fc9101f950fb53c0880b71c8cb57815dc2459fc65a262d09f1856af73a6ab7f5a3d1bbe15593985845f58c6f7a5bf85a
7
+ data.tar.gz: 650f1918d18c4408b25b732a18805b05ff11cb45e41a6aaeaf823d54954fbb4e7805edf60437ef2030348402d77770866787c8a574f9a155f97c77bd9b42a8f6
@@ -10,7 +10,7 @@ module Dmp
10
10
 
11
11
  class << self
12
12
  def dmp_id_base_url
13
- ENV['DMP_ID_BASE_URL'].end_with?('/') ? ENV['DMP_ID_BASE_URL'] : "#{ENV['DMP_ID_BASE_URL']}/"
13
+ ENV['DMP_ID_BASE_URL']&.end_with?('/') ? ENV['DMP_ID_BASE_URL'] : "#{ENV['DMP_ID_BASE_URL']}/"
14
14
  end
15
15
 
16
16
  # Format the DMP ID in the way we want it
@@ -74,7 +74,7 @@ p "ANNOTATING METADATA:"
74
74
  annotated['dmp_id'] = Dmp::DmpIdHandler.pk_to_dmp_id(p_key: annotated['PK'])
75
75
 
76
76
  # Update the modification timestamps
77
- annotated['dmphub_modification_day'] = Time.now.strftime('%Y-%M-%d')
77
+ annotated['dmphub_modification_day'] = Time.now.strftime('%Y-%m-%d')
78
78
  annotated['dmphub_updated_at'] = Time.now.iso8601
79
79
  # Only add the Creation date if it is blank
80
80
  annotated['dmphub_created_at'] = Time.now.iso8601 if json['dmphub_created_at'].nil?
@@ -85,7 +85,7 @@ p "ANNOTATING METADATA:"
85
85
  json.fetch('dmp_id', {})['identifier'].nil?
86
86
 
87
87
  # Record the original Provenance system's identifier
88
- annotated['dmphub_provenance_identifier'] = json['dmp_id']
88
+ annotated['dmphub_provenance_identifier'] = json.fetch('dmp_id', {})['identifier']
89
89
  annotated
90
90
  end
91
91
  # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmp-dynamo_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - briri