isolate 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -0
- data/README.rdoc +12 -8
- data/lib/isolate.rb +3 -3
- metadata +8 -5
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -4,9 +4,12 @@
|
|
4
4
|
|
5
5
|
== Description
|
6
6
|
|
7
|
-
Isolate is a very simple RubyGems sandbox. It
|
8
|
-
|
9
|
-
|
7
|
+
Isolate is a very simple RubyGems sandbox. It provides a way to
|
8
|
+
express and install your code's Gem dependencies.
|
9
|
+
|
10
|
+
When Isolate runs, it uses GEM_HOME, GEM_PATH, and a few other tricks
|
11
|
+
to completely separate your code from the system's RubyGems
|
12
|
+
configuration, leaving it free to run in blissful solitude.
|
10
13
|
|
11
14
|
While Isolate doesn't make any assumptions about what sort of code
|
12
15
|
you're writing, it was extracted from a few Rails apps, so it's
|
@@ -18,7 +21,7 @@ full-featured Gem bundler, check out Yehuda Katz and Carl Lerche's
|
|
18
21
|
Bundler[http://github.com/wycats/bundler]: It does a lot of fancy AOT
|
19
22
|
dependency resolution, supports non-gem resources, and is probably a
|
20
23
|
better fit for you. For a widely used Gem manager and installer, check
|
21
|
-
out Chad
|
24
|
+
out Chad Woolley's GemInstaller[http://geminstaller.rubyforge.org].
|
22
25
|
|
23
26
|
YMMV, but I haven't tried Isolate with anything older than RubyGems
|
24
27
|
1.3.5.
|
@@ -27,11 +30,11 @@ YMMV, but I haven't tried Isolate with anything older than RubyGems
|
|
27
30
|
|
28
31
|
=== Defining Your Isolated Environment
|
29
32
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
Gem::DependencyInstaller as flags.
|
33
|
+
It'spretty easy: <tt>gem</tt> is similar to RubyGems' method of the
|
34
|
+
same name. Version specifiers are optional, and any hash args tacked
|
35
|
+
on to the end are passed through to Gem::DependencyInstaller as flags.
|
34
36
|
|
37
|
+
require "rubygems"
|
35
38
|
require "isolate"
|
36
39
|
|
37
40
|
Isolate.gems "vendor/isolated" do
|
@@ -83,6 +86,7 @@ you want, you could just as easily put them in
|
|
83
86
|
<tt>config/{gems,deps,whatever}.rb</tt>, just make sure it's loaded in
|
84
87
|
the preinitializer:
|
85
88
|
|
89
|
+
require "rubygems"
|
86
90
|
require "isolate"
|
87
91
|
|
88
92
|
Isolate.gems "vendor/isolated", :install => true, :verbose => true do
|
data/lib/isolate.rb
CHANGED
@@ -7,7 +7,7 @@ require "rubygems/requirement"
|
|
7
7
|
|
8
8
|
class Isolate
|
9
9
|
Entry = Struct.new :name, :requirement, :environments, :options # :nodoc:
|
10
|
-
VERSION = "1.0.
|
10
|
+
VERSION = "1.0.1" # :nodoc:
|
11
11
|
|
12
12
|
attr_reader :entries # :nodoc:
|
13
13
|
|
@@ -166,10 +166,10 @@ class Isolate
|
|
166
166
|
warn "#{progress} Isolating #{e.name} (#{e.requirement})."
|
167
167
|
end
|
168
168
|
|
169
|
+
options = e.options.dup.merge :install_dir => path
|
169
170
|
old = Gem.sources.dup
|
170
|
-
source =
|
171
|
+
source = options.delete :source
|
171
172
|
Gem.sources = Array(source) if source
|
172
|
-
options = e.options.merge :install_dir => path
|
173
173
|
installer = Gem::DependencyInstaller.new options
|
174
174
|
|
175
175
|
installer.install e.name, e.requirement
|
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.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Barnette
|
@@ -23,9 +23,12 @@ dependencies:
|
|
23
23
|
version: 2.3.3
|
24
24
|
version:
|
25
25
|
description: |-
|
26
|
-
Isolate is a very simple RubyGems sandbox. It
|
27
|
-
|
28
|
-
|
26
|
+
Isolate is a very simple RubyGems sandbox. It provides a way to
|
27
|
+
express and install your code's Gem dependencies.
|
28
|
+
|
29
|
+
When Isolate runs, it uses GEM_HOME, GEM_PATH, and a few other tricks
|
30
|
+
to completely separate your code from the system's RubyGems
|
31
|
+
configuration, leaving it free to run in blissful solitude.
|
29
32
|
|
30
33
|
While Isolate doesn't make any assumptions about what sort of code
|
31
34
|
you're writing, it was extracted from a few Rails apps, so it's
|
@@ -37,7 +40,7 @@ description: |-
|
|
37
40
|
Bundler[http://github.com/wycats/bundler]: It does a lot of fancy AOT
|
38
41
|
dependency resolution, supports non-gem resources, and is probably a
|
39
42
|
better fit for you. For a widely used Gem manager and installer, check
|
40
|
-
out Chad
|
43
|
+
out Chad Woolley's GemInstaller[http://geminstaller.rubyforge.org].
|
41
44
|
|
42
45
|
YMMV, but I haven't tried Isolate with anything older than RubyGems
|
43
46
|
1.3.5.
|