dry-types-rails 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/dry-types-rails.gemspec +1 -1
- data/lib/dry/types/rails/railtie.rb +4 -4
- data/lib/dry/types/rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a82e1f66220b094672ce4064aee6cb8673275f29
|
4
|
+
data.tar.gz: 609ead63a103aa7ba09885712e6a1b93d4b53724
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd7300cb37e6990a3653579384e22e7620b83610656168abe7d5090e84d6b8487d68c9a7ed2d71939ca1ac9a9bec68a5f6824695e82809cb2e45d71da04b6bf4
|
7
|
+
data.tar.gz: 2bf9d10056795c9f612fe9d389df8cac1fb5fa6cfd5849394b7fd03752b8b5a9cd1737ac06d92f17e76b3c3554d80899943abb412d6bb318e4027574ff3dc104
|
data/dry-types-rails.gemspec
CHANGED
@@ -4,18 +4,18 @@ module Dry
|
|
4
4
|
module TypesRegistration
|
5
5
|
REGISTERED_TYPES = Concurrent::Array.new
|
6
6
|
|
7
|
-
def
|
8
|
-
return if TypesRegistration::REGISTERED_TYPES.include?(
|
7
|
+
def register(name, type)
|
8
|
+
return if TypesRegistration::REGISTERED_TYPES.include?(name)
|
9
9
|
|
10
10
|
super.tap do
|
11
11
|
# Check to see if we need to remove the registered type
|
12
|
-
autoloaded = ActiveSupport::Dependencies.will_unload?(
|
12
|
+
autoloaded = ActiveSupport::Dependencies.will_unload?(type)
|
13
13
|
# ActiveSupport::Dependencies.will_unload?(klass) won't return true yet
|
14
14
|
# if it's the first time a constant is being autoloaded
|
15
15
|
# so we have to see if we're in the middle of loading a missing constants
|
16
16
|
autoloaded |= caller.any? { |line| line =~ /\:in.*?new_constants_in/ }
|
17
17
|
|
18
|
-
TypesRegistration::REGISTERED_TYPES <<
|
18
|
+
TypesRegistration::REGISTERED_TYPES << name if autoloaded
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-types-rails
|
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
|
- Jerome Gravel-Niquet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.8.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.8.1
|
83
83
|
description: Simplifies dry-types usage with Rails.
|
84
84
|
email:
|
85
85
|
- jeromegn@gmail.com
|