lib/bundler.rb in bundler-0.9.2 vs lib/bundler.rb in bundler-0.9.3

- old
+ new

@@ -2,11 +2,11 @@ require 'pathname' require 'yaml' require 'bundler/rubygems' module Bundler - VERSION = "0.9.2" + VERSION = "0.9.3" autoload :Definition, 'bundler/definition' autoload :Dependency, 'bundler/dependency' autoload :Dsl, 'bundler/dsl' autoload :Environment, 'bundler/environment' @@ -104,22 +104,26 @@ def settings @settings ||= Settings.new(root) end - private - def default_gemfile + if ENV['BUNDLE_GEMFILE'] + return Pathname.new(ENV['BUNDLE_GEMFILE']) + end + current = Pathname.new(Dir.pwd) until current.root? filename = current.join("Gemfile") return filename if filename.exist? current = current.parent end raise GemfileNotFound, "The default Gemfile was not found" end + + private def configure_gem_home_and_path if path = settings[:path] ENV['GEM_HOME'] = File.expand_path(path, root) ENV['GEM_PATH'] = ''