isolate 1.5.0 → 1.5.1

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.
@@ -1,3 +1,7 @@
1
+ === 1.5.1 / 2009-10-02
2
+
3
+ * Fix passthrough for explicitly false conditions.
4
+
1
5
  === 1.5.0 / 2009-10-01
2
6
 
3
7
  * Implemented passthrough.
@@ -21,7 +21,7 @@ class Isolate
21
21
  end
22
22
  end
23
23
 
24
- VERSION = "1.5.0" # :nodoc:
24
+ VERSION = "1.5.1" # :nodoc:
25
25
 
26
26
  attr_reader :entries # :nodoc:
27
27
 
@@ -71,6 +71,7 @@ class Isolate
71
71
  @enabled = false
72
72
  @entries = []
73
73
  @environments = []
74
+ @passthrough = false
74
75
  @path = path
75
76
 
76
77
  @install = options.fetch :install, true
@@ -242,11 +243,11 @@ class Isolate
242
243
  end
243
244
 
244
245
  def passthrough &block # :nodoc:
245
- @passthrough = block
246
+ @passthrough = yield
246
247
  end
247
248
 
248
249
  def passthrough? # :nodoc:
249
- defined? @passthrough and @passthrough ||= @passthrough.call
250
+ @passthrough
250
251
  end
251
252
 
252
253
  def verbose? # :nodoc:
@@ -216,6 +216,10 @@ class TestIsolate < MiniTest::Unit::TestCase
216
216
  idx = Gem.source_index.dup
217
217
  @isolate.activate
218
218
  assert_equal idx, Gem.source_index
219
+
220
+
221
+ @isolate.passthrough { false }
222
+ refute @isolate.passthrough?
219
223
  end
220
224
  end
221
225
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isolate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Barnette
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-10-01 00:00:00 -07:00
13
+ date: 2009-10-02 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency