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

- old
+ new

@@ -1,12 +1,12 @@ require 'fileutils' require 'pathname' require 'yaml' -require 'bundler/rubygems' +require 'bundler/rubygems-ext' module Bundler - VERSION = "0.9.3" + VERSION = "0.9.4" autoload :Definition, 'bundler/definition' autoload :Dependency, 'bundler/dependency' autoload :Dsl, 'bundler/dsl' autoload :Environment, 'bundler/environment' @@ -14,10 +14,11 @@ autoload :Installer, 'bundler/installer' autoload :RemoteSpecification, 'bundler/remote_specification' autoload :Resolver, 'bundler/resolver' autoload :Runtime, 'bundler/runtime' autoload :Settings, 'bundler/settings' + autoload :SharedHelpers, 'bundler/shared_helpers' autoload :Source, 'bundler/source' autoload :Specification, 'bundler/specification' autoload :UI, 'bundler/ui' class BundlerError < StandardError @@ -104,26 +105,14 @@ def settings @settings ||= Settings.new(root) end - def default_gemfile - if ENV['BUNDLE_GEMFILE'] - return Pathname.new(ENV['BUNDLE_GEMFILE']) - end + private - 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" + def default_gemfile + SharedHelpers.default_gemfile end - - private def configure_gem_home_and_path if path = settings[:path] ENV['GEM_HOME'] = File.expand_path(path, root) ENV['GEM_PATH'] = ''