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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40b4be9df46939eeedfc30932569349b5fdd6037
4
- data.tar.gz: e094dbbe50b3425b68f4bb866495e2392f1a281b
3
+ metadata.gz: bd083cbbcdfaa027e91d0c7aa5c3ecd1f7a7b360
4
+ data.tar.gz: 62d78221803dee64e5941047f50d340b84437e57
5
5
  SHA512:
6
- metadata.gz: 5b3979a9d8f3cc4d5178e3c6bf9a8c106d0109162ac9d8a3b042b1edb2b666fe592e9cd8f1b197f1a51adea90fd34cc76ecf3f1979c88d8dfdbe76659ce5ae9d
7
- data.tar.gz: 75d4b1fa0eee1c53fbb91965751f2c9ab46bc5c833e923c50d698562977fcdc23a865c1c1615909f826a0ffd66baed4a53b6c243f55a760d7b7cf8695827ea7e
6
+ metadata.gz: 12eaa06d640341428da9beb87c79c33b9c2ce09ada2da4229c731693c362395e8f4c132856dbbd4fe986ccbd80532bf71448de6e1c6f1ce1cd050f19bad8b2fa
7
+ data.tar.gz: 93bbdd93691abe4efaa68d48510690a23a6b698673fbf9d52327ecb83539c55ebce5607c494d11430390ee182661dd71e56f516d963363785c4c6214b03261a5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.3.3 2016-05-28
2
+
3
+ * Add deprecation warnings about modules and case equality as type constraints (@nepalez)
4
+
5
+ [Compare v0.3.2...v0.3.3](https://github.com/dry-rb/dry-initializer/compare/v0.3.2..v0.3.3)
6
+
1
7
  ## v0.3.2 2016-05-25
2
8
 
3
9
  ### Bugs Fixed
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "dry-initializer"
3
- gem.version = "0.3.2"
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.class.ancestors.map(&:name).include? "Dry::Types::Builder"
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.2
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-25 00:00:00.000000000 Z
12
+ date: 2016-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec