dry-schema 1.11.2 → 1.11.3

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: 54711c3fdbfd2a26598cfb2d3c4b475cc20060d5ede19cd464b008c4d7ced04a
4
- data.tar.gz: c8fd8e307a37a4cea6ac8f7dfe7d0af4fbadcf8ff8b617b090639f39d488a2ee
3
+ metadata.gz: 2c69bd3fc92a8084c35a9049bc7df4c9b68345c70b5b52936c3a3c99bbb89b77
4
+ data.tar.gz: dc2f132989df78249c206510a9743422174cd4401b566c09d7c828133c3a8fe0
5
5
  SHA512:
6
- metadata.gz: e3575927541dfa787a2fe9afb2becde806d37cd8f08ffc43f215d7032bcb9062633be9bd5af8e6d97a4b4b4568381ad1698a507f992cb66cbf1b53ee172f4cca
7
- data.tar.gz: 362f8443a65e53ec778ff5a45b0e97c264fdecc70794c4e5d2b98ed20e07ec1690545a14abdfe4ef522897364c7fc80b8345c34c2666ca30650ed2cbb211b455
6
+ metadata.gz: 95987f2ccf19ae51fb68971a10f8d71dd2d3b3d86b48c53f88c3800cc7734386c789f2e0af3f193af3be5e31a86fcdf7bc7c33661acc67d923a3de8b298f1770
7
+ data.tar.gz: 0c77455225be4a21a698abb51952e5ba7929ee0c861936834e9eebe0b104bce36d8f6aaa6856ea04cc9e7a55724631c3633930ba1aebf8dda14cfdb05756a152
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
2
 
3
+ ## 1.11.3 2022-10-21
4
+
5
+
6
+ ### Fixed
7
+
8
+ - Fixed `array(sum_type)` syntax which was a regression introduced in 1.10.0 (issue #436 fixed via #437) (@solnic)
9
+
10
+
11
+ [Compare v1.11.2...v1.11.3](https://github.com/dry-rb/dry-schema/compare/v1.11.2...v1.11.3)
12
+
3
13
  ## 1.11.2 2022-10-16
4
14
 
5
15
 
@@ -53,9 +53,15 @@ module Dry
53
53
  #
54
54
  # @api public
55
55
  def value(*args, **opts, &block)
56
- extract_type_spec(args) do |*predicates, type_spec:, type_rule:|
56
+ if (type_spec_from_opts = opts[:type_spec])
57
57
  append_macro(Macros::Value) do |macro|
58
- macro.call(*predicates, type_spec: type_spec, type_rule: type_rule, **opts, &block)
58
+ macro.call(*args, type_spec: type_spec_from_opts, **opts, &block)
59
+ end
60
+ else
61
+ extract_type_spec(args) do |*predicates, type_spec:, type_rule:|
62
+ append_macro(Macros::Value) do |macro|
63
+ macro.call(*predicates, type_spec: type_spec, type_rule: type_rule, **opts, &block)
64
+ end
59
65
  end
60
66
  end
61
67
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Schema
5
- VERSION = "1.11.2"
5
+ VERSION = "1.11.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.11.2
4
+ version: 1.11.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: 2022-10-16 00:00:00.000000000 Z
11
+ date: 2022-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby