lib/bundler.rb in bundler-1.0.0.rc.2 vs lib/bundler.rb in bundler-1.0.0.rc.3

- old
+ new

@@ -58,26 +58,19 @@ # Internal errors, should be rescued class InvalidSpecSet < StandardError; end class << self attr_writer :ui, :bundle_path + attr_accessor :deployment def configure @configured ||= begin configure_gem_home_and_path true end end - def production? - @production - end - - def production=(value) - @production = value - end - def ui @ui ||= UI.new end def bundle_path @@ -125,12 +118,11 @@ def definition(unlock = nil) @definition = nil if unlock @definition ||= begin configure upgrade_lockfile - lockfile = root.join("Gemfile.lock") - Definition.build(default_gemfile, lockfile, unlock) + Definition.build(default_gemfile, default_lockfile, unlock) end end def ruby_scope "#{Gem.ruby_engine}/#{Gem::ConfigMap[:ruby_version]}" @@ -182,10 +174,14 @@ def default_gemfile SharedHelpers.default_gemfile end + def default_lockfile + SharedHelpers.default_lockfile + end + WINDOWS = Config::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)! NULL = WINDOWS ? "NUL" : "/dev/null" def requires_sudo? path = bundle_path @@ -221,10 +217,10 @@ Gem.clear_paths end def upgrade_lockfile - lockfile = root.join("Gemfile.lock") + lockfile = default_lockfile if lockfile.exist? && lockfile.read(3) == "---" Bundler.ui.warn "Detected Gemfile.lock generated by 0.9, deleting..." lockfile.rmtree # lock = YAML.load_file(lockfile) #