schemacop 3.0.24 → 3.0.25

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: 9266f3e24f871c0c005fd264d52b5fdd604fbac3bde31785f1aaed3b2394797f
4
- data.tar.gz: 7c52fb71ce8160f8f8f513e0baa52d2e6aa39f8b819857d88654f3226c38fbe0
3
+ metadata.gz: 6f8c7ab35c69a90c61abae57241a5b2c3e0a2b34e28907527fc017e28edd1d38
4
+ data.tar.gz: 736001d1624fecf2abe1486beaf4f07ea9072cbefb32c5393e1d7382a38ce9ac
5
5
  SHA512:
6
- metadata.gz: 3f76ac03e7d18945a488a081780659751856840be7e6c6d28290513be6dddcf21843052b5e8e2e830816d2c55a5d239370b19c811690ddc91770b2be1bbc5a78
7
- data.tar.gz: b1b93d8f9cdeea32bc8219f0f0a5b14851fd7d129ab5003fdc215c6260b01bc1f0e4880a634c16200d1271da7d13d0be4d7623908f517acc7861ff9c1f361469
6
+ metadata.gz: 766a3ab0ad94ad6be036ecabe7eb6e8df9e0ed1330c97356e6510e47b6446303f6361e05facec1f353a02f0e4cdea10e704351ec30a539acdc41320227473750
7
+ data.tar.gz: f9ce6508cdf4374cd8e6909db207225932ca79ccaaf1d504cae8c011f90212431c0f11976c0f112cebf2bf3bf96edd23ec09fb4c27bce8da6e99a48147f9ac1b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 3.0.25 (2023-10-30)
4
+
5
+ * Improve documentation: list validation
6
+
3
7
  ## 3.0.24 (2023-05-15)
4
8
 
5
9
  * Add `require_key` option
data/README_V3.md CHANGED
@@ -109,8 +109,8 @@ The nodes in Schemacop v3 also support generic keywords, similar to JSON schema:
109
109
  value is not in the array, the validation will fail
110
110
  * `default`: You may provide a default value for items that will be set if the
111
111
  value is not given
112
- * `require_key`: If set to true, validate that the key of this node is present,
113
- regardless of the value (including `nil`). This is only validated if the
112
+ * `require_key`: If set to true, validate that the key of this node is present,
113
+ regardless of the value (including `nil`). This is only validated if the
114
114
  schema type is set to `:hash`.
115
115
  Example:
116
116
  ```ruby
@@ -673,10 +673,11 @@ how you specify your array contents.
673
673
 
674
674
  List validation validates a sequence of arbitrary length where each item matches
675
675
  the same schema. Unless you specify a `min_items` count on the array node, an
676
- empty array will also suffice. To specify a list validation, use the `list` DSL
677
- method, and specify the type you want to validate against. Here, you need to
678
- specify the type of the element using the long `type` name (e.g. `integer` and
679
- not `int`).
676
+ empty array will also suffice. If the option `required: true` is not specified,
677
+ a list containing only `nil` values is also valid. To specify a list validation,
678
+ use the `list` DSL method, and specify the type you want to validate against.
679
+ Here, you need to specify the type of the element using the long `type` name
680
+ (e.g. `integer` and not `int`).
680
681
 
681
682
  For example, you can specify that you want an array with only integers between 1 and 5:
682
683
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.24
1
+ 3.0.25
data/schemacop.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: schemacop 3.0.24 ruby lib
2
+ # stub: schemacop 3.0.25 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "schemacop".freeze
6
- s.version = "3.0.24"
6
+ s.version = "3.0.25"
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 = "2023-05-15"
11
+ s.date = "2023-10-30"
12
12
  s.files = [".github/workflows/ruby.yml".freeze, ".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "README_V2.md".freeze, "README_V3.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "lib/schemacop.rb".freeze, "lib/schemacop/base_schema.rb".freeze, "lib/schemacop/exceptions.rb".freeze, "lib/schemacop/railtie.rb".freeze, "lib/schemacop/schema.rb".freeze, "lib/schemacop/schema2.rb".freeze, "lib/schemacop/schema3.rb".freeze, "lib/schemacop/scoped_env.rb".freeze, "lib/schemacop/v2.rb".freeze, "lib/schemacop/v2/caster.rb".freeze, "lib/schemacop/v2/collector.rb".freeze, "lib/schemacop/v2/dupper.rb".freeze, "lib/schemacop/v2/field_node.rb".freeze, "lib/schemacop/v2/node.rb".freeze, "lib/schemacop/v2/node_resolver.rb".freeze, "lib/schemacop/v2/node_supporting_field.rb".freeze, "lib/schemacop/v2/node_supporting_type.rb".freeze, "lib/schemacop/v2/node_with_block.rb".freeze, "lib/schemacop/v2/validator/array_validator.rb".freeze, "lib/schemacop/v2/validator/boolean_validator.rb".freeze, "lib/schemacop/v2/validator/float_validator.rb".freeze, "lib/schemacop/v2/validator/hash_validator.rb".freeze, "lib/schemacop/v2/validator/integer_validator.rb".freeze, "lib/schemacop/v2/validator/nil_validator.rb".freeze, "lib/schemacop/v2/validator/number_validator.rb".freeze, "lib/schemacop/v2/validator/object_validator.rb".freeze, "lib/schemacop/v2/validator/string_validator.rb".freeze, "lib/schemacop/v2/validator/symbol_validator.rb".freeze, "lib/schemacop/v3.rb".freeze, "lib/schemacop/v3/all_of_node.rb".freeze, "lib/schemacop/v3/any_of_node.rb".freeze, "lib/schemacop/v3/array_node.rb".freeze, "lib/schemacop/v3/boolean_node.rb".freeze, "lib/schemacop/v3/combination_node.rb".freeze, "lib/schemacop/v3/context.rb".freeze, "lib/schemacop/v3/dsl_scope.rb".freeze, "lib/schemacop/v3/global_context.rb".freeze, "lib/schemacop/v3/hash_node.rb".freeze, "lib/schemacop/v3/integer_node.rb".freeze, "lib/schemacop/v3/is_not_node.rb".freeze, "lib/schemacop/v3/node.rb".freeze, "lib/schemacop/v3/node_registry.rb".freeze, "lib/schemacop/v3/number_node.rb".freeze, "lib/schemacop/v3/numeric_node.rb".freeze, "lib/schemacop/v3/object_node.rb".freeze, "lib/schemacop/v3/one_of_node.rb".freeze, "lib/schemacop/v3/reference_node.rb".freeze, "lib/schemacop/v3/result.rb".freeze, "lib/schemacop/v3/string_node.rb".freeze, "lib/schemacop/v3/symbol_node.rb".freeze, "schemacop.gemspec".freeze, "test/lib/test_helper.rb".freeze, "test/schemas/nested/group.rb".freeze, "test/schemas/user.rb".freeze, "test/unit/schemacop/v2/casting_test.rb".freeze, "test/unit/schemacop/v2/collector_test.rb".freeze, "test/unit/schemacop/v2/custom_check_test.rb".freeze, "test/unit/schemacop/v2/custom_if_test.rb".freeze, "test/unit/schemacop/v2/defaults_test.rb".freeze, "test/unit/schemacop/v2/empty_test.rb".freeze, "test/unit/schemacop/v2/nil_dis_allow_test.rb".freeze, "test/unit/schemacop/v2/node_resolver_test.rb".freeze, "test/unit/schemacop/v2/short_forms_test.rb".freeze, "test/unit/schemacop/v2/types_test.rb".freeze, "test/unit/schemacop/v2/validator_array_test.rb".freeze, "test/unit/schemacop/v2/validator_boolean_test.rb".freeze, "test/unit/schemacop/v2/validator_float_test.rb".freeze, "test/unit/schemacop/v2/validator_hash_test.rb".freeze, "test/unit/schemacop/v2/validator_integer_test.rb".freeze, "test/unit/schemacop/v2/validator_nil_test.rb".freeze, "test/unit/schemacop/v2/validator_number_test.rb".freeze, "test/unit/schemacop/v2/validator_object_test.rb".freeze, "test/unit/schemacop/v2/validator_string_test.rb".freeze, "test/unit/schemacop/v2/validator_symbol_test.rb".freeze, "test/unit/schemacop/v3/all_of_node_test.rb".freeze, "test/unit/schemacop/v3/any_of_node_test.rb".freeze, "test/unit/schemacop/v3/array_node_test.rb".freeze, "test/unit/schemacop/v3/boolean_node_test.rb".freeze, "test/unit/schemacop/v3/global_context_test.rb".freeze, "test/unit/schemacop/v3/hash_node_test.rb".freeze, "test/unit/schemacop/v3/integer_node_test.rb".freeze, "test/unit/schemacop/v3/is_not_node_test.rb".freeze, "test/unit/schemacop/v3/node_test.rb".freeze, "test/unit/schemacop/v3/number_node_test.rb".freeze, "test/unit/schemacop/v3/object_node_test.rb".freeze, "test/unit/schemacop/v3/one_of_node_test.rb".freeze, "test/unit/schemacop/v3/reference_node_test.rb".freeze, "test/unit/schemacop/v3/string_node_test.rb".freeze, "test/unit/schemacop/v3/symbol_node_test.rb".freeze]
13
13
  s.homepage = "https://github.com/sitrox/schemacop".freeze
14
14
  s.licenses = ["MIT".freeze]
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: 3.0.24
4
+ version: 3.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-15 00:00:00.000000000 Z
11
+ date: 2023-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport