isolate 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ === 1.6.1 / 2009-10-04
2
+
3
+ * Simplify subshells.
4
+ * Squash warning.
5
+
1
6
  === 1.6.0 / 2009-10-03
2
7
 
3
8
  * Add Rake helpers.
data/lib/isolate.rb CHANGED
@@ -21,7 +21,7 @@ class Isolate
21
21
  end
22
22
  end
23
23
 
24
- VERSION = "1.6.0" # :nodoc:
24
+ VERSION = "1.6.1" # :nodoc:
25
25
 
26
26
  attr_reader :entries # :nodoc:
27
27
 
@@ -151,7 +151,10 @@ class Isolate
151
151
  @old_ruby_opt = ENV["RUBYOPT"]
152
152
  @old_load_path = $LOAD_PATH.dup
153
153
 
154
- $LOAD_PATH.reject! { |p| Gem.path.any? { |gp| p.include?(gp) } }
154
+ $LOAD_PATH.reject! do |p|
155
+ p != File.dirname(__FILE__) &&
156
+ Gem.path.any? { |gp| p.include?(gp) }
157
+ end
155
158
 
156
159
  # HACK: Gotta keep isolate explicitly in the LOAD_PATH in
157
160
  # subshells, and the only way I can think of to do that is by
@@ -161,7 +164,7 @@ class Isolate
161
164
  ENV["GEM_PATH"] = ENV["GEM_HOME"] = path
162
165
 
163
166
  bin = File.join path, "bin"
164
- ENV["PATH"]= [bin, ENV["PATH"]].join File::PATH_SEPARATOR
167
+ ENV["PATH"] = [bin, ENV["PATH"]].join File::PATH_SEPARATOR
165
168
 
166
169
  self.class.refresh
167
170
 
data/lib/isolate/rake.rb CHANGED
@@ -9,7 +9,7 @@ namespace :isolate do
9
9
  gems << "--version '#{entry.requirement}'"
10
10
  gems << "--source #{entry.options[:source]}" if entry.options[:source]
11
11
 
12
- f.puts gems.join " "
12
+ f.puts gems.join(" ")
13
13
  end
14
14
 
15
15
  # this above all: to thine own self be true
@@ -17,9 +17,8 @@ namespace :isolate do
17
17
  end
18
18
  end
19
19
 
20
- desc "Start an isolated subshell. Run 'command' and exit if specified."
20
+ desc "Run an isolated command or subshell."
21
21
  task :sh, [:command] do |t, args|
22
- exec ENV["SHELL"] unless args.command
23
- sh args.command
22
+ exec args.command || ENV["SHELL"]
24
23
  end
25
24
  end
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.6.0
4
+ version: 1.6.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-03 00:00:00 -07:00
13
+ date: 2009-10-04 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency