uc3-dmp-id 0.0.80 → 0.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49be29fe52616c95e8cb9a58221caf8ae2931a418a019f874e3c1ea311b8487a
4
- data.tar.gz: 73643d8ac5c0058c554fb4679ace24e200dc97d12ac4a5a1d5d32725e259118d
3
+ metadata.gz: b007856ad5a2979b663ac9bca26022d13aa08c854d36db99f6b5073f3d96c914
4
+ data.tar.gz: 96b951823afd6c995b824ce8047792a5e90b56fc9f6636a0a33c20ce05101796
5
5
  SHA512:
6
- metadata.gz: 1afdda10f4f785f5b9e4b2ace0851ca431ef7e91d88d16e98901f704e00a3d286e8febe161be736cf2f3576e6d5fe2b04d1ede420231bde5bcedaf17c1775170
7
- data.tar.gz: 630b9efacc9bfdf7f52a620f6f29cf7e4452783ef153cf2e34b1aeb590fc2a99f13bb94805ecd34dddfc4fa32c7eb3c4a4869da0e851bcd7b8b316d4fa39b844
6
+ metadata.gz: 25266f1a148076550a27e53813b5ee074e6379505d894715532d6945cfb299ce6aa1002fa1a3fc02490429421db7256e10459bcc791d2115134d56aa18e7988d
7
+ data.tar.gz: 54102b178db027bd0e496cdc1ee703e3180d2a1a020a20da113dc919f1479bb15311c50c892198ae8d47a8de5473e5d636d98e6903c28c8c8c12ee548d898a03
@@ -33,7 +33,7 @@ puts annotated
33
33
  raise UpdaterError, MSG_NO_CHANGE if Helper.eql?(dmp_a: existing, dmp_b: annotated)
34
34
 
35
35
  # Generate a new version of the DMP. This involves versioning the current latest version
36
- new_version = versioner.new_version(p_key: p_key, dmp: json)
36
+ new_version = versioner.new_version(p_key: p_key, dmp: annotated)
37
37
 
38
38
  puts 'DMP after splicing all changes:'
39
39
  puts new_version
@@ -84,13 +84,13 @@ puts new_version
84
84
  errs = Validator.validate(mode: 'author', json: json)
85
85
  return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
86
86
 
87
- puts "Provenance: #{provenance['PK']}, DMP_ID to PK #{Helper.dmp_id_to_pk(json: json.fetch('dmp_id', {}))} == P_KEY: #{p_key}"
87
+ puts "Provenance: #{provenance['PK']}, DMP_ID to PK #{Helper.dmp_id_to_pk(json: json['dmp'].fetch('dmp_id', {}))} == P_KEY: #{p_key}"
88
88
 
89
89
  # Fail if the provenance is not defined
90
90
  return [MSG_DMP_FORBIDDEN] unless provenance.is_a?(Hash) && !provenance['PK'].nil?
91
91
 
92
92
  # Verify that the JSON is for the same DMP in the PK
93
- dmp_id = json.fetch('dmp_id', {})
93
+ dmp_id = json['dmp'].fetch('dmp_id', {})
94
94
  return [MSG_DMP_FORBIDDEN] unless Helper.dmp_id_to_pk(json: dmp_id) == p_key
95
95
  # Make sure they're not trying to update a historical copy of the DMP
96
96
  return [MSG_DMP_NO_HISTORICALS] if json['SK'] != Helper::DMP_LATEST_VERSION
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.80'
4
+ VERSION = '0.0.82'
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.80
4
+ version: 0.0.82
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley