dry-initializer 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/dry-initializer.gemspec +1 -1
- data/lib/dry/initializer/plugins/type_constraint.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd083cbbcdfaa027e91d0c7aa5c3ecd1f7a7b360
|
4
|
+
data.tar.gz: 62d78221803dee64e5941047f50d340b84437e57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12eaa06d640341428da9beb87c79c33b9c2ce09ada2da4229c731693c362395e8f4c132856dbbd4fe986ccbd80532bf71448de6e1c6f1ce1cd050f19bad8b2fa
|
7
|
+
data.tar.gz: 93bbdd93691abe4efaa68d48510690a23a6b698673fbf9d52327ecb83539c55ebce5607c494d11430390ee182661dd71e56f516d963363785c4c6214b03261a5
|
data/CHANGELOG.md
CHANGED
data/dry-initializer.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "dry-initializer"
|
3
|
-
gem.version = "0.3.
|
3
|
+
gem.version = "0.3.3"
|
4
4
|
gem.author = ["Vladimir Kochnev (marshall-lee)", "Andrew Kozin (nepalez)"]
|
5
5
|
gem.email = ["hashtable@yandex.ru", "andrew.kozin@gmail.com"]
|
6
6
|
gem.homepage = "https://github.com/dryrb/dry-initializer"
|
@@ -14,7 +14,7 @@ module Dry::Initializer::Plugins
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def dry_type?
|
17
|
-
type.
|
17
|
+
type.respond_to? :call
|
18
18
|
end
|
19
19
|
|
20
20
|
def plain_type?
|
@@ -24,6 +24,9 @@ module Dry::Initializer::Plugins
|
|
24
24
|
def module_type_constraint
|
25
25
|
return unless plain_type?
|
26
26
|
|
27
|
+
warn "[DEPRECATION] support for ruby modules as type constraint" \
|
28
|
+
" is deprecated. Use dry-types instead."
|
29
|
+
|
27
30
|
"fail #{TypeError}.new(:#{name}, #{type}, @#{name})" \
|
28
31
|
" unless @#{name} == Dry::Initializer::UNDEFINED ||" \
|
29
32
|
" #{type} === @#{name}"
|
@@ -44,6 +47,9 @@ module Dry::Initializer::Plugins
|
|
44
47
|
end
|
45
48
|
|
46
49
|
def object_type_constraint
|
50
|
+
warn "[DEPRECATION] support for case equality (===) as type constraint" \
|
51
|
+
" is deprecated. Use dry-types instead."
|
52
|
+
|
47
53
|
ivar = :"@#{name}"
|
48
54
|
constraint = type
|
49
55
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-initializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Kochnev (marshall-lee)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|