diff options
-rw-r--r-- | lib/bundler.rb | 8 | ||||
-rw-r--r-- | lib/bundler/installer.rb | 7 | ||||
-rw-r--r-- | spec/commands/config_spec.rb | 9 | ||||
-rw-r--r-- | spec/install/upgrade_spec.rb | 26 |
4 files changed, 0 insertions, 50 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index b940dc063a..307f6e5d05 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -124,7 +124,6 @@ module Bundler @definition = nil if unlock @definition ||= begin configure - upgrade_lockfile Definition.build(default_gemfile, default_lockfile, unlock) end end @@ -448,13 +447,6 @@ module Bundler Bundler.rubygems.clear_paths end - def upgrade_lockfile - lockfile = default_lockfile - return unless lockfile.exist? && lockfile.read(3) == "---" - Bundler.ui.warn "Detected Gemfile.lock generated by 0.9, deleting..." - lockfile.rmtree - end - # @param env [Hash] def with_env(env) backup = ENV.to_hash diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index c7ce68d25d..402d7fb611 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -61,7 +61,6 @@ module Bundler # Finally: TODO add documentation for how the standalone process works. def run(options) create_bundle_path - remove_0_9_environment_rb if Bundler.settings[:frozen] @definition.ensure_equivalent_gemfile_and_lockfile(options[:deployment]) @@ -220,12 +219,6 @@ module Bundler options["local"] ? @definition.resolve_with_cache! : @definition.resolve_remotely! end - def remove_0_9_environment_rb - SharedHelpers.filesystem_access(Bundler.app_config_path.join("environment.rb")) do |env_file| - env_file.rmtree if env_file.exist? - end - end - def lock(opts = {}) @definition.lock(Bundler.default_lockfile, opts[:preserve_unknown_sections]) end diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb index b7a1d55172..fce6102c29 100644 --- a/spec/commands/config_spec.rb +++ b/spec/commands/config_spec.rb @@ -30,15 +30,6 @@ describe ".bundle/config" do expect(bundled_app("../foo/config")).to exist expect(the_bundle).to include_gems "rack 1.0.0" end - - it "removes environment.rb from BUNDLE_APP_CONFIG's path" do - FileUtils.mkdir_p(tmp("foo/bar")) - ENV["BUNDLE_APP_CONFIG"] = tmp("foo/bar").to_s - bundle "install" - FileUtils.touch tmp("foo/bar/environment.rb") - expect(the_bundle).to include_gems "rack 1.0.0" - expect(tmp("foo/bar/environment.rb")).not_to exist - end end describe "global" do diff --git a/spec/install/upgrade_spec.rb b/spec/install/upgrade_spec.rb deleted file mode 100644 index d979b97647..0000000000 --- a/spec/install/upgrade_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -require "spec_helper" - -describe "bundle install for the first time with v1.0" do - before :each do - in_app_root - - gemfile <<-G - source "file://#{gem_repo1}" - gem "rack" - G - end - - it "removes lockfiles in 0.9 YAML format" do - File.open("Gemfile.lock", "w") {|f| YAML.dump({}, f) } - bundle :install - expect(Pathname.new("Gemfile.lock")).not_to read_as(a_string_starting_with("---")) - end - - it "removes env.rb if it exists" do - bundled_app.join(".bundle").mkdir - bundled_app.join(".bundle/environment.rb").open("w") {|f| f.write("raise 'nooo'") } - bundle :install - expect(bundled_app.join(".bundle/environment.rb")).not_to exist - end -end |