dry-container 0.2.6 → 0.2.7

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: 18b93873ebbb6d027bc713b5f3af823f1db50800
4
- data.tar.gz: 07c73e06100d4b7c8cde5d2d6bc4446b46ff552f
3
+ metadata.gz: 26e7f1ca9061aa03d6e755c1086f795a2d2521bd
4
+ data.tar.gz: f013cc3a723ea5e1be5c1587c8f6468b4578c103
5
5
  SHA512:
6
- metadata.gz: 0c8a18232ff3e895eefa1e6b3fe046f255d9add144a7aa302f431e92d81cceae292cc6b90a3d9157b202b6bd50eb1bfc37686920731a626204f3b49792183852
7
- data.tar.gz: b5376428867106db4b3b70cd33e07a035be1a46ce2ae5be7fc93085e5b08efbae06dd7f6db1dac33fcd743cb23c81169f86360c3ec6397725fabd8e45a950282
6
+ metadata.gz: 3366600c7719b4ed0a12aa0d54617c0e9549b6b9fee3d3402d822c19651deb494438114a1355915b19e5702a2297a8999535d9f2754496861d55547fdd1f7a35
7
+ data.tar.gz: 151f3d2f03dbf86cde331c3f833103f6f3fa468304dbb3e87e236ead872342c330467cd322a413db11700d52a50b8db363e03505d834b53d03b2a1d6492d0672
@@ -38,7 +38,7 @@ module Dry
38
38
  @_container = ::ThreadSafe::Hash.new
39
39
 
40
40
  def self.inherited(subclass)
41
- subclass.instance_variable_set(:@_container, @_container)
41
+ subclass.instance_variable_set(:@_container, @_container.dup)
42
42
  super
43
43
  end
44
44
  end
@@ -1,6 +1,6 @@
1
1
  module Dry
2
2
  class Container
3
3
  # @api public
4
- VERSION = '0.2.6'.freeze
4
+ VERSION = '0.2.7'.freeze
5
5
  end
6
6
  end
@@ -3,4 +3,16 @@ RSpec.describe Dry::Container do
3
3
  let(:container) { klass.new }
4
4
 
5
5
  it_behaves_like 'a container'
6
+
7
+ describe 'inheritance' do
8
+ it 'sets up a container for a child class' do
9
+ parent = Class.new { extend Dry::Container::Mixin }
10
+ child = Class.new(parent)
11
+
12
+ parent.register(:foo, 'foo')
13
+ child.register(:foo, 'foo')
14
+
15
+ expect(parent[:foo]).to_not be(child[:foo])
16
+ end
17
+ end
6
18
  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.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Holland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-20 00:00:00.000000000 Z
11
+ date: 2015-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thread_safe
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.4.5
135
+ rubygems_version: 2.4.5.1
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: A simple container intended for use as an IoC container
@@ -141,4 +141,3 @@ test_files:
141
141
  - spec/integration/mixin_spec.rb
142
142
  - spec/spec_helper.rb
143
143
  - spec/support/shared_examples/container.rb
144
- has_rdoc: