Skip to content
Browse files

Back to deleting old lockfiles for the beta release

  • Loading branch information...
1 parent 0e5351b commit 91c3beb0a5af9b816e34ecd0aef0b6fd6a0487ee @indirect indirect committed
Showing with 17 additions and 17 deletions.
  1. +17 −17 lib/bundler.rb
View
34 lib/bundler.rb
@@ -208,23 +208,23 @@ def configure_gem_home_and_path
def upgrade_lockfile
lockfile = root.join("Gemfile.lock")
if lockfile.exist? && lockfile.read(3) == "---"
- Bundler.ui.warn "Updating Gemfile.lock from 0.9 format to 1.0 format..."
-
- lock = YAML.load_file(lockfile)
-
- source_uris = lock["sources"].map{|s| s["Rubygems"]["uri"] }
- sources = [Bundler::Source::Rubygems.new({"remotes" => source_uris})]
-
- deps = lock["dependencies"].map do |name, opts|
- version = opts.delete("version")
- Bundler::Dependency.new(name, version, opts)
- end
-
- definition = Bundler::Definition.new(nil, deps, sources, {})
-
- File.open(lockfile, 'w') do |f|
- f.write definition.to_lock
- end
+ Bundler.ui.warn "Detected Gemfile.lock generated by 0.9, deleting..."
+ lockfile.rmtree
+ # lock = YAML.load_file(lockfile)
+ #
+ # source_uris = lock["sources"].map{|s| s["Rubygems"]["uri"] }
+ # sources = [Bundler::Source::Rubygems.new({"remotes" => source_uris})]
+ #
+ # deps = lock["dependencies"].map do |name, opts|
+ # version = opts.delete("version")
+ # Bundler::Dependency.new(name, version, opts)
+ # end
+ #
+ # definition = Bundler::Definition.new(nil, deps, sources, {})
+ #
+ # File.open(lockfile, 'w') do |f|
+ # f.write definition.to_lock
+ # end
end
end

0 comments on commit 91c3beb

Please sign in to comment.
Something went wrong with that request. Please try again.