uc3-dmp-id 0.0.124 → 0.0.126

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: a563ea123c96c51fd8a774fa4888a9546fe1acb9edd7421e66d1a789e5177888
4
- data.tar.gz: ff638024c224791e55f1fe7c3e6e6826a56f99bb0aa2f2e862bf10b356472df6
3
+ metadata.gz: 73d2494e92230d95b9af70786a5d86c630d5b2173a6e33d61fe709a038324787
4
+ data.tar.gz: 3bb154b98d213aa867ae91a94a4931773faa01131e14a13dcdcdfc50c4d75e6c
5
5
  SHA512:
6
- metadata.gz: 59730ef2899e81d2a695b474f05b3b1b2823a1afa2deef516d9af5daa9a0bf857b52da2a20f1e99bcedd1c2d840670612c7c4958636b2209ced85a11e7576197
7
- data.tar.gz: 25a8282517cdd5208f3ec8776f25fe8e1f8fb928dd4d7fdd20cad0665631e12440a80f67e2df777f98df8e503dbb46cd57b44c2e85fc6a39ea4ddf726de5b031
6
+ metadata.gz: d7e8cff85f91ba62b56063d1351632f39a0088ba14a7a9565c6dcd19784b3c091a2332cbc578e4805065bd70fc1a807099bb70d46b2844e3f5e14d7f18abeb5b
7
+ data.tar.gz: 91811d73974c7664b6008824c4f5b7bc7a5d9414d750dfa6de29ee990c9d292b1b237735d7e38b33e1b5c81fdb52eb7ef0f0245d7bc1b141c4fb760180bf0621
@@ -58,13 +58,12 @@ module Uc3DmpId
58
58
 
59
59
  def _preregister_dmp_id(client:, provenance:, json:, logger: nil)
60
60
  # Use the specified DMP ID if the provenance has permission
61
- existing = json.fetch('dmp', {}).fetch('dmp_id', {})
61
+ seeding = provenance.fetch('seedingWithLiveDmpIds', false).to_s.downcase == 'true'
62
62
  seed_id = json.fetch('dmp', {})['dmproadmap_external_system_identifier']
63
63
 
64
64
  # If we are seeding already registered DMP IDs from the Provenance system, then return the original DMP ID
65
- return seed_id.gsub(%r{https?://}, '') if existing.fetch('type', 'other') == 'url' &&
66
- !seed_id.nil? &&
67
- provenance.fetch('seedingWithLiveDmpIds', false).to_s.downcase == 'true'
65
+ logger.debug(message: "Seeding DMP ID with #{seed_id.gsub(%r{https?://}, '')}") if seeding && !seed_id.nil?
66
+ return seed_id.gsub(%r{https?://}, '') if seeding && !seed_id.nil?
68
67
 
69
68
  #Generate a new DMP ID
70
69
  dmp_id = ''
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.124'
4
+ VERSION = '0.0.126'
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.0.124
4
+ version: 0.0.126
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-08-04 00:00:00.000000000 Z
11
+ date: 2023-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json