lib/bundler.rb in bundler-1.10.0.pre vs lib/bundler.rb in bundler-1.10.0.pre.1
- old
+ new
@@ -204,16 +204,14 @@
path = custom_path || root
path.join(self.settings.app_cache_path)
end
def tmp(name = Process.pid.to_s)
- @tmp ||= Pathname.new Dir.mktmpdir("bundler")
- @tmp.join(name)
+ Pathname.new(Dir.mktmpdir(["bundler", name]))
end
- def cleanup
- FileUtils.remove_entry_secure(@tmp) if defined?(@tmp) && @tmp
- rescue
+ def rm_rf(path)
+ FileUtils.remove_entry_secure(path) if path && File.exist?(path)
end
def settings
return @settings if defined?(@settings)
@settings = Settings.new(app_config_path)