isolate 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -1
- data/README.rdoc +11 -6
- data/lib/isolate.rb +4 -4
- data/test/test_isolate.rb +7 -6
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -67,13 +67,18 @@ your environment.
|
|
67
67
|
|
68
68
|
=== Installing Isolated Gems
|
69
69
|
|
70
|
-
|
71
|
-
|
70
|
+
By default, Isolate will install your gems automatically. You can pass
|
71
|
+
<tt>:install</tt> and <tt>:verbose</tt> options to control things:
|
72
|
+
|
73
|
+
# install, but quietly
|
74
|
+
Isolate.gems "vendor/isolated" :verbose => false do
|
75
|
+
...
|
72
76
|
end
|
73
77
|
|
74
|
-
|
75
|
-
|
76
|
-
|
78
|
+
# don't install
|
79
|
+
Isolate.gems "vendor/isolated", :install => false do
|
80
|
+
...
|
81
|
+
end
|
77
82
|
|
78
83
|
=== A Rails Example
|
79
84
|
|
@@ -89,7 +94,7 @@ the preinitializer:
|
|
89
94
|
require "rubygems"
|
90
95
|
require "isolate"
|
91
96
|
|
92
|
-
Isolate.gems "vendor/isolated"
|
97
|
+
Isolate.gems "vendor/isolated" do
|
93
98
|
gem "rails", "= 2.2.2"
|
94
99
|
|
95
100
|
# async emails!
|
data/lib/isolate.rb
CHANGED
@@ -14,7 +14,7 @@ class Isolate
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
VERSION = "1.0
|
17
|
+
VERSION = "1.1.0" # :nodoc:
|
18
18
|
|
19
19
|
attr_reader :entries # :nodoc:
|
20
20
|
|
@@ -34,7 +34,7 @@ class Isolate
|
|
34
34
|
#
|
35
35
|
# Option defaults:
|
36
36
|
#
|
37
|
-
# { :install =>
|
37
|
+
# { :install => true, :verbose => true }
|
38
38
|
|
39
39
|
def self.gems path, options = {}, &block
|
40
40
|
@@instance = new path, options, &block
|
@@ -63,9 +63,9 @@ class Isolate
|
|
63
63
|
@enabled = false
|
64
64
|
@entries = []
|
65
65
|
@environments = []
|
66
|
-
@install = options[:install]
|
66
|
+
@install = options.key?(:install) ? options[:install] : true
|
67
67
|
@path = path
|
68
|
-
@verbose = options[:verbose]
|
68
|
+
@verbose = options.key?(:verbose) ? options[:verbose] : true
|
69
69
|
|
70
70
|
instance_eval(&block) if block_given?
|
71
71
|
end
|
data/test/test_isolate.rb
CHANGED
@@ -5,7 +5,7 @@ require "isolate"
|
|
5
5
|
|
6
6
|
class TestIsolate < MiniTest::Unit::TestCase
|
7
7
|
def setup
|
8
|
-
@isolate = Isolate.new "tmp/gems"
|
8
|
+
@isolate = Isolate.new "tmp/gems", :install => false, :verbose => false
|
9
9
|
end
|
10
10
|
|
11
11
|
def teardown
|
@@ -66,7 +66,7 @@ class TestIsolate < MiniTest::Unit::TestCase
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def test_activate_install
|
69
|
-
@isolate = Isolate.new "tmp/gems", :install => true
|
69
|
+
@isolate = Isolate.new "tmp/gems", :install => true, :verbose => false
|
70
70
|
|
71
71
|
@isolate.gem "foo"
|
72
72
|
|
@@ -172,12 +172,13 @@ class TestIsolate < MiniTest::Unit::TestCase
|
|
172
172
|
end
|
173
173
|
|
174
174
|
def test_initialize_options
|
175
|
-
|
176
|
-
refute @isolate.verbose?
|
177
|
-
|
178
|
-
i = Isolate.new "foo/gems", :install => true, :verbose => true
|
175
|
+
i = Isolate.new "foo/gems"
|
179
176
|
assert i.install?
|
180
177
|
assert i.verbose?
|
178
|
+
|
179
|
+
i = Isolate.new "foo/gems", :install => false, :verbose => false
|
180
|
+
refute i.install?
|
181
|
+
refute i.verbose?
|
181
182
|
end
|
182
183
|
end
|
183
184
|
|
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.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Barnette
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-22 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|