scorpion-ioc 0.5.16 → 0.5.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa2c5650c430acffe40dbd7481bbaa9fce44a4ed
4
- data.tar.gz: 21957b78742687d586311ba4b3b212b98fb6999f
3
+ metadata.gz: 54b4e38bcbe61c32aeff6adc0138857fbd9d0203
4
+ data.tar.gz: 373bf814dc967bb59c44beb38b7c2de9e3b503ba
5
5
  SHA512:
6
- metadata.gz: cdb6397aa1e6df0ce1b2dcc952d5b05bf990bcd9ec929f4036c8d8a78711115d9432a9d5a39c90770af726d55d3d1169792f4259e4279c1954afa46e9d1d8d9a
7
- data.tar.gz: c3f66b1744a425f19205e98e052d6e2ad022f9e511f898833a780bcd4c8b5844f9fc13f0b722eec3f96f2bb62bed608eb88f04fa6c03bdf1af36559d376fa802
6
+ metadata.gz: 700caed2c071bb394be1c0d451440064f6d1e8bfc1ffb37f12af1b65387c0be7e2da7c81de02d765603ac87b37d28213fa1692392fa4672c4712349b628b3ca4
7
+ data.tar.gz: 5f3e64a7229831ad4d1a6311f1d199fc5a09b84a6bfd8b015073f1c26542a24f0ee671044af6f3949db88dd446ab2bd8187211127fdaae6dbc0381592b8b75b8
@@ -39,6 +39,13 @@ module Scorpion
39
39
  @instance = nil
40
40
  end
41
41
 
42
+ # @see Dependency#replicate
43
+ def replicate
44
+ dup.tap do |replica|
45
+ replica.release
46
+ end
47
+ end
48
+
42
49
  end
43
50
  end
44
51
  end
@@ -1,5 +1,5 @@
1
1
  module Scorpion
2
- VERSION_NUMBER = "0.5.16"
2
+ VERSION_NUMBER = "0.5.17"
3
3
  VERSION_SUFFIX = ""
4
4
  VERSION = "#{VERSION_NUMBER}#{VERSION_SUFFIX}"
5
5
  end
@@ -0,0 +1,16 @@
1
+ require "spec_helper"
2
+
3
+ describe Scorpion::Dependency::CapturedDependency do
4
+ describe "#replicate" do
5
+ it "does not hold reference to previously captured instance" do
6
+ spec = double Scorpion::Dependency::ClassDependency
7
+ instance = double
8
+ allow( spec ).to receive( :fetch ).and_return instance
9
+
10
+ captured = Scorpion::Dependency::CapturedDependency.new( spec )
11
+ captured.fetch( nil ) # Force instance to be resolved
12
+
13
+ expect( captured.replicate.instance ).to be_nil
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorpion-ioc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Alexander
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-17 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -180,6 +180,7 @@ files:
180
180
  - spec/lib/scorpion/attribute_spec.rb
181
181
  - spec/lib/scorpion/dependency/argument_dependency_spec.rb
182
182
  - spec/lib/scorpion/dependency/builder_dependency_spec.rb
183
+ - spec/lib/scorpion/dependency/captured_dependency_spec.rb
183
184
  - spec/lib/scorpion/dependency/module_dependency_spec.rb
184
185
  - spec/lib/scorpion/dependency_map_spec.rb
185
186
  - spec/lib/scorpion/dependency_spec.rb
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
219
  version: '0'
219
220
  requirements: []
220
221
  rubyforge_project:
221
- rubygems_version: 2.5.1
222
+ rubygems_version: 2.5.0
222
223
  signing_key:
223
224
  specification_version: 4
224
225
  summary: Add IoC to rails with minimal fuss and ceremony
@@ -234,6 +235,7 @@ test_files:
234
235
  - spec/lib/scorpion/attribute_spec.rb
235
236
  - spec/lib/scorpion/dependency/argument_dependency_spec.rb
236
237
  - spec/lib/scorpion/dependency/builder_dependency_spec.rb
238
+ - spec/lib/scorpion/dependency/captured_dependency_spec.rb
237
239
  - spec/lib/scorpion/dependency/module_dependency_spec.rb
238
240
  - spec/lib/scorpion/dependency_map_spec.rb
239
241
  - spec/lib/scorpion/dependency_spec.rb