dry-schema 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +64 -3
- data/README.md +6 -1
- data/dry-schema.gemspec +4 -5
- data/lib/dry/schema/config.rb +5 -0
- data/lib/dry/schema/dsl.rb +2 -2
- data/lib/dry/schema/extensions/json_schema/schema_compiler.rb +10 -3
- data/lib/dry/schema/macros/dsl.rb +24 -7
- data/lib/dry/schema/macros/key.rb +1 -1
- data/lib/dry/schema/macros/value.rb +1 -1
- data/lib/dry/schema/message/or/multi_path.rb +1 -1
- data/lib/dry/schema/messages/i18n.rb +6 -4
- data/lib/dry/schema/messages.rb +36 -5
- data/lib/dry/schema/trace.rb +1 -1
- data/lib/dry/schema/version.rb +1 -1
- data/lib/dry/schema.rb +3 -3
- metadata +11 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b54511171dc7fabc01aadfd9a1fd2be49ba597ca0210996f31567b7497360ac
|
|
4
|
+
data.tar.gz: 01bba0206f064be19b2f8b8048e326890f8bca3e359b59d2f0664d12a57c9e4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24b64bb68fa2b0494b7e78e4add7bb1155986b801862cca1abdf5b79c0697778e5d3456033c99574a93ae55638318bdb6a69b758b983d3b542b06313cc17b621
|
|
7
|
+
data.tar.gz: 7072a8dca2e49ca412da5bd5923fd906e8cda76f7234f4269797fcd807d2a577978b9cdcb6a7a517f4ccad9558eace9a9fe954b6a33956b9071681aaa2499781
|
data/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Break Versioning](https://www.taoensso.com/break-versioning).
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Break Versioning](https://www.taoensso.com/break-versioning).
|
|
7
6
|
|
|
8
7
|
## [Unreleased]
|
|
9
8
|
|
|
@@ -19,7 +18,69 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
|
|
|
19
18
|
|
|
20
19
|
### Security
|
|
21
20
|
|
|
22
|
-
[Unreleased]: https://github.com/dry-rb/dry-schema/compare/v1.
|
|
21
|
+
[Unreleased]: https://github.com/dry-rb/dry-schema/compare/v1.17.0...main
|
|
22
|
+
|
|
23
|
+
## [1.17.0] - 2026-11-20
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Accept predicate keywords without a question mark, matching dry-types constraints. Keywords with a question mark still work. (@aaronmallen in #520)
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
Dry::Schema.Params do
|
|
31
|
+
required(:name).filled(:string, min_size: 2)
|
|
32
|
+
required(:age).value(:integer, gt: 18)
|
|
33
|
+
end
|
|
34
|
+
```
|
|
35
|
+
- Accept a custom messages backend for `config.messages.backend`: a `Dry::Schema::Messages::Abstract` subclass, or any object responding to `build(options)`. (@parndt in #526)
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
class ShoutingMessages < Dry::Schema::Messages::YAML
|
|
39
|
+
def get(key, options = EMPTY_HASH)
|
|
40
|
+
result = super
|
|
41
|
+
result&.merge(text: result[:text].upcase)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
schema = Dry::Schema.define do
|
|
46
|
+
config.messages.backend = ShoutingMessages
|
|
47
|
+
|
|
48
|
+
required(:name).filled(:string)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
schema.(name: "").errors.to_h
|
|
52
|
+
# => {name: ["MUST BE FILLED"]}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
[1.17.0]: https://github.com/dry-rb/dry-schema/compare/v1.16.0...v1.17.0
|
|
56
|
+
|
|
57
|
+
## [1.16.0] - 2026-03-03
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- Support JRuby (@katafrakt in #512, @timriley in 1a6202f)
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- In JSON Schema output, represent values with an `eql?` constraint as "const" values. (@adamransom in #514)
|
|
66
|
+
```ruby
|
|
67
|
+
require "dry/schema"
|
|
68
|
+
Dry::Schema.load_extensions(:json_schema)
|
|
69
|
+
|
|
70
|
+
schema = Dry::Schema.JSON do
|
|
71
|
+
required(:version).value(:integer, eql?: 1)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
schema.json_schema
|
|
75
|
+
# => {"$schema": "http://json-schema.org/draft-06/schema#", type: "object", properties: {version: {type: "integer", const: 1}}, required: ["version"]}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
|
|
80
|
+
- In JSON Schema output, fix representation of arrays that are a combinations of schemas. (@adamransom in #516)
|
|
81
|
+
- Avoid mutation of arguments given to `Dry::Schema::Messages::I18n#get`. (@flash-gordon in 51d48b6)
|
|
82
|
+
|
|
83
|
+
[1.16.0]: https://github.com/dry-rb/dry-schema/compare/v1.15.0...v1.16.0
|
|
23
84
|
|
|
24
85
|
## [1.15.0] - 2026-01-09
|
|
25
86
|
|
data/README.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<!--- This file is synced from hanakai-rb/repo-sync -->
|
|
2
2
|
|
|
3
|
-
[rubygem]: https://rubygems.org/gems/dry-schema
|
|
4
3
|
[actions]: https://github.com/dry-rb/dry-schema/actions
|
|
4
|
+
[chat]: https://discord.gg/naQApPAsZB
|
|
5
|
+
[forum]: https://discourse.hanakai.org
|
|
6
|
+
[rubygem]: https://rubygems.org/gems/dry-schema
|
|
5
7
|
|
|
6
8
|
# dry-schema [][rubygem] [][actions]
|
|
7
9
|
|
|
10
|
+
[][forum]
|
|
11
|
+
[][chat]
|
|
12
|
+
|
|
8
13
|
## Links
|
|
9
14
|
|
|
10
15
|
- [User documentation](https://dry-rb.org/gems/dry-schema)
|
data/dry-schema.gemspec
CHANGED
|
@@ -21,19 +21,18 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
TEXT
|
|
22
22
|
spec.homepage = "https://dry-rb.org/gems/dry-schema"
|
|
23
23
|
spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "dry-schema.gemspec", "lib/**/*", "config/*.yml"]
|
|
24
|
-
spec.bindir = "
|
|
25
|
-
spec.executables = []
|
|
24
|
+
spec.bindir = "exe"
|
|
25
|
+
spec.executables = Dir["exe/*"].map { |f| File.basename(f) }
|
|
26
26
|
spec.require_paths = ["lib"]
|
|
27
27
|
|
|
28
28
|
spec.extra_rdoc_files = ["README.md", "CHANGELOG.md", "LICENSE"]
|
|
29
29
|
|
|
30
|
-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
31
30
|
spec.metadata["changelog_uri"] = "https://github.com/dry-rb/dry-schema/blob/main/CHANGELOG.md"
|
|
32
31
|
spec.metadata["source_code_uri"] = "https://github.com/dry-rb/dry-schema"
|
|
33
32
|
spec.metadata["bug_tracker_uri"] = "https://github.com/dry-rb/dry-schema/issues"
|
|
34
33
|
spec.metadata["funding_uri"] = "https://github.com/sponsors/hanami"
|
|
35
34
|
|
|
36
|
-
spec.required_ruby_version = ">= 3.
|
|
35
|
+
spec.required_ruby_version = ">= 3.3"
|
|
37
36
|
|
|
38
37
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
|
39
38
|
spec.add_runtime_dependency "zeitwerk", "~> 2.6"
|
|
@@ -41,7 +40,7 @@ Gem::Specification.new do |spec|
|
|
|
41
40
|
spec.add_runtime_dependency "dry-configurable", "~> 1.0", ">= 1.0.1"
|
|
42
41
|
spec.add_runtime_dependency "dry-initializer", "~> 3.2"
|
|
43
42
|
spec.add_runtime_dependency "dry-logic", "~> 1.6"
|
|
44
|
-
spec.add_runtime_dependency "dry-types", "~> 1.
|
|
43
|
+
spec.add_runtime_dependency "dry-types", "~> 1.9", ">= 1.9.1"
|
|
45
44
|
spec.add_development_dependency "bundler"
|
|
46
45
|
spec.add_development_dependency "rake"
|
|
47
46
|
spec.add_development_dependency "rspec"
|
data/lib/dry/schema/config.rb
CHANGED
|
@@ -39,6 +39,11 @@ module Dry
|
|
|
39
39
|
#
|
|
40
40
|
# Return configuration for message backend
|
|
41
41
|
#
|
|
42
|
+
# `backend` is `:yaml` (the default), `:i18n`, or an object that responds to
|
|
43
|
+
# `build(options)`, such as a subclass of {Messages::Abstract}. A custom backend's `build`
|
|
44
|
+
# receives only the options for settings defined on {Messages::Abstract}, so settings that a
|
|
45
|
+
# subclass adds keep their defaults unless the subclass sets them.
|
|
46
|
+
#
|
|
42
47
|
# @return [Dry::Configurable::Config]
|
|
43
48
|
#
|
|
44
49
|
# @api public
|
data/lib/dry/schema/dsl.rb
CHANGED
|
@@ -132,7 +132,7 @@ module Dry
|
|
|
132
132
|
#
|
|
133
133
|
# required(:age).value(:integer)
|
|
134
134
|
#
|
|
135
|
-
# required(:user_limit).value(:integer, gt
|
|
135
|
+
# required(:user_limit).value(:integer, gt: 0)
|
|
136
136
|
#
|
|
137
137
|
# required(:tags).filled { array? | str? }
|
|
138
138
|
#
|
|
@@ -502,7 +502,7 @@ module Dry
|
|
|
502
502
|
parents.each_cons(2) do |left, right|
|
|
503
503
|
unless left.config == right.config
|
|
504
504
|
raise ::ArgumentError,
|
|
505
|
-
|
|
505
|
+
"Parent configs differ, left=#{left.inspect}, right=#{right.inspect}"
|
|
506
506
|
end
|
|
507
507
|
end
|
|
508
508
|
|
|
@@ -37,6 +37,7 @@ module Dry
|
|
|
37
37
|
true?: {},
|
|
38
38
|
false?: {},
|
|
39
39
|
included_in?: {enum: ->(v, _) { v.to_a }},
|
|
40
|
+
eql?: {const: IDENTITY},
|
|
40
41
|
filled?: EMPTY_HASH,
|
|
41
42
|
uri?: {format: "uri"},
|
|
42
43
|
uuid_v1?: {
|
|
@@ -133,14 +134,20 @@ module Dry
|
|
|
133
134
|
|
|
134
135
|
# @api private
|
|
135
136
|
def visit_or(node, opts = EMPTY_HASH)
|
|
137
|
+
any_of = []
|
|
136
138
|
node.each do |child|
|
|
137
139
|
c = self.class.new(loose: loose?)
|
|
138
140
|
c.keys.update(subschema: {})
|
|
139
|
-
c.visit(child, opts.merge(key: :subschema))
|
|
140
|
-
|
|
141
|
-
any_of = (keys[opts[:key]][:anyOf] ||= [])
|
|
141
|
+
c.visit(child, opts.except(:member).merge(key: :subschema))
|
|
142
142
|
any_of << c.keys[:subschema]
|
|
143
143
|
end
|
|
144
|
+
|
|
145
|
+
target = keys[opts[:key]]
|
|
146
|
+
if target[:type]&.include?("array")
|
|
147
|
+
target[:items] = {anyOf: any_of}
|
|
148
|
+
else
|
|
149
|
+
target[:anyOf] = any_of
|
|
150
|
+
end
|
|
144
151
|
end
|
|
145
152
|
|
|
146
153
|
# @api private
|
|
@@ -13,6 +13,16 @@ module Dry
|
|
|
13
13
|
undef :nil?
|
|
14
14
|
undef :respond_to?
|
|
15
15
|
|
|
16
|
+
# Keyword options that macros read for themselves, rather than treating them as predicates
|
|
17
|
+
#
|
|
18
|
+
# These must never share a name with a built-in predicate (minus its question mark), since
|
|
19
|
+
# predicate keywords may be written without the question mark. A custom predicate that
|
|
20
|
+
# shares one of these names can still be used by including its question mark, e.g.
|
|
21
|
+
# `type_rule?: 1`.
|
|
22
|
+
#
|
|
23
|
+
# @api private
|
|
24
|
+
MACRO_OPTIONS = %i[type_spec type_rule].freeze
|
|
25
|
+
|
|
16
26
|
# @!attribute [r] chain
|
|
17
27
|
# Indicate if the macro should append its rules to the provided trace
|
|
18
28
|
# @return [Boolean]
|
|
@@ -34,6 +44,10 @@ module Dry
|
|
|
34
44
|
# @overload value(*predicates, **predicate_opts)
|
|
35
45
|
# Set predicates without and with arguments
|
|
36
46
|
#
|
|
47
|
+
# Predicates with arguments may be given as keywords, with or without their question
|
|
48
|
+
# mark: `min_size: 2` and `min_size?: 2` are the same. Including the question mark is
|
|
49
|
+
# always unambiguous, so use it if a predicate name could clash with a macro option.
|
|
50
|
+
#
|
|
37
51
|
# @param [Array<Symbol>] predicates
|
|
38
52
|
# @param [Hash] predicate_opts
|
|
39
53
|
#
|
|
@@ -41,10 +55,13 @@ module Dry
|
|
|
41
55
|
# required(:name).value(:filled?)
|
|
42
56
|
#
|
|
43
57
|
# @example with a predicate with arguments
|
|
44
|
-
# required(:name).value(min_size
|
|
58
|
+
# required(:name).value(min_size: 2)
|
|
45
59
|
#
|
|
46
60
|
# @example with a predicate with and without arguments
|
|
47
|
-
# required(:name).value(:filled?, min_size
|
|
61
|
+
# required(:name).value(:filled?, min_size: 2)
|
|
62
|
+
#
|
|
63
|
+
# @example with a predicate name that includes its question mark
|
|
64
|
+
# required(:name).value(min_size?: 2)
|
|
48
65
|
#
|
|
49
66
|
# @example with a block
|
|
50
67
|
# required(:name).value { filled? & min_size?(2) }
|
|
@@ -72,7 +89,7 @@ module Dry
|
|
|
72
89
|
# required(:name).filled(:string)
|
|
73
90
|
#
|
|
74
91
|
# @example with a type spec and a predicate
|
|
75
|
-
# required(:name).filled(:string, format
|
|
92
|
+
# required(:name).filled(:string, format: /\w+/)
|
|
76
93
|
#
|
|
77
94
|
# @return [Macros::Core]
|
|
78
95
|
#
|
|
@@ -110,7 +127,7 @@ module Dry
|
|
|
110
127
|
# manually.
|
|
111
128
|
#
|
|
112
129
|
# @example
|
|
113
|
-
# required(:tags).value(:hash, min_size
|
|
130
|
+
# required(:tags).value(:hash, min_size: 1).schema do
|
|
114
131
|
# required(:name).value(:string)
|
|
115
132
|
# end
|
|
116
133
|
#
|
|
@@ -144,10 +161,10 @@ module Dry
|
|
|
144
161
|
# manually.
|
|
145
162
|
#
|
|
146
163
|
# @example a list of strings
|
|
147
|
-
# required(:tags).value(:array, min_size
|
|
164
|
+
# required(:tags).value(:array, min_size: 2).each(:str?)
|
|
148
165
|
#
|
|
149
166
|
# @example a list of hashes
|
|
150
|
-
# required(:tags).value(:array, min_size
|
|
167
|
+
# required(:tags).value(:array, min_size: 2).each(:hash) do
|
|
151
168
|
# required(:name).filled(:string)
|
|
152
169
|
# end
|
|
153
170
|
#
|
|
@@ -182,7 +199,7 @@ module Dry
|
|
|
182
199
|
# Set type spec
|
|
183
200
|
#
|
|
184
201
|
# @example
|
|
185
|
-
# required(:name).type(:string).value(min_size
|
|
202
|
+
# required(:name).type(:string).value(min_size: 2)
|
|
186
203
|
#
|
|
187
204
|
# @param [Symbol, Array, Dry::Types::Type] spec
|
|
188
205
|
#
|
|
@@ -15,7 +15,7 @@ module Dry
|
|
|
15
15
|
# Specify predicates that should be applied before coercion
|
|
16
16
|
#
|
|
17
17
|
# @example check format before coercing to a date
|
|
18
|
-
# required(:publish_date).filter(format
|
|
18
|
+
# required(:publish_date).filter(format: /\d{4}-\d{2}-\d{2}).value(:date)
|
|
19
19
|
#
|
|
20
20
|
# @see Macros::Key#value
|
|
21
21
|
#
|
|
@@ -32,8 +32,7 @@ module Dry
|
|
|
32
32
|
def get(key, options = EMPTY_HASH)
|
|
33
33
|
return unless key
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
result = t.(key, **options)
|
|
35
|
+
result = t.(key, locale: default_locale, **options)
|
|
37
36
|
|
|
38
37
|
if result.is_a?(Hash)
|
|
39
38
|
text = result[:text]
|
|
@@ -114,9 +113,12 @@ module Dry
|
|
|
114
113
|
resolved_key = key?(text_key, opts) ? text_key : key
|
|
115
114
|
|
|
116
115
|
result = t.(resolved_key, **opts)
|
|
117
|
-
return result unless result.is_a?(Hash)
|
|
118
116
|
|
|
119
|
-
result
|
|
117
|
+
if result.is_a?(::Hash)
|
|
118
|
+
result[:text]
|
|
119
|
+
else
|
|
120
|
+
result
|
|
121
|
+
end
|
|
120
122
|
end
|
|
121
123
|
|
|
122
124
|
private
|
data/lib/dry/schema/messages.rb
CHANGED
|
@@ -14,19 +14,50 @@ module Dry
|
|
|
14
14
|
module_function
|
|
15
15
|
|
|
16
16
|
public def setup(config)
|
|
17
|
-
backend_class = BACKENDS.fetch(config.backend) do
|
|
18
|
-
raise "+#{config.backend}+ is not a valid messages identifier"
|
|
19
|
-
end
|
|
20
|
-
|
|
21
17
|
namespace = config.namespace
|
|
22
18
|
options = config.to_h.select { |k, _| Abstract.setting_names.include?(k) }
|
|
23
19
|
|
|
24
|
-
messages =
|
|
20
|
+
messages = backend(config.backend).build(options)
|
|
25
21
|
|
|
26
22
|
return messages.namespaced(namespace) if namespace
|
|
27
23
|
|
|
28
24
|
messages
|
|
29
25
|
end
|
|
26
|
+
|
|
27
|
+
# Returns the backend for the given identifier (`:i18n` or `:yaml`), or the given object
|
|
28
|
+
# itself if it can build messages, such as a subclass of {Abstract}
|
|
29
|
+
#
|
|
30
|
+
# The backend's `build` receives only the options for settings defined on {Abstract}. If a
|
|
31
|
+
# subclass adds its own settings, they keep their defaults unless the subclass sets them.
|
|
32
|
+
#
|
|
33
|
+
# A custom backend only needs `build(options)`, which must return an object that implements
|
|
34
|
+
# the {Abstract} interface. It does not need `#merge`.
|
|
35
|
+
#
|
|
36
|
+
# @api private
|
|
37
|
+
public def backend(identifier)
|
|
38
|
+
return identifier if identifier.respond_to?(:build)
|
|
39
|
+
|
|
40
|
+
backend_class = BACKENDS.fetch(identifier) do
|
|
41
|
+
raise invalid_backend_message(identifier)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
Messages.const_get(backend_class)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# @api private
|
|
48
|
+
private_class_method def invalid_backend_message(identifier)
|
|
49
|
+
message =
|
|
50
|
+
"#{identifier.inspect} is not a valid messages backend. Use :yaml, :i18n, " \
|
|
51
|
+
"or an object that responds to #build, such as a subclass of #{Abstract}"
|
|
52
|
+
|
|
53
|
+
# It's an easy mistake to pass a pre-built messages object instead of its class, so add a
|
|
54
|
+
# hint for this case.
|
|
55
|
+
if identifier.is_a?(Abstract)
|
|
56
|
+
message += ". Pass the class (#{identifier.class}), not an instance."
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
message
|
|
60
|
+
end
|
|
30
61
|
end
|
|
31
62
|
end
|
|
32
63
|
end
|
data/lib/dry/schema/trace.rb
CHANGED
|
@@ -44,7 +44,7 @@ module Dry
|
|
|
44
44
|
elsif predicate.is_a?(::Array)
|
|
45
45
|
predicate.map { |pred| evaluate_predicates(pred).reduce(:&) }.reduce(:|)
|
|
46
46
|
elsif predicate.is_a?(::Hash)
|
|
47
|
-
predicate.map { |pred, *args| __send__(pred, *args) }
|
|
47
|
+
predicate.map { |pred, *args| __send__(:"#{pred.to_s.delete_suffix("?")}?", *args) }
|
|
48
48
|
else
|
|
49
49
|
__send__(predicate)
|
|
50
50
|
end
|
data/lib/dry/schema/version.rb
CHANGED
data/lib/dry/schema.rb
CHANGED
|
@@ -54,7 +54,7 @@ module Dry
|
|
|
54
54
|
# @example
|
|
55
55
|
# Dry::Schema.define do
|
|
56
56
|
# required(:name).filled(:string)
|
|
57
|
-
# required(:age).value(:integer, gt
|
|
57
|
+
# required(:age).value(:integer, gt: 0)
|
|
58
58
|
# end
|
|
59
59
|
#
|
|
60
60
|
# @param [Hash] options
|
|
@@ -75,7 +75,7 @@ module Dry
|
|
|
75
75
|
# @example
|
|
76
76
|
# Dry::Schema.Params do
|
|
77
77
|
# required(:name).filled(:string)
|
|
78
|
-
# required(:age).value(:integer, gt
|
|
78
|
+
# required(:age).value(:integer, gt: 0)
|
|
79
79
|
# end
|
|
80
80
|
#
|
|
81
81
|
# @return [Params]
|
|
@@ -95,7 +95,7 @@ module Dry
|
|
|
95
95
|
# @example
|
|
96
96
|
# Dry::Schema.JSON do
|
|
97
97
|
# required(:name).filled(:string)
|
|
98
|
-
# required(:age).value(:integer, gt
|
|
98
|
+
# required(:age).value(:integer, gt: 0)
|
|
99
99
|
# end
|
|
100
100
|
#
|
|
101
101
|
# @return [Params]
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dry-schema
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hanakai team
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
@@ -105,14 +105,20 @@ dependencies:
|
|
|
105
105
|
requirements:
|
|
106
106
|
- - "~>"
|
|
107
107
|
- !ruby/object:Gem::Version
|
|
108
|
-
version: '1.
|
|
108
|
+
version: '1.9'
|
|
109
|
+
- - ">="
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: 1.9.1
|
|
109
112
|
type: :runtime
|
|
110
113
|
prerelease: false
|
|
111
114
|
version_requirements: !ruby/object:Gem::Requirement
|
|
112
115
|
requirements:
|
|
113
116
|
- - "~>"
|
|
114
117
|
- !ruby/object:Gem::Version
|
|
115
|
-
version: '1.
|
|
118
|
+
version: '1.9'
|
|
119
|
+
- - ">="
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: 1.9.1
|
|
116
122
|
- !ruby/object:Gem::Dependency
|
|
117
123
|
name: bundler
|
|
118
124
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -259,7 +265,6 @@ homepage: https://dry-rb.org/gems/dry-schema
|
|
|
259
265
|
licenses:
|
|
260
266
|
- MIT
|
|
261
267
|
metadata:
|
|
262
|
-
allowed_push_host: https://rubygems.org
|
|
263
268
|
changelog_uri: https://github.com/dry-rb/dry-schema/blob/main/CHANGELOG.md
|
|
264
269
|
source_code_uri: https://github.com/dry-rb/dry-schema
|
|
265
270
|
bug_tracker_uri: https://github.com/dry-rb/dry-schema/issues
|
|
@@ -271,7 +276,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
271
276
|
requirements:
|
|
272
277
|
- - ">="
|
|
273
278
|
- !ruby/object:Gem::Version
|
|
274
|
-
version: '3.
|
|
279
|
+
version: '3.3'
|
|
275
280
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
281
|
requirements:
|
|
277
282
|
- - ">="
|