uc3-dmp-id 0.0.78 → 0.0.80

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: 46b976e1a1b1c6778fab08b24b77ce59e140b8bc40ae913fd6bca412e5eb3949
4
- data.tar.gz: 3e3e704bed2b5781f3721237d91fe898d972338a7c235357afcde470e4d8b0fc
3
+ metadata.gz: 49be29fe52616c95e8cb9a58221caf8ae2931a418a019f874e3c1ea311b8487a
4
+ data.tar.gz: 73643d8ac5c0058c554fb4679ace24e200dc97d12ac4a5a1d5d32725e259118d
5
5
  SHA512:
6
- metadata.gz: 915115311a1d724470f2239b686cb82cfede0ccb0d52b312e3f3331be18927f75a5e07f900388baaf6b38c43f10259d0a39c318ef29d47153bac45f41672c7b8
7
- data.tar.gz: 725027220b0481dc90ebfa0dd5b851190da6382f16012f161278ba766a0d91beb02c94dda0f889a376f5ae7f133582d2fce7b184ae1982990ee875492926d101
6
+ metadata.gz: 1afdda10f4f785f5b9e4b2ace0851ca431ef7e91d88d16e98901f704e00a3d286e8febe161be736cf2f3576e6d5fe2b04d1ede420231bde5bcedaf17c1775170
7
+ data.tar.gz: 630b9efacc9bfdf7f52a620f6f29cf7e4452783ef153cf2e34b1aeb590fc2a99f13bb94805ecd34dddfc4fa32c7eb3c4a4869da0e851bcd7b8b316d4fa39b844
@@ -13,6 +13,7 @@ module Uc3DmpId
13
13
  raise UpdaterError, MSG_DMP_INVALID_DMP_ID unless p_key.is_a?(String) && !p_key.strip.empty?
14
14
 
15
15
  dmp = Helper.parse_json(json: json)
16
+ p_key = Helper.append_pk_prefix(p_key: p_key)
16
17
  errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp)
17
18
 
18
19
  puts "Updateable? #{errs}"
@@ -83,6 +84,8 @@ puts new_version
83
84
  errs = Validator.validate(mode: 'author', json: json)
84
85
  return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
85
86
 
87
+ puts "Provenance: #{provenance['PK']}, DMP_ID to PK #{Helper.dmp_id_to_pk(json: json.fetch('dmp_id', {}))} == P_KEY: #{p_key}"
88
+
86
89
  # Fail if the provenance is not defined
87
90
  return [MSG_DMP_FORBIDDEN] unless provenance.is_a?(Hash) && !provenance['PK'].nil?
88
91
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.78'
4
+ VERSION = '0.0.80'
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.78
4
+ version: 0.0.80
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley