ruby-changes:54102
From: hsbt <ko1@a...>
Date: Tue, 11 Dec 2018 12:07:46 +0900 (JST)
Subject: [ruby-changes:54102] hsbt:r66323 (trunk): Downgrade Bundler 1.17.x from 2.0.0.
hsbt 2018-12-11 12:07:37 +0900 (Tue, 11 Dec 2018) New Revision: 66323 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66323 Log: Downgrade Bundler 1.17.x from 2.0.0. We have the platform issue on heroku: * https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305 * https://github.com/heroku/heroku-buildpack-ruby/issues/833 Modified files: trunk/lib/bundler/capistrano.rb trunk/lib/bundler/cli/console.rb trunk/lib/bundler/cli/install.rb trunk/lib/bundler/cli/update.rb trunk/lib/bundler/cli.rb trunk/lib/bundler/definition.rb trunk/lib/bundler/deployment.rb trunk/lib/bundler/dsl.rb trunk/lib/bundler/feature_flag.rb trunk/lib/bundler/rubygems_integration.rb trunk/lib/bundler/settings.rb trunk/lib/bundler/setup.rb trunk/lib/bundler/shared_helpers.rb trunk/lib/bundler/templates/newgem/Gemfile.tt trunk/lib/bundler/version.rb trunk/lib/bundler/vlad.rb trunk/lib/bundler.rb trunk/libexec/bundle_ruby trunk/man/bundle-config.1 trunk/man/bundle-config.1.txt trunk/man/bundle-install.1 trunk/man/bundle-install.1.txt trunk/man/bundle-update.1 trunk/man/bundle-update.1.txt trunk/spec/bundler/bundler/cli_spec.rb trunk/spec/bundler/bundler/definition_spec.rb trunk/spec/bundler/bundler/dsl_spec.rb trunk/spec/bundler/bundler/source_list_spec.rb trunk/spec/bundler/cache/path_spec.rb trunk/spec/bundler/commands/binstubs_spec.rb trunk/spec/bundler/commands/check_spec.rb trunk/spec/bundler/commands/clean_spec.rb trunk/spec/bundler/commands/console_spec.rb trunk/spec/bundler/commands/exec_spec.rb trunk/spec/bundler/commands/init_spec.rb trunk/spec/bundler/commands/inject_spec.rb trunk/spec/bundler/commands/install_spec.rb trunk/spec/bundler/commands/list_spec.rb trunk/spec/bundler/commands/outdated_spec.rb trunk/spec/bundler/commands/package_spec.rb trunk/spec/bundler/commands/pristine_spec.rb trunk/spec/bundler/commands/show_spec.rb trunk/spec/bundler/commands/update_spec.rb trunk/spec/bundler/commands/version_spec.rb trunk/spec/bundler/commands/viz_spec.rb trunk/spec/bundler/install/binstubs_spec.rb trunk/spec/bundler/install/deploy_spec.rb trunk/spec/bundler/install/gemfile/gemspec_spec.rb trunk/spec/bundler/install/gemfile/git_spec.rb trunk/spec/bundler/install/gemfile/groups_spec.rb trunk/spec/bundler/install/gemfile/path_spec.rb trunk/spec/bundler/install/gemfile/platform_spec.rb trunk/spec/bundler/install/gemfile/sources_spec.rb trunk/spec/bundler/install/gems/compact_index_spec.rb trunk/spec/bundler/install/gems/dependency_api_spec.rb trunk/spec/bundler/install/gems/flex_spec.rb trunk/spec/bundler/install/gems/standalone_spec.rb trunk/spec/bundler/install/git_spec.rb trunk/spec/bundler/install/path_spec.rb trunk/spec/bundler/install/post_bundle_message_spec.rb trunk/spec/bundler/install/redownload_spec.rb trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb trunk/spec/bundler/lock/lockfile_spec.rb trunk/spec/bundler/other/bundle_ruby_spec.rb trunk/spec/bundler/other/major_deprecation_spec.rb trunk/spec/bundler/other/platform_spec.rb trunk/spec/bundler/plugins/source/example_spec.rb trunk/spec/bundler/quality_spec.rb trunk/spec/bundler/realworld/edgecases_spec.rb trunk/spec/bundler/runtime/executable_spec.rb trunk/spec/bundler/runtime/setup_spec.rb trunk/spec/bundler/runtime/with_clean_env_spec.rb trunk/spec/bundler/spec_helper.rb trunk/spec/bundler/support/helpers.rb trunk/spec/bundler/support/path.rb trunk/spec/bundler/support/platforms.rb trunk/spec/bundler/update/git_spec.rb trunk/spec/bundler/update/redownload_spec.rb Index: spec/bundler/support/helpers.rb =================================================================== --- spec/bundler/support/helpers.rb (revision 66322) +++ spec/bundler/support/helpers.rb (revision 66323) @@ -53,7 +53,7 @@ module Spec https://github.com/ruby/ruby/blob/trunk/spec/bundler/support/helpers.rb#L53 end def bundle_update_requires_all? - Bundler::VERSION.start_with?("2.") ? nil : true + Bundler::VERSION.start_with?("1.") ? nil : true end def in_app_root(&blk) @@ -152,7 +152,7 @@ module Spec https://github.com/ruby/ruby/blob/trunk/spec/bundler/support/helpers.rb#L152 bang :bundle def forgotten_command_line_options(options) - remembered = Bundler.bundler_major_version < 3 + remembered = Bundler::VERSION.split(".", 2).first == "1" options = options.map do |k, v| k = Array(k)[remembered ? 0 : -1] v = '""' if v && v.to_s.empty? Index: spec/bundler/commands/init_spec.rb =================================================================== --- spec/bundler/commands/init_spec.rb (revision 66322) +++ spec/bundler/commands/init_spec.rb (revision 66323) @@ -1,19 +1,19 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/init_spec.rb#L1 # frozen_string_literal: true RSpec.describe "bundle init" do - it "generates a Gemfile", :bundler => "< 3" do + it "generates a Gemfile", :bundler => "< 2" do bundle! :init expect(out).to include("Writing new Gemfile") expect(bundled_app("Gemfile")).to be_file end - it "generates a gems.rb", :bundler => "3" do + it "generates a gems.rb", :bundler => "2" do bundle! :init expect(out).to include("Writing new gems.rb") expect(bundled_app("gems.rb")).to be_file end - context "when a Gemfile already exists", :bundler => "< 3" do + context "when a Gemfile already exists", :bundler => "< 2" do before do create_file "Gemfile", <<-G gem "rails" @@ -30,7 +30,7 @@ RSpec.describe "bundle init" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/init_spec.rb#L30 end end - context "when gems.rb already exists", :bundler => ">= 3" do + context "when gems.rb already exists", :bundler => ">= 2" do before do create_file("gems.rb", <<-G) gem "rails" @@ -47,7 +47,7 @@ RSpec.describe "bundle init" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/init_spec.rb#L47 end end - context "when a Gemfile exists in a parent directory", :bundler => "< 3" do + context "when a Gemfile exists in a parent directory", :bundler => "< 2" do let(:subdir) { "child_dir" } it "lets users generate a Gemfile in a child directory" do @@ -82,7 +82,7 @@ RSpec.describe "bundle init" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/init_spec.rb#L82 end end - context "when a gems.rb file exists in a parent directory", :bundler => ">= 3" do + context "when a gems.rb file exists in a parent directory", :bundler => ">= 2" do let(:subdir) { "child_dir" } it "lets users generate a Gemfile in a child directory" do @@ -99,7 +99,7 @@ RSpec.describe "bundle init" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/init_spec.rb#L99 end end - context "given --gemspec option", :bundler => "< 3" do + context "given --gemspec option", :bundler => "< 2" do let(:spec_file) { tmp.join("test.gemspec") } it "should generate from an existing gemspec" do @@ -115,7 +115,7 @@ RSpec.describe "bundle init" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/init_spec.rb#L115 bundle :init, :gemspec => spec_file - gemfile = if Bundler::VERSION[0, 2].to_i < 3 + gemfile = if Bundler::VERSION[0, 2] == "1." bundled_app("Gemfile").read else bundled_app("gems.rb").read @@ -146,7 +146,7 @@ RSpec.describe "bundle init" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/init_spec.rb#L146 context "when init_gems_rb setting is enabled" do before { bundle "config init_gems_rb true" } - context "given --gemspec option", :bundler => "< 3" do + context "given --gemspec option", :bundler => "< 2" do let(:spec_file) { tmp.join("test.gemspec") } before do Index: spec/bundler/commands/viz_spec.rb =================================================================== --- spec/bundler/commands/viz_spec.rb (revision 66322) +++ spec/bundler/commands/viz_spec.rb (revision 66323) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/viz_spec.rb#L1 # frozen_string_literal: true -RSpec.describe "bundle viz", :ruby => "1.9.3", :bundler => "< 3", :if => Bundler.which("dot") do +RSpec.describe "bundle viz", :ruby => "1.9.3", :bundler => "< 2", :if => Bundler.which("dot") do let(:ruby_graphviz) do graphviz_glob = base_system_gems.join("cache/ruby-graphviz*") Pathname.glob(graphviz_glob).first Index: spec/bundler/commands/list_spec.rb =================================================================== --- spec/bundler/commands/list_spec.rb (revision 66322) +++ spec/bundler/commands/list_spec.rb (revision 66323) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/list_spec.rb#L1 # frozen_string_literal: true -RSpec.describe "bundle list", :bundler => "3" do +RSpec.describe "bundle list", :bundler => "2" do before do install_gemfile <<-G source "file://#{gem_repo1}" Index: spec/bundler/commands/check_spec.rb =================================================================== --- spec/bundler/commands/check_spec.rb (revision 66322) +++ spec/bundler/commands/check_spec.rb (revision 66323) @@ -92,7 +92,7 @@ RSpec.describe "bundle check" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/check_spec.rb#L92 expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.") end - it "remembers --without option from install", :bundler => "< 3" do + it "remembers --without option from install", :bundler => "< 2" do gemfile <<-G source "file://#{gem_repo1}" group :foo do @@ -238,7 +238,7 @@ RSpec.describe "bundle check" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/check_spec.rb#L238 expect(last_command).to be_failure end - context "--path", :bundler => "< 3" do + context "--path", :bundler => "< 2" do before do gemfile <<-G source "file://#{gem_repo1}" @@ -254,7 +254,7 @@ RSpec.describe "bundle check" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/check_spec.rb#L254 expect(out).to include("The Gemfile's dependencies are satisfied") end - it "should write to .bundle/config", :bundler => "< 3" do + it "should write to .bundle/config", :bundler => "< 2" do bundle "check --path vendor/bundle" bundle! "check" end Index: spec/bundler/commands/update_spec.rb =================================================================== --- spec/bundler/commands/update_spec.rb (revision 66322) +++ spec/bundler/commands/update_spec.rb (revision 66323) @@ -11,7 +11,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L11 G end - describe "with no arguments", :bundler => "< 3" do + describe "with no arguments", :bundler => "< 2" do it "updates the entire bundle" do update_repo2 do build_gem "activesupport", "3.0" @@ -34,7 +34,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L34 end end - describe "with --all", :bundler => "3" do + describe "with --all", :bundler => "2" do it "updates the entire bundle" do update_repo2 do build_gem "activesupport", "3.0" @@ -279,7 +279,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L279 end describe "in a frozen bundle" do - it "should fail loudly", :bundler => "< 3" do + it "should fail loudly", :bundler => "< 2" do bundle! "install --deployment" bundle "update", :all => bundle_update_requires_all? @@ -288,14 +288,14 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L288 expect(out).to match(/freeze \nby running `bundle install --no-deployment`./m) end - it "should suggest different command when frozen is set globally", :bundler => "< 3" do + it "should suggest different command when frozen is set globally", :bundler => "< 2" do bundle! "config --global frozen 1" bundle "update", :all => bundle_update_requires_all? expect(out).to match(/You are trying to install in deployment mode after changing.your Gemfile/m). and match(/freeze \nby running `bundle config --delete frozen`./m) end - it "should suggest different command when frozen is set globally", :bundler => "3" do + it "should suggest different command when frozen is set globally", :bundler => "2" do bundle! "config --global deployment true" bundle "update", :all => bundle_update_requires_all? expect(out).to match(/You are trying to install in deployment mode after changing.your Gemfile/m). @@ -304,7 +304,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L304 end describe "with --source option" do - it "should not update gems not included in the source that happen to have the same name", :bundler => "< 3" do + it "should not update gems not included in the source that happen to have the same name", :bundler => "< 2" do install_gemfile! <<-G source "file://#{gem_repo2}" gem "activesupport" @@ -315,7 +315,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L315 expect(the_bundle).to include_gem "activesupport 3.0" end - it "should not update gems not included in the source that happen to have the same name", :bundler => "3" do + it "should not update gems not included in the source that happen to have the same name", :bundler => "2" do install_gemfile! <<-G source "file://#{gem_repo2}" gem "activesupport" @@ -358,7 +358,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L358 G end - it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 3" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 2" do update_repo2 do build_gem "fred", "2.0" build_gem "harry", "2.0" do |s| @@ -371,7 +371,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L371 expect(the_bundle).to include_gems "fred 1.0" end - it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "3" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "2" do update_repo2 do build_gem "fred", "2.0" build_gem "harry", "2.0" do |s| @@ -403,7 +403,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L403 G end - it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 3" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 2" do update_repo2 do build_gem "george", "2.0" build_gem "harry", "2.0" do |s| @@ -417,7 +417,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L417 expect(the_bundle).to include_gems "george 1.0" end - it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "3" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "2" do update_repo2 do build_gem "george", "2.0" build_gem "harry", "2.0" do |s| @@ -561,14 +561,14 @@ RSpec.describe "bundle update when a gem https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L561 G end - it "should explain that bundler conflicted", :bundler => "< 3" do + it "should explain that bundler conflicted", :bundler => "< 2" do bundle "update", :all => bundle_update_requires_all? expect(last_command.stdboth).not_to match(/in snapshot/i) expect(last_command.bundler_err).to match(/current Bundler version/i). and match(/perhaps you need to update bundler/i) end - it "should warn that the newer version of Bundler would conflict", :bundler => "3" do + it "should warn that the newer version of Bundler would conflict", :bundler => "2" do bundle! "update", :all => true expect(last_command.bundler_err).to include("rails (3.0.1) has dependency bundler"). and include("so the dependency is being ignored") @@ -577,7 +577,7 @@ RSpec.describe "bundle update when a gem https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/update_spec.rb#L577 end RSpec.describe "bundle update" do - it "shows the previous version of the gem when updated from rubygems source", :bundler => "< 3" do + it "shows the previous version of the gem when updated from rubygems source", :bundler => "< 2" do build_repo2 install_gemfile <<-G Index: spec/bundler/commands/binstubs_spec.rb =================================================================== --- spec/bundler/commands/binstubs_spec.rb (revision 66322) +++ spec/bundler/commands/binstubs_spec.rb (revision 66323) @@ -134,33 +134,6 @@ RSpec.describe "bundle binstubs <gem>" d https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/binstubs_spec.rb#L134 if ENV["BUNDLER_SPEC_SUB_VERSION"] let(:system_bundler_version) { Bundler::VERSION } end - - before do - gemfile <<-G - source "file:///Users/colby/Projects/bundler/tmp/gems/remote2" - gem "rack" - gem "prints_loaded_gems" - G - - lockfile <<-G - GEM - remote: file:///Users/colby/Projects/bundler/tmp/gems/remote2/ - specs: - prints_loaded_gems (1.0) - rack (1.2) - - PLATFORMS - ruby - - DEPENDENCIES - prints_loaded_gems - rack - - BUNDLED WITH - #{system_bundler_version} - G - end - it "runs bundler" do sys_exec! "#{bundled_app("bin/bundle")} install" expect(out).to eq %(system bundler #{system_bundler_version}\n["install"]) @@ -340,7 +313,7 @@ RSpec.describe "bundle binstubs <gem>" d https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/binstubs_spec.rb#L313 expect(bundled_app("exec/rackup")).to exist end - it "setting is saved for bundle install", :bundler => "< 3" do + it "setting is saved for bundle install", :bundler => "< 2" do install_gemfile <<-G source "file://#{gem_repo1}" gem "rack" Index: spec/bundler/commands/console_spec.rb =================================================================== --- spec/bundler/commands/console_spec.rb (revision 66322) +++ spec/bundler/commands/console_spec.rb (revision 66323) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/console_spec.rb#L1 # frozen_string_literal: true -RSpec.describe "bundle console", :bundler => "< 3" do +RSpec.describe "bundle console", :bundler => "< 2" do before :each do install_gemfile <<-G source "file://#{gem_repo1}" Index: spec/bundler/other/bundle_ruby_spec.rb =================================================================== --- spec/bundler/other/bundle_ruby_spec.rb (revision 66322) +++ spec/bundler/other/bundle_ruby_spec.rb (revision 66323) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/other/bundle_ruby_spec.rb#L1 # frozen_string_literal: true -RSpec.describe "bundle_ruby", :bundler => "< 3" do +RSpec.describe "bundle_ruby", :bundler => "< 2" do context "without patchlevel" do it "returns the ruby version" do gemfile <<-G Index: spec/bundler/commands/show_spec.rb =================================================================== --- spec/bundler/commands/show_spec.rb (revision 66322) +++ spec/bundler/commands/show_spec.rb (revision 66323) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/show_spec.rb#L1 # frozen_string_literal: true -RSpec.describe "bundle show", :bundler => "< 3", :ruby => ">= 2.0" do +RSpec.describe "bundle show", :bundler => "< 2", :ruby => ">= 2.0" do context "with a standard Gemfile" do before :each do install_gemfile <<-G @@ -36,7 +36,7 @@ RSpec.describe "bundle show", :bundler = https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/show_spec.rb#L36 it "prints path if gem exists in bundle" do bundle "show rails" expect(out).to eq( - "[DEPRECATED FOR 3.0] use `bundle info rails` instead of `bundle show rails`\n" + + "[DEPRECATED FOR 2.0] use `bundle info rails` instead of `bundle show rails`\n" + default_bundle_path("gems", "rails-2.3.2").to_s ) end @@ -44,7 +44,7 @@ RSpec.describe "bundle show", :bundler = https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/show_spec.rb#L44 it "prints the path to the running bundler" do bundle "show bundler" expect(out).to eq( - "[DEPRECATED FOR 3.0] use `bundle info bundler` instead of `bundle show bundler`\n" + + "[DEPRECATED FOR 2.0] use `bundle info bundler` instead of `bundle show bundler`\n" + root.to_s ) end @@ -52,7 +52,7 @@ RSpec.describe "bundle show", :bundler = https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/show_spec.rb#L52 it "prints path if gem exists in bundle (with --paths option)" do bundle "show rails --paths" expect(out).to eq( - "[DEPRECATED FOR 3.0] use `bundle info rails --path` instead of `bundle show rails --paths`\n" + + "[DEPRECATED FOR 2.0] use `bundle info rails --path` instead of `bundle show rails --paths`\n" + default_bundle_path("gems", "rails-2.3.2").to_s ) end @@ -64,7 +64,7 @@ RSpec.describe "bundle show", :bundler = https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/show_spec.rb#L64 expect(out).to include(default_bundle_path("gems", "rails-2.3.2").to_s) out_lines = out.split("\n") - expect(out_lines[0]).to eq("[DEPRECATED FOR 3.0] use `bundle list` instead of `bundle show --paths`") + expect(out_lines[0]).to eq("[DEPRECATED FOR 2.0] use `bundle list` instead of `bundle show --paths`") # Gem names are the last component of their path. gem_list = out_lines[1..-1].map {|p| p.split("/").last } Index: spec/bundler/commands/exec_spec.rb =================================================================== --- spec/bundler/commands/exec_spec.rb (revision 66322) +++ spec/bundler/commands/exec_spec.rb (revision 66323) @@ -570,7 +570,22 @@ RSpec.describe "bundle exec" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/exec_spec.rb#L570 it_behaves_like "it runs" end - context "the executable is empty" do + context "the executable is empty", :bundler => "< 2" do + let(:executable) { "" } + + let(:exit_code) { 0 } + let(:expected) { "#{path} is empty" } + (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/