uc3-dmp-id 0.0.31 → 0.0.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/creator.rb +1 -1
- data/lib/uc3-dmp-id/validator.rb +0 -6
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9c5eb1e3af04a0d8ed5468b4f2357872e63e8a07e06ce071a6414daed420a27
|
4
|
+
data.tar.gz: fd042c4b9bb088a893010bcaf7e5d84fdb884a7c8ef513313159508bcbe79056
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac616730bfdc04c41a01bda6bbcd795981a889df0a2fe0d5ec8087a1047380a1b8a020bc6b72274c57941004e5b7e198ed00f98df8b946a755f67379e0dc651f
|
7
|
+
data.tar.gz: 5fe3de09a45418038dbc64241938955bdd5273dceb4d3fa329f1f7d5bf6ba3841b9307461947fc3c5ac5bbfef1e701bbb4a41a9cd6d192a76fc24a5f5316db40
|
data/lib/uc3-dmp-id/creator.rb
CHANGED
@@ -19,7 +19,7 @@ module Uc3DmpId
|
|
19
19
|
raise DeleterError, MSG_DMP_FORBIDDEN unless provenance.is_a?(Hash) && !provenance['PK'].nil?
|
20
20
|
|
21
21
|
# Validate the incoming JSON first
|
22
|
-
errs = Validator.validate(mode: 'author', json: Helper.parse_json(json: json))
|
22
|
+
errs = Validator.validate(mode: 'author', json: Helper.parse_json(json: json))
|
23
23
|
raise CreatorError, errs.join(', ') if errs.is_a?(Array) && errs.any? && errs.first != Validator::MSG_VALID_JSON
|
24
24
|
|
25
25
|
# Fail if the provenance or owner affiliation are not defined
|
data/lib/uc3-dmp-id/validator.rb
CHANGED
@@ -44,12 +44,6 @@ module Uc3DmpId
|
|
44
44
|
# Load the JSON schema that corresponds with the mode
|
45
45
|
# ------------------------------------------------------------------------------------
|
46
46
|
def _load_schema(mode:)
|
47
|
-
|
48
|
-
puts "::Uc3DmpId::Schemas::Author defined? #{Object.const_defined?('::Uc3DmpId::Schemas::Author')}"
|
49
|
-
puts "Uc3DmpId::Schemas::Author defined? #{Object.const_defined?('Uc3DmpId::Schemas::Author')}"
|
50
|
-
puts "Schemas::Author defined? #{Object.const_defined?('Schemas::Author')}"
|
51
|
-
puts "Author defined? #{Object.const_defined?('Author')}"
|
52
|
-
|
53
47
|
# Instatiate the matching schema
|
54
48
|
schema = "Uc3DmpId::Schemas::#{mode.to_s.downcase.capitalize}".split('::').inject(Object) { |o,c| p o; o.const_get c }
|
55
49
|
schema.respond_to?(:load) ? schema.load : nil
|
data/lib/uc3-dmp-id/version.rb
CHANGED