dry-schema 1.3.2 → 1.4.2
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 +178 -108
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/dry/schema.rb +1 -1
- data/lib/dry/schema/constants.rb +3 -2
- data/lib/dry/schema/dsl.rb +65 -20
- data/lib/dry/schema/extensions/hints/message_compiler_methods.rb +1 -1
- data/lib/dry/schema/key.rb +4 -4
- data/lib/dry/schema/macros/core.rb +2 -2
- data/lib/dry/schema/macros/dsl.rb +31 -8
- data/lib/dry/schema/macros/filled.rb +0 -7
- data/lib/dry/schema/macros/key.rb +2 -2
- data/lib/dry/schema/macros/schema.rb +2 -7
- data/lib/dry/schema/macros/value.rb +21 -2
- data/lib/dry/schema/message_compiler.rb +6 -5
- data/lib/dry/schema/messages/abstract.rb +43 -19
- data/lib/dry/schema/messages/i18n.rb +34 -1
- data/lib/dry/schema/messages/namespaced.rb +6 -1
- data/lib/dry/schema/messages/template.rb +1 -1
- data/lib/dry/schema/messages/yaml.rb +12 -0
- data/lib/dry/schema/namespaced_rule.rb +2 -1
- data/lib/dry/schema/predicate_registry.rb +2 -23
- data/lib/dry/schema/processor.rb +10 -27
- data/lib/dry/schema/processor_steps.rb +116 -0
- data/lib/dry/schema/result.rb +1 -1
- data/lib/dry/schema/type_registry.rb +2 -2
- data/lib/dry/schema/version.rb +1 -1
- metadata +5 -5
- data/lib/dry/schema/primitive_inferrer.rb +0 -98
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebd83b8cd1025c9f732f593b47d52583455bac56def9866901a374cd9f24dc11
|
4
|
+
data.tar.gz: def7d4f585ab856a055667474bc6cb59e7f012e13dcf0a4a9d17daa9b0ea53d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77a2481151c16aa91e1a29a32e640adadfcefcbceacbd5e1e8cdfcd63c29d186dbc17640d9da0974c37a2e152440da723fd516cac7362cd195b24630011905d0
|
7
|
+
data.tar.gz: c5cf256d2b61a3dc7b832f68d6ce64c735f00a7885f42a05f53f67a07ec6108322d996ea243387dc91b5acfbb57765129e8d25bfecbb2c151a5e18ac3c709c50
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,78 @@
|
|
1
|
+
# 1.4.2 2019-12-19
|
2
|
+
|
3
|
+
### Fixed
|
4
|
+
|
5
|
+
* `I18n` messages backend supports procs as text properly (issue #208) (@robhanlon22)
|
6
|
+
* `I18n` messages backend supports message meta-data (issue #210) (@robhanlon22)
|
7
|
+
* Fixed keyword warnings from MRI 2.7.0 (@flash-gordon)
|
8
|
+
* Array with a member works correctly with `maybe` (issue #206) (@solnic)
|
9
|
+
|
10
|
+
[Compare v1.4.1...v1.4.2](https://github.com/dry-rb/dry-schema/compare/v1.4.1...v1.4.2)
|
11
|
+
|
12
|
+
# 1.4.1 2019-10-08
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
|
16
|
+
- Child schemas no longer mutate processing steps of their parent classes (@skryukov)
|
17
|
+
|
18
|
+
[Compare v1.4.0...v1.4.1](https://github.com/dry-rb/dry-schema/compare/v1.4.0...v1.4.1)
|
19
|
+
|
20
|
+
# 1.4.0 2019-10-08
|
21
|
+
|
22
|
+
### Added
|
23
|
+
|
24
|
+
- Support for passing multiple parent schemas. They are inherited from left to right (@ianwhite)
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
Dry::Schema.define(parent: [parent_a, parent_b, parent_c]) do
|
28
|
+
...
|
29
|
+
end
|
30
|
+
```
|
31
|
+
|
32
|
+
- Improved error messages about missing translations (@skryukov)
|
33
|
+
- [experimental] before/after callbacks for schema steps (@skryukov)
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
Dry::Schema.Params do
|
37
|
+
required(:name).value(:string)
|
38
|
+
optional(:age).value(:integer)
|
39
|
+
|
40
|
+
before(:value_coercer) do |result|
|
41
|
+
result.to_h.compact
|
42
|
+
end
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
### Fixed
|
47
|
+
|
48
|
+
- Added/fixed support for custom optional types (@flash-gordon)
|
49
|
+
|
50
|
+
[Compare v1.3.4...v1.4.0](https://github.com/dry-rb/dry-schema/compare/v1.3.4...v1.4.0)
|
51
|
+
|
52
|
+
# 1.3.4 2019-09-11
|
53
|
+
|
54
|
+
### Fixed
|
55
|
+
|
56
|
+
- Fixed regression where using `array?` predicate within a block would crach (issue #186) (@skryukov)
|
57
|
+
|
58
|
+
[Compare v1.3.3...v1.3.4](https://github.com/dry-rb/dry-schema/compare/v1.3.3...v1.3.4)
|
59
|
+
|
60
|
+
# 1.3.3 2019-08-14
|
61
|
+
|
62
|
+
### Fixed
|
63
|
+
|
64
|
+
- Reject attempts to build a nested schema for array types built on `Dry::Types::Nominal` (fixed #171) (@flash-gordon)
|
65
|
+
- Current `I18n.locale` is now properly handled when caching message templates (@flash-gordon)
|
66
|
+
- Default processor uses strict types by default, which fixes various cases when `maybe` is used with a constructor type (@flash-gordon)
|
67
|
+
- Namespaced messages no longer causes a crash when used with nested schemas (fixed #176) (@solnic)
|
68
|
+
|
69
|
+
[Compare v1.3.2...v1.3.3](https://github.com/dry-rb/dry-schema/compare/v1.3.2...v1.3.3)
|
70
|
+
|
1
71
|
# 1.3.2 2019-08-01
|
2
72
|
|
3
73
|
### Added
|
4
74
|
|
5
|
-
|
75
|
+
- Support for new predicates: `bytesize?`, `min_bytesize?` and `max_bytesize?` (@bmalinconico)
|
6
76
|
|
7
77
|
[Compare v1.3.1...v1.3.2](https://github.com/dry-rb/dry-schema/compare/v1.3.1...v1.3.2)
|
8
78
|
|
@@ -10,8 +80,8 @@
|
|
10
80
|
|
11
81
|
### Fixed
|
12
82
|
|
13
|
-
|
14
|
-
|
83
|
+
- `Result#error?` works correctly with nested hashes and arrays (@solnic)
|
84
|
+
- `:hints` extension no longer causes a crash where base messages are generated too (issue #165) (@solnic)
|
15
85
|
|
16
86
|
[Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-schema/compare/v1.3.0...v1.3.1)
|
17
87
|
|
@@ -21,15 +91,15 @@
|
|
21
91
|
|
22
92
|
- Automatic predicate inferring for constrained types! (@flash-gordon)
|
23
93
|
|
24
|
-
|
25
|
-
|
94
|
+
```ruby
|
95
|
+
Types::Name = Types::String.constrained(min_size: 1)
|
26
96
|
|
27
|
-
|
28
|
-
|
29
|
-
|
97
|
+
schema = Dry::Schema.define do
|
98
|
+
required(:name).value(Types::Name)
|
99
|
+
end
|
30
100
|
|
31
|
-
|
32
|
-
|
101
|
+
schema.(name: '').errors.to_h # => { name: ["size cannot be less than 1"] }
|
102
|
+
```
|
33
103
|
|
34
104
|
- Support for redefining re-used schemas (issue #43) (@skryukov)
|
35
105
|
|
@@ -45,19 +115,19 @@
|
|
45
115
|
|
46
116
|
- Ability to configure your own type container (@Morozzzko)
|
47
117
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
118
|
+
```ruby
|
119
|
+
types = Dry::Schema::TypeContainer.new
|
120
|
+
types.register(
|
121
|
+
'params.trimmed_string',
|
122
|
+
Types::String.constructor(&:strip).constructor(&:downcase)
|
123
|
+
)
|
54
124
|
|
55
|
-
|
56
|
-
|
125
|
+
Dry::Schema.Params do
|
126
|
+
config.types = types
|
57
127
|
|
58
|
-
|
59
|
-
|
60
|
-
|
128
|
+
require(:name).value(:trimmed_string)
|
129
|
+
end
|
130
|
+
```
|
61
131
|
|
62
132
|
### Fixed
|
63
133
|
|
@@ -79,18 +149,18 @@
|
|
79
149
|
|
80
150
|
### Added
|
81
151
|
|
82
|
-
- `config.messages.default_locale` for setting...default locale (surprise, surprise) (solnic)
|
83
|
-
- `Config` exposes `predicates` setting too (solnic)
|
152
|
+
- `config.messages.default_locale` for setting...default locale (surprise, surprise) (@solnic)
|
153
|
+
- `Config` exposes `predicates` setting too (@solnic)
|
84
154
|
|
85
155
|
### Fixed
|
86
156
|
|
87
|
-
- `filled` macro behavior results in `must be filled` error messages when appropriate - see PR #141 for more information (issue #134) (solnic)
|
88
|
-
- Filter rules no longer cause keys to be added to input (issue #142) (solnic)
|
89
|
-
- Filter rules work now with inheritance (solnic)
|
90
|
-
- Inherited type schemas used by coercion are now properly configured as `lax` type (solnic)
|
91
|
-
- `Config` is now finalized before instantiating schemas and properly dupped when its inherited (flash-gordon + solnic)
|
92
|
-
- `Config#eql?` works as expected (solnic)
|
93
|
-
- Predicates are properly inferred from array with a member type spec, ie `array[:integer]` results in `array? + each(:integer?)` (issue #140) (solnic)
|
157
|
+
- `filled` macro behavior results in `must be filled` error messages when appropriate - see PR #141 for more information (issue #134) (@solnic)
|
158
|
+
- Filter rules no longer cause keys to be added to input (issue #142) (@solnic)
|
159
|
+
- Filter rules work now with inheritance (@solnic)
|
160
|
+
- Inherited type schemas used by coercion are now properly configured as `lax` type (@solnic)
|
161
|
+
- `Config` is now finalized before instantiating schemas and properly dupped when its inherited (@flash-gordon + @solnic)
|
162
|
+
- `Config#eql?` works as expected (@solnic)
|
163
|
+
- Predicates are properly inferred from array with a member type spec, ie `array[:integer]` results in `array? + each(:integer?)` (issue #140) (@solnic)
|
94
164
|
|
95
165
|
[Compare v1.0.3...v1.1.0](https://github.com/dry-rb/dry-schema/compare/v1.0.3...v1.1.0)
|
96
166
|
|
@@ -98,9 +168,9 @@
|
|
98
168
|
|
99
169
|
### Fixed
|
100
170
|
|
101
|
-
- `Object#hash` is no longer used to calculate cache keys due to a potential risk of having hash collisions (solnic)
|
102
|
-
- Predicate arguments are used again for template cache keys (solnic)
|
103
|
-
- `I18n` messages backend no longer evaluates templates twice (solnic)
|
171
|
+
- `Object#hash` is no longer used to calculate cache keys due to a potential risk of having hash collisions (@solnic)
|
172
|
+
- Predicate arguments are used again for template cache keys (@solnic)
|
173
|
+
- `I18n` messages backend no longer evaluates templates twice (@solnic)
|
104
174
|
|
105
175
|
[Compare v1.0.2...v1.0.3](https://github.com/dry-rb/dry-schema/compare/v1.0.2...v1.0.3)
|
106
176
|
|
@@ -108,7 +178,7 @@
|
|
108
178
|
|
109
179
|
### Fixed
|
110
180
|
|
111
|
-
- Caching message templates uses restricted set of known keys to calculate cache keys (issue #132) (solnic)
|
181
|
+
- Caching message templates uses restricted set of known keys to calculate cache keys (issue #132) (@solnic)
|
112
182
|
|
113
183
|
[Compare v1.0.1...v1.0.2](https://github.com/dry-rb/dry-schema/compare/v1.0.1...v1.0.2)
|
114
184
|
|
@@ -116,7 +186,7 @@
|
|
116
186
|
|
117
187
|
### Fixed
|
118
188
|
|
119
|
-
- Applying `key?` predicate no longer causes recursive calls to `Result#errors` (issue #130) (solnic)
|
189
|
+
- Applying `key?` predicate no longer causes recursive calls to `Result#errors` (issue #130) (@solnic)
|
120
190
|
|
121
191
|
[Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-schema/compare/v1.0.0...v1.0.1)
|
122
192
|
|
@@ -124,12 +194,12 @@
|
|
124
194
|
|
125
195
|
### Changed
|
126
196
|
|
127
|
-
- [BREAKING] `Result#to_hash` was removed (solnic)
|
197
|
+
- [BREAKING] `Result#to_hash` was removed (@solnic)
|
128
198
|
|
129
199
|
### Fixed
|
130
200
|
|
131
|
-
- Setting `:any` as the type spec no longer crashes (solnic)
|
132
|
-
- `Result#error?` handles paths to array elements correctly (solnic)
|
201
|
+
- Setting `:any` as the type spec no longer crashes (@solnic)
|
202
|
+
- `Result#error?` handles paths to array elements correctly (@solnic)
|
133
203
|
|
134
204
|
[Compare v0.6.0...v1.0.0](https://github.com/dry-rb/dry-schema/compare/v0.6.0...v1.0.0)
|
135
205
|
|
@@ -137,9 +207,9 @@
|
|
137
207
|
|
138
208
|
### Changed
|
139
209
|
|
140
|
-
- Dependency on `dry-types` was bumped to `~> 1.0` (solnic)
|
141
|
-
- Dependency on `dry-logic` was bumped to `~> 1.0` (solnic)
|
142
|
-
- Dependency on `dry-initializer` was bumped to `~> 3.0` (solnic)
|
210
|
+
- Dependency on `dry-types` was bumped to `~> 1.0` (@solnic)
|
211
|
+
- Dependency on `dry-logic` was bumped to `~> 1.0` (@solnic)
|
212
|
+
- Dependency on `dry-initializer` was bumped to `~> 3.0` (@solnic)
|
143
213
|
|
144
214
|
[Compare v0.5.1...v0.6.0](https://github.com/dry-rb/dry-schema/compare/v0.5.1...v0.6.0)
|
145
215
|
|
@@ -147,7 +217,7 @@
|
|
147
217
|
|
148
218
|
### Fixed
|
149
219
|
|
150
|
-
- Key map no longer crashes on unexpected input (issue #118) (solnic)
|
220
|
+
- Key map no longer crashes on unexpected input (issue #118) (@solnic)
|
151
221
|
|
152
222
|
[Compare v0.5.0...v0.5.1](https://github.com/dry-rb/dry-schema/compare/v0.5.0...v0.5.1)
|
153
223
|
|
@@ -157,38 +227,38 @@
|
|
157
227
|
|
158
228
|
- Support for arbitrary meta-data in messages, ie:
|
159
229
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
230
|
+
```yaml
|
231
|
+
en:
|
232
|
+
dry_schema:
|
233
|
+
errors:
|
234
|
+
filled?:
|
235
|
+
text: "cannot be blank"
|
236
|
+
code: 123
|
237
|
+
```
|
168
238
|
|
169
|
-
|
239
|
+
Now your error hash will include `{ foo: [{ text: 'cannot be blank', code: 123 }] }` (@solnic + @flash-gordon)
|
170
240
|
|
171
|
-
- Support for type specs in `array` macro, ie `required(:tags).array(:integer)` (solnic)
|
172
|
-
- Support for type specs in `each` macro, ie `required(:tags).each(:integer)` (solnic)
|
241
|
+
- Support for type specs in `array` macro, ie `required(:tags).array(:integer)` (@solnic)
|
242
|
+
- Support for type specs in `each` macro, ie `required(:tags).each(:integer)` (@solnic)
|
173
243
|
- Shortcut for defining an array with hash as its member, ie:
|
174
244
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
245
|
+
```ruby
|
246
|
+
Dry::Schema.Params do
|
247
|
+
required(:tags).array(:hash) do
|
248
|
+
required(:name).filled(:string)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
```
|
182
252
|
|
183
253
|
### Fixed
|
184
254
|
|
185
|
-
- Inferring predicates doesn't crash when `Any` type is used (flash-gordon)
|
186
|
-
- Inferring type specs when type is already set works correctly (solnic)
|
255
|
+
- Inferring predicates doesn't crash when `Any` type is used (@flash-gordon)
|
256
|
+
- Inferring type specs when type is already set works correctly (@solnic)
|
187
257
|
|
188
258
|
### Changed
|
189
259
|
|
190
|
-
- [BREAKING] `:monads` extension wraps entire result objects in `Success` or `Failure` (flash-gordon)
|
191
|
-
- When `:hints` are disabled, result AST will not include hint nodes (solnic)
|
260
|
+
- [BREAKING] `:monads` extension wraps entire result objects in `Success` or `Failure` (@flash-gordon)
|
261
|
+
- When `:hints` are disabled, result AST will not include hint nodes (@solnic)
|
192
262
|
|
193
263
|
[Compare v0.4.0...v0.5.0](https://github.com/dry-rb/dry-schema/compare/v0.4.0...v0.5.0)
|
194
264
|
|
@@ -196,30 +266,30 @@
|
|
196
266
|
|
197
267
|
### Added
|
198
268
|
|
199
|
-
- Schemas are now compatible with procs via `#to_proc` (issue #53) (solnic)
|
200
|
-
- Support for configuring `top_namespace` for localized messages (solnic)
|
201
|
-
- Support for configuring more than one load path for localized messages (solnic)
|
202
|
-
- Support for inferring predicates from arbitrary types (issue #101) (solnic)
|
269
|
+
- Schemas are now compatible with procs via `#to_proc` (issue #53) (@solnic)
|
270
|
+
- Support for configuring `top_namespace` for localized messages (@solnic)
|
271
|
+
- Support for configuring more than one load path for localized messages (@solnic)
|
272
|
+
- Support for inferring predicates from arbitrary types (issue #101) (@solnic)
|
203
273
|
|
204
274
|
### Fixed
|
205
275
|
|
206
|
-
- Handling of messages for `optional` keys without value rules works correctly (issue #87) (solnic)
|
207
|
-
- Message structure for `optional` keys with an array of hashes no longer duplicates keys (issue #89) (solnic)
|
208
|
-
- Inferring `:date_time?` predicate works correctly with `DateTime` types (issue #97) (solnic)
|
276
|
+
- Handling of messages for `optional` keys without value rules works correctly (issue #87) (@solnic)
|
277
|
+
- Message structure for `optional` keys with an array of hashes no longer duplicates keys (issue #89) (@solnic)
|
278
|
+
- Inferring `:date_time?` predicate works correctly with `DateTime` types (issue #97) (@solnic)
|
209
279
|
|
210
280
|
### Changed
|
211
281
|
|
212
|
-
- [BREAKING] Updated to work with `dry-types 0.15.0` (flash-gordon)
|
213
|
-
- [BREAKING] `Result#{errors,messages,hints}` returns `MessageSet` object now which is an enumerable coercible to a hash (solnic)
|
214
|
-
- [BREAKING] `Messages` backend classes no longer use global configuration (solnic)
|
215
|
-
- [BREAKING] Passing a non-symbol key name in the DSL will raise `ArgumentError` (issue #29) (solnic)
|
282
|
+
- [BREAKING] Updated to work with `dry-types 0.15.0` (@flash-gordon)
|
283
|
+
- [BREAKING] `Result#{errors,messages,hints}` returns `MessageSet` object now which is an enumerable coercible to a hash (@solnic)
|
284
|
+
- [BREAKING] `Messages` backend classes no longer use global configuration (@solnic)
|
285
|
+
- [BREAKING] Passing a non-symbol key name in the DSL will raise `ArgumentError` (issue #29) (@solnic)
|
216
286
|
- [BREAKING] Configuration for message backends is now nested under `messages` key with following settings:
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
- [BREAKING] `Messages::I18n` uses `I18.store_translations` instead of messing with `I18n.load_path` (solnic)
|
222
|
-
- Schemas (`Params` and `JSON`) have nicer inspect (solnic)
|
287
|
+
- `messages.backend` - previously `messages`
|
288
|
+
- `messages.load_paths` - previously `messages_path`
|
289
|
+
- `messages.namespace` - previously `namespace`
|
290
|
+
- `messages.top_namespace` - **new setting** see above
|
291
|
+
- [BREAKING] `Messages::I18n` uses `I18.store_translations` instead of messing with `I18n.load_path` (@solnic)
|
292
|
+
- Schemas (`Params` and `JSON`) have nicer inspect (@solnic)
|
223
293
|
|
224
294
|
[Compare v0.3.0...v0.4.0](https://github.com/dry-rb/dry-schema/compare/v0.3.0...v0.4.0)
|
225
295
|
|
@@ -227,16 +297,16 @@
|
|
227
297
|
|
228
298
|
### Fixed
|
229
299
|
|
230
|
-
- Configuration is properly inherited from a parent schema (skryukov)
|
231
|
-
- `Result#error?` returns `true` when a preceding key has errors (solnic)
|
232
|
-
- Predicate inferrer no longer chokes on sum, constructor and enum types (solnic)
|
233
|
-
- Predicate inferrer infers `:bool?` from boolean types (solnic)
|
234
|
-
- Block-based definitions using `array` works correctly (solnic)
|
235
|
-
- Using a disjunction with `array` and `hash` produces correct errors when element validation for array failed (solnic)
|
300
|
+
- Configuration is properly inherited from a parent schema (@skryukov)
|
301
|
+
- `Result#error?` returns `true` when a preceding key has errors (@solnic)
|
302
|
+
- Predicate inferrer no longer chokes on sum, constructor and enum types (@solnic)
|
303
|
+
- Predicate inferrer infers `:bool?` from boolean types (@solnic)
|
304
|
+
- Block-based definitions using `array` works correctly (@solnic)
|
305
|
+
- Using a disjunction with `array` and `hash` produces correct errors when element validation for array failed (@solnic)
|
236
306
|
|
237
307
|
### Changed
|
238
308
|
|
239
|
-
- Required ruby version was removed from gemspec for people who are stuck on MRI 2.3.x (solnic)
|
309
|
+
- Required ruby version was removed from gemspec for people who are stuck on MRI 2.3.x (@solnic)
|
240
310
|
|
241
311
|
[Compare v0.2.0...v0.3.0](https://github.com/dry-rb/dry-schema/compare/v0.2.0...v0.3.0)
|
242
312
|
|
@@ -244,28 +314,28 @@
|
|
244
314
|
|
245
315
|
### Added
|
246
316
|
|
247
|
-
- New `hash` macro which prepends `hash?` type-check and allows nested schema definition (solnic)
|
248
|
-
- New `array` macro which works like `each` but prepends `array?` type-check (solnic)
|
317
|
+
- New `hash` macro which prepends `hash?` type-check and allows nested schema definition (@solnic)
|
318
|
+
- New `array` macro which works like `each` but prepends `array?` type-check (@solnic)
|
249
319
|
|
250
320
|
### Fixed
|
251
321
|
|
252
|
-
- Rule name translation works correctly with I18n (issue #52) (solnic)
|
253
|
-
- Rule name translation works correctly with namespaced messages (both I18n and plain YAML) (issue #57) (solnic)
|
254
|
-
- Error messages under namespaces are correctly resolved for overridden names (issue #53) (solnic)
|
255
|
-
- Namespaced error messages work correctly when schemas are reused within other schemas (issue #49) (solnic)
|
256
|
-
- Child schema can override inherited rules now (issue #66) (skryukov)
|
257
|
-
- Hints are correctly generated for disjunction that use type-check predicates (issue #24) (solnic)
|
258
|
-
- Hints are correctly generated for nested schemas (issue #26) (solnic)
|
259
|
-
- `filled` macro respects inferred type-check predicates and puts them in front (solnic)
|
260
|
-
- Value coercion works correctly with re-usable nested schemas (issue #25) (solnic)
|
322
|
+
- Rule name translation works correctly with I18n (issue #52) (@solnic)
|
323
|
+
- Rule name translation works correctly with namespaced messages (both I18n and plain YAML) (issue #57) (@solnic)
|
324
|
+
- Error messages under namespaces are correctly resolved for overridden names (issue #53) (@solnic)
|
325
|
+
- Namespaced error messages work correctly when schemas are reused within other schemas (issue #49) (@solnic)
|
326
|
+
- Child schema can override inherited rules now (issue #66) (@skryukov)
|
327
|
+
- Hints are correctly generated for disjunction that use type-check predicates (issue #24) (@solnic)
|
328
|
+
- Hints are correctly generated for nested schemas (issue #26) (@solnic)
|
329
|
+
- `filled` macro respects inferred type-check predicates and puts them in front (@solnic)
|
330
|
+
- Value coercion works correctly with re-usable nested schemas (issue #25) (@solnic)
|
261
331
|
|
262
332
|
### Changed
|
263
333
|
|
264
|
-
- [BREAKING] **Messages are now configured under `dry_schema` namespace by default** (issue #38) (solnic)
|
265
|
-
- [BREAKING] Hints are now an optional feature provided by `:hints` extension, to load it do `Dry::Schema.load_extensions(:hints)` (solnic)
|
266
|
-
- [BREAKING] Hints generation was improved in general, output of `Result#messages` and `Result#hints` changed in some cases (solnic)
|
267
|
-
- [BREAKING] `schema` macro no longer prepends `hash?` check, for this behavior use the new `hash` macro (see #31) (solnic)
|
268
|
-
- [BREAKING] Support for MRI < 2.4 was dropped (solnic)
|
334
|
+
- [BREAKING] **Messages are now configured under `dry_schema` namespace by default** (issue #38) (@solnic)
|
335
|
+
- [BREAKING] Hints are now an optional feature provided by `:hints` extension, to load it do `Dry::Schema.load_extensions(:hints)` (@solnic)
|
336
|
+
- [BREAKING] Hints generation was improved in general, output of `Result#messages` and `Result#hints` changed in some cases (@solnic)
|
337
|
+
- [BREAKING] `schema` macro no longer prepends `hash?` check, for this behavior use the new `hash` macro (see #31) (@solnic)
|
338
|
+
- [BREAKING] Support for MRI < 2.4 was dropped (@solnic)
|
269
339
|
|
270
340
|
[Compare v0.1.1...v0.2.0](https://github.com/dry-rb/dry-schema/compare/v0.1.1...v0.2.0)
|
271
341
|
|
@@ -273,16 +343,16 @@
|
|
273
343
|
|
274
344
|
### Added
|
275
345
|
|
276
|
-
- `Result#error?` supports checking nested errors too ie`result.error?('user.address')` (solnic)
|
346
|
+
- `Result#error?` supports checking nested errors too ie`result.error?('user.address')` (@solnic)
|
277
347
|
|
278
348
|
### Fixed
|
279
349
|
|
280
|
-
- Fix issues with templates and invalid tokens (issue #27) (solnic)
|
281
|
-
- Fix Ruby warnings (flash-gordon)
|
350
|
+
- Fix issues with templates and invalid tokens (issue #27) (@solnic)
|
351
|
+
- Fix Ruby warnings (@flash-gordon)
|
282
352
|
|
283
353
|
### Internal
|
284
354
|
|
285
|
-
- Key and value coercers are now equalizable (flash-gordon)
|
355
|
+
- Key and value coercers are now equalizable (@flash-gordon)
|
286
356
|
|
287
357
|
[Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-schema/compare/v0.1.0...v0.1.1)
|
288
358
|
|
data/LICENSE
CHANGED