uc3-dmp-id 0.0.77 → 0.0.79

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: bae071224d4e143bf9f192f5b32bd755c752c0634c3314ec71480a3a48d1ad93
4
- data.tar.gz: ff1e3c94a9e09dbd400833a5a90d1bb080dd6f2f47ad55c198982466daad578f
3
+ metadata.gz: da5dfe631ce55bbbbc07ef7ef3827d4c47240d3b5f11b2ce86bae6a21a36f900
4
+ data.tar.gz: 4f75515de20699e2fdaa296d47e398bc81450c362f1744c9e577d4efddc8845d
5
5
  SHA512:
6
- metadata.gz: f477d5ae13ae8c352a720faa71a91532884db19859e9399962c1481966d98610a407c2b5abf16e33d09a19061f2643dee1b91315df88983654671a64f0279461
7
- data.tar.gz: 0f4c206e3fa4b5ac476b6e39f89a24926b75637115819d83c55aa5eddbc2b37de54e7dfe0355c70a8f28441c09fa50d299c9b935cc77aa3026056fcf243e2e24
6
+ metadata.gz: 136b0c2ca5323a4c6992edc5d36d5c4a721938676ab894f0e39a86b0f9d42ccaee1a54a0176e9ea4ac00e41e656ad0bb5badd1e32257c0691a200f5764f32af2
7
+ data.tar.gz: 47dde129910892bbf2fbf9947bb8e5d830b4f3378003fa5cff99e9b3330aa8f88aaf90003c681dace5699c64892a81c9493b6bb765238aa9a5e59984a6bd1276
@@ -13,7 +13,8 @@ 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
- errs = _updateable?(provenance: provenance, p_key: p_key, dmp: dmp)
16
+ p_key = Helper.append_pk_prefix(p_key: p_key)
17
+ errs = _updateable?(provenance: provenance, p_key: p_key, json: dmp)
17
18
 
18
19
  puts "Updateable? #{errs}"
19
20
 
@@ -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: 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.77'
4
+ VERSION = '0.0.79'
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.77
4
+ version: 0.0.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley