uc3-dmp-id 0.1.18 → 0.1.20

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: c1307ce8ca80ee4f57ab605dc5804d2318593c8042b9f59ac9b4907bf370a87b
4
- data.tar.gz: 00e3ae0ff4a083240274a413c14234e6287f223fa7d936bcc36ad6087a890872
3
+ metadata.gz: cf23236a56983b63050eefbc4a1b94eb435c44a3c7e47e060f7a95e880ed0d3b
4
+ data.tar.gz: 483b42d03c8e3e0ae8cf88222ca099c3690bcff4e943245c372408fc3382d141
5
5
  SHA512:
6
- metadata.gz: 958040bdec6799e3b02e02caf399c0135d546fc8c5e8535129bf641970076e1c6524f4bf0c525ff830ec7efe9db905b8abee76db168b6115c4d8f65b9d221ca0
7
- data.tar.gz: 97091e9049ac3e8dccd069b69d35504a41f1bc24d6295b99054587336bcfc327fe5d9c15a38852f86352fc14edc311169ba026a185395c6af8d1866c884c255b
6
+ metadata.gz: 6b4a5b5f7fdc3853892a4c71a2c285f40b41624b4e68caacfc95affefb05024d8e29ff0e36f54f421519594a5ec55f41cbf7c9261e9402f51dd8e3c43a3638ac
7
+ data.tar.gz: 1fd451e5b41c1fe381d08630c28f7fda267cdb1000fbdb0125ac5b6ff37b50c0881a3d91335fb72471a1d2d9471b4ef097be45c18f9c892aedcfc2c041d97196
@@ -95,7 +95,9 @@ module Uc3DmpId
95
95
  }
96
96
  work_type = work.fetch('type', 'Text')&.downcase&.strip
97
97
  ret[:work_type] = work_type == 'text' ? type : work_type
98
- ret[:citation] = work['citation'] unless work['citation'].nil?
98
+ citation_in = work.fetch('dmproadmap_related_identifier', {})['citation']
99
+ ret[:citation] = citation_in unless citation_in.nil?
100
+
99
101
  @logger&.debug(message: "Assessing Work: #{work['id']} (pre citation)", details: ret)
100
102
  return JSON.parse(ret.to_json) unless ret[:citation].nil? && !work['bibtex'].nil?
101
103
 
@@ -44,8 +44,10 @@ module Uc3DmpId
44
44
 
45
45
  # Set the :created and :modified timestamps
46
46
  now = Time.now.utc.iso8601
47
- annotated['created'] = now
48
- annotated['modified'] = now
47
+ seeding = provenance.fetch('seedingWithLiveDmpIds', false).to_s.downcase == 'true'
48
+ # Do not overwrite the created/modified timestamps if we are seeding!
49
+ annotated['created'] = now unless seeding
50
+ annotated['modified'] = now unless seeding
49
51
 
50
52
  # Create the item
51
53
  resp = client.put_item(json: annotated, logger:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.18'
4
+ VERSION = '0.1.20'
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.18
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-09 00:00:00.000000000 Z
11
+ date: 2024-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
- rubygems_version: 3.4.10
153
+ rubygems_version: 3.4.22
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: DMPTool gem that provides support for DMP ID records