uc3-dmp-id 0.0.53 → 0.0.55

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: 0c6aefe84a14cc3fed061803e17239d43059129ba99834def60393b53128b7c2
4
- data.tar.gz: fb432fe944e5c9db435ce031e602f19ae503de8ba5efb6a8efaf17baedfd521a
3
+ metadata.gz: 1d2311f35cbb8b833394919ecad0432d096db0a9b4344f817cdacd62399a97ec
4
+ data.tar.gz: 7ecdaf2b92b718d69ff0bc102df2fd366e6f9a2701a92a66c61aeb6e2997381a
5
5
  SHA512:
6
- metadata.gz: 6d37cb0887e748983735c5100130185d130807fa72ffbcc22ce5c0937439b03fcdbdd5b6fa4f369581a56a8eb79c9a7ca7891e1f17b16ee7b727626643f1ac2f
7
- data.tar.gz: c67d9e3a5601534f103895a3f507e3b9ae3e2bddb880f92de1a3a01a7fe6de595b144bac818040e7388847cd2edfff817f3602772027d9cf69c70c4e1e5c4c8d
6
+ metadata.gz: 302e438282cc47e54ad94c7f1072c6c3f6bb130881c23f2d8c22bed34f17e6b2eb7919e4f17b137e3adc97963316a9fb0e97c651046362e42ae24781fb2318cd
7
+ data.tar.gz: 37c8ee0465b0cd2b398cb40be0aa6b56494a141cacd0161db127d867dd6bb867be5c0b663e5a51cf1eca2803ac3a28dec37ca7a938c5a780f4c48927db4a1e24
@@ -57,6 +57,9 @@ module Uc3DmpId
57
57
  annotated['dmproadmap_related_identifiers'] = [] if annotated['dmproadmap_related_identifiers'].nil?
58
58
  annotated << { descriptor: 'is_metadata_for', work_type: 'output_management_plan', type: 'url', identifier: url }
59
59
 
60
+ puts "Attached:"
61
+ puts annotated
62
+
60
63
  # Save the changes as the new latest version
61
64
  resp = client.put_item(json: annotated, debug: debug)
62
65
  raise UpdaterError, MSG_DMP_UNABLE_TO_VERSION if resp.nil?
@@ -69,7 +72,7 @@ module Uc3DmpId
69
72
  # Check if the DMP ID is updateable by the provenance
70
73
  def _updateable?(provenance:, p_key:, json:)
71
74
  # Validate the incoming JSON first
72
- errs = Validator.validate(mode: 'author', json: json)&.fetch('dmp', {})
75
+ errs = Validator.validate(mode: 'author', json: json)
73
76
  return errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
74
77
 
75
78
  # Fail if the provenance is not defined
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.0.53'
4
+ VERSION = '0.0.55'
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.53
4
+ version: 0.0.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley