dry-validation 1.2.0 → 1.5.0

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: aadb0a6e283c3de0438b2ddf7335262e276c206021e95f4aaa7eb70be040f268
4
- data.tar.gz: e2c9949f4f69ded243970367602b997c8eba80c5d18b223f7f14d30d914b4886
3
+ metadata.gz: 5c4b57593ac3fd38a26ef3eb26a31b34503bfa75a6fc118358745aa9fb772be1
4
+ data.tar.gz: 534dc4c9e0a8e83faec7077a78e4b3fd7e7fa5b55b6aa277479999332920bcb5
5
5
  SHA512:
6
- metadata.gz: 7cd158435b3998c6864a594d61315760b974a4b8d8a8728bdff42cc3684209416a23a154e0efe9537ab54839f96819b4b11f434104b2ba5b2be6dd4fce4c39b5
7
- data.tar.gz: d796476595c68a33dca5cf26cb11f3aff0c3fc2be73165f5693bb9b62c94c02a917ff8f559cc62055909805d95928dc96189e8a1391657177a21674ab15b58f5
6
+ metadata.gz: 8268526e70a23bd00ff7825accd0b7f4ca682342a2fefab22051e756e574a8b2834d527e1c1e2cce0a7084308eb9d721dafce92b1500c793588ba9d219499e82
7
+ data.tar.gz: d1ca0f28f775093521f74330dc4a09142a99c83c693aefcab1571f32343692a72c5f3669bd51baf10865fc9de93074ab3893ddfbb6412edf540bf3f2ac37b47c
@@ -1,58 +1,155 @@
1
- # v1.2.0 2019-07-08
1
+ ## unreleased
2
+
3
+
4
+ ### Added
5
+
6
+ - `schema_error?` rule helper (@waiting-for-dev)
7
+ - `rule_error?` rule helper (@waiting-for-dev)
8
+
9
+ ### Changed
10
+
11
+ - dry-schema dependency was bumped to `~> 1.5` (@solnic)
12
+ - [internal] `KeyMap` patches have been removed since dry-schema now provides required functionality (@solnic)
13
+
14
+ [Compare v1.4.2...master](https://github.com/dry-rb/dry-validation/compare/v1.4.2...master)
15
+
16
+ ## 1.4.2 2020-01-18
17
+
18
+
19
+ ### Fixed
20
+
21
+ - Macros using predicates that accept a range argument work as expected (no need to wrap the argument in an array) (@waiting-for-dev)
22
+
23
+
24
+ [Compare v1.4.1...v1.4.2](https://github.com/dry-rb/dry-validation/compare/v1.4.1...v1.4.2)
25
+
26
+ ## 1.4.1 2020-01-08
27
+
2
28
 
3
29
  ### Added
4
30
 
5
- * New extension `:predicates_as_macros` (@waiting-for-dev)
31
+ - Pattern matching on result values (@flash-gordon)
6
32
 
7
33
  ### Fixed
8
34
 
9
- * Guarding rules for nested keys works correctly (issue #560) (@solnic)
35
+ - List tokens are correctly interpolated as a comma separated list in rule messages (see #611) (@waiting-for-dev)
36
+ - Warnings about delegated keywords (@flash-gordon)
37
+
38
+
39
+ [Compare v1.4.0...v1.4.1](https://github.com/dry-rb/dry-validation/compare/v1.4.0...v1.4.1)
40
+
41
+ ## 1.4.0 2019-12-12
42
+
43
+
44
+ ### Added
45
+
46
+ - Support for multi-schema inheritance (@ianwhite)
47
+
48
+ ### Fixed
49
+
50
+ - Keyword warnings reported by Ruby 2.7 (@flash-gordon)
51
+ - Fixed an issue where `MessageSet` would be marked as empty too early (@ianwhite)
52
+ - Messages are correctly generated when there are errors for both an array and one or more of its elements (see #599) (@Bugagazavr)
53
+
54
+ ### Changed
55
+
56
+ - A meaningful exception is raised when failure options are not valid (@MatElGran)
57
+ - [internal] improved performance in `Contract.ensure_valid_keys` (@grzegorz-jakubiak)
58
+ - [internal] fixed keyword warnings on MRI 2.7.0 (@flash-gordon)
59
+
60
+ [Compare v1.3.1...v1.4.0](https://github.com/dry-rb/dry-validation/compare/v1.3.1...v1.4.0)
61
+
62
+ ## 1.3.1 2019-08-16
63
+
10
64
 
11
65
  ### Changed
12
66
 
13
- * `dry-schema` dependency was bumped to `>= 1.3.1` (@solnic)
67
+ - You can now set an external schema without providing a block (@alassek)
68
+
69
+ [Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-validation/compare/v1.3.0...v1.3.1)
70
+
71
+ ## 1.3.0 2019-08-14
72
+
73
+
74
+ ### Added
75
+
76
+ - Support for setting an external schema (that can be extended too) (fixed #574) (@solnic)
77
+
78
+ ### Fixed
79
+
80
+ - Using a hash spec to define rule keys with more than one value is properly handled by rule guard now (fixed #576) (@solnic)
81
+
82
+ ### Changed
83
+
84
+ - `values` within rules uses `Hash#fetch_values` internally now, which improves performance (@esparta)
85
+
86
+ [Compare v1.2.1...v1.3.0](https://github.com/dry-rb/dry-validation/compare/v1.2.1...v1.3.0)
87
+
88
+ ## 1.2.1 2019-07-16
89
+
90
+
91
+ ### Fixed
92
+
93
+ - Defining an abstract contract class that has no schema no longer crashes (issue #565) (@solnic)
94
+ - Fixed an issue where `Rule#each` would crash when the value is not an array (issue #567) (@solnic)
95
+ - Fixed an issue where guarding a rule would crash when keys are missing in the input (issue #569) (@solnic)
96
+ - Added missing "pathname" require (issue #570) (@solnic)
97
+
98
+
99
+ [Compare v1.2.0...v1.2.1](https://github.com/dry-rb/dry-validation/compare/v1.2.0...v1.2.1)
100
+
101
+ ## 1.2.0 2019-07-08
102
+
103
+
104
+ ### Added
105
+
106
+ - New extension `:predicates_as_macros` (@waiting-for-dev)
107
+
108
+ ### Fixed
109
+
110
+ - Guarding rules for nested keys works correctly (issue #560) (@solnic)
111
+
112
+ ### Changed
113
+
114
+ - `dry-schema` dependency was bumped to `>= 1.3.1` (@solnic)
14
115
 
15
116
  [Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-validation/compare/v1.1.1...v1.2.0)
16
117
 
17
- # v1.1.1 2019-06-24
118
+ ## 1.1.1 2019-06-24
119
+
18
120
 
19
121
  ### Fixed
20
122
 
21
- * `Rule#each` works with array values from nested hashes (@mustardnoise)
123
+ - `Rule#each` works with array values from nested hashes (@mustardnoise)
124
+
22
125
 
23
126
  [Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-validation/compare/v1.1.0...v1.1.1)
24
127
 
25
- # v1.1.0 2019-06-14
128
+ ## 1.1.0 2019-06-14
129
+
26
130
 
27
131
  ### Added
28
132
 
29
- * `key?` method available within rules, that can be used to check if there's a value under the rule's default key (refs #540) (@solnic)
30
- * `value` supports hash-based path specifications now (refs #547) (@solnic)
31
- * `value` can read multiple values when the key points to them, ie in case of `rule(geo: [:lat, :lon])` it would return an array with `lat` and `lon` (@solnic)
133
+ - `key?` method available within rules, that can be used to check if there's a value under the rule's default key (refs #540) (@solnic)
134
+ - `value` supports hash-based path specifications now (refs #547) (@solnic)
135
+ - `value` can read multiple values when the key points to them, ie in case of `rule(geo: [:lat, :lon])` it would return an array with `lat` and `lon` (@solnic)
32
136
 
33
137
  ### Fixed
34
138
 
35
- * Passing multiple macro names to `validate` or `each` works correctly (fixed #538 #541) (@jandudulski)
139
+ - Passing multiple macro names to `validate` or `each` works correctly (fixed #538 #541) (@jandudulski)
36
140
 
37
- [Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.1.0)
38
141
 
39
- # v1.0.0 2019-06-10
142
+ [Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.1.0)
40
143
 
41
- This release is a complete rewrite on top of `dry-schema` that uses contract classes to define schema and validation rules. It's **not backward-compatible**. This release addressed over 150 known issues, including bugs and missing features.
144
+ ## 1.0.0 2019-06-10
42
145
 
43
146
  See [the list of all addressed issues](https://github.com/dry-rb/dry-validation/issues?utf8=✓&q=is%3Aissue+is%3Aclosed+closed%3A%3E%3D2019-01-01+) as well as issues that were moved to dry-schema and [addressed there](https://github.com/dry-rb/dry-schema/issues?q=is%3Aissue+is%3Aclosed+dry-validation+milestone%3A1.0.0).
44
147
 
45
- ### :sparkles: Release highlights :sparkles:
46
148
 
47
- - New `Dry::Validation::Contract` API for defining contract classes with schemas and validation rules
48
- - Improved message backends with support for `key` and `base` messages, and arbitrary meta-data (like error codes etc.)
49
- - Support for defining rules for array elements ie `rule(:items).each { ... }`
50
- - Support for macros that encapsulate common rule logic
51
- - Built-in `:acceptance` macro
149
+ [Compare v1.0.0...v1.0.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0...v1.0.0)
52
150
 
53
- [Compare v0.13.3...v1.0.0](https://github.com/dry-rb/dry-validation/compare/v0.13.3...v1.0.0)
151
+ ## 1.0.0 2019-06-10
54
152
 
55
- # v1.0.0 2019-06-10 (compared to 1.0.0.rc3)
56
153
 
57
154
  ### Added
58
155
 
@@ -75,65 +172,69 @@ See [the list of all addressed issues](https://github.com/dry-rb/dry-validation/
75
172
 
76
173
  [Compare v1.0.0.rc3...v1.0.0](https://github.com/dry-rb/dry-validation/compare/v1.0.0.rc3...v1.0.0)
77
174
 
78
- # v1.0.0.rc3 2019-05-06
175
+ ## 1.0.0.rc3 2019-05-06
176
+
79
177
 
80
178
  ### Added
81
179
 
82
- * [EXPERIMENTAL] `Validation.register_macro` for registering global macros (solnic)
83
- * [EXPERIMENTAL] `Contract.register_macro` for registering macros available to specific contract classes (solnic)
84
- * `Dry::Validation.Contract` shortcut for quickly defining a contract and getting its instance back (solnic)
85
- * New configuration option `config.locale` for setting the default locale (solnic)
180
+ - [EXPERIMENTAL] `Validation.register_macro` for registering global macros (solnic)
181
+ - [EXPERIMENTAL] `Contract.register_macro` for registering macros available to specific contract classes (solnic)
182
+ - `Dry::Validation.Contract` shortcut for quickly defining a contract and getting its instance back (solnic)
183
+ - New configuration option `config.locale` for setting the default locale (solnic)
86
184
 
87
185
  ### Fixed
88
186
 
89
- * `config/errors.yml` are now bundled with the gem, **`rc2` was broken because of this** (solnic)
187
+ - `config/errors.yml` are now bundled with the gem, **`rc2` was broken because of this** (solnic)
188
+
90
189
 
91
190
  [Compare v1.0.0.rc2...v1.0.0.rc3](https://github.com/dry-rb/dry-validation/compare/v1.0.0.rc2...v1.0.0.rc3)
92
191
 
93
- # v1.0.0.rc2 2019-05-04
192
+ ## 1.0.0.rc2 2019-05-04
94
193
 
95
194
  This was **yanked** on rubygems.org because the bundled gem was missing `config` directory, thus it was not possible to require it. It was fixed in `rc3`.
96
195
 
97
196
  ### Added
98
197
 
99
- * [EXPERIMENTAL] support for registering macros via `Dry::Validation::Macros.register(:your_macro, &block)` (solnic)
100
- * [EXPERIMENTAL] `:acceptance` as the first built-in macro (issue #157) (solnic)
198
+ - [EXPERIMENTAL] support for registering macros via `Dry::Validation::Macros.register(:your_macro, &block)` (solnic)
199
+ - [EXPERIMENTAL] `:acceptance` as the first built-in macro (issue #157) (solnic)
101
200
 
102
201
  ### Fixed
103
202
 
104
- * Passing invalid argument to `failure` will raise a meaningful error instead of crashing (solnic)
203
+ - Passing invalid argument to `failure` will raise a meaningful error instead of crashing (solnic)
105
204
 
106
205
  ### Changed
107
206
 
108
- * In rule validation blocks, `values` is now an instance of a hash-like `Dry::Validation::Values` class, rather than `Dry::Schema::Result`. This gives more convenient access to data within rules (solnic)
109
- * Dependency on `dry-schema` was updated to `~> 1.0` (solnic)
207
+ - In rule validation blocks, `values` is now an instance of a hash-like `Dry::Validation::Values` class, rather than `Dry::Schema::Result`. This gives more convenient access to data within rules (solnic)
208
+ - Dependency on `dry-schema` was updated to `~> 1.0` (solnic)
110
209
 
111
210
  [Compare v1.0.0.rc1...v1.0.0.rc2](https://github.com/dry-rb/dry-validation/compare/v1.0.0.rc1...v1.0.0.rc2)
112
211
 
113
- # v1.0.0.rc1 2019-04-26
212
+ ## 1.0.0.rc1 2019-04-26
213
+
114
214
 
115
215
  ### Added
116
216
 
117
- * `:hints` extension is back (solnic)
118
- * `Result` objects have access to the context object which is shared between rules (flash-gordon)
217
+ - `:hints` extension is back (solnic)
218
+ - `Result` objects have access to the context object which is shared between rules (flash-gordon)
119
219
 
120
220
  ### Fixed
121
221
 
122
- * Multiple hint messages no longer crash message set (flash-gordon)
123
- * `Contract#inspect` no longer crashes (solnic)
222
+ - Multiple hint messages no longer crash message set (flash-gordon)
223
+ - `Contract#inspect` no longer crashes (solnic)
124
224
 
125
225
  ### Changed
126
226
 
127
- * Dependency on `dry-schema` was bumped to `~> 0.6` - this pulls in `dry-types 1.0.0` and `dry-logic 1.0.0` (solnic)
128
- * Dependency on `dry-initializer` was bumped to `~> 3.0` (solnic)
227
+ - Dependency on `dry-schema` was bumped to `~> 0.6` - this pulls in `dry-types 1.0.0` and `dry-logic 1.0.0` (solnic)
228
+ - Dependency on `dry-initializer` was bumped to `~> 3.0` (solnic)
129
229
 
130
230
  [Compare v1.0.0.beta2...v1.0.0.rc1](https://github.com/dry-rb/dry-validation/compare/v1.0.0.beta2...v1.0.0.rc1)
131
231
 
132
- # v1.0.0.beta2 2019-04-04
232
+ ## 1.0.0.beta2 2019-04-04
233
+
133
234
 
134
235
  ### Added
135
236
 
136
- * Support for arbitrary meta-data in failures, ie:
237
+ - Support for arbitrary meta-data in failures, ie:
137
238
 
138
239
  ```ruby
139
240
  class NewUserContract < Dry::Validation::Contract
@@ -151,98 +252,107 @@ This was **yanked** on rubygems.org because the bundled gem was missing `config`
151
252
 
152
253
  ### Changed
153
254
 
154
- * [BREAKING] `Error` was renamed to `Message` as it is a more generic concept (solnic)
155
- * [BREAKING] `ErrorSet` was renamed to `MessageSet` for consistency (solnic)
156
- * [BREAKING] `:monads` extension wraps entire result objects in `Success` or `Failure` (flash-gordon)
255
+ - [BREAKING] `Error` was renamed to `Message` as it is a more generic concept (solnic)
256
+ - [BREAKING] `ErrorSet` was renamed to `MessageSet` for consistency (solnic)
257
+ - [BREAKING] `:monads` extension wraps entire result objects in `Success` or `Failure` (flash-gordon)
157
258
 
158
259
  [Compare v1.0.0.beta1...v1.0.0.beta2](https://github.com/dry-rb/dry-validation/compare/v1.0.0.beta1...v1.0.0.beta2)
159
260
 
160
- # v1.0.0.beta1 2019-03-26
261
+ ## 1.0.0.beta1 2019-03-26
262
+
161
263
 
162
264
  ### Added
163
265
 
164
- * New API for setting failures `base.failure` for base errors and `key.failure` for key errors (solnic)
165
- * Support for `base` errors associated with a key even when child keys have errors too (solnic)
166
- * Support for `base` errors not associated with any key (solnic)
167
- * Result objects use `ErrorSet` object now for managing messages (solnic)
168
- * Nested keys are properly handled when generating messages hash (issue #489) (flash-gordon + solnic)
169
- * Result objects support `locale` and `full` options now (solnic)
170
- * Ability to configure `top_namespace` for messages, which will be used for both schema and rule localization (solnic)
171
- * Rule blocks receive a context object that you can use to share data between rules (solnic)
266
+ - New API for setting failures `base.failure` for base errors and `key.failure` for key errors (solnic)
267
+ - Support for `base` errors associated with a key even when child keys have errors too (solnic)
268
+ - Support for `base` errors not associated with any key (solnic)
269
+ - Result objects use `ErrorSet` object now for managing messages (solnic)
270
+ - Nested keys are properly handled when generating messages hash (issue #489) (flash-gordon + solnic)
271
+ - Result objects support `locale` and `full` options now (solnic)
272
+ - Ability to configure `top_namespace` for messages, which will be used for both schema and rule localization (solnic)
273
+ - Rule blocks receive a context object that you can use to share data between rules (solnic)
172
274
 
173
275
  ### Changed
174
276
 
175
- * [BREAKING] `Result#errors` returns an instance of `ErrorSet` now, it's an enumerable, coerible to a hash (solnic)
176
- * [BREAKING] `failure` was removed in favor of `key.failure` or `key(:foo).failure` (solnic)
177
- * [BREAKING] `Result#to_hash` was removed (flash-gordon)
277
+ - [BREAKING] `Result#errors` returns an instance of `ErrorSet` now, it's an enumerable, coerible to a hash (solnic)
278
+ - [BREAKING] `failure` was removed in favor of `key.failure` or `key(:foo).failure` (solnic)
279
+ - [BREAKING] `Result#to_hash` was removed (flash-gordon)
178
280
 
179
281
  [Compare v1.0.0.alpha2...v1.0.0.beta1](https://github.com/dry-rb/dry-validation/compare/v1.0.0.alpha2...v1.0.0.beta1)
180
282
 
181
- # v1.0.0.alpha2 2019-03-05
283
+ ## 1.0.0.alpha2 2019-03-05
182
284
 
183
285
  First round of bug fixes. Thanks for testing <3!
184
286
 
185
287
  ### Fixed
186
288
 
187
- * Errors with nested messages are correctly built (flash-gordon)
188
- * Messages for nested keys are correctly resolved (solnic)
189
- * A message for a nested key is resolved when it's defined under `errors.rule.%{key}` too, but a message under nested key will override it (solnic)
289
+ - Errors with nested messages are correctly built (flash-gordon)
290
+ - Messages for nested keys are correctly resolved (solnic)
291
+ - A message for a nested key is resolved when it's defined under `errors.rule.%{key}` too, but a message under nested key will override it (solnic)
190
292
 
191
293
  ### Changed
192
294
 
193
- * When a message template is not found a more meaningful error is raised that includes both rule identifier and key path (solnic)
295
+ - When a message template is not found a more meaningful error is raised that includes both rule identifier and key path (solnic)
194
296
 
195
297
  [Compare v1.0.0.alpha1...v1.0.0.alpha2](https://github.com/dry-rb/dry-validation/compare/v1.0.0.alpha1...v1.0.0.alpha2)
196
298
 
197
- # v1.0.0.alpha1 2019-03-04
299
+ ## 1.0.0.alpha1 2019-03-04
198
300
 
199
301
  Complete rewrite on top of `dry-schema`.
200
302
 
201
303
  ### Added
202
304
 
203
- * [BREAKING] `Dry::Validation::Contract` as a replacement for validation schemas (solnic)
204
- * [BREAKING] New `rule` DSL with an improved API for setting error messages (solnic)
305
+ - [BREAKING] `Dry::Validation::Contract` as a replacement for validation schemas (solnic)
306
+ - [BREAKING] New `rule` DSL with an improved API for setting error messages (solnic)
205
307
 
206
- [Compare v0.13.0...v1.0.0.alpha1](https://github.com/dry-rb/dry-validation/compare/v0.13.0...v1.0.0.alpha1)
207
308
 
208
- # v0.13.0 2019-01-29
309
+ [Compare v0.13.0...v1.0.0.alpha1](https://github.com/dry-rb/dry-validation/compare/v0.13.0...v1.0.0.alpha1)
209
310
 
210
- ### Changed
311
+ ## 0.13.0 2019-01-29
211
312
 
212
- - `dry-logic` was bumped to `~> 0.5` (solnic)
213
- - `dry-types` was bumped to `~> 0.14` (solnic)
214
313
 
215
314
  ### Fixed
216
315
 
217
316
  - Warning about method redefined (amatsuda)
218
317
 
318
+ ### Changed
319
+
320
+ - `dry-logic` was bumped to `~> 0.5` (solnic)
321
+ - `dry-types` was bumped to `~> 0.14` (solnic)
322
+
219
323
  [Compare v0.12.3...v0.13.0](https://github.com/dry-rb/dry-validation/compare/v0.12.3...v0.13.0)
220
324
 
221
- # v0.12.3 2019-01-29
325
+ ## 0.12.3 2019-01-29
326
+
222
327
 
223
328
  ### Changed
224
329
 
225
- * [internal] dry-logic was pinned to `~> 0.4.2` (flash-gordon)
330
+ - [internal] dry-logic was pinned to `~> 0.4.2` (flash-gordon)
226
331
 
227
332
  [Compare v0.12.2...v0.12.3](https://github.com/dry-rb/dry-validation/compare/v0.12.2...v0.12.3)
228
333
 
229
- # v0.12.2 2018-08-29
334
+ ## 0.12.2 2018-08-29
335
+
230
336
 
231
337
  ### Fixed
232
338
 
233
339
  - Use correct key names for rule messages when using i18n (jozzi05)
234
340
 
341
+
235
342
  [Compare v0.12.1...v0.12.2](https://github.com/dry-rb/dry-validation/compare/v0.12.1...v0.12.2)
236
343
 
237
- # v0.12.1 2018-07-06
344
+ ## 0.12.1 2018-07-06
345
+
238
346
 
239
347
  ### Fixed
240
348
 
241
349
  - [internal] fixed deprecation warnings (flash-gordon)
242
350
 
351
+
243
352
  [Compare v0.12.0...v0.12.1](https://github.com/dry-rb/dry-validation/compare/v0.12.0...v0.12.1)
244
353
 
245
- # v0.12.0 2018-05-31
354
+ ## 0.12.0 2018-05-31
355
+
246
356
 
247
357
  ### Changed
248
358
 
@@ -251,7 +361,8 @@ Complete rewrite on top of `dry-schema`.
251
361
 
252
362
  [Compare v0.11.1...v0.12.0](https://github.com/dry-rb/dry-validation/compare/v0.11.1...v0.12.0)
253
363
 
254
- # v0.11.1 2017-09-15
364
+ ## 0.11.1 2017-09-15
365
+
255
366
 
256
367
  ### Changed
257
368
 
@@ -260,7 +371,8 @@ Complete rewrite on top of `dry-schema`.
260
371
 
261
372
  [Compare v0.11.0...v0.11.1](https://github.com/dry-rb/dry-validation/compare/v0.11.0...v0.11.1)
262
373
 
263
- # v0.11.0 2017-05-30
374
+ ## 0.11.0 2017-05-30
375
+
264
376
 
265
377
  ### Changed
266
378
 
@@ -268,32 +380,39 @@ Complete rewrite on top of `dry-schema`.
268
380
 
269
381
  [Compare v0.10.7...v0.11.0](https://github.com/dry-rb/dry-validation/compare/v0.10.7...v0.11.0)
270
382
 
271
- # v0.10.7 2017-05-15
383
+ ## 0.10.7 2017-05-15
384
+
272
385
 
273
386
  ### Fixed
274
387
 
275
388
  - `validate` can now be defined multiple times for the same key (kimquy)
276
389
  - Re-using rules between schemas no longer mutates original rule set (pabloh)
277
390
 
391
+
278
392
  [Compare v0.10.6...v0.10.7](https://github.com/dry-rb/dry-validation/compare/v0.10.6...v0.10.7)
279
393
 
280
- # v0.10.6 2017-04-26
394
+ ## 0.10.6 2017-04-26
395
+
281
396
 
282
397
  ### Fixed
283
398
 
284
399
  - Fixes issue with wrong localized error messages when namespaced messages are used (kbredemeier)
285
400
 
401
+
286
402
  [Compare v0.10.5...v0.10.6](https://github.com/dry-rb/dry-validation/compare/v0.10.5...v0.10.6)
287
403
 
288
- # v0.10.5 2017-01-12
404
+ ## 0.10.5 2017-01-12
405
+
289
406
 
290
407
  ### Fixed
291
408
 
292
409
  - Warnings under MRI 2.4.0 are gone (koic)
293
410
 
411
+
294
412
  [Compare v0.10.4...v0.10.5](https://github.com/dry-rb/dry-validation/compare/v0.10.4...v0.10.5)
295
413
 
296
- # v0.10.4 2016-12-03
414
+ ## 0.10.4 2016-12-03
415
+
297
416
 
298
417
  ### Fixed
299
418
 
@@ -306,31 +425,38 @@ Complete rewrite on top of `dry-schema`.
306
425
 
307
426
  [Compare v0.10.3...v0.10.4](https://github.com/dry-rb/dry-validation/compare/v0.10.3...v0.10.4)
308
427
 
309
- # v0.10.3 2016-09-27
428
+ ## 0.10.3 2016-09-27
429
+
310
430
 
311
431
  ### Fixed
312
432
 
313
433
  - Custom predicates work correctly with `each` macro (solnic)
314
434
 
435
+
315
436
  [Compare v0.10.2...v0.10.3](https://github.com/dry-rb/dry-validation/compare/v0.10.2...v0.10.3)
316
437
 
317
- # v0.10.2 2016-09-23
438
+ ## 0.10.2 2016-09-23
439
+
318
440
 
319
441
  ### Fixed
320
442
 
321
443
  - Constrained types + hints work again (solnic)
322
444
 
445
+
323
446
  [Compare v0.10.1...v0.10.2](https://github.com/dry-rb/dry-validation/compare/v0.10.1...v0.10.2)
324
447
 
325
- # v0.10.1 2016-09-22
448
+ ## 0.10.1 2016-09-22
449
+
326
450
 
327
451
  ### Fixed
328
452
 
329
453
  - Remove obsolete require of `dry/struct` which is now an optional extension (flash-gordon)
330
454
 
455
+
331
456
  [Compare v0.10.0...v0.10.1](https://github.com/dry-rb/dry-validation/compare/v0.10.0...v0.10.1)
332
457
 
333
- # v0.10.0 2016-09-21
458
+ ## 0.10.0 2016-09-21
459
+
334
460
 
335
461
  ### Added
336
462
 
@@ -353,34 +479,31 @@ Complete rewrite on top of `dry-schema`.
353
479
  - [BREAKING] `when` macro no longer supports multiple disconnected rules in its block, whatever the block returns will be used for the implication (solnic)
354
480
  - [BREAKING] `rule(some_name: %i(some keys))` will _always_ use `:some_name` as the key for failure messages (solnic)
355
481
 
356
- ### Internal
357
-
358
- - ~2 x performance boost (solnic)
359
- - Rule AST was updated to latest dry-logic (solnic)
360
- - `MessageCompiler` was drastically simplified based on the new result AST from dry-logic (solnic)
361
- - `HintCompiler` is gone as hints are now part of the result AST (solnic)
362
- - `maybe` macro creates an implication instead of a disjunction (`not(none?).then(*your-predicates)`) (solnic)
363
-
364
482
  [Compare v0.9.5...v0.10.0](https://github.com/dry-rb/dry-validation/compare/v0.9.5...v0.10.0)
365
483
 
366
- # v0.9.5 2016-08-16
484
+ ## 0.9.5 2016-08-16
485
+
367
486
 
368
487
  ### Fixed
369
488
 
370
489
  - Infering multiple predicates with options works as expected ie `value(:str?, min_size?: 3, max_size?: 6)` (solnic)
371
490
  - Default `locale` configured in `I18n` is now respected by the messages compiler (agustin + cavi21)
372
491
 
492
+
373
493
  [Compare v0.9.4...v0.9.5](https://github.com/dry-rb/dry-validation/compare/v0.9.4...v0.9.5)
374
494
 
375
- # v0.9.4 2016-08-11
495
+ ## 0.9.4 2016-08-11
496
+
376
497
 
377
498
  ### Fixed
378
499
 
379
500
  - Error messages for sibling deeply nested schemas are nested correctly (timriley)
380
501
 
502
+
381
503
  [Compare v0.9.3...v0.9.4](https://github.com/dry-rb/dry-validation/compare/v0.9.3...v0.9.4)
382
504
 
383
- # v0.9.3 2016-07-22
505
+ ## 0.9.3 2016-07-22
506
+
384
507
 
385
508
  ### Added
386
509
 
@@ -398,24 +521,29 @@ Complete rewrite on top of `dry-schema`.
398
521
 
399
522
  [Compare v0.9.2...v0.9.3](https://github.com/dry-rb/dry-validation/compare/v0.9.2...v0.9.3)
400
523
 
401
- # v0.9.2 2016-07-13
524
+ ## 0.9.2 2016-07-13
525
+
402
526
 
403
527
  ### Fixed
404
528
 
405
529
  - Constrained types now work with `each` macro (solnic)
406
530
  - Array coercion without member type works now ie `required(:arr).maybe(:array?)` (solnic)
407
531
 
532
+
408
533
  [Compare v0.9.1...v0.9.2](https://github.com/dry-rb/dry-validation/compare/v0.9.1...v0.9.2)
409
534
 
410
- # v0.9.1 2016-07-11
535
+ ## 0.9.1 2016-07-11
536
+
411
537
 
412
538
  ### Fixed
413
539
 
414
540
  - `I18n` backend is no longer required and set by default (solnic)
415
541
 
542
+
416
543
  [Compare v0.9.0...v0.9.1](https://github.com/dry-rb/dry-validation/compare/v0.9.0...v0.9.1)
417
544
 
418
- # v0.9.0 2016-07-08
545
+ ## 0.9.0 2016-07-08
546
+
419
547
 
420
548
  ### Added
421
549
 
@@ -428,10 +556,6 @@ Complete rewrite on top of `dry-schema`.
428
556
  - Support for message token transformations in custom predicates (fran-worley)
429
557
  - [EXPERIMENTAL] Ability to compose predicates that accept dynamic args provided by the schema (solnic)
430
558
 
431
- ### Changed
432
-
433
- - Tokens for `size?` were renamed `left` => `size_left` and `right` => `size_right` (fran-worley)
434
-
435
559
  ### Fixed
436
560
 
437
561
  - Duped key names in nested schemas no longer result in invalid error messages structure (solnic)
@@ -441,18 +565,14 @@ Complete rewrite on top of `dry-schema`.
441
565
  - Hints for elements are no longer provided for an array when the value is not an array (solnic)
442
566
  - `input` macro no longer messes up error messages for nested structures (solnic)
443
567
 
444
- ### Internal
568
+ ### Changed
445
569
 
446
- - Compiling messages is now ~5% faster (solnic + splattael)
447
- - Refactored Error and Hint compilers (solnic)
448
- - Refactored Schema to use an internal executor objects with steps (solnic)
449
- - Extracted root-rule into a separate validation step (solnic)
450
- - Added `MessageSet` that result objects now use (in 1.0.0 it'll be exposed via public API) (solnic)
451
- - We can now distinguish error messages from validation hints via `Message` and `Hint` objects (solnic)
570
+ - Tokens for `size?` were renamed `left` => `size_left` and `right` => `size_right` (fran-worley)
452
571
 
453
572
  [Compare v0.8.0...v0.9.0](https://github.com/dry-rb/dry-validation/compare/v0.8.0...v0.9.0)
454
573
 
455
- # v0.8.0 2016-07-01
574
+ ## 0.8.0 2016-07-01
575
+
456
576
 
457
577
  ### Added
458
578
 
@@ -498,19 +618,10 @@ Complete rewrite on top of `dry-schema`.
498
618
  - Deprecate key in favor of required (coop)
499
619
  - Remove nested key syntax (solnic)
500
620
 
501
- ### Internal
502
-
503
- - ~15% performance boost via various optimizations (solnic)
504
- - When using explicit type specs building a schema is ~80-85x faster (solnic)
505
- - No longer uses `Dry::Types::Predicates` as `:type?` predicate was moved to dry-logic (solnic)
506
- - Integration specs covering predicates with Form and Schema (jodosha)
507
- - Use latest ruby versions on travis (flash-gordon)
508
- - Make pry console optional with IRB as a default (flash-gordon)
509
- - Remove wrapping rules in :set nodes (solnic)
510
-
511
621
  [Compare v0.7.4...v0.8.0](https://github.com/dry-rb/dry-validation/compare/v0.7.4...v0.8.0)
512
622
 
513
- # v0.7.4 2016-04-06
623
+ ## 0.7.4 2016-04-06
624
+
514
625
 
515
626
  ### Added
516
627
 
@@ -521,9 +632,11 @@ Complete rewrite on top of `dry-schema`.
521
632
 
522
633
  - Depending on deeply nested values in high-level rules works now (solnic)
523
634
 
635
+
524
636
  [Compare v0.7.3...v0.7.4](https://github.com/dry-rb/dry-validation/compare/v0.7.3...v0.7.4)
525
637
 
526
- # v0.7.3 2016-03-30
638
+ ## 0.7.3 2016-03-30
639
+
527
640
 
528
641
  ### Added
529
642
 
@@ -536,22 +649,22 @@ Complete rewrite on top of `dry-schema`.
536
649
  - Creating a nested schema properly sets full path to nested data structure (solnic)
537
650
  - Error message for `empty?` predicate is now correct (jodosha)
538
651
 
539
- ### Internal
540
-
541
- - Switch from `thread_safe` to `concurrent` (joevandyk)
542
652
 
543
653
  [Compare v0.7.2...v0.7.3](https://github.com/dry-rb/dry-validation/compare/v0.7.2...v0.7.3)
544
654
 
545
- # v0.7.2 2016-03-28
655
+ ## 0.7.2 2016-03-28
656
+
546
657
 
547
658
  ### Added
548
659
 
549
660
  - Support for nested schemas inside high-level rules (solnic)
550
661
  - `Schema#to_proc` so that you can do `data.each(&schema)` (solnic)
551
662
 
663
+
552
664
  [Compare v0.7.1...v0.7.2](https://github.com/dry-rb/dry-validation/compare/v0.7.1...v0.7.2)
553
665
 
554
- # v0.7.1 2016-03-21
666
+ ## 0.7.1 2016-03-21
667
+
555
668
 
556
669
  ### Added
557
670
 
@@ -569,7 +682,8 @@ Complete rewrite on top of `dry-schema`.
569
682
 
570
683
  [Compare v0.7.0...v0.7.1](https://github.com/dry-rb/dry-validation/compare/v0.7.0...v0.7.1)
571
684
 
572
- # v0.7.0 2016-03-16
685
+ ## 0.7.0 2016-03-16
686
+
573
687
 
574
688
  ### Added
575
689
 
@@ -593,6 +707,12 @@ Complete rewrite on top of `dry-schema`.
593
707
  - `Validation::Result` responds to `#[]` and `#each` (delegating to its output)
594
708
  and it's an enumerable (solnic)
595
709
 
710
+ ### Fixed
711
+
712
+ - Qualified rule names properly use last node by default for error messages (solnic)
713
+ - Validation hints only include relevant messages (solnic)
714
+ - `:yaml` messages respect `:locale` option in `Result#messages` (solnic)
715
+
596
716
  ### Changed
597
717
 
598
718
  - `schema` was **removed** from the DSL, just use `key(:name).schema` instead (solnic)
@@ -603,15 +723,10 @@ Complete rewrite on top of `dry-schema`.
603
723
  - `Schema::Result` is now `Validation::Result` and it no longer has success and
604
724
  failure results, only error results are provided (solnic)
605
725
 
606
- ### Fixed
607
-
608
- - Qualified rule names properly use last node by default for error messages (solnic)
609
- - Validation hints only include relevant messages (solnic)
610
- - `:yaml` messages respect `:locale` option in `Result#messages` (solnic)
611
-
612
726
  [Compare v0.6.0...v0.7.0](https://github.com/dry-rb/dry-validation/compare/v0.6.0...v0.7.0)
613
727
 
614
- # v0.6.0 2016-01-20
728
+ ## 0.6.0 2016-01-20
729
+
615
730
 
616
731
  ### Added
617
732
 
@@ -622,38 +737,41 @@ Complete rewrite on top of `dry-schema`.
622
737
  - Support for `confirmation(:foo, some_predicate: some_argument)` shortcut syntax (solnic)
623
738
  - Support for error messages for grouped rules (like `confirmation`) (solnic)
624
739
  - Schemas support injecting rules from the outside (solnic)
625
-
626
- ## Changed
627
-
740
+ - ## Changed
628
741
  - `rule` uses objects that inherit from `BasicObject` to avoid conflicts with
629
742
  predicate names and built-in `Object` methods (solnic)
630
743
  - In `Schema::Form` both `key` and `optional` will apply `filled?` predicate by
631
744
  default when no block is passed (solnic)
632
745
 
746
+
633
747
  [Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-validation/compare/v0.5.0...v0.6.0)
634
748
 
635
- # v0.5.0 2016-01-11
749
+ ## 0.5.0 2016-01-11
636
750
 
637
- ### Changed
638
-
639
- - Now depends on [dry-logic](https://github.com/dry-rb/dry-logic) for predicates and rules (solnic)
640
- - `dry/validation/schema/form` is now required by default (solnic)
641
751
 
642
752
  ### Fixed
643
753
 
644
754
  - `Schema::Form` uses safe `form.array` and `form.hash` types which fixes #42 (solnic)
645
755
 
756
+ ### Changed
757
+
758
+ - Now depends on [dry-logic](https://github.com/dry-rb/dry-logic) for predicates and rules (solnic)
759
+ - `dry/validation/schema/form` is now required by default (solnic)
760
+
646
761
  [Compare v0.4.1...v0.5.0](https://github.com/dry-rb/dry-validation/compare/v0.4.1...v0.5.0)
647
762
 
648
- # v0.4.1 2015-12-27
763
+ ## 0.4.1 2015-12-27
764
+
649
765
 
650
766
  ### Added
651
767
 
652
768
  - Support for `each` and type coercion inference in `Schema::Form` (solnic)
653
769
 
770
+
654
771
  [Compare v0.4.0...v0.4.1](https://github.com/dry-rb/dry-validation/compare/v0.4.0...v0.4.1)
655
772
 
656
- # v0.4.0 2015-12-21
773
+ ## 0.4.0 2015-12-21
774
+
657
775
 
658
776
  ### Added
659
777
 
@@ -667,9 +785,11 @@ Complete rewrite on top of `dry-schema`.
667
785
 
668
786
  - Error messages hash has now consistent structure `rule_name => [msgs_array, input_value]` (solnic)
669
787
 
788
+
670
789
  [Compare v0.3.1...v0.4.0](https://github.com/dry-rb/dry-validation/compare/v0.3.1...v0.4.0)
671
790
 
672
- # v0.3.1 2015-12-08
791
+ ## 0.3.1 2015-12-08
792
+
673
793
 
674
794
  ### Added
675
795
 
@@ -679,9 +799,11 @@ Complete rewrite on top of `dry-schema`.
679
799
 
680
800
  - Error compiler returns an empty hash rather than a nil when there are no errors (solnic)
681
801
 
802
+
682
803
  [Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-validation/compare/v0.3.0...v0.3.1)
683
804
 
684
- # v0.3.0 2015-12-07
805
+ ## 0.3.0 2015-12-07
806
+
685
807
 
686
808
  ### Added
687
809
 
@@ -703,9 +825,10 @@ Complete rewrite on top of `dry-schema`.
703
825
  errors and messages
704
826
  - `Schema::Result#messages` returns a hash with rule names, messages and input values (solnic)
705
827
 
706
- [Compare v0.2.0...HEAD](https://github.com/dry-rb/dry-validation/compare/v0.2.0...HEAD)
828
+ [Compare v0.2.0...v0.3.0](https://github.com/dry-rb/dry-validation/compare/v0.2.0...v0.3.0)
829
+
830
+ ## 0.2.0 2015-11-30
707
831
 
708
- # v0.2.0 2015-11-30
709
832
 
710
833
  ### Added
711
834
 
@@ -726,8 +849,9 @@ Complete rewrite on top of `dry-schema`.
726
849
 
727
850
  - Added missing `and` / `or` interfaces to composite rules (solnic)
728
851
 
729
- [Compare v0.1.0...HEAD](https://github.com/dry-rb/dry-validation/compare/v0.1.0...HEAD)
730
852
 
731
- # v0.1.0 2015-11-25
853
+ [Compare v0.1.0...v0.2.0](https://github.com/dry-rb/dry-validation/compare/v0.1.0...v0.2.0)
854
+
855
+ ## 0.1.0 2015-11-25
732
856
 
733
857
  First public release