dry-validation 1.5.1 → 1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2deba7f8bd2d4ad011e0f4be2aa20d4f20d219d85d0eeec23d3b3e0b12c0bcf4
4
- data.tar.gz: 12f9500062c0239d19f6bf32450db22065a9caa3062e4cb71d79a9370c3229ec
3
+ metadata.gz: 83395b144bcdc666d13ac3cb100e2a7488ba9caa638067f03beee031964da26a
4
+ data.tar.gz: fa5f1480a6bff63238c76ffc6ee8c574ccc113048843d5f79c9fdc216b899d23
5
5
  SHA512:
6
- metadata.gz: be6cf6d5dfce8ebec88743b7661eaf4d3cc1294cea249b87e7c02fd00b36013a033fe5feab1ccdb3e6e6020873435fbfc5bf6ee41b5f76836358973f5074843e
7
- data.tar.gz: 77f87593b028dfa608f22835413a73fcbd7c2585e9a98c95f20a158df47fc5ca3f46a0357188f5bd1fc37140de7b57b833ae969aabe55bbdf71628f7db6f645e
6
+ metadata.gz: 7d14bcf252cbf7cd6a2d58f936d65da3e71343388b87924f51f56cd7812fecff33bab17f4193cf354cc76fd7d3bbbd2081e847b0c8b54b466c1781599aeba25b
7
+ data.tar.gz: 11d241432260233c0b7f8fe03b69e1a2cd44e0e7fd241a90ba5f3eb65eff4f21e7c8c88e3fa5c903dc65dbbd78de537a03368ba47cf714a295c7da8784286af8
@@ -1,4 +1,4 @@
1
- ## unreleased
1
+ ## 1.5.1 2020-06-18
2
2
 
3
3
 
4
4
  ### Fixed
@@ -6,9 +6,23 @@
6
6
  - dry-monads no longer required for the `:hints` extension (@schokomarie)
7
7
  - Using `full: true` option works as expected with custom rule messages (issue #618 fixed via #651) (@sirfilip)
8
8
  - Using `locale: ...` option works as expected with hints (issue #589 fixed via #652) (@sirfilip)
9
+ - `key?` predicate in rules no longer crashes when the rule path points to a non-existent array value (issue #653 fixed via #654) (@solnic)
9
10
 
10
11
 
11
- [Compare v1.5.0...master](https://github.com/dry-rb/dry-validation/compare/v1.5.0...master)
12
+ [Compare v1.5.1...v1.5.1](https://github.com/dry-rb/dry-validation/compare/v1.5.1...v1.5.1)
13
+
14
+ ## 1.5.1 2020-06-18
15
+
16
+
17
+ ### Fixed
18
+
19
+ - dry-monads no longer required for the `:hints` extension (@schokomarie)
20
+ - Using `full: true` option works as expected with custom rule messages (issue #618 fixed via #651) (@sirfilip)
21
+ - Using `locale: ...` option works as expected with hints (issue #589 fixed via #652) (@sirfilip)
22
+ - `key?` predicate in rules no longer crashes when the rule path points to a non-existent array value (issue #653 fixed via #654) (@solnic)
23
+
24
+
25
+ [Compare v1.5.0...v1.5.1](https://github.com/dry-rb/dry-validation/compare/v1.5.0...v1.5.1)
12
26
 
13
27
  ## 1.5.0 2020-03-11
14
28
 
@@ -68,6 +68,8 @@ module Dry
68
68
  if e.is_a?(Array)
69
69
  result = e.all? { |k| key?(k, a) }
70
70
  return result
71
+ elsif e.is_a?(Symbol) && a.is_a?(Array)
72
+ return false
71
73
  else
72
74
  return false unless a.is_a?(Array) ? (e >= 0 && e < a.size) : a.key?(e)
73
75
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Validation
5
- VERSION = "1.5.1"
5
+ VERSION = "1.5.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
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-06-18 00:00:00.000000000 Z
11
+ date: 2020-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby