dry-types 1.5.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +50 -0
- data/LICENSE +1 -1
- data/README.md +7 -13
- data/dry-types.gemspec +19 -18
- data/lib/dry/types/array/constructor.rb +0 -2
- data/lib/dry/types/array/member.rb +1 -3
- data/lib/dry/types/array.rb +0 -3
- data/lib/dry/types/builder.rb +43 -14
- data/lib/dry/types/builder_methods.rb +1 -1
- data/lib/dry/types/coercions/params.rb +4 -3
- data/lib/dry/types/compat.rb +1 -0
- data/lib/dry/types/compiler.rb +1 -3
- data/lib/dry/types/composition.rb +152 -0
- data/lib/dry/types/constrained.rb +0 -5
- data/lib/dry/types/constraints.rb +3 -7
- data/lib/dry/types/constructor/function.rb +8 -9
- data/lib/dry/types/constructor.rb +4 -10
- data/lib/dry/types/container.rb +1 -3
- data/lib/dry/types/core.rb +2 -3
- data/lib/dry/types/decorator.rb +0 -2
- data/lib/dry/types/default.rb +3 -6
- data/lib/dry/types/enum.rb +0 -3
- data/lib/dry/types/errors.rb +13 -1
- data/lib/dry/types/extensions/maybe.rb +8 -5
- data/lib/dry/types/extensions/monads.rb +7 -2
- data/lib/dry/types/fn_container.rb +0 -2
- data/lib/dry/types/hash/constructor.rb +2 -4
- data/lib/dry/types/hash.rb +1 -6
- data/lib/dry/types/implication.rb +66 -0
- data/lib/dry/types/intersection.rb +108 -0
- data/lib/dry/types/lax.rb +1 -4
- data/lib/dry/types/map.rb +9 -3
- data/lib/dry/types/module.rb +18 -9
- data/lib/dry/types/nominal.rb +2 -13
- data/lib/dry/types/predicate_inferrer.rb +8 -9
- data/lib/dry/types/predicate_registry.rb +7 -7
- data/lib/dry/types/primitive_inferrer.rb +0 -2
- data/lib/dry/types/printer/composition.rb +44 -0
- data/lib/dry/types/printer.rb +116 -131
- data/lib/dry/types/result.rb +0 -2
- data/lib/dry/types/schema/key.rb +1 -4
- data/lib/dry/types/schema.rb +6 -4
- data/lib/dry/types/sum.rb +3 -95
- data/lib/dry/types/type.rb +1 -3
- data/lib/dry/types/version.rb +1 -1
- data/lib/dry/types.rb +49 -22
- metadata +32 -46
metadata
CHANGED
@@ -1,131 +1,113 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.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:
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bigdecimal
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: concurrent-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: dry-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '0.5'
|
47
|
+
version: '1.0'
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
52
|
- - "~>"
|
56
53
|
- !ruby/object:Gem::Version
|
57
|
-
version: '0
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0.5'
|
54
|
+
version: '1.0'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: dry-inflector
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
59
|
- - "~>"
|
66
60
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 0.1.2
|
61
|
+
version: '1.0'
|
71
62
|
type: :runtime
|
72
63
|
prerelease: false
|
73
64
|
version_requirements: !ruby/object:Gem::Requirement
|
74
65
|
requirements:
|
75
66
|
- - "~>"
|
76
67
|
- !ruby/object:Gem::Version
|
77
|
-
version: '0
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 0.1.2
|
68
|
+
version: '1.0'
|
81
69
|
- !ruby/object:Gem::Dependency
|
82
70
|
name: dry-logic
|
83
71
|
requirement: !ruby/object:Gem::Requirement
|
84
72
|
requirements:
|
85
73
|
- - "~>"
|
86
74
|
- !ruby/object:Gem::Version
|
87
|
-
version: '1.
|
88
|
-
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: 1.0.2
|
75
|
+
version: '1.4'
|
91
76
|
type: :runtime
|
92
77
|
prerelease: false
|
93
78
|
version_requirements: !ruby/object:Gem::Requirement
|
94
79
|
requirements:
|
95
80
|
- - "~>"
|
96
81
|
- !ruby/object:Gem::Version
|
97
|
-
version: '1.
|
98
|
-
- - ">="
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: 1.0.2
|
82
|
+
version: '1.4'
|
101
83
|
- !ruby/object:Gem::Dependency
|
102
|
-
name:
|
84
|
+
name: zeitwerk
|
103
85
|
requirement: !ruby/object:Gem::Requirement
|
104
86
|
requirements:
|
105
|
-
- - "
|
87
|
+
- - "~>"
|
106
88
|
- !ruby/object:Gem::Version
|
107
|
-
version: '
|
108
|
-
type: :
|
89
|
+
version: '2.6'
|
90
|
+
type: :runtime
|
109
91
|
prerelease: false
|
110
92
|
version_requirements: !ruby/object:Gem::Requirement
|
111
93
|
requirements:
|
112
|
-
- - "
|
94
|
+
- - "~>"
|
113
95
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
96
|
+
version: '2.6'
|
115
97
|
- !ruby/object:Gem::Dependency
|
116
|
-
name:
|
98
|
+
name: bundler
|
117
99
|
requirement: !ruby/object:Gem::Requirement
|
118
100
|
requirements:
|
119
|
-
- - "
|
101
|
+
- - ">="
|
120
102
|
- !ruby/object:Gem::Version
|
121
|
-
version: '
|
103
|
+
version: '0'
|
122
104
|
type: :development
|
123
105
|
prerelease: false
|
124
106
|
version_requirements: !ruby/object:Gem::Requirement
|
125
107
|
requirements:
|
126
|
-
- - "
|
108
|
+
- - ">="
|
127
109
|
- !ruby/object:Gem::Version
|
128
|
-
version: '
|
110
|
+
version: '0'
|
129
111
|
- !ruby/object:Gem::Dependency
|
130
112
|
name: rake
|
131
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,6 +175,7 @@ files:
|
|
193
175
|
- lib/dry/types/coercions/params.rb
|
194
176
|
- lib/dry/types/compat.rb
|
195
177
|
- lib/dry/types/compiler.rb
|
178
|
+
- lib/dry/types/composition.rb
|
196
179
|
- lib/dry/types/constrained.rb
|
197
180
|
- lib/dry/types/constrained/coercible.rb
|
198
181
|
- lib/dry/types/constraints.rb
|
@@ -211,7 +194,9 @@ files:
|
|
211
194
|
- lib/dry/types/fn_container.rb
|
212
195
|
- lib/dry/types/hash.rb
|
213
196
|
- lib/dry/types/hash/constructor.rb
|
197
|
+
- lib/dry/types/implication.rb
|
214
198
|
- lib/dry/types/inflector.rb
|
199
|
+
- lib/dry/types/intersection.rb
|
215
200
|
- lib/dry/types/json.rb
|
216
201
|
- lib/dry/types/lax.rb
|
217
202
|
- lib/dry/types/map.rb
|
@@ -225,6 +210,7 @@ files:
|
|
225
210
|
- lib/dry/types/primitive_inferrer.rb
|
226
211
|
- lib/dry/types/printable.rb
|
227
212
|
- lib/dry/types/printer.rb
|
213
|
+
- lib/dry/types/printer/composition.rb
|
228
214
|
- lib/dry/types/result.rb
|
229
215
|
- lib/dry/types/schema.rb
|
230
216
|
- lib/dry/types/schema/key.rb
|
@@ -237,7 +223,7 @@ licenses:
|
|
237
223
|
- MIT
|
238
224
|
metadata:
|
239
225
|
allowed_push_host: https://rubygems.org
|
240
|
-
changelog_uri: https://github.com/dry-rb/dry-types/blob/
|
226
|
+
changelog_uri: https://github.com/dry-rb/dry-types/blob/main/CHANGELOG.md
|
241
227
|
source_code_uri: https://github.com/dry-rb/dry-types
|
242
228
|
bug_tracker_uri: https://github.com/dry-rb/dry-types/issues
|
243
229
|
post_install_message:
|
@@ -248,14 +234,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
248
234
|
requirements:
|
249
235
|
- - ">="
|
250
236
|
- !ruby/object:Gem::Version
|
251
|
-
version:
|
237
|
+
version: '3.0'
|
252
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
239
|
requirements:
|
254
240
|
- - ">="
|
255
241
|
- !ruby/object:Gem::Version
|
256
242
|
version: '0'
|
257
243
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
244
|
+
rubygems_version: 3.3.26
|
259
245
|
signing_key:
|
260
246
|
specification_version: 4
|
261
247
|
summary: Type system for Ruby supporting coercions, constraints and complex types
|