dry-types 0.13.3 → 0.13.4
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 +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +6 -0
- data/lib/dry/types/constructor.rb +3 -3
- data/lib/dry/types/definition.rb +1 -1
- data/lib/dry/types/hash/schema.rb +1 -1
- data/lib/dry/types/hash/schema_builder.rb +1 -1
- data/lib/dry/types/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbf4d67993d24ac6ee54193a12a7ad872078216a115ca170368899d6ce8ec5ea
|
|
4
|
+
data.tar.gz: a0fcfa2eb7abb090b0c182e596e2b2b3c5cdcb28b0065fe23a91a7b7daa0af01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7baab2ddb3433498905dc143d299ed4af015d416744a14cb7ebc69d3102d0c6b7c58a1c66859d817003b6c49660cee8fd73d3448e1669cedd87666df3927ce48
|
|
7
|
+
data.tar.gz: 628520f10cfd2d3bfe64313d4528197e542087c8218967fd05c29cd360b0e04a913394711b892dcdd374f544ee01bc5d581c3b707dab4d4d82d67f4010ba8e8e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -17,15 +17,15 @@ module Dry
|
|
|
17
17
|
# @param [Builder, Object] input
|
|
18
18
|
# @param [Hash] options
|
|
19
19
|
# @param [#call, nil] block
|
|
20
|
-
def self.new(input, options
|
|
20
|
+
def self.new(input, **options, &block)
|
|
21
21
|
type = input.is_a?(Builder) ? input : Definition.new(input)
|
|
22
|
-
super(type, options, &block)
|
|
22
|
+
super(type, **options, &block)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
# @param [Type] type
|
|
26
26
|
# @param [Hash] options
|
|
27
27
|
# @param [#call, nil] block
|
|
28
|
-
def initialize(type, options
|
|
28
|
+
def initialize(type, **options, &block)
|
|
29
29
|
@type = type
|
|
30
30
|
@fn = options.fetch(:fn, block)
|
|
31
31
|
|
data/lib/dry/types/definition.rb
CHANGED
|
@@ -25,7 +25,7 @@ module Dry
|
|
|
25
25
|
# @param [Hash] options
|
|
26
26
|
# @option options [Hash{Symbol => Definition}] :member_types
|
|
27
27
|
# @option options [String] :key_transform_fn
|
|
28
|
-
def initialize(_primitive, options)
|
|
28
|
+
def initialize(_primitive, **options)
|
|
29
29
|
@member_types = options.fetch(:member_types)
|
|
30
30
|
|
|
31
31
|
meta = options[:meta] || EMPTY_HASH
|
|
@@ -14,7 +14,7 @@ module Dry
|
|
|
14
14
|
# @param primitive [Type]
|
|
15
15
|
# @option options [Hash{Symbol => Definition}] :member_types
|
|
16
16
|
# @option options [Symbol] :hash_type
|
|
17
|
-
def call(primitive, options)
|
|
17
|
+
def call(primitive, **options)
|
|
18
18
|
hash_type = options.fetch(:hash_type)
|
|
19
19
|
member_types = {}
|
|
20
20
|
|
data/lib/dry/types/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dry-types
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piotr Solnica
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|
|
@@ -265,8 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
265
265
|
- !ruby/object:Gem::Version
|
|
266
266
|
version: '0'
|
|
267
267
|
requirements: []
|
|
268
|
-
|
|
269
|
-
rubygems_version: 2.7.6
|
|
268
|
+
rubygems_version: 3.0.0.beta3
|
|
270
269
|
signing_key:
|
|
271
270
|
specification_version: 4
|
|
272
271
|
summary: Type system for Ruby supporting coercions, constraints and complex types
|