dry-schema 1.11.2 → 1.12.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: 54711c3fdbfd2a26598cfb2d3c4b475cc20060d5ede19cd464b008c4d7ced04a
4
- data.tar.gz: c8fd8e307a37a4cea6ac8f7dfe7d0af4fbadcf8ff8b617b090639f39d488a2ee
3
+ metadata.gz: 7320e83a79df3304ba5bdd03077f15ff7cc57b361070eccce0fe06ffb81794b9
4
+ data.tar.gz: c2d39039e5946dc3a587cf984e957d695767629464d38ce8bcf5ce2ac3d5f6f8
5
5
  SHA512:
6
- metadata.gz: e3575927541dfa787a2fe9afb2becde806d37cd8f08ffc43f215d7032bcb9062633be9bd5af8e6d97a4b4b4568381ad1698a507f992cb66cbf1b53ee172f4cca
7
- data.tar.gz: 362f8443a65e53ec778ff5a45b0e97c264fdecc70794c4e5d2b98ed20e07ec1690545a14abdfe4ef522897364c7fc80b8345c34c2666ca30650ed2cbb211b455
6
+ metadata.gz: 49e56ca6e3db2834008c46fd43e49cbac7f037a57ee58cc43af9ff6c8d992c1573da51bed225e4fc2dd84549b48386f7b335e19c74cc5ed0074ea005709c3695
7
+ data.tar.gz: 9401d493d77af5032279b237a5a6da4776eee23414bdb14fa555562362e6f61ffa007304395dda5a45ed3e19b9a31cab989467b7440b1bfb791963771e8f78cc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
2
 
3
+ ## 1.12.0 2022-11-04
4
+
5
+
6
+ ### Changed
7
+
8
+ - This version depends on dry-core 1.0 and dry-configurable 1.0 (@flash-gordon)
9
+
10
+ [Compare v1.11.3...v1.12.0](https://github.com/dry-rb/dry-schema/compare/v1.11.3...v1.12.0)
11
+
12
+ ## 1.11.3 2022-10-21
13
+
14
+
15
+ ### Fixed
16
+
17
+ - Fixed `array(sum_type)` syntax which was a regression introduced in 1.10.0 (issue #436 fixed via #437) (@solnic)
18
+
19
+
20
+ [Compare v1.11.2...v1.11.3](https://github.com/dry-rb/dry-schema/compare/v1.11.2...v1.11.3)
21
+
3
22
  ## 1.11.2 2022-10-16
4
23
 
5
24
 
@@ -273,7 +292,7 @@ This release ships with a bunch of internal refactorings that should improve per
273
292
 
274
293
  [Compare v1.5.4...v1.5.5](https://github.com/dry-rb/dry-schema/compare/v1.5.4...v1.5.5)
275
294
 
276
- ## 1.5.4
295
+ ## 1.5.4
277
296
 
278
297
  2020-09-03
279
298
 
data/dry-schema.gemspec CHANGED
@@ -35,12 +35,12 @@ Gem::Specification.new do |spec|
35
35
 
36
36
  # to update dependencies edit project.yml
37
37
  spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
38
- spec.add_runtime_dependency "dry-configurable", "~> 0.16", ">= 0.16"
39
- spec.add_runtime_dependency "dry-core", "~> 0.9", ">= 0.9"
40
- spec.add_runtime_dependency "dry-initializer", "~> 3.0"
41
- spec.add_runtime_dependency "dry-logic", "~> 1.3"
42
- spec.add_runtime_dependency "dry-types", "~> 1.6"
43
38
  spec.add_runtime_dependency "zeitwerk", "~> 2.6"
39
+ spec.add_runtime_dependency "dry-configurable", "~> 1.0", "< 2"
40
+ spec.add_runtime_dependency "dry-core", "~> 1.0", "< 2"
41
+ spec.add_runtime_dependency "dry-initializer", "~> 3.0"
42
+ spec.add_runtime_dependency "dry-logic", ">= 1.4", "< 2"
43
+ spec.add_runtime_dependency "dry-types", ">= 1.7", "< 2"
44
44
 
45
45
  spec.add_development_dependency "bundler"
46
46
  spec.add_development_dependency "rake"
@@ -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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dry/container"
3
+ require "dry/core/container"
4
4
  require "dry/types"
5
5
 
6
6
  module Dry
@@ -13,7 +13,7 @@ module Dry
13
13
  #
14
14
  # @api public
15
15
  class TypeContainer
16
- include Dry::Container::Mixin
16
+ include Dry::Core::Container::Mixin
17
17
 
18
18
  def initialize(types_container = Dry::Types.container)
19
19
  super()
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Schema
5
- VERSION = "1.11.2"
5
+ VERSION = "1.12.0"
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.12.0
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-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -25,101 +25,113 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: dry-configurable
28
+ name: zeitwerk
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.16'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: '0.16'
33
+ version: '2.6'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: '0.16'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '0.16'
40
+ version: '2.6'
47
41
  - !ruby/object:Gem::Dependency
48
- name: dry-core
42
+ name: dry-configurable
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '0.9'
54
- - - ">="
47
+ version: '1.0'
48
+ - - "<"
55
49
  - !ruby/object:Gem::Version
56
- version: '0.9'
50
+ version: '2'
57
51
  type: :runtime
58
52
  prerelease: false
59
53
  version_requirements: !ruby/object:Gem::Requirement
60
54
  requirements:
61
55
  - - "~>"
62
56
  - !ruby/object:Gem::Version
63
- version: '0.9'
64
- - - ">="
57
+ version: '1.0'
58
+ - - "<"
65
59
  - !ruby/object:Gem::Version
66
- version: '0.9'
60
+ version: '2'
67
61
  - !ruby/object:Gem::Dependency
68
- name: dry-initializer
62
+ name: dry-core
69
63
  requirement: !ruby/object:Gem::Requirement
70
64
  requirements:
71
65
  - - "~>"
72
66
  - !ruby/object:Gem::Version
73
- version: '3.0'
67
+ version: '1.0'
68
+ - - "<"
69
+ - !ruby/object:Gem::Version
70
+ version: '2'
74
71
  type: :runtime
75
72
  prerelease: false
76
73
  version_requirements: !ruby/object:Gem::Requirement
77
74
  requirements:
78
75
  - - "~>"
79
76
  - !ruby/object:Gem::Version
80
- version: '3.0'
77
+ version: '1.0'
78
+ - - "<"
79
+ - !ruby/object:Gem::Version
80
+ version: '2'
81
81
  - !ruby/object:Gem::Dependency
82
- name: dry-logic
82
+ name: dry-initializer
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: '1.3'
87
+ version: '3.0'
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: '1.3'
94
+ version: '3.0'
95
95
  - !ruby/object:Gem::Dependency
96
- name: dry-types
96
+ name: dry-logic
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - "~>"
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '1.4'
102
+ - - "<"
100
103
  - !ruby/object:Gem::Version
101
- version: '1.6'
104
+ version: '2'
102
105
  type: :runtime
103
106
  prerelease: false
104
107
  version_requirements: !ruby/object:Gem::Requirement
105
108
  requirements:
106
- - - "~>"
109
+ - - ">="
107
110
  - !ruby/object:Gem::Version
108
- version: '1.6'
111
+ version: '1.4'
112
+ - - "<"
113
+ - !ruby/object:Gem::Version
114
+ version: '2'
109
115
  - !ruby/object:Gem::Dependency
110
- name: zeitwerk
116
+ name: dry-types
111
117
  requirement: !ruby/object:Gem::Requirement
112
118
  requirements:
113
- - - "~>"
119
+ - - ">="
114
120
  - !ruby/object:Gem::Version
115
- version: '2.6'
121
+ version: '1.7'
122
+ - - "<"
123
+ - !ruby/object:Gem::Version
124
+ version: '2'
116
125
  type: :runtime
117
126
  prerelease: false
118
127
  version_requirements: !ruby/object:Gem::Requirement
119
128
  requirements:
120
- - - "~>"
129
+ - - ">="
121
130
  - !ruby/object:Gem::Version
122
- version: '2.6'
131
+ version: '1.7'
132
+ - - "<"
133
+ - !ruby/object:Gem::Version
134
+ version: '2'
123
135
  - !ruby/object:Gem::Dependency
124
136
  name: bundler
125
137
  requirement: !ruby/object:Gem::Requirement