dry-schema 1.7.1 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/dry-schema.gemspec +1 -1
- data/lib/dry/schema/config.rb +9 -9
- data/lib/dry/schema/messages/abstract.rb +9 -9
- data/lib/dry/schema/processor.rb +2 -2
- data/lib/dry/schema/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc91fbbcd77a2535c39ac072f7725e2cc89cf40fb1710c1f7f2f32867d37351e
|
4
|
+
data.tar.gz: a725bbc8ae7735fb576b827c5ee4dc00235e51287e7fb20882d8235fc61d72f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dcb14a96c4d9e1c38ca7bafaf04a621ee71cffc75bb4f3328d46752ec291f4ee580fea7f21bc4b430277af601ca31e29c5358d3c72d38ec53e128b411921245
|
7
|
+
data.tar.gz: 27d66147c3be3d089d92b56ddec1b00a230d83e04606a52c14c10cb0f40648b8beb893f874e00916c5450769b1bdaf72c0df54e3e89464f96bc96986904fe465
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
+
## 1.8.0 2021-09-12
|
4
|
+
|
5
|
+
|
6
|
+
### Changed
|
7
|
+
|
8
|
+
- [internal] Upgraded to new `setting` API provided in dry-configurable 0.13.0 (@timriley in #356)
|
9
|
+
|
10
|
+
[Compare v1.7.1...v1.8.0](https://github.com/dry-rb/dry-schema/compare/v1.7.1...v1.8.0)
|
11
|
+
|
3
12
|
## 1.7.1 2021-08-29
|
4
13
|
|
5
14
|
|
data/dry-schema.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
# to update dependencies edit project.yml
|
37
37
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
38
|
-
spec.add_runtime_dependency "dry-configurable", "~> 0.
|
38
|
+
spec.add_runtime_dependency "dry-configurable", "~> 0.13", ">= 0.13.0"
|
39
39
|
spec.add_runtime_dependency "dry-core", "~> 0.5", ">= 0.5"
|
40
40
|
spec.add_runtime_dependency "dry-initializer", "~> 3.0"
|
41
41
|
spec.add_runtime_dependency "dry-logic", "~> 1.0"
|
data/lib/dry/schema/config.rb
CHANGED
@@ -25,7 +25,7 @@ module Dry
|
|
25
25
|
# @return [Schema::PredicateRegistry]
|
26
26
|
#
|
27
27
|
# @api public
|
28
|
-
setting
|
28
|
+
setting :predicates, default: Schema::PredicateRegistry.new
|
29
29
|
|
30
30
|
# @!method types
|
31
31
|
#
|
@@ -34,7 +34,7 @@ module Dry
|
|
34
34
|
# @return [Hash]
|
35
35
|
#
|
36
36
|
# @api public
|
37
|
-
setting
|
37
|
+
setting :types, default: Dry::Types
|
38
38
|
|
39
39
|
# @!method messages
|
40
40
|
#
|
@@ -43,12 +43,12 @@ module Dry
|
|
43
43
|
# @return [Dry::Configurable::Config]
|
44
44
|
#
|
45
45
|
# @api public
|
46
|
-
setting
|
47
|
-
setting
|
48
|
-
setting
|
49
|
-
setting
|
50
|
-
setting
|
51
|
-
setting
|
46
|
+
setting :messages do
|
47
|
+
setting :backend, default: :yaml
|
48
|
+
setting :namespace
|
49
|
+
setting :load_paths, default: Set[DEFAULT_MESSAGES_PATH], constructor: :dup.to_proc
|
50
|
+
setting :top_namespace, default: DEFAULT_MESSAGES_ROOT
|
51
|
+
setting :default_locale
|
52
52
|
end
|
53
53
|
|
54
54
|
# @!method validate_keys
|
@@ -58,7 +58,7 @@ module Dry
|
|
58
58
|
# @return [Boolean]
|
59
59
|
#
|
60
60
|
# @api public
|
61
|
-
setting
|
61
|
+
setting :validate_keys, default: false
|
62
62
|
|
63
63
|
# @api private
|
64
64
|
def respond_to_missing?(meth, include_private = false)
|
@@ -18,13 +18,13 @@ module Dry
|
|
18
18
|
include Dry::Configurable
|
19
19
|
include Dry::Equalizer(:config)
|
20
20
|
|
21
|
-
setting :default_locale
|
22
|
-
setting :load_paths, Set[DEFAULT_MESSAGES_PATH]
|
23
|
-
setting :top_namespace, DEFAULT_MESSAGES_ROOT
|
24
|
-
setting :root, "errors"
|
25
|
-
setting :lookup_options, %i[root predicate path val_type arg_type].freeze
|
21
|
+
setting :default_locale
|
22
|
+
setting :load_paths, default: Set[DEFAULT_MESSAGES_PATH]
|
23
|
+
setting :top_namespace, default: DEFAULT_MESSAGES_ROOT
|
24
|
+
setting :root, default: "errors"
|
25
|
+
setting :lookup_options, default: %i[root predicate path val_type arg_type].freeze
|
26
26
|
|
27
|
-
setting :lookup_paths, [
|
27
|
+
setting :lookup_paths, default: [
|
28
28
|
"%<root>s.rules.%<path>s.%<predicate>s.arg.%<arg_type>s",
|
29
29
|
"%<root>s.rules.%<path>s.%<predicate>s",
|
30
30
|
"%<root>s.%<predicate>s.%<message_type>s",
|
@@ -35,13 +35,13 @@ module Dry
|
|
35
35
|
"%<root>s.%<predicate>s"
|
36
36
|
].freeze
|
37
37
|
|
38
|
-
setting :rule_lookup_paths, ["rules.%<name>s"].freeze
|
38
|
+
setting :rule_lookup_paths, default: ["rules.%<name>s"].freeze
|
39
39
|
|
40
|
-
setting :arg_types, Hash.new { |*| "default" }.update(
|
40
|
+
setting :arg_types, default: Hash.new { |*| "default" }.update(
|
41
41
|
Range => "range"
|
42
42
|
)
|
43
43
|
|
44
|
-
setting :val_types, Hash.new { |*| "default" }.update(
|
44
|
+
setting :val_types, default: Hash.new { |*| "default" }.update(
|
45
45
|
Range => "range",
|
46
46
|
String => "string"
|
47
47
|
)
|
data/lib/dry/schema/processor.rb
CHANGED
@@ -28,8 +28,8 @@ module Dry
|
|
28
28
|
include Dry::Logic::Operators
|
29
29
|
|
30
30
|
setting :key_map_type
|
31
|
-
setting :type_registry_namespace, :strict
|
32
|
-
setting :filter_empty_string, false
|
31
|
+
setting :type_registry_namespace, default: :strict
|
32
|
+
setting :filter_empty_string, default: false
|
33
33
|
|
34
34
|
option :steps, default: -> { ProcessorSteps.new }
|
35
35
|
|
data/lib/dry/schema/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -30,20 +30,20 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.13'
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: 0.13.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
43
|
+
version: '0.13'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.13.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: dry-core
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|