dry-schema 1.5.2 → 1.5.3

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: 56d8ad72225fe97e2b15ab143007eb6ffc9356a5255bb58392e62e515faec939
4
- data.tar.gz: f1c083ba766e4626d6f3b6bba1d90b94c5a69c3876b27c102188a41d48c6882a
3
+ metadata.gz: ed1f0c97144ee071608d437d3d0f17b8031e942bc53335dddd52f9701c51c1c0
4
+ data.tar.gz: c6d24ab22475c7794c999a7e04b3106451356080014ef4c087a4d1458bc21783
5
5
  SHA512:
6
- metadata.gz: 456412163fc86f80ccf4f5c03e89801baeb28cc048d1ba510ca99539cbbf8ae512b6ac1e3821399b9121eec007927176f83450b1b4643feb6b3848b3b5c04c1d
7
- data.tar.gz: 993d886c1863a36c20d16b2ac7c08ece0412c9e9d97534aea93564f5be02da1772c803115eaef06731f45093ed147ce0ed889578114fc086e9e3d75fd67bd750
6
+ metadata.gz: 91e0a095b534dc935c372830e8cfc5ae55fd854994b7641b90e59efd11e739b81296b575a486836982b99804349c3d2cd8d539ea207101b43675db95b0a0557a
7
+ data.tar.gz: c4e691dfe79c69a6d71e4046d9d81d23b8da16b4861b313fd66977d3d0be2a337bf7e80e6aef23c85561217608b2d589ce098c4c9626a177106eb45158e079b8
@@ -1,3 +1,16 @@
1
+ ## 1.5.3 2020-08-21
2
+
3
+
4
+ ### Fixed
5
+
6
+ - Key validator works correctly with an array with maybe hash as its member (issue #308 fixed via #309) (@tadeusz-niemiec)
7
+
8
+ ### Changed
9
+
10
+ - [info extension] small performance improvement in the set visitor (see #305 for more details) (@esparta)
11
+
12
+ [Compare v1.5.2...v1.5.3](https://github.com/dry-rb/dry-schema/compare/v1.5.2...v1.5.3)
13
+
1
14
  ## 1.5.2 2020-06-26
2
15
 
3
16
 
@@ -50,7 +50,7 @@ module Dry
50
50
  def visit_set(node, opts = EMPTY_HASH)
51
51
  target = (key = opts[:key]) ? self.class.new : self
52
52
 
53
- node.map { |child| target.visit(child, opts) }
53
+ node.each { |child| target.visit(child, opts) }
54
54
 
55
55
  return unless key
56
56
 
@@ -28,7 +28,7 @@ module Dry
28
28
  if path[INDEX_REGEX]
29
29
  key = path.gsub(INDEX_REGEX, BRACKETS)
30
30
 
31
- unless key_paths.include?(key)
31
+ if key_paths.none? { |key_path| key_path.include?(key) }
32
32
  arr = path.gsub(INDEX_REGEX) { |m| ".#{m[1]}" }
33
33
  arr.split(DOT).map { |s| DIGIT_REGEX.match?(s) ? s.to_i : s.to_sym }
34
34
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Schema
5
- VERSION = "1.5.2"
5
+ VERSION = "1.5.3"
6
6
  end
7
7
  end
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.2
4
+ version: 1.5.3
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-26 00:00:00.000000000 Z
11
+ date: 2020-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby