isolate 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -0
- data/README.rdoc +14 -3
- data/lib/isolate.rb +6 -2
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -31,15 +31,14 @@ YMMV, but I haven't tried Isolate with anything older than RubyGems
|
|
31
31
|
=== Defining Your Isolated Environment
|
32
32
|
|
33
33
|
It's pretty easy: <tt>gem</tt> is similar to RubyGems' method of the
|
34
|
-
same name. Version specifiers are optional
|
35
|
-
on to the end are passed through to Gem::DependencyInstaller as flags.
|
34
|
+
same name. Version specifiers are optional.
|
36
35
|
|
37
36
|
require "rubygems"
|
38
37
|
require "isolate"
|
39
38
|
|
40
39
|
Isolate.gems "vendor/isolated" do
|
41
40
|
gem "johnson", "~> 1.1" # or maybe...
|
42
|
-
gem "jbarnette-johnson"
|
41
|
+
gem "jbarnette-johnson"
|
43
42
|
end
|
44
43
|
|
45
44
|
At the end of the <tt>Isolate.gems</tt> block, you're completely
|
@@ -65,6 +64,18 @@ Unsurprisingly, the <tt>mocha</tt> gem will only be activated in the
|
|
65
64
|
example below for an example of how to use <tt>RAILS_ENV</tt> to set
|
66
65
|
your environment.
|
67
66
|
|
67
|
+
=== Options
|
68
|
+
|
69
|
+
Any trailing hash args to <tt>gem</tt> are passed to
|
70
|
+
<tt>Gem::DependencyInstaller</tt> as options. There are two special
|
71
|
+
exceptions, <tt>:source</tt> and <tt>:args</tt>.
|
72
|
+
|
73
|
+
# explicitly specify gem source
|
74
|
+
gem "jbarnette-johnson", :source => "http://gems.github.com"
|
75
|
+
|
76
|
+
# pass gem install args (the part after the '--')
|
77
|
+
gem "pg", :args => "ARCHFLAGS='-arch x86_64'"
|
78
|
+
|
68
79
|
=== Installing Isolated Gems
|
69
80
|
|
70
81
|
By default, Isolate will install your gems automatically. You can pass
|
data/lib/isolate.rb
CHANGED
@@ -16,7 +16,7 @@ class Isolate
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
VERSION = "1.
|
19
|
+
VERSION = "1.3.0" # :nodoc:
|
20
20
|
|
21
21
|
attr_reader :entries # :nodoc:
|
22
22
|
|
@@ -171,14 +171,18 @@ class Isolate
|
|
171
171
|
warn "#{progress} Isolating #{e.name} (#{e.requirement})."
|
172
172
|
end
|
173
173
|
|
174
|
-
options = e.options.dup.merge :install_dir => path
|
175
174
|
old = Gem.sources.dup
|
175
|
+
options = e.options.merge :install_dir => path
|
176
176
|
source = options.delete :source
|
177
|
+
args = options.delete :args
|
177
178
|
Gem.sources = Array(source) if source
|
178
179
|
installer = Gem::DependencyInstaller.new options
|
179
180
|
|
181
|
+
Gem::Command.build_args = args if args
|
180
182
|
installer.install e.name, e.requirement
|
183
|
+
|
181
184
|
Gem.sources = old
|
185
|
+
Gem::Command.build_args = nil if args
|
182
186
|
end
|
183
187
|
|
184
188
|
Gem.source_index.refresh!
|
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.
|
4
|
+
version: 1.3.0
|
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-09-
|
13
|
+
date: 2009-09-23 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|