uc3-dmp-id 0.0.31 → 0.0.33
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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 865a2da35a678771517b269f33d836aa5bacd7c41c15f037e06da3ae5c1f4110
|
4
|
+
data.tar.gz: 59a50dcb837f57a9a577aa99d0af2f45124b8b9e502b88f5ad1d21b4881880c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e4c19d1b7bbd43fe5bc66b26e6af670ea848b9348e50544efedac6a19ac1bc1d8c126da09ce7fa7511d80f1f7a13bd48379a62251ecea9e9521c99508da6ecd
|
7
|
+
data.tar.gz: 44117596ad98ae5acaf508ba6fddcc8032ef1ec06d3436d9685a8c942f1823c1b3352b33f988d6fe18e112fc04a76ee86ce5c10ba815bec439d8e731e4bb3d93
|
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
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|