lib/bundler.rb in bundler-1.5.3 vs lib/bundler.rb in bundler-1.6.0.pre.1
- old
+ new
@@ -88,11 +88,11 @@
def configure
@configured ||= configure_gem_home_and_path
end
def ui
- @ui ||= UI.new
+ @ui ||= UI::Silent.new
end
# Returns absolute path of where gems are installed on the filesystem.
def bundle_path
@bundle_path ||= Pathname.new(settings.path).expand_path(root)
@@ -152,13 +152,16 @@
Definition.build(default_gemfile, default_lockfile, unlock)
end
end
def locked_gems
- @locked_gems ||= begin
+ return @locked_gems if defined?(@locked_gems)
+ if Bundler.default_lockfile.exist?
lock = Bundler.read_file(Bundler.default_lockfile)
- LockfileParser.new(lock)
+ @lock_gems = LockfileParser.new(lock)
+ else
+ @locked_gems = nil
end
end
def ruby_scope
"#{Bundler.rubygems.ruby_engine}/#{Gem::ConfigMap[:ruby_version]}"
@@ -192,11 +195,12 @@
ENV['BUNDLE_APP_CONFIG'] ?
Pathname.new(ENV['BUNDLE_APP_CONFIG']).expand_path(root) :
root.join('.bundle')
end
- def app_cache
- root.join("vendor/cache")
+ def app_cache(custom_path = nil)
+ path = custom_path || root
+ path.join("vendor/cache")
end
def tmp
user_bundle_path.join("tmp", Process.pid.to_s)
end