isolate 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG.rdoc +5 -0
  2. data/README.rdoc +12 -8
  3. data/lib/isolate.rb +3 -3
  4. metadata +8 -5
@@ -1,3 +1,8 @@
1
1
  === 1.0.0 / 2009-09-21
2
2
 
3
3
  * Birthday!
4
+
5
+ === 1.0.1 / 2009-09-21
6
+
7
+ * Doco updates. [Review by Evan]
8
+ * Don't modify Entry#options on install. [Review by Evan]
@@ -4,9 +4,12 @@
4
4
 
5
5
  == Description
6
6
 
7
- Isolate is a very simple RubyGems sandbox. It restricts GEM_PATH and
8
- GEM_HOME, and provides a DSL for expressing your code's runtime Gem
9
- dependencies.
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 Wooley's GemInstaller[http://geminstaller.rubyforge.org].
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
- The DSL's pretty easy: <tt>gem</tt> is similar to RubyGems'
31
- identically-named method. Version specifiers are optional, and any
32
- hash args tacked on to the end are passed through to
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
@@ -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.0" # :nodoc:
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 = e.options.delete :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.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 restricts GEM_PATH and
27
- GEM_HOME, and provides a DSL for expressing your code's runtime Gem
28
- dependencies.
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 Wooley's GemInstaller[http://geminstaller.rubyforge.org].
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.