dry-schema 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/dry/schema/compiler.rb +1 -1
- data/lib/dry/schema/dsl.rb +0 -1
- data/lib/dry/schema/key_validator.rb +2 -1
- data/lib/dry/schema/predicate.rb +2 -0
- data/lib/dry/schema/result.rb +1 -1
- data/lib/dry/schema/rule_applier.rb +0 -1
- data/lib/dry/schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c56536db764858bb0d594688d581e4f38fd46f949f75829c20a63d67902f3704
|
4
|
+
data.tar.gz: f99af785ccdee69c8cc5d4398b4802612c2b3456e4d472a25d591d593ac9d2bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f538d54f0ab58595f14e94340e1cb2a3da45a5a4909e8aa5e3bb1a6d68fcd5992debf4d6a8c7909fb25166c11160d970dfb06ac4266e87869117ca984574b1
|
7
|
+
data.tar.gz: 3a26179c03e7f4fccce53ae19c6d9133af913407ba64d05bf28a1b173fbdc5e922176edf94c48842829c5b52eda16f5589aa1b98b2848b3094e3713fc2844716
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 1.5.1 2020-05-21
|
2
|
+
|
3
|
+
|
4
|
+
### Fixed
|
5
|
+
|
6
|
+
- Negated predicates support the logic operator API now (fixed via #276 by @solnic)
|
7
|
+
- Fixed circular require warning (issue #279 closed via #282 by @landongrindheim)
|
8
|
+
- Validating keys against an array with non-hash members no longer crashes (issue #283 fixed via #284 by @beechnut and issue #289 fixed via #288 by @tadeusz-niemiec)
|
9
|
+
|
10
|
+
|
11
|
+
[Compare v1.5.0...v1.5.1](https://github.com/dry-rb/dry-schema/compare/v1.5.0...v1.5.1)
|
12
|
+
|
1
13
|
## 1.5.0 2020-03-11
|
2
14
|
|
3
15
|
|
data/lib/dry/schema/compiler.rb
CHANGED
data/lib/dry/schema/dsl.rb
CHANGED
@@ -53,7 +53,8 @@ module Dry
|
|
53
53
|
when Hash
|
54
54
|
[key].product(key_paths(hash[key])).map { |keys| keys.join(DOT) }
|
55
55
|
when Array
|
56
|
-
value.
|
56
|
+
hashes_or_arrays = value.select { |e| e.is_a?(Array) || e.is_a?(Hash) }
|
57
|
+
hashes_or_arrays.flat_map.with_index { |el, idx|
|
57
58
|
key_paths(el).map { |path| ["#{key}[#{idx}]", *path].join(DOT) }
|
58
59
|
}
|
59
60
|
else
|
data/lib/dry/schema/predicate.rb
CHANGED
data/lib/dry/schema/result.rb
CHANGED
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.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|