dry-container 0.3.3 → 0.3.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/Gemfile +1 -1
- data/lib/dry/container/mixin.rb +8 -5
- data/lib/dry/container/version.rb +1 -1
- data/spec/spec_helper.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2fb7b27d123e0eeca646cadab96b2f4ffb23de85
|
|
4
|
+
data.tar.gz: da29556aeb02ed91cf5ee90b9cfccbbf21b86514
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74e4defaad4bdcbafe10b718f8efd8c76c9e480dc6681546889a762184b732da205e98f3c3cbe4083e474642ecc43cb6308ccf1f57b739ea25218e767e5b892d
|
|
7
|
+
data.tar.gz: 1335f6b7e9ea69d245b8a51cfd3545a1e915436933a9ef83bfcb57f0bc3a79e5f9f53a6dd87f6244a86b6682fe2656a630c63e00f9e688a6fdc73b194e0bba9c
|
data/Gemfile
CHANGED
data/lib/dry/container/mixin.rb
CHANGED
|
@@ -26,19 +26,22 @@ module Dry
|
|
|
26
26
|
module Mixin
|
|
27
27
|
# @private
|
|
28
28
|
def self.extended(base)
|
|
29
|
+
hooks_mod = Module.new do
|
|
30
|
+
def inherited(subclass)
|
|
31
|
+
subclass.instance_variable_set(:@_container, @_container.dup)
|
|
32
|
+
super
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
29
36
|
base.class_eval do
|
|
30
37
|
extend ::Dry::Configurable
|
|
38
|
+
extend hooks_mod
|
|
31
39
|
|
|
32
40
|
setting :registry, ::Dry::Container::Registry.new
|
|
33
41
|
setting :resolver, ::Dry::Container::Resolver.new
|
|
34
42
|
setting :namespace_separator, '.'
|
|
35
43
|
|
|
36
44
|
@_container = ::Concurrent::Hash.new
|
|
37
|
-
|
|
38
|
-
def self.inherited(subclass)
|
|
39
|
-
subclass.instance_variable_set(:@_container, @_container.dup)
|
|
40
|
-
super
|
|
41
|
-
end
|
|
42
45
|
end
|
|
43
46
|
end
|
|
44
47
|
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
|
+
if RUBY_ENGINE == 'rbx'
|
|
4
|
+
require 'codeclimate-test-reporter'
|
|
5
|
+
CodeClimate::TestReporter.start
|
|
6
|
+
end
|
|
7
|
+
|
|
3
8
|
require 'dry/container'
|
|
4
9
|
require 'dry/container/stub'
|
|
5
10
|
|
|
6
11
|
Dir[Pathname(__FILE__).dirname.join('support/**/*.rb').to_s].each do |file|
|
|
7
12
|
require file
|
|
8
13
|
end
|
|
9
|
-
|
|
10
|
-
if RUBY_ENGINE == 'rbx'
|
|
11
|
-
require 'codeclimate-test-reporter'
|
|
12
|
-
CodeClimate::TestReporter.start
|
|
13
|
-
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dry-container
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Holland
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-05-
|
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
140
140
|
version: '0'
|
|
141
141
|
requirements: []
|
|
142
142
|
rubyforge_project:
|
|
143
|
-
rubygems_version: 2.
|
|
143
|
+
rubygems_version: 2.5.1
|
|
144
144
|
signing_key:
|
|
145
145
|
specification_version: 4
|
|
146
146
|
summary: A simple container intended for use as an IoC container
|