schemacop 2.4.2 → 2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/LICENSE +1 -1
- data/README.md +18 -2
- data/VERSION +1 -1
- data/doc/Schemacop.html +5 -5
- data/doc/Schemacop/ArrayValidator.html +1 -1
- data/doc/Schemacop/BooleanValidator.html +1 -1
- data/doc/Schemacop/Caster.html +1 -1
- data/doc/Schemacop/Collector.html +1 -1
- data/doc/Schemacop/Dupper.html +214 -0
- data/doc/Schemacop/Exceptions.html +1 -1
- data/doc/Schemacop/Exceptions/InvalidSchemaError.html +1 -1
- data/doc/Schemacop/Exceptions/ValidationError.html +1 -1
- data/doc/Schemacop/FieldNode.html +1 -1
- data/doc/Schemacop/FloatValidator.html +1 -1
- data/doc/Schemacop/HashValidator.html +10 -6
- data/doc/Schemacop/IntegerValidator.html +1 -1
- data/doc/Schemacop/NilValidator.html +1 -1
- data/doc/Schemacop/Node.html +1 -1
- data/doc/Schemacop/NodeResolver.html +1 -1
- data/doc/Schemacop/NodeSupportingField.html +1 -1
- data/doc/Schemacop/NodeSupportingType.html +1 -1
- data/doc/Schemacop/NodeWithBlock.html +1 -1
- data/doc/Schemacop/NumberValidator.html +1 -1
- data/doc/Schemacop/ObjectValidator.html +1 -1
- data/doc/Schemacop/RootNode.html +1 -1
- data/doc/Schemacop/Schema.html +8 -6
- data/doc/Schemacop/StringValidator.html +1 -1
- data/doc/Schemacop/SymbolValidator.html +1 -1
- data/doc/ScopedEnv.html +1 -1
- data/doc/_index.html +19 -4
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +19 -4
- data/doc/index.html +19 -4
- data/doc/method_list.html +93 -85
- data/doc/top-level-namespace.html +1 -1
- data/lib/schemacop.rb +4 -3
- data/lib/schemacop/dupper.rb +19 -0
- data/lib/schemacop/field_node.rb +1 -0
- data/lib/schemacop/node_supporting_type.rb +6 -6
- data/lib/schemacop/schema.rb +2 -1
- data/lib/schemacop/validator/hash_validator.rb +5 -1
- data/schemacop.gemspec +5 -5
- data/test/casting_test.rb +28 -0
- data/test/defaults_test.rb +22 -0
- data/test/empty_test.rb +14 -0
- data/test/validator_hash_test.rb +22 -0
- metadata +7 -3
@@ -102,7 +102,7 @@
|
|
102
102
|
</div>
|
103
103
|
|
104
104
|
<div id="footer">
|
105
|
-
Generated on
|
105
|
+
Generated on Thu Jul 2 11:30:34 2020 by
|
106
106
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
107
107
|
0.9.20 (ruby-2.6.2).
|
108
108
|
</div>
|
data/lib/schemacop.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Schemacop
|
2
2
|
DEFAULT_CASTERS = {
|
3
3
|
String => {
|
4
|
-
Integer => proc { |s| Integer(s) },
|
5
|
-
Float => proc { |s| Float(s) }
|
4
|
+
Integer => proc { |s| s.blank? ? nil : Integer(s, 10) },
|
5
|
+
Float => proc { |s| s.blank? ? nil : Float(s) }
|
6
6
|
},
|
7
7
|
Float => {
|
8
8
|
Integer => proc { |f| Integer(f) }
|
@@ -15,8 +15,8 @@ end
|
|
15
15
|
|
16
16
|
require 'set'
|
17
17
|
require 'active_support/core_ext/class/attribute'
|
18
|
+
require 'active_support/core_ext/object/blank'
|
18
19
|
require 'active_support/hash_with_indifferent_access'
|
19
|
-
require 'active_support/core_ext/object/deep_dup'
|
20
20
|
|
21
21
|
require 'schemacop/scoped_env'
|
22
22
|
require 'schemacop/exceptions'
|
@@ -30,6 +30,7 @@ require 'schemacop/field_node'
|
|
30
30
|
require 'schemacop/root_node'
|
31
31
|
require 'schemacop/node_supporting_field'
|
32
32
|
require 'schemacop/caster'
|
33
|
+
require 'schemacop/dupper'
|
33
34
|
require 'schemacop/validator/array_validator'
|
34
35
|
require 'schemacop/validator/boolean_validator'
|
35
36
|
require 'schemacop/validator/hash_validator'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Schemacop
|
2
|
+
class Dupper
|
3
|
+
def self.dup_data(data)
|
4
|
+
if data.is_a?(Hash)
|
5
|
+
data = data.dup
|
6
|
+
|
7
|
+
data.each do |key, value|
|
8
|
+
data[key] = dup_data(value)
|
9
|
+
end
|
10
|
+
|
11
|
+
return data
|
12
|
+
elsif data.is_a?(Array)
|
13
|
+
return data.map { |value| dup_data(value) }
|
14
|
+
else
|
15
|
+
return data
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/schemacop/field_node.rb
CHANGED
@@ -105,12 +105,12 @@ module Schemacop
|
|
105
105
|
|
106
106
|
next unless caster.castable?
|
107
107
|
begin
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
108
|
+
data = caster.cast
|
109
|
+
collector.override_value(data)
|
110
|
+
return data
|
111
|
+
rescue Exceptions::InvalidSchemaError => e
|
112
|
+
collector.error e.message
|
113
|
+
end
|
114
114
|
end
|
115
115
|
|
116
116
|
return data
|
data/lib/schemacop/schema.rb
CHANGED
@@ -37,7 +37,8 @@ module Schemacop
|
|
37
37
|
# @return [Schemacop::Collector] The object that collected errors
|
38
38
|
# throughout the validation.
|
39
39
|
def validate(data)
|
40
|
-
|
40
|
+
dupped_data = Schemacop::Dupper.dup_data(data)
|
41
|
+
collector = Collector.new(dupped_data)
|
41
42
|
@root.fields[:root].validate({ root: data }, collector.ignore_next_segment)
|
42
43
|
return collector
|
43
44
|
end
|
@@ -2,6 +2,8 @@ module Schemacop
|
|
2
2
|
class HashValidator < NodeSupportingField
|
3
3
|
register symbols: :hash, klasses: Hash
|
4
4
|
|
5
|
+
option :allow_obsolete_keys
|
6
|
+
|
5
7
|
def validate(data, collector)
|
6
8
|
super
|
7
9
|
|
@@ -21,7 +23,9 @@ module Schemacop
|
|
21
23
|
|
22
24
|
obsolete_keys = data_keys - allowed_fields
|
23
25
|
|
24
|
-
|
26
|
+
unless option?(:allow_obsolete_keys)
|
27
|
+
collector.error "Obsolete keys: #{obsolete_keys.inspect}." if obsolete_keys.any?
|
28
|
+
end
|
25
29
|
|
26
30
|
@fields.values.each do |field|
|
27
31
|
field.validate(data, collector)
|
data/schemacop.gemspec
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: schemacop 2.4.
|
2
|
+
# stub: schemacop 2.4.7 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "schemacop".freeze
|
6
|
-
s.version = "2.4.
|
6
|
+
s.version = "2.4.7"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Sitrox".freeze]
|
11
|
-
s.date = "
|
12
|
-
s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "doc/Schemacop.html".freeze, "doc/Schemacop/ArrayValidator.html".freeze, "doc/Schemacop/BooleanValidator.html".freeze, "doc/Schemacop/Caster.html".freeze, "doc/Schemacop/Collector.html".freeze, "doc/Schemacop/Exceptions.html".freeze, "doc/Schemacop/Exceptions/InvalidSchemaError.html".freeze, "doc/Schemacop/Exceptions/ValidationError.html".freeze, "doc/Schemacop/FieldNode.html".freeze, "doc/Schemacop/FloatValidator.html".freeze, "doc/Schemacop/HashValidator.html".freeze, "doc/Schemacop/IntegerValidator.html".freeze, "doc/Schemacop/NilValidator.html".freeze, "doc/Schemacop/Node.html".freeze, "doc/Schemacop/NodeResolver.html".freeze, "doc/Schemacop/NodeSupportingField.html".freeze, "doc/Schemacop/NodeSupportingType.html".freeze, "doc/Schemacop/NodeWithBlock.html".freeze, "doc/Schemacop/NumberValidator.html".freeze, "doc/Schemacop/ObjectValidator.html".freeze, "doc/Schemacop/RootNode.html".freeze, "doc/Schemacop/Schema.html".freeze, "doc/Schemacop/StringValidator.html".freeze, "doc/Schemacop/SymbolValidator.html".freeze, "doc/ScopedEnv.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/inheritance.graphml".freeze, "doc/inheritance.pdf".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "lib/schemacop.rb".freeze, "lib/schemacop/caster.rb".freeze, "lib/schemacop/collector.rb".freeze, "lib/schemacop/exceptions.rb".freeze, "lib/schemacop/field_node.rb".freeze, "lib/schemacop/node.rb".freeze, "lib/schemacop/node_resolver.rb".freeze, "lib/schemacop/node_supporting_field.rb".freeze, "lib/schemacop/node_supporting_type.rb".freeze, "lib/schemacop/node_with_block.rb".freeze, "lib/schemacop/root_node.rb".freeze, "lib/schemacop/schema.rb".freeze, "lib/schemacop/scoped_env.rb".freeze, "lib/schemacop/validator/array_validator.rb".freeze, "lib/schemacop/validator/boolean_validator.rb".freeze, "lib/schemacop/validator/float_validator.rb".freeze, "lib/schemacop/validator/hash_validator.rb".freeze, "lib/schemacop/validator/integer_validator.rb".freeze, "lib/schemacop/validator/nil_validator.rb".freeze, "lib/schemacop/validator/number_validator.rb".freeze, "lib/schemacop/validator/object_validator.rb".freeze, "lib/schemacop/validator/string_validator.rb".freeze, "lib/schemacop/validator/symbol_validator.rb".freeze, "schemacop.gemspec".freeze, "test/casting_test.rb".freeze, "test/collector_test.rb".freeze, "test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/defaults_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/node_resolver_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze, "test/validator_symbol_test.rb".freeze]
|
11
|
+
s.date = "2020-07-02"
|
12
|
+
s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "doc/Schemacop.html".freeze, "doc/Schemacop/ArrayValidator.html".freeze, "doc/Schemacop/BooleanValidator.html".freeze, "doc/Schemacop/Caster.html".freeze, "doc/Schemacop/Collector.html".freeze, "doc/Schemacop/Dupper.html".freeze, "doc/Schemacop/Exceptions.html".freeze, "doc/Schemacop/Exceptions/InvalidSchemaError.html".freeze, "doc/Schemacop/Exceptions/ValidationError.html".freeze, "doc/Schemacop/FieldNode.html".freeze, "doc/Schemacop/FloatValidator.html".freeze, "doc/Schemacop/HashValidator.html".freeze, "doc/Schemacop/IntegerValidator.html".freeze, "doc/Schemacop/NilValidator.html".freeze, "doc/Schemacop/Node.html".freeze, "doc/Schemacop/NodeResolver.html".freeze, "doc/Schemacop/NodeSupportingField.html".freeze, "doc/Schemacop/NodeSupportingType.html".freeze, "doc/Schemacop/NodeWithBlock.html".freeze, "doc/Schemacop/NumberValidator.html".freeze, "doc/Schemacop/ObjectValidator.html".freeze, "doc/Schemacop/RootNode.html".freeze, "doc/Schemacop/Schema.html".freeze, "doc/Schemacop/StringValidator.html".freeze, "doc/Schemacop/SymbolValidator.html".freeze, "doc/ScopedEnv.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/inheritance.graphml".freeze, "doc/inheritance.pdf".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "lib/schemacop.rb".freeze, "lib/schemacop/caster.rb".freeze, "lib/schemacop/collector.rb".freeze, "lib/schemacop/dupper.rb".freeze, "lib/schemacop/exceptions.rb".freeze, "lib/schemacop/field_node.rb".freeze, "lib/schemacop/node.rb".freeze, "lib/schemacop/node_resolver.rb".freeze, "lib/schemacop/node_supporting_field.rb".freeze, "lib/schemacop/node_supporting_type.rb".freeze, "lib/schemacop/node_with_block.rb".freeze, "lib/schemacop/root_node.rb".freeze, "lib/schemacop/schema.rb".freeze, "lib/schemacop/scoped_env.rb".freeze, "lib/schemacop/validator/array_validator.rb".freeze, "lib/schemacop/validator/boolean_validator.rb".freeze, "lib/schemacop/validator/float_validator.rb".freeze, "lib/schemacop/validator/hash_validator.rb".freeze, "lib/schemacop/validator/integer_validator.rb".freeze, "lib/schemacop/validator/nil_validator.rb".freeze, "lib/schemacop/validator/number_validator.rb".freeze, "lib/schemacop/validator/object_validator.rb".freeze, "lib/schemacop/validator/string_validator.rb".freeze, "lib/schemacop/validator/symbol_validator.rb".freeze, "schemacop.gemspec".freeze, "test/casting_test.rb".freeze, "test/collector_test.rb".freeze, "test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/defaults_test.rb".freeze, "test/empty_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/node_resolver_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze, "test/validator_symbol_test.rb".freeze]
|
13
13
|
s.homepage = "https://github.com/sitrox/schemacop".freeze
|
14
14
|
s.licenses = ["MIT".freeze]
|
15
15
|
s.rubygems_version = "3.0.3".freeze
|
16
16
|
s.summary = "Schemacop validates ruby structures consisting of nested hashes and arrays against simple schema definitions.".freeze
|
17
|
-
s.test_files = ["test/casting_test.rb".freeze, "test/collector_test.rb".freeze, "test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/defaults_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/node_resolver_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze, "test/validator_symbol_test.rb".freeze]
|
17
|
+
s.test_files = ["test/casting_test.rb".freeze, "test/collector_test.rb".freeze, "test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/defaults_test.rb".freeze, "test/empty_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/node_resolver_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze, "test/validator_symbol_test.rb".freeze]
|
18
18
|
|
19
19
|
if s.respond_to? :specification_version then
|
20
20
|
s.specification_version = 4
|
data/test/casting_test.rb
CHANGED
@@ -86,5 +86,33 @@ module Schemacop
|
|
86
86
|
|
87
87
|
assert_equal 42, s.validate!('42')
|
88
88
|
end
|
89
|
+
|
90
|
+
def test_decimal_basis_castings
|
91
|
+
s = Schema.new do
|
92
|
+
type :integer, cast: [String]
|
93
|
+
end
|
94
|
+
|
95
|
+
assert_equal 1, s.validate!('01')
|
96
|
+
assert_equal 8, s.validate!('08')
|
97
|
+
assert_equal 11, s.validate!('011')
|
98
|
+
end
|
99
|
+
|
100
|
+
def test_string_to_nil_castings
|
101
|
+
s = Schema.new do
|
102
|
+
opt :int_field, :integer, cast: [String]
|
103
|
+
opt :float_field, :float, cast: [String]
|
104
|
+
end
|
105
|
+
|
106
|
+
expected_int = { int_field: nil }
|
107
|
+
expected_float = { float_field: nil }
|
108
|
+
|
109
|
+
assert_equal expected_int, s.validate!(int_field: nil)
|
110
|
+
assert_equal expected_int, s.validate!(int_field: "")
|
111
|
+
assert_equal expected_int, s.validate!(int_field: " ")
|
112
|
+
|
113
|
+
assert_equal expected_float, s.validate!(float_field: nil)
|
114
|
+
assert_equal expected_float, s.validate!(float_field: "")
|
115
|
+
assert_equal expected_float, s.validate!(float_field: " ")
|
116
|
+
end
|
89
117
|
end
|
90
118
|
end
|
data/test/defaults_test.rb
CHANGED
@@ -58,6 +58,28 @@ module Schemacop
|
|
58
58
|
assert_equal({ foo: [{ bar: 42 }] }, output)
|
59
59
|
end
|
60
60
|
|
61
|
+
def test_proc
|
62
|
+
s = Schema.new do
|
63
|
+
opt :year, :integer, default: ->() { Time.now.year }
|
64
|
+
end
|
65
|
+
|
66
|
+
input = {}
|
67
|
+
output = s.validate!(input)
|
68
|
+
assert_equal({ year: Time.now.year }, output)
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_nested_proc
|
72
|
+
myproc = proc { 42 }
|
73
|
+
|
74
|
+
s = Schema.new do
|
75
|
+
opt :myproc, Proc, default: ->() { myproc }
|
76
|
+
end
|
77
|
+
|
78
|
+
input = {}
|
79
|
+
output = s.validate!(input)
|
80
|
+
assert_equal({ myproc: myproc }, output)
|
81
|
+
end
|
82
|
+
|
61
83
|
def test_invalid_default
|
62
84
|
s = Schema.new :integer, default: '42'
|
63
85
|
|
data/test/empty_test.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Schemacop
|
4
|
+
class EmptyTest < Minitest::Test
|
5
|
+
def test_empty_hash
|
6
|
+
schema = Schema.new do
|
7
|
+
type Hash
|
8
|
+
end
|
9
|
+
|
10
|
+
assert_nothing_raised { schema.validate!({}) }
|
11
|
+
assert_verr { schema.validate!(foo: :bar) }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/test/validator_hash_test.rb
CHANGED
@@ -21,6 +21,28 @@ module Schemacop
|
|
21
21
|
assert_verr { s.validate!(one: 3, three: true) }
|
22
22
|
end
|
23
23
|
|
24
|
+
def test_allow_obsolete_keys
|
25
|
+
s = Schema.new do
|
26
|
+
type :hash, allow_obsolete_keys: true
|
27
|
+
end
|
28
|
+
|
29
|
+
assert_nothing_raised { s.validate!(foo: :bar) }
|
30
|
+
assert_equal({ foo: { bar: :baz } }, s.validate!(foo: { bar: :baz }))
|
31
|
+
|
32
|
+
assert_verr { s.validate!(3) }
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_allow_obsolete_keys_with_substructore
|
36
|
+
s = Schema.new do
|
37
|
+
type :hash, allow_obsolete_keys: true do
|
38
|
+
req :foo
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
assert_nothing_raised { s.validate!(foo: :bar, bar: :baz) }
|
43
|
+
assert_verr { s.validate!(bar: :baz) }
|
44
|
+
end
|
45
|
+
|
24
46
|
def test_nested
|
25
47
|
s = Schema.new do
|
26
48
|
type :hash do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schemacop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sitrox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- doc/Schemacop/BooleanValidator.html
|
188
188
|
- doc/Schemacop/Caster.html
|
189
189
|
- doc/Schemacop/Collector.html
|
190
|
+
- doc/Schemacop/Dupper.html
|
190
191
|
- doc/Schemacop/Exceptions.html
|
191
192
|
- doc/Schemacop/Exceptions/InvalidSchemaError.html
|
192
193
|
- doc/Schemacop/Exceptions/ValidationError.html
|
@@ -226,6 +227,7 @@ files:
|
|
226
227
|
- lib/schemacop.rb
|
227
228
|
- lib/schemacop/caster.rb
|
228
229
|
- lib/schemacop/collector.rb
|
230
|
+
- lib/schemacop/dupper.rb
|
229
231
|
- lib/schemacop/exceptions.rb
|
230
232
|
- lib/schemacop/field_node.rb
|
231
233
|
- lib/schemacop/node.rb
|
@@ -252,6 +254,7 @@ files:
|
|
252
254
|
- test/custom_check_test.rb
|
253
255
|
- test/custom_if_test.rb
|
254
256
|
- test/defaults_test.rb
|
257
|
+
- test/empty_test.rb
|
255
258
|
- test/nil_dis_allow_test.rb
|
256
259
|
- test/node_resolver_test.rb
|
257
260
|
- test/short_forms_test.rb
|
@@ -286,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
289
|
- !ruby/object:Gem::Version
|
287
290
|
version: '0'
|
288
291
|
requirements: []
|
289
|
-
rubygems_version: 3.
|
292
|
+
rubygems_version: 3.1.2
|
290
293
|
signing_key:
|
291
294
|
specification_version: 4
|
292
295
|
summary: Schemacop validates ruby structures consisting of nested hashes and arrays
|
@@ -297,6 +300,7 @@ test_files:
|
|
297
300
|
- test/custom_check_test.rb
|
298
301
|
- test/custom_if_test.rb
|
299
302
|
- test/defaults_test.rb
|
303
|
+
- test/empty_test.rb
|
300
304
|
- test/nil_dis_allow_test.rb
|
301
305
|
- test/node_resolver_test.rb
|
302
306
|
- test/short_forms_test.rb
|