dry-types 1.7.0 → 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 +20 -0
- data/LICENSE +1 -1
- data/README.md +5 -12
- data/dry-types.gemspec +5 -4
- data/lib/dry/types/constructor.rb +2 -2
- data/lib/dry/types/hash.rb +1 -1
- data/lib/dry/types/predicate_inferrer.rb +5 -0
- data/lib/dry/types/version.rb +1 -1
- data/lib/dry/types.rb +1 -1
- metadata +20 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b751a4799c67217dd1540dacc45a70ce51dab53441ec64e575f74a520e0eb6
|
4
|
+
data.tar.gz: e50e85513f68af8f0b98f5af707c2e82826c7daed237fba9ca014b96fc4e4754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7247fc6a64c97967a83de7613f298d25137c4d03ae9afa79929255cca792dcb6a9f7203f4cdefb942b662c7ec7a32d0386a005c8e6e19ecfa03d37d802d2877
|
7
|
+
data.tar.gz: 2a54fd10714b4a5a74e7026de501c9a74f4378890ed4e39f98f9b163eb23ebfd28d27d85165e18a68aa8603149df2c8d56eabef99f36d26c56f6e60676fa3e3b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
+
## 1.7.2 2024-01-05
|
4
|
+
|
5
|
+
|
6
|
+
### Fixed
|
7
|
+
|
8
|
+
- Fixed BigDecimal warning due to not being required in gemspec (@bkuhlmann in #464)
|
9
|
+
|
10
|
+
|
11
|
+
[Compare v1.7.1...v1.7.2](https://github.com/dry-rb/dry-types/compare/v1.7.1...v1.7.2)
|
12
|
+
|
13
|
+
## 1.7.1 2023-02-17
|
14
|
+
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
|
18
|
+
- Warning from jruby about overwritten keyword (@flash-gordon + @klobuczek in #454)
|
19
|
+
|
20
|
+
|
21
|
+
[Compare v1.7.0...v1.7.1](https://github.com/dry-rb/dry-types/compare/v1.7.0...v1.7.1)
|
22
|
+
|
3
23
|
## 1.7.0 2022-11-04
|
4
24
|
|
5
25
|
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,29 +1,22 @@
|
|
1
1
|
<!--- this file is synced from dry-rb/template-gem project -->
|
2
|
+
|
2
3
|
[gem]: https://rubygems.org/gems/dry-types
|
3
4
|
[actions]: https://github.com/dry-rb/dry-types/actions
|
4
|
-
[codacy]: https://www.codacy.com/gh/dry-rb/dry-types
|
5
|
-
[chat]: https://dry-rb.zulipchat.com
|
6
|
-
[inchpages]: http://inch-ci.org/github/dry-rb/dry-types
|
7
|
-
|
8
|
-
# dry-types [![Join the chat at https://dry-rb.zulipchat.com](https://img.shields.io/badge/dry--rb-join%20chat-%23346b7a.svg)][chat]
|
9
5
|
|
10
|
-
[![Gem Version](https://badge.fury.io/rb/dry-types.svg)][gem]
|
11
|
-
[![CI Status](https://github.com/dry-rb/dry-types/workflows/ci/badge.svg)][actions]
|
12
|
-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f2d71613195f4da993acb9ac9d6ea336)][codacy]
|
13
|
-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/f2d71613195f4da993acb9ac9d6ea336)][codacy]
|
14
|
-
[![Inline docs](http://inch-ci.org/github/dry-rb/dry-types.svg?branch=main)][inchpages]
|
6
|
+
# dry-types [![Gem Version](https://badge.fury.io/rb/dry-types.svg)][gem] [![CI Status](https://github.com/dry-rb/dry-types/workflows/CI/badge.svg)][actions]
|
15
7
|
|
16
8
|
## Links
|
17
9
|
|
18
10
|
* [User documentation](https://dry-rb.org/gems/dry-types)
|
19
11
|
* [API documentation](http://rubydoc.info/gems/dry-types)
|
12
|
+
* [Forum](https://discourse.dry-rb.org)
|
20
13
|
|
21
14
|
## Supported Ruby versions
|
22
15
|
|
23
16
|
This library officially supports the following Ruby versions:
|
24
17
|
|
25
|
-
* MRI `>=
|
26
|
-
* jruby `>= 9.
|
18
|
+
* MRI `>= 3.0`
|
19
|
+
* jruby `>= 9.4` (not tested on CI)
|
27
20
|
|
28
21
|
## License
|
29
22
|
|
data/dry-types.gemspec
CHANGED
@@ -26,13 +26,14 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.metadata["source_code_uri"] = "https://github.com/dry-rb/dry-types"
|
27
27
|
spec.metadata["bug_tracker_uri"] = "https://github.com/dry-rb/dry-types/issues"
|
28
28
|
|
29
|
-
spec.required_ruby_version = ">=
|
29
|
+
spec.required_ruby_version = ">= 3.0"
|
30
30
|
|
31
31
|
# to update dependencies edit project.yml
|
32
|
+
spec.add_runtime_dependency "bigdecimal", "~> 3.0"
|
32
33
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
33
|
-
spec.add_runtime_dependency "dry-core", "~> 1.0"
|
34
|
-
spec.add_runtime_dependency "dry-inflector", "~> 1.0"
|
35
|
-
spec.add_runtime_dependency "dry-logic", "
|
34
|
+
spec.add_runtime_dependency "dry-core", "~> 1.0"
|
35
|
+
spec.add_runtime_dependency "dry-inflector", "~> 1.0"
|
36
|
+
spec.add_runtime_dependency "dry-logic", "~> 1.4"
|
36
37
|
spec.add_runtime_dependency "zeitwerk", "~> 2.6"
|
37
38
|
|
38
39
|
spec.add_development_dependency "bundler"
|
@@ -22,9 +22,9 @@ module Dry
|
|
22
22
|
# @param [#call, nil] block
|
23
23
|
#
|
24
24
|
# @api public
|
25
|
-
def self.new(input, **options, &block)
|
25
|
+
def self.new(input, fn: Undefined, **options, &block)
|
26
26
|
type = input.is_a?(Builder) ? input : Nominal.new(input)
|
27
|
-
super(type, **options, fn: Function[
|
27
|
+
super(type, **options, fn: Function[Undefined.default(fn, block)])
|
28
28
|
end
|
29
29
|
|
30
30
|
# @param [Builder, Object] input
|
data/lib/dry/types/hash.rb
CHANGED
@@ -49,7 +49,7 @@ module Dry
|
|
49
49
|
# @api private
|
50
50
|
def weak(*)
|
51
51
|
raise "Support for old hash schemas was removed, please refer to the CHANGELOG "\
|
52
|
-
"on how to proceed with the new API https://github.com/dry-rb/dry-types/blob/
|
52
|
+
"on how to proceed with the new API https://github.com/dry-rb/dry-types/blob/main/CHANGELOG.md"
|
53
53
|
end
|
54
54
|
alias_method :permissive, :weak
|
55
55
|
alias_method :strict, :weak
|
data/lib/dry/types/version.rb
CHANGED
data/lib/dry/types.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
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
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bigdecimal
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: concurrent-ruby
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,9 +45,6 @@ dependencies:
|
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '1.0'
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '2'
|
37
48
|
type: :runtime
|
38
49
|
prerelease: false
|
39
50
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,9 +52,6 @@ dependencies:
|
|
41
52
|
- - "~>"
|
42
53
|
- !ruby/object:Gem::Version
|
43
54
|
version: '1.0'
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '2'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: dry-inflector
|
49
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,9 +59,6 @@ dependencies:
|
|
51
59
|
- - "~>"
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '1.0'
|
54
|
-
- - "<"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '2'
|
57
62
|
type: :runtime
|
58
63
|
prerelease: false
|
59
64
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -61,29 +66,20 @@ dependencies:
|
|
61
66
|
- - "~>"
|
62
67
|
- !ruby/object:Gem::Version
|
63
68
|
version: '1.0'
|
64
|
-
- - "<"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '2'
|
67
69
|
- !ruby/object:Gem::Dependency
|
68
70
|
name: dry-logic
|
69
71
|
requirement: !ruby/object:Gem::Requirement
|
70
72
|
requirements:
|
71
|
-
- - "
|
73
|
+
- - "~>"
|
72
74
|
- !ruby/object:Gem::Version
|
73
75
|
version: '1.4'
|
74
|
-
- - "<"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '2'
|
77
76
|
type: :runtime
|
78
77
|
prerelease: false
|
79
78
|
version_requirements: !ruby/object:Gem::Requirement
|
80
79
|
requirements:
|
81
|
-
- - "
|
80
|
+
- - "~>"
|
82
81
|
- !ruby/object:Gem::Version
|
83
82
|
version: '1.4'
|
84
|
-
- - "<"
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '2'
|
87
83
|
- !ruby/object:Gem::Dependency
|
88
84
|
name: zeitwerk
|
89
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,14 +234,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
234
|
requirements:
|
239
235
|
- - ">="
|
240
236
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
237
|
+
version: '3.0'
|
242
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
239
|
requirements:
|
244
240
|
- - ">="
|
245
241
|
- !ruby/object:Gem::Version
|
246
242
|
version: '0'
|
247
243
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
244
|
+
rubygems_version: 3.3.26
|
249
245
|
signing_key:
|
250
246
|
specification_version: 4
|
251
247
|
summary: Type system for Ruby supporting coercions, constraints and complex types
|