From 2fbbbba5bd684edfd62beb106b48ac93919eb128 Mon Sep 17 00:00:00 2001 From: hsbt Date: Sun, 4 Nov 2018 01:14:48 +0000 Subject: Merge upstream changes from 2-0-stable branch of bundler/bundler. * It update bundler 2 mode to bundler 3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/bundler/feature_flag.rb | 58 ++++++++++++------------ man/bundle-config.1 | 20 +++++++- man/bundle-config.1.txt | 22 +++++++-- man/bundle-install.1 | 2 +- man/bundle-install.1.txt | 2 +- man/bundle-update.1 | 2 +- man/bundle-update.1.txt | 2 +- spec/bundler/bundler/cli_spec.rb | 6 +-- spec/bundler/bundler/definition_spec.rb | 8 ++-- spec/bundler/bundler/dsl_spec.rb | 8 ++-- spec/bundler/bundler/source_list_spec.rb | 6 +-- spec/bundler/bundler/ui/shell_spec.rb | 4 +- spec/bundler/cache/path_spec.rb | 2 +- spec/bundler/commands/binstubs_spec.rb | 2 +- spec/bundler/commands/check_spec.rb | 6 +-- spec/bundler/commands/clean_spec.rb | 6 +-- spec/bundler/commands/console_spec.rb | 2 +- spec/bundler/commands/exec_spec.rb | 16 +++---- spec/bundler/commands/init_spec.rb | 16 +++---- spec/bundler/commands/inject_spec.rb | 2 +- spec/bundler/commands/install_spec.rb | 8 ++-- spec/bundler/commands/list_spec.rb | 2 +- spec/bundler/commands/outdated_spec.rb | 2 +- spec/bundler/commands/package_spec.rb | 2 +- spec/bundler/commands/show_spec.rb | 2 +- spec/bundler/commands/update_spec.rb | 28 ++++++------ spec/bundler/commands/version_spec.rb | 12 ++--- spec/bundler/commands/viz_spec.rb | 2 +- spec/bundler/install/binstubs_spec.rb | 4 +- spec/bundler/install/deploy_spec.rb | 8 ++-- spec/bundler/install/gemfile/gemspec_spec.rb | 4 +- spec/bundler/install/gemfile/git_spec.rb | 2 +- spec/bundler/install/gemfile/groups_spec.rb | 6 +-- spec/bundler/install/gemfile/path_spec.rb | 2 +- spec/bundler/install/gemfile/platform_spec.rb | 2 +- spec/bundler/install/gemfile/sources_spec.rb | 8 ++-- spec/bundler/install/gems/compact_index_spec.rb | 16 +++---- spec/bundler/install/gems/dependency_api_spec.rb | 16 +++---- spec/bundler/install/gems/flex_spec.rb | 4 +- spec/bundler/install/gems/standalone_spec.rb | 6 +-- spec/bundler/install/git_spec.rb | 4 +- spec/bundler/install/path_spec.rb | 12 ++--- spec/bundler/install/post_bundle_message_spec.rb | 4 +- spec/bundler/install/redownload_spec.rb | 2 +- spec/bundler/lock/lockfile_bundler_1_spec.rb | 2 +- spec/bundler/lock/lockfile_spec.rb | 4 +- spec/bundler/other/bundle_ruby_spec.rb | 2 +- spec/bundler/other/major_deprecation_spec.rb | 2 +- spec/bundler/other/platform_spec.rb | 10 ++-- spec/bundler/plugins/source/example_spec.rb | 8 ++-- spec/bundler/runtime/executable_spec.rb | 4 +- spec/bundler/runtime/setup_spec.rb | 4 +- spec/bundler/runtime/with_clean_env_spec.rb | 8 ++-- spec/bundler/update/git_spec.rb | 4 +- spec/bundler/update/redownload_spec.rb | 2 +- 55 files changed, 216 insertions(+), 184 deletions(-) diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index 83e7ff0389..15ba825c51 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -27,38 +27,38 @@ module Bundler (1..10).each {|v| define_method("bundler_#{v}_mode?") { major_version >= v } } - settings_flag(:allow_bundler_dependency_conflicts) { bundler_2_mode? } - settings_flag(:allow_offline_install) { bundler_2_mode? } - settings_flag(:auto_clean_without_path) { bundler_2_mode? } - settings_flag(:auto_config_jobs) { bundler_2_mode? } - settings_flag(:cache_all) { bundler_2_mode? } - settings_flag(:cache_command_is_package) { bundler_2_mode? } - settings_flag(:console_command) { !bundler_2_mode? } - settings_flag(:default_install_uses_path) { bundler_2_mode? } - settings_flag(:deployment_means_frozen) { bundler_2_mode? } - settings_flag(:disable_multisource) { bundler_2_mode? } + settings_flag(:allow_bundler_dependency_conflicts) { bundler_3_mode? } + settings_flag(:allow_offline_install) { bundler_3_mode? } + settings_flag(:auto_clean_without_path) { bundler_3_mode? } + settings_flag(:auto_config_jobs) { bundler_3_mode? } + settings_flag(:cache_all) { bundler_3_mode? } + settings_flag(:cache_command_is_package) { bundler_3_mode? } + settings_flag(:console_command) { !bundler_3_mode? } + settings_flag(:default_install_uses_path) { bundler_3_mode? } + settings_flag(:deployment_means_frozen) { bundler_3_mode? } + settings_flag(:disable_multisource) { bundler_3_mode? } settings_flag(:error_on_stderr) { bundler_2_mode? } - settings_flag(:forget_cli_options) { bundler_2_mode? } - settings_flag(:global_path_appends_ruby_scope) { bundler_2_mode? } - settings_flag(:global_gem_cache) { bundler_2_mode? } - settings_flag(:init_gems_rb) { bundler_2_mode? } - settings_flag(:list_command) { bundler_2_mode? } - settings_flag(:lockfile_uses_separate_rubygems_sources) { bundler_2_mode? } - settings_flag(:only_update_to_newer_versions) { bundler_2_mode? } - settings_flag(:path_relative_to_cwd) { bundler_2_mode? } + settings_flag(:forget_cli_options) { bundler_3_mode? } + settings_flag(:global_path_appends_ruby_scope) { bundler_3_mode? } + settings_flag(:global_gem_cache) { bundler_3_mode? } + settings_flag(:init_gems_rb) { bundler_3_mode? } + settings_flag(:list_command) { bundler_3_mode? } + settings_flag(:lockfile_uses_separate_rubygems_sources) { bundler_3_mode? } + settings_flag(:only_update_to_newer_versions) { bundler_3_mode? } + settings_flag(:path_relative_to_cwd) { bundler_3_mode? } settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") } - settings_flag(:prefer_gems_rb) { bundler_2_mode? } - settings_flag(:print_only_version_number) { bundler_2_mode? } - settings_flag(:setup_makes_kernel_gem_public) { !bundler_2_mode? } - settings_flag(:skip_default_git_sources) { bundler_2_mode? } - settings_flag(:specific_platform) { bundler_2_mode? } - settings_flag(:suppress_install_using_messages) { bundler_2_mode? } - settings_flag(:unlock_source_unlocks_spec) { !bundler_2_mode? } - settings_flag(:update_requires_all_flag) { bundler_2_mode? } - settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_2_mode? } - settings_flag(:viz_command) { !bundler_2_mode? } + settings_flag(:prefer_gems_rb) { bundler_3_mode? } + settings_flag(:print_only_version_number) { bundler_3_mode? } + settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? } + settings_flag(:skip_default_git_sources) { bundler_3_mode? } + settings_flag(:specific_platform) { bundler_3_mode? } + settings_flag(:suppress_install_using_messages) { bundler_3_mode? } + settings_flag(:unlock_source_unlocks_spec) { !bundler_3_mode? } + settings_flag(:update_requires_all_flag) { bundler_3_mode? } + settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_3_mode? } + settings_flag(:viz_command) { !bundler_3_mode? } - settings_option(:default_cli_command) { bundler_2_mode? ? :cli_help : :install } + settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install } def initialize(bundler_version) @bundler_version = Gem::Version.create(bundler_version) diff --git a/man/bundle-config.1 b/man/bundle-config.1 index c250975a6c..8c0b3683c6 100644 --- a/man/bundle-config.1 +++ b/man/bundle-config.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-CONFIG" "1" "October 2018" "" "" +.TH "BUNDLE\-CONFIG" "1" "November 2018" "" "" . .SH "NAME" \fBbundle\-config\fR \- Set bundler configuration options @@ -238,7 +238,7 @@ The following is a list of all configuration keys and their purpose\. You can le \fBpath\.system\fR (\fBBUNDLE_PATH__SYSTEM\fR): Whether Bundler will install gems into the default system path (\fBGem\.dir\fR)\. . .IP "\(bu" 4 -\fBpath_relative_to_cwd\fR (\fBPATH_RELATIVE_TO_CWD\fR) Makes \fB\-\-path\fR relative to the CWD instead of the \fBGemfile\fR\. +\fBpath_relative_to_cwd\fR (\fBBUNDLE_PATH_RELATIVE_TO_CWD\fR) Makes \fB\-\-path\fR relative to the CWD instead of the \fBGemfile\fR\. . .IP "\(bu" 4 \fBplugins\fR (\fBBUNDLE_PLUGINS\fR): Enable Bundler\'s experimental plugin system\. @@ -478,4 +478,20 @@ export BUNDLE_GITHUB__COM=abcd0123generatedtoken:x\-oauth\-basic .fi . .IP "" 0 +. +.SH "CONFIGURE BUNDLER DIRECTORIES" +Bundler\'s home, config, cache and plugin directories are able to be configured through environment variables\. The default location for Bundler\'s home directory is \fB~/\.bundle\fR, which all directories inherit from by default\. The following outlines the available environment variables and their default values +. +.IP "" 4 +. +.nf + +BUNDLE_USER_HOME : $HOME/\.bundle +BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache +BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config +BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin +. +.fi +. +.IP "" 0 diff --git a/man/bundle-config.1.txt b/man/bundle-config.1.txt index 0a999e8a97..9b07159342 100644 --- a/man/bundle-config.1.txt +++ b/man/bundle-config.1.txt @@ -282,8 +282,8 @@ BUNDLE-CONFIG(1) BUNDLE-CONFIG(1) o 1mpath.system 22m(1mBUNDLE_PATH__SYSTEM22m): Whether Bundler will install gems into the default system path (1mGem.dir22m). - o 1mpath_relative_to_cwd 22m(1mPATH_RELATIVE_TO_CWD22m) Makes 1m--path 22mrelative - to the CWD instead of the 1mGemfile22m. + o 1mpath_relative_to_cwd 22m(1mBUNDLE_PATH_RELATIVE_TO_CWD22m) Makes 1m--path0m + relative to the CWD instead of the 1mGemfile22m. o 1mplugins 22m(1mBUNDLE_PLUGINS22m): Enable Bundler's experimental plugin sys- tem. @@ -507,7 +507,23 @@ BUNDLE-CONFIG(1) BUNDLE-CONFIG(1) +1mCONFIGURE BUNDLER DIRECTORIES0m + Bundler's home, config, cache and plugin directories are able to be + configured through environment variables. The default location for + Bundler's home directory is 1m~/.bundle22m, which all directories inherit + from by default. The following outlines the available environment vari- + ables and their default values - October 2018 BUNDLE-CONFIG(1) + BUNDLE_USER_HOME : $HOME/.bundle + BUNDLE_USER_CACHE : $BUNDLE_USER_HOME/cache + BUNDLE_USER_CONFIG : $BUNDLE_USER_HOME/config + BUNDLE_USER_PLUGIN : $BUNDLE_USER_HOME/plugin + + + + + + + November 2018 BUNDLE-CONFIG(1) diff --git a/man/bundle-install.1 b/man/bundle-install.1 index 6026713af1..2549562b76 100644 --- a/man/bundle-install.1 +++ b/man/bundle-install.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-INSTALL" "1" "October 2018" "" "" +.TH "BUNDLE\-INSTALL" "1" "November 2018" "" "" . .SH "NAME" \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile diff --git a/man/bundle-install.1.txt b/man/bundle-install.1.txt index 1b7f3adcdf..004a5224b2 100644 --- a/man/bundle-install.1.txt +++ b/man/bundle-install.1.txt @@ -398,4 +398,4 @@ BUNDLE-INSTALL(1) BUNDLE-INSTALL(1) - October 2018 BUNDLE-INSTALL(1) + November 2018 BUNDLE-INSTALL(1) diff --git a/man/bundle-update.1 b/man/bundle-update.1 index 49f51c09a8..3a303b582d 100644 --- a/man/bundle-update.1 +++ b/man/bundle-update.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BUNDLE\-UPDATE" "1" "October 2018" "" "" +.TH "BUNDLE\-UPDATE" "1" "November 2018" "" "" . .SH "NAME" \fBbundle\-update\fR \- Update your gems to the latest available versions diff --git a/man/bundle-update.1.txt b/man/bundle-update.1.txt index d2ec46444b..573842858d 100644 --- a/man/bundle-update.1.txt +++ b/man/bundle-update.1.txt @@ -387,4 +387,4 @@ BUNDLE-UPDATE(1) BUNDLE-UPDATE(1) - October 2018 BUNDLE-UPDATE(1) + November 2018 BUNDLE-UPDATE(1) diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb index c82d46587e..9a2591ac96 100644 --- a/spec/bundler/bundler/cli_spec.rb +++ b/spec/bundler/bundler/cli_spec.rb @@ -28,7 +28,7 @@ RSpec.describe "bundle executable" do end context "with no arguments" do - it "prints a concise help message", :bundler => "2" do + it "prints a concise help message", :bundler => "3" do bundle! "" expect(last_command.stderr).to be_empty expect(last_command.stdout).to include("Bundler version #{Bundler::VERSION}"). @@ -161,12 +161,12 @@ To install the latest version, run `gem install bundler --pre` end RSpec.describe "bundler executable" do - it "shows the bundler version just as the `bundle` executable does", :bundler => "< 2" do + it "shows the bundler version just as the `bundle` executable does", :bundler => "< 3" do bundler "--version" expect(out).to eq("Bundler version #{Bundler::VERSION}") end - it "shows the bundler version just as the `bundle` executable does", :bundler => "2" do + it "shows the bundler version just as the `bundle` executable does", :bundler => "3" do bundler "--version" expect(out).to eq(Bundler::VERSION) end diff --git a/spec/bundler/bundler/definition_spec.rb b/spec/bundler/bundler/definition_spec.rb index 2ed87ec81d..a38c0b05b0 100644 --- a/spec/bundler/bundler/definition_spec.rb +++ b/spec/bundler/bundler/definition_spec.rb @@ -32,7 +32,7 @@ RSpec.describe Bundler::Definition do end describe "detects changes" do - it "for a path gem with changes", :bundler => "< 2" do + it "for a path gem with changes", :bundler => "< 3" do build_lib "foo", "1.0", :path => lib_path("foo") install_gemfile <<-G @@ -70,7 +70,7 @@ RSpec.describe Bundler::Definition do G end - it "for a path gem with changes", :bundler => "2" do + it "for a path gem with changes", :bundler => "3" do build_lib "foo", "1.0", :path => lib_path("foo") install_gemfile <<-G @@ -108,7 +108,7 @@ RSpec.describe Bundler::Definition do G end - it "for a path gem with deps and no changes", :bundler => "< 2" do + it "for a path gem with deps and no changes", :bundler => "< 3" do build_lib "foo", "1.0", :path => lib_path("foo") do |s| s.add_dependency "rack", "1.0" s.add_development_dependency "net-ssh", "1.0" @@ -145,7 +145,7 @@ RSpec.describe Bundler::Definition do G end - it "for a path gem with deps and no changes", :bundler => "2" do + it "for a path gem with deps and no changes", :bundler => "3" do build_lib "foo", "1.0", :path => lib_path("foo") do |s| s.add_dependency "rack", "1.0" s.add_development_dependency "net-ssh", "1.0" diff --git a/spec/bundler/bundler/dsl_spec.rb b/spec/bundler/bundler/dsl_spec.rb index bffe4f1608..dcc816eee2 100644 --- a/spec/bundler/bundler/dsl_spec.rb +++ b/spec/bundler/bundler/dsl_spec.rb @@ -25,7 +25,7 @@ RSpec.describe Bundler::Dsl do expect { subject.git_source(:example) }.to raise_error(Bundler::InvalidOption) end - context "default hosts (git, gist)", :bundler => "< 2" do + context "default hosts (git, gist)", :bundler => "< 3" do it "converts :github to :git" do subject.gem("sparks", :github => "indirect/sparks") github_uri = "git://github.com/indirect/sparks.git" @@ -63,7 +63,7 @@ RSpec.describe Bundler::Dsl do end end - context "default git sources", :bundler => "2" do + context "default git sources", :bundler => "3" do it "has none" do expect(subject.instance_variable_get(:@git_sources)).to eq({}) end @@ -229,7 +229,7 @@ RSpec.describe Bundler::Dsl do # gem 'spree_api' # gem 'spree_backend' # end - describe "#github", :bundler => "< 2" do + describe "#github", :bundler => "< 3" do it "from github" do spree_gems = %w[spree_core spree_api spree_backend] subject.github "spree" do @@ -242,7 +242,7 @@ RSpec.describe Bundler::Dsl do end end - describe "#github", :bundler => "2" do + describe "#github", :bundler => "3" do it "from github" do expect do spree_gems = %w[spree_core spree_api spree_backend] diff --git a/spec/bundler/bundler/source_list_spec.rb b/spec/bundler/bundler/source_list_spec.rb index ce3353012c..541a46c6d0 100644 --- a/spec/bundler/bundler/source_list_spec.rb +++ b/spec/bundler/bundler/source_list_spec.rb @@ -115,7 +115,7 @@ RSpec.describe Bundler::SourceList do end end - describe "#add_rubygems_remote", :bundler => "< 2" do + describe "#add_rubygems_remote", :bundler => "< 3" do let!(:returned_source) { source_list.add_rubygems_remote("https://rubygems.org/") } it "returns the aggregate rubygems source" do @@ -372,7 +372,7 @@ RSpec.describe Bundler::SourceList do source_list.add_git_source("uri" => "git://first-git.org/path.git") end - it "combines the rubygems sources into a single instance, removing duplicate remotes from the end", :bundler => "< 2" do + it "combines the rubygems sources into a single instance, removing duplicate remotes from the end", :bundler => "< 3" do expect(source_list.lock_sources).to eq [ Bundler::Source::Git.new("uri" => "git://first-git.org/path.git"), Bundler::Source::Git.new("uri" => "git://second-git.org/path.git"), @@ -391,7 +391,7 @@ RSpec.describe Bundler::SourceList do ] end - it "returns all sources, without combining rubygems sources", :bundler => "2" do + it "returns all sources, without combining rubygems sources", :bundler => "3" do expect(source_list.lock_sources).to eq [ Bundler::Source::Rubygems.new, Bundler::Source::Rubygems.new("remotes" => ["https://duplicate-rubygems.org"]), diff --git a/spec/bundler/bundler/ui/shell_spec.rb b/spec/bundler/bundler/ui/shell_spec.rb index 951a446aff..6de2330687 100644 --- a/spec/bundler/bundler/ui/shell_spec.rb +++ b/spec/bundler/bundler/ui/shell_spec.rb @@ -21,7 +21,7 @@ RSpec.describe Bundler::UI::Shell do describe "#warn" do before { subject.level = "warn" } - it "prints to stdout", :bundler => "< 2" do + it "prints to stdout", :bundler => "< 3" do expect { subject.warn("warning") }.to output("warning\n").to_stdout end @@ -46,7 +46,7 @@ RSpec.describe Bundler::UI::Shell do describe "#error" do before { subject.level = "error" } - it "prints to stdout", :bundler => "< 2" do + it "prints to stdout", :bundler => "< 3" do expect { subject.error("error!!!") }.to output("error!!!\n").to_stdout end diff --git a/spec/bundler/cache/path_spec.rb b/spec/bundler/cache/path_spec.rb index 8c6a843476..12be2dbcf8 100644 --- a/spec/bundler/cache/path_spec.rb +++ b/spec/bundler/cache/path_spec.rb @@ -86,7 +86,7 @@ expect(bundled_app("vendor/cache/bar-1.0")).not_to exist end - it "raises a warning without --all", :bundler => "< 2" do + it "raises a warning without --all", :bundler => "< 3" do build_lib "foo" install_gemfile <<-G diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb index 6a705d3423..849c5a4f75 100644 --- a/spec/bundler/commands/binstubs_spec.rb +++ b/spec/bundler/commands/binstubs_spec.rb @@ -313,7 +313,7 @@ RSpec.describe "bundle binstubs " do expect(bundled_app("exec/rackup")).to exist end - it "setting is saved for bundle install", :bundler => "< 2" do + it "setting is saved for bundle install", :bundler => "< 3" do install_gemfile <<-G source "file://#{gem_repo1}" gem "rack" diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb index f2af446fbf..890f4b1356 100644 --- a/spec/bundler/commands/check_spec.rb +++ b/spec/bundler/commands/check_spec.rb @@ -92,7 +92,7 @@ RSpec.describe "bundle check" do expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.") end - it "remembers --without option from install", :bundler => "< 2" do + it "remembers --without option from install", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" group :foo do @@ -238,7 +238,7 @@ RSpec.describe "bundle check" do expect(last_command).to be_failure end - context "--path", :bundler => "< 2" do + context "--path", :bundler => "< 3" do before do gemfile <<-G source "file://#{gem_repo1}" @@ -254,7 +254,7 @@ RSpec.describe "bundle check" do expect(out).to include("The Gemfile's dependencies are satisfied") end - it "should write to .bundle/config", :bundler => "< 2" do + it "should write to .bundle/config", :bundler => "< 3" do bundle "check --path vendor/bundle" bundle! "check" end diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb index 37cbeeb4e7..da860e62f8 100644 --- a/spec/bundler/commands/clean_spec.rb +++ b/spec/bundler/commands/clean_spec.rb @@ -343,7 +343,7 @@ RSpec.describe "bundle clean" do expect(out).to include("rack (1.0.0)").and include("thin (1.0)") end - it "--clean should override the bundle setting on install", :bundler => "< 2" do + it "--clean should override the bundle setting on install", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" @@ -363,7 +363,7 @@ RSpec.describe "bundle clean" do should_not_have_gems "thin-1.0" end - it "--clean should override the bundle setting on update", :bundler => "< 2" do + it "--clean should override the bundle setting on update", :bundler => "< 3" do build_repo2 gemfile <<-G @@ -383,7 +383,7 @@ RSpec.describe "bundle clean" do should_not_have_gems "foo-1.0" end - it "automatically cleans when path has not been set", :bundler => "2" do + it "automatically cleans when path has not been set", :bundler => "3" do build_repo2 install_gemfile! <<-G diff --git a/spec/bundler/commands/console_spec.rb b/spec/bundler/commands/console_spec.rb index 9bf66e8f5b..05b0a6c1e4 100644 --- a/spec/bundler/commands/console_spec.rb +++ b/spec/bundler/commands/console_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle console", :bundler => "< 2" do +RSpec.describe "bundle console", :bundler => "< 3" do before :each do install_gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb index 6835305d55..a08f2b6fe8 100644 --- a/spec/bundler/commands/exec_spec.rb +++ b/spec/bundler/commands/exec_spec.rb @@ -570,7 +570,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable is empty", :bundler => "< 2" do + context "the executable is empty", :bundler => "< 3" do let(:executable) { "" } let(:exit_code) { 0 } @@ -585,7 +585,7 @@ RSpec.describe "bundle exec" do end end - context "the executable is empty", :bundler => "2" do + context "the executable is empty", :bundler => "3" do let(:executable) { "" } let(:exit_code) { 0 } @@ -594,7 +594,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises", :bundler => "< 2" do + context "the executable raises", :bundler => "< 3" do let(:executable) { super() << "\nraise 'ERROR'" } let(:exit_code) { 1 } let(:expected) { super() << "\nbundler: failed to load command: #{path} (#{path})" } @@ -605,7 +605,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises", :bundler => "2" do + context "the executable raises", :bundler => "3" do let(:executable) { super() << "\nraise 'ERROR'" } let(:exit_code) { 1 } let(:expected_err) do @@ -615,7 +615,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises an error without a backtrace", :bundler => "< 2" do + context "the executable raises an error without a backtrace", :bundler => "< 3" do let(:executable) { super() << "\nclass Err < Exception\ndef backtrace; end;\nend\nraise Err" } let(:exit_code) { 1 } let(:expected) { super() << "\nbundler: failed to load command: #{path} (#{path})" } @@ -624,7 +624,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises an error without a backtrace", :bundler => "2" do + context "the executable raises an error without a backtrace", :bundler => "3" do let(:executable) { super() << "\nclass Err < Exception\ndef backtrace; end;\nend\nraise Err" } let(:exit_code) { 1 } let(:expected_err) { "bundler: failed to load command: #{path} (#{path})\nErr: Err" } @@ -638,7 +638,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "when Bundler.setup fails", :bundler => "< 2" do + context "when Bundler.setup fails", :bundler => "< 3" do before do gemfile <<-G gem 'rack', '2' @@ -655,7 +655,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "when Bundler.setup fails", :bundler => "2" do + context "when Bundler.setup fails", :bundler => "3" do before do gemfile <<-G gem 'rack', '2' diff --git a/spec/bundler/commands/init_spec.rb b/spec/bundler/commands/init_spec.rb index 9b5bd95814..e0782f28f7 100644 --- a/spec/bundler/commands/init_spec.rb +++ b/spec/bundler/commands/init_spec.rb @@ -1,19 +1,19 @@ # frozen_string_literal: true RSpec.describe "bundle init" do - it "generates a Gemfile", :bundler => "< 2" do + it "generates a Gemfile", :bundler => "< 3" do bundle! :init expect(out).to include("Writing new Gemfile") expect(bundled_app("Gemfile")).to be_file end - it "generates a gems.rb", :bundler => "2" do + it "generates a gems.rb", :bundler => "3" 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 => "< 2" do + context "when a Gemfile already exists", :bundler => "< 3" do before do create_file "Gemfile", <<-G gem "rails" @@ -30,7 +30,7 @@ RSpec.describe "bundle init" do end end - context "when gems.rb already exists", :bundler => ">= 2" do + context "when gems.rb already exists", :bundler => ">= 3" do before do create_file("gems.rb", <<-G) gem "rails" @@ -47,7 +47,7 @@ RSpec.describe "bundle init" do end end - context "when a Gemfile exists in a parent directory", :bundler => "< 2" do + context "when a Gemfile exists in a parent directory", :bundler => "< 3" 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 end end - context "when a gems.rb file exists in a parent directory", :bundler => ">= 2" do + context "when a gems.rb file exists in a parent directory", :bundler => ">= 3" 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 end end - context "given --gemspec option", :bundler => "< 2" do + context "given --gemspec option", :bundler => "< 3" do let(:spec_file) { tmp.join("test.gemspec") } it "should generate from an existing gemspec" do @@ -146,7 +146,7 @@ RSpec.describe "bundle init" do context "when init_gems_rb setting is enabled" do before { bundle "config init_gems_rb true" } - context "given --gemspec option", :bundler => "< 2" do + context "given --gemspec option", :bundler => "< 3" do let(:spec_file) { tmp.join("test.gemspec") } before do diff --git a/spec/bundler/commands/inject_spec.rb b/spec/bundler/commands/inject_spec.rb index b7ffc89a34..822644f39a 100644 --- a/spec/bundler/commands/inject_spec.rb +++ b/spec/bundler/commands/inject_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle inject", :bundler => "< 2" do +RSpec.describe "bundle inject", :bundler => "< 3" do before :each do gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index 394f672fef..326f98161e 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -29,7 +29,7 @@ RSpec.describe "bundle install with gem sources" do expect(bundled_app("Gemfile.lock")).to exist end - it "does not create ./.bundle by default", :bundler => "< 2" do + it "does not create ./.bundle by default", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" gem "rack" @@ -275,14 +275,14 @@ RSpec.describe "bundle install with gem sources" do expect(the_bundle).to include_gems "rack 1.0" end - it "allows running bundle install --system without deleting foo", :bundler => "< 2" do + it "allows running bundle install --system without deleting foo", :bundler => "< 3" do bundle "install", forgotten_command_line_options(:path => "vendor") bundle "install", forgotten_command_line_options(:system => true) FileUtils.rm_rf(bundled_app("vendor")) expect(the_bundle).to include_gems "rack 1.0" end - it "allows running bundle install --system after deleting foo", :bundler => "< 2" do + it "allows running bundle install --system after deleting foo", :bundler => "< 3" do bundle "install", forgotten_command_line_options(:path => "vendor") FileUtils.rm_rf(bundled_app("vendor")) bundle "install", forgotten_command_line_options(:system => true) @@ -290,7 +290,7 @@ RSpec.describe "bundle install with gem sources" do end end - it "finds gems in multiple sources", :bundler => "< 2" do + it "finds gems in multiple sources", :bundler => "< 3" do build_repo2 update_repo2 diff --git a/spec/bundler/commands/list_spec.rb b/spec/bundler/commands/list_spec.rb index 5305176c65..ba4bb9b040 100644 --- a/spec/bundler/commands/list_spec.rb +++ b/spec/bundler/commands/list_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle list", :bundler => "2" do +RSpec.describe "bundle list", :bundler => "3" do before do install_gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/bundler/commands/outdated_spec.rb b/spec/bundler/commands/outdated_spec.rb index fc1f1772e7..c9d3ac1de4 100644 --- a/spec/bundler/commands/outdated_spec.rb +++ b/spec/bundler/commands/outdated_spec.rb @@ -407,7 +407,7 @@ RSpec.describe "bundle outdated" do expect(out).to include("Installing foo 1.0") end - context "after bundle install --deployment", :bundler => "< 2" do + context "after bundle install --deployment", :bundler => "< 3" do before do install_gemfile <<-G, forgotten_command_line_options(:deployment => true) source "file://#{gem_repo2}" diff --git a/spec/bundler/commands/package_spec.rb b/spec/bundler/commands/package_spec.rb index 6351909bc7..a8426e6322 100644 --- a/spec/bundler/commands/package_spec.rb +++ b/spec/bundler/commands/package_spec.rb @@ -141,7 +141,7 @@ RSpec.describe "bundle package" do end end - context "with --path", :bundler => "< 2" do + context "with --path", :bundler => "< 3" do it "sets root directory for gems" do gemfile <<-D source "file://#{gem_repo1}" diff --git a/spec/bundler/commands/show_spec.rb b/spec/bundler/commands/show_spec.rb index efbe4b13fb..bf96ec489a 100644 --- a/spec/bundler/commands/show_spec.rb +++ b/spec/bundler/commands/show_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle show", :bundler => "< 2", :ruby => ">= 2.0" do +RSpec.describe "bundle show", :bundler => "< 3", :ruby => ">= 2.0" do context "with a standard Gemfile" do before :each do install_gemfile <<-G diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index 6eb49d3acd..1effba6526 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -11,7 +11,7 @@ RSpec.describe "bundle update" do G end - describe "with no arguments", :bundler => "< 2" do + describe "with no arguments", :bundler => "< 3" do it "updates the entire bundle" do update_repo2 do build_gem "activesupport", "3.0" @@ -34,7 +34,7 @@ RSpec.describe "bundle update" do end end - describe "with --all", :bundler => "2" do + describe "with --all", :bundler => "3" do it "updates the entire bundle" do update_repo2 do build_gem "activesupport", "3.0" @@ -279,7 +279,7 @@ RSpec.describe "bundle update" do end describe "in a frozen bundle" do - it "should fail loudly", :bundler => "< 2" do + it "should fail loudly", :bundler => "< 3" do bundle! "install --deployment" bundle "update", :all => bundle_update_requires_all? @@ -288,14 +288,14 @@ RSpec.describe "bundle update" do expect(out).to match(/freeze \nby running `bundle install --no-deployment`./m) end - it "should suggest different command when frozen is set globally", :bundler => "< 2" do + it "should suggest different command when frozen is set globally", :bundler => "< 3" 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 => "2" do + it "should suggest different command when frozen is set globally", :bundler => "3" 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 end describe "with --source option" do - it "should not update gems not included in the source that happen to have the same name", :bundler => "< 2" do + it "should not update gems not included in the source that happen to have the same name", :bundler => "< 3" do install_gemfile! <<-G source "file://#{gem_repo2}" gem "activesupport" @@ -315,7 +315,7 @@ RSpec.describe "bundle update" do 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 => "2" do + it "should not update gems not included in the source that happen to have the same name", :bundler => "3" do install_gemfile! <<-G source "file://#{gem_repo2}" gem "activesupport" @@ -358,7 +358,7 @@ RSpec.describe "bundle update" do G end - it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 2" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 3" 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 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 => "2" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "3" 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 G end - it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 2" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "< 3" 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 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 => "2" do + it "should not update the child dependencies of a gem that has the same name as the source", :bundler => "3" 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 depends on a newer version of bundler" G end - it "should explain that bundler conflicted", :bundler => "< 2" do + it "should explain that bundler conflicted", :bundler => "< 3" 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 => "2" do + it "should warn that the newer version of Bundler would conflict", :bundler => "3" 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 depends on a newer version of bundler" end RSpec.describe "bundle update" do - it "shows the previous version of the gem when updated from rubygems source", :bundler => "< 2" do + it "shows the previous version of the gem when updated from rubygems source", :bundler => "< 3" do build_repo2 install_gemfile <<-G diff --git a/spec/bundler/commands/version_spec.rb b/spec/bundler/commands/version_spec.rb index b919c25e0f..66c7930397 100644 --- a/spec/bundler/commands/version_spec.rb +++ b/spec/bundler/commands/version_spec.rb @@ -2,36 +2,36 @@ RSpec.describe "bundle version" do context "with -v" do - it "outputs the version", :bundler => "< 2" do + it "outputs the version", :bundler => "< 3" do bundle! "-v" expect(out).to eq("Bundler version #{Bundler::VERSION}") end - it "outputs the version", :bundler => "2" do + it "outputs the version", :bundler => "3" do bundle! "-v" expect(out).to eq(Bundler::VERSION) end end context "with --version" do - it "outputs the version", :bundler => "< 2" do + it "outputs the version", :bundler => "< 3" do bundle! "--version" expect(out).to eq("Bundler version #{Bundler::VERSION}") end - it "outputs the version", :bundler => "2" do + it "outputs the version", :bundler => "3" do bundle! "--version" expect(out).to eq(Bundler::VERSION) end end context "with version" do - it "outputs the version with build metadata", :bundler => "< 2" do + it "outputs the version with build metadata", :bundler => "< 3" do bundle! "version" expect(out).to match(/\ABundler version #{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit [a-fA-F0-9]{7,}\)\z/) end - it "outputs the version with build metadata", :bundler => "2" do + it "outputs the version with build metadata", :bundler => "3" do bundle! "version" expect(out).to match(/\A#{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit [a-fA-F0-9]{7,}\)\z/) end diff --git a/spec/bundler/commands/viz_spec.rb b/spec/bundler/commands/viz_spec.rb index 3804d3561c..61414956a9 100644 --- a/spec/bundler/commands/viz_spec.rb +++ b/spec/bundler/commands/viz_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle viz", :ruby => "1.9.3", :bundler => "< 2", :if => Bundler.which("dot") do +RSpec.describe "bundle viz", :ruby => "1.9.3", :bundler => "< 3", :if => Bundler.which("dot") do let(:ruby_graphviz) do graphviz_glob = base_system_gems.join("cache/ruby-graphviz*") Pathname.glob(graphviz_glob).first diff --git a/spec/bundler/install/binstubs_spec.rb b/spec/bundler/install/binstubs_spec.rb index 23eb691ab8..f04d3fe654 100644 --- a/spec/bundler/install/binstubs_spec.rb +++ b/spec/bundler/install/binstubs_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle install", :bundler => "< 2" do +RSpec.describe "bundle install", :bundler => "< 3" do describe "when system_bindir is set" do # On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if # you want to avoid sudo installs for system gems with OS X's default ruby @@ -20,7 +20,7 @@ RSpec.describe "bundle install", :bundler => "< 2" do end end - describe "when multiple gems contain the same exe", :bundler => "< 2" do + describe "when multiple gems contain the same exe", :bundler => "< 3" do before do build_repo2 do build_gem "fake", "14" do |s| diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb index 3b9d68982a..21b93e57c0 100644 --- a/spec/bundler/install/deploy_spec.rb +++ b/spec/bundler/install/deploy_spec.rb @@ -8,7 +8,7 @@ RSpec.describe "install with --deployment or --frozen" do G end - context "with CLI flags", :bundler => "< 2" do + context "with CLI flags", :bundler => "< 3" do it "fails without a lockfile and says that --deployment requires a lock" do bundle "install --deployment" expect(out).to include("The --deployment flag requires a Gemfile.lock") @@ -109,11 +109,11 @@ RSpec.describe "install with --deployment or --frozen" do bundle "install" end - it "works with the --deployment flag if you didn't change anything", :bundler => "< 2" do + it "works with the --deployment flag if you didn't change anything", :bundler => "< 3" do bundle! "install --deployment" end - it "works with the --frozen flag if you didn't change anything", :bundler => "< 2" do + it "works with the --frozen flag if you didn't change anything", :bundler => "< 3" do bundle! "install --frozen" end @@ -165,7 +165,7 @@ RSpec.describe "install with --deployment or --frozen" do expect(out).to include("The path `#{lib_path("path_gem-1.0")}` does not exist.") end - it "can have --frozen set via an environment variable", :bundler => "< 2" do + it "can have --frozen set via an environment variable", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" gem "rack" diff --git a/spec/bundler/install/gemfile/gemspec_spec.rb b/spec/bundler/install/gemfile/gemspec_spec.rb index 7ce037730e..bbb56da5a4 100644 --- a/spec/bundler/install/gemfile/gemspec_spec.rb +++ b/spec/bundler/install/gemfile/gemspec_spec.rb @@ -433,7 +433,7 @@ RSpec.describe "bundle install from an existing gemspec" do end end - context "on ruby", :bundler => "< 2" do + context "on ruby", :bundler => "< 3" do before do simulate_platform("ruby") bundle :install @@ -534,7 +534,7 @@ RSpec.describe "bundle install from an existing gemspec" do end end - context "on ruby", :bundler => "2" do + context "on ruby", :bundler => "3" do before do simulate_platform("ruby") bundle :install diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index 57d83a5295..fe396c7a0f 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -26,7 +26,7 @@ RSpec.describe "bundle install with git sources" do expect(out).to eq("WIN") end - it "caches the git repo", :bundler => "< 2" do + it "caches the git repo", :bundler => "< 3" do expect(Dir["#{default_bundle_path}/cache/bundler/git/foo-1.0-*"]).to have_attributes :size => 1 end diff --git a/spec/bundler/install/gemfile/groups_spec.rb b/spec/bundler/install/gemfile/groups_spec.rb index 19c379e188..45395e606f 100644 --- a/spec/bundler/install/gemfile/groups_spec.rb +++ b/spec/bundler/install/gemfile/groups_spec.rb @@ -192,19 +192,19 @@ RSpec.describe "bundle install with groups" do expect(the_bundle).not_to include_gems "thin 1.0" end - it "does remove groups from without when passed at --with", :bundler => "< 2" do + it "does remove groups from without when passed at --with", :bundler => "< 3" do bundle :install, forgotten_command_line_options(:without => "emo") bundle :install, forgotten_command_line_options(:with => "emo") expect(the_bundle).to include_gems "activesupport 2.3.5" end - it "does remove groups from with when passed at --without", :bundler => "< 2" do + it "does remove groups from with when passed at --without", :bundler => "< 3" do bundle :install, forgotten_command_line_options(:with => "debugging") bundle :install, forgotten_command_line_options(:without => "debugging") expect(the_bundle).not_to include_gem "thin 1.0" end - it "errors out when passing a group to with and without via CLI flags", :bundler => "< 2" do + it "errors out when passing a group to with and without via CLI flags", :bundler => "< 3" do bundle :install, forgotten_command_line_options(:with => "emo debugging", :without => "emo") expect(last_command).to be_failure expect(out).to include("The offending groups are: emo") diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb index f7789e7ea5..a508c971ad 100644 --- a/spec/bundler/install/gemfile/path_spec.rb +++ b/spec/bundler/install/gemfile/path_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true RSpec.describe "bundle install with explicit source paths" do - it "fetches gems with a global path source", :bundler => "< 2" do + it "fetches gems with a global path source", :bundler => "< 3" do build_lib "foo" install_gemfile <<-G diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb index bfdf9b68c8..b5dbc41a33 100644 --- a/spec/bundler/install/gemfile/platform_spec.rb +++ b/spec/bundler/install/gemfile/platform_spec.rb @@ -230,7 +230,7 @@ RSpec.describe "bundle install across platforms" do expect(the_bundle).to include_gems "nokogiri 1.4.2 JAVA", "weakling 0.0.3" end - it "works with gems that have extra platform-specific runtime dependencies", :bundler => "< 2" do + it "works with gems that have extra platform-specific runtime dependencies", :bundler => "< 3" do simulate_platform x64_mac update_repo2 do diff --git a/spec/bundler/install/gemfile/sources_spec.rb b/spec/bundler/install/gemfile/sources_spec.rb index c814d0de76..efe6ccce7f 100644 --- a/spec/bundler/install/gemfile/sources_spec.rb +++ b/spec/bundler/install/gemfile/sources_spec.rb @@ -28,7 +28,7 @@ RSpec.describe "bundle install with gems on multiple sources" do bundle "config major_deprecations true" end - it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first", :bundler => "< 2" do + it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first", :bundler => "< 3" do bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") @@ -58,7 +58,7 @@ RSpec.describe "bundle install with gems on multiple sources" do bundle "config major_deprecations true" end - it "warns about ambiguous gems, but installs anyway", :bundler => "< 2" do + it "warns about ambiguous gems, but installs anyway", :bundler => "< 3" do bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") @@ -248,7 +248,7 @@ RSpec.describe "bundle install with gems on multiple sources" do G end - it "installs from the other source and warns about ambiguous gems", :bundler => "< 2" do + it "installs from the other source and warns about ambiguous gems", :bundler => "< 3" do bundle "config major_deprecations true" bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") @@ -276,7 +276,7 @@ RSpec.describe "bundle install with gems on multiple sources" do G end - it "installs the dependency from the pinned source without warning", :bundler => "< 2" do + it "installs the dependency from the pinned source without warning", :bundler => "< 3" do bundle :install expect(out).not_to include("Warning: the gem 'rack' was found in multiple sources.") diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 02a37a77d5..2acade1166 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -269,7 +269,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(last_command.stdboth).not_to include "Double checking" end - it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -328,7 +328,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "rack 1.2" end - it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 2" do + it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 3" do # In this scenario, the gem "somegem" only exists in repo4. It depends on specific version of activesupport that # exists only in repo1. There happens also be a version of activesupport in repo4, but not the one that version 1.0.0 # of somegem wants. This test makes sure that bundler actually finds version 1.2.3 of active support in the other @@ -352,7 +352,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "activesupport 1.2.3" end - it "considers all possible versions of dependencies from all api gem sources when using blocks", :bundler => "< 2" do + it "considers all possible versions of dependencies from all api gem sources when using blocks", :bundler => "< 3" do # In this scenario, the gem "somegem" only exists in repo4. It depends on specific version of activesupport that # exists only in repo1. There happens also be a version of activesupport in repo4, but not the one that version 1.0.0 # of somegem wants. This test makes sure that bundler actually finds version 1.2.3 of active support in the other @@ -458,7 +458,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "foo 1.0" end - it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -522,7 +522,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(the_bundle).to include_gems "rails 2.3.2" end - it "installs the binstubs", :bundler => "< 2" do + it "installs the binstubs", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -534,7 +534,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(out).to eq("1.0.0") end - it "installs the bins when using --path and uses autoclean", :bundler => "< 2" do + it "installs the bins when using --path and uses autoclean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -545,7 +545,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(vendored_gems("bin/rackup")).to exist end - it "installs the bins when using --path and uses bundle clean", :bundler => "< 2" do + it "installs the bins when using --path and uses bundle clean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -620,7 +620,7 @@ The checksum of /versions does not match the checksum provided by the server! So expect(out).not_to include("#{user}:#{password}") end - it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 2" do + it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 3" do gemfile <<-G source "#{basic_auth_source_uri}" source "file://#{gem_repo1}" diff --git a/spec/bundler/install/gems/dependency_api_spec.rb b/spec/bundler/install/gems/dependency_api_spec.rb index 2ffe4b62d7..3cb98db1eb 100644 --- a/spec/bundler/install/gems/dependency_api_spec.rb +++ b/spec/bundler/install/gems/dependency_api_spec.rb @@ -243,7 +243,7 @@ RSpec.describe "gemcutter's dependency API" do end end - it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -302,7 +302,7 @@ RSpec.describe "gemcutter's dependency API" do expect(the_bundle).to include_gems "rack 1.2" end - it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 2" do + it "considers all possible versions of dependencies from all api gem sources", :bundler => "< 3" do # In this scenario, the gem "somegem" only exists in repo4. It depends on specific version of activesupport that # exists only in repo1. There happens also be a version of activesupport in repo4, but not the one that version 1.0.0 # of somegem wants. This test makes sure that bundler actually finds version 1.2.3 of active support in the other @@ -372,7 +372,7 @@ RSpec.describe "gemcutter's dependency API" do expect(out).to include("Fetching source index from http://localgemserver.test/extra") end - it "does not fetch every spec if the index of gems is large when doing back deps", :bundler => "< 2" do + it "does not fetch every spec if the index of gems is large when doing back deps", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -432,7 +432,7 @@ RSpec.describe "gemcutter's dependency API" do expect(the_bundle).to include_gems "foo 1.0" end - it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 2" do + it "fetches again when more dependencies are found in subsequent sources using --deployment", :bundler => "< 3" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -496,7 +496,7 @@ RSpec.describe "gemcutter's dependency API" do expect(the_bundle).to include_gems "rails 2.3.2" end - it "installs the binstubs", :bundler => "< 2" do + it "installs the binstubs", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -508,7 +508,7 @@ RSpec.describe "gemcutter's dependency API" do expect(out).to eq("1.0.0") end - it "installs the bins when using --path and uses autoclean", :bundler => "< 2" do + it "installs the bins when using --path and uses autoclean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -519,7 +519,7 @@ RSpec.describe "gemcutter's dependency API" do expect(vendored_gems("bin/rackup")).to exist end - it "installs the bins when using --path and uses bundle clean", :bundler => "< 2" do + it "installs the bins when using --path and uses bundle clean", :bundler => "< 3" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -594,7 +594,7 @@ RSpec.describe "gemcutter's dependency API" do expect(out).not_to include("#{user}:#{password}") end - it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 2" do + it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 3" do gemfile <<-G source "#{basic_auth_source_uri}" source "file://#{gem_repo1}" diff --git a/spec/bundler/install/gems/flex_spec.rb b/spec/bundler/install/gems/flex_spec.rb index 37d2e4958a..736f418ec7 100644 --- a/spec/bundler/install/gems/flex_spec.rb +++ b/spec/bundler/install/gems/flex_spec.rb @@ -244,7 +244,7 @@ RSpec.describe "bundle flex_install" do end describe "when adding a new source" do - it "updates the lockfile", :bundler => "< 2" do + it "updates the lockfile", :bundler => "< 3" do build_repo2 install_gemfile! <<-G source "file://localhost#{gem_repo1}" @@ -274,7 +274,7 @@ RSpec.describe "bundle flex_install" do L end - it "updates the lockfile", :bundler => "2" do + it "updates the lockfile", :bundler => "3" do build_repo2 install_gemfile! <<-G source "file://localhost#{gem_repo1}" diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb index 10ce589eef..fa7a3bdc27 100644 --- a/spec/bundler/install/gems/standalone_spec.rb +++ b/spec/bundler/install/gems/standalone_spec.rb @@ -197,7 +197,7 @@ RSpec.shared_examples "bundle install --standalone" do expect(last_command.stderr).to eq("ZOMG LOAD ERROR") end - it "allows --path to change the location of the standalone bundle", :bundler => "< 2" do + it "allows --path to change the location of the standalone bundle", :bundler => "< 3" do bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true) Dir.chdir(bundled_app) do @@ -213,7 +213,7 @@ RSpec.shared_examples "bundle install --standalone" do expect(last_command.stdout).to eq("2.3.2") end - it "allows --path to change the location of the standalone bundle", :bundler => "2" do + it "allows --path to change the location of the standalone bundle", :bundler => "3" do bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true) path = File.expand_path("path/to/bundle") @@ -273,7 +273,7 @@ RSpec.shared_examples "bundle install --standalone" do end end - describe "with --binstubs", :bundler => "< 2" do + describe "with --binstubs", :bundler => "< 3" do before do gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/bundler/install/git_spec.rb b/spec/bundler/install/git_spec.rb index 6ae718c2a4..48086a86c7 100644 --- a/spec/bundler/install/git_spec.rb +++ b/spec/bundler/install/git_spec.rb @@ -2,7 +2,7 @@ RSpec.describe "bundle install" do context "git sources" do - it "displays the revision hash of the gem repository", :bundler => "< 2" do + it "displays the revision hash of the gem repository", :bundler => "< 3" do build_git "foo", "1.0", :path => lib_path("foo") install_gemfile <<-G @@ -14,7 +14,7 @@ RSpec.describe "bundle install" do expect(the_bundle).to include_gems "foo 1.0", :source => "git@#{lib_path("foo")}" end - it "displays the ref of the gem repository when using branch~num as a ref", :bundler => "< 2" do + it "displays the ref of the gem repository when using branch~num as a ref", :bundler => "< 3" do build_git "foo", "1.0", :path => lib_path("foo") rev = revision_for(lib_path("foo"))[0..6] update_git "foo", "2.0", :path => lib_path("foo"), :gemspec => true diff --git a/spec/bundler/install/path_spec.rb b/spec/bundler/install/path_spec.rb index 44439c275e..94f38c9290 100644 --- a/spec/bundler/install/path_spec.rb +++ b/spec/bundler/install/path_spec.rb @@ -13,7 +13,7 @@ RSpec.describe "bundle install" do G end - it "does not use available system gems with bundle --path vendor/bundle", :bundler => "< 2" do + it "does not use available system gems with bundle --path vendor/bundle", :bundler => "< 3" do bundle! :install, forgotten_command_line_options(:path => "vendor/bundle") expect(the_bundle).to include_gems "rack 1.0.0" end @@ -35,13 +35,13 @@ RSpec.describe "bundle install" do expect(out).to include("gems are installed into `./vendor/bundle`") end - it "disallows --path vendor/bundle --system", :bundler => "< 2" do + it "disallows --path vendor/bundle --system", :bundler => "< 3" do bundle "install --path vendor/bundle --system" expect(out).to include("Please choose only one option.") expect(exitstatus).to eq(15) if exitstatus end - it "remembers to disable system gems after the first time with bundle --path vendor/bundle", :bundler => "< 2" do + it "remembers to disable system gems after the first time with bundle --path vendor/bundle", :bundler => "< 3" do bundle "install --path vendor/bundle" FileUtils.rm_rf bundled_app("vendor") bundle "install" @@ -53,7 +53,7 @@ RSpec.describe "bundle install" do context "with path_relative_to_cwd set to true" do before { bundle! "config path_relative_to_cwd true" } - it "installs the bundle relatively to current working directory", :bundler => "< 2" do + it "installs the bundle relatively to current working directory", :bundler => "< 3" do Dir.chdir(bundled_app.parent) do bundle! "install --gemfile='#{bundled_app}/Gemfile' --path vendor/bundle" expect(out).to include("installed into `./vendor/bundle`") @@ -113,7 +113,7 @@ RSpec.describe "bundle install" do expect(the_bundle).to include_gems "rack 1.0.0" end - context "with global_path_appends_ruby_scope set", :bundler => "2" do + context "with global_path_appends_ruby_scope set", :bundler => "3" do it "installs gems to ." do set_bundle_path(type, ".") bundle! "config --global disable_shared_gems true" @@ -147,7 +147,7 @@ RSpec.describe "bundle install" do end end - context "with global_path_appends_ruby_scope unset", :bundler => "< 2" do + context "with global_path_appends_ruby_scope unset", :bundler => "< 3" do it "installs gems to ." do set_bundle_path(type, ".") bundle! "config --global disable_shared_gems true" diff --git a/spec/bundler/install/post_bundle_message_spec.rb b/spec/bundler/install/post_bundle_message_spec.rb index eadc8a4d85..c41dc67458 100644 --- a/spec/bundler/install/post_bundle_message_spec.rb +++ b/spec/bundler/install/post_bundle_message_spec.rb @@ -101,7 +101,7 @@ RSpec.describe "post bundle message" do end describe "with misspelled or non-existent gem name" do - it "should report a helpful error message", :bundler => "< 2" do + it "should report a helpful error message", :bundler => "< 3" do install_gemfile <<-G source "file://localhost#{gem_repo1}" gem "rack" @@ -110,7 +110,7 @@ RSpec.describe "post bundle message" do expect(out).to include("Could not find gem 'not-a-gem' in any of the gem sources listed in your Gemfile.") end - it "should report a helpful error message", :bundler => "2" do + it "should report a helpful error message", :bundler => "3" do install_gemfile <<-G source "file://localhost#{gem_repo1}" gem "rack" diff --git a/spec/bundler/install/redownload_spec.rb b/spec/bundler/install/redownload_spec.rb index 665c64d49a..25d49999fc 100644 --- a/spec/bundler/install/redownload_spec.rb +++ b/spec/bundler/install/redownload_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle install", :bundler => "< 2", :ruby => ">= 2.0" do +RSpec.describe "bundle install", :bundler => "< 3", :ruby => ">= 2.0" do before :each do gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/bundler/lock/lockfile_bundler_1_spec.rb b/spec/bundler/lock/lockfile_bundler_1_spec.rb index fcdf6ebf0d..851fbea99a 100644 --- a/spec/bundler/lock/lockfile_bundler_1_spec.rb +++ b/spec/bundler/lock/lockfile_bundler_1_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "the lockfile format", :bundler => "< 2" do +RSpec.describe "the lockfile format", :bundler => "< 3" do include Bundler::GemHelpers before { ENV["BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD"] = "TRUE" } diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb index 53c832445f..9e2fb3b2dd 100644 --- a/spec/bundler/lock/lockfile_spec.rb +++ b/spec/bundler/lock/lockfile_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "the lockfile format", :bundler => "2" do +RSpec.describe "the lockfile format", :bundler => "3" do include Bundler::GemHelpers before { ENV["BUNDLER_SPEC_IGNORE_COMPATIBILITY_GUARD"] = "TRUE" } @@ -428,7 +428,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do expect(the_bundle).to include_gems "net-sftp 1.1.1", "net-ssh 1.0.0" end - it "generates a simple lockfile for a single pinned source, gem with a version requirement", :bundler => "< 2" do + it "generates a simple lockfile for a single pinned source, gem with a version requirement", :bundler => "< 3" do git = build_git "foo" install_gemfile <<-G diff --git a/spec/bundler/other/bundle_ruby_spec.rb b/spec/bundler/other/bundle_ruby_spec.rb index a7da9cbec9..88933b039e 100644 --- a/spec/bundler/other/bundle_ruby_spec.rb +++ b/spec/bundler/other/bundle_ruby_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle_ruby", :bundler => "< 2" do +RSpec.describe "bundle_ruby", :ruby_repo, :bundler => "< 3" do context "without patchlevel" do it "returns the ruby version" do gemfile <<-G diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb index fba177b497..a147d053e1 100644 --- a/spec/bundler/other/major_deprecation_spec.rb +++ b/spec/bundler/other/major_deprecation_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "major deprecations", :bundler => "< 2" do +RSpec.describe "major deprecations", :bundler => "< 3" do let(:warnings) { last_command.bundler_err } # change to err in 2.0 let(:warnings_without_version_messages) { warnings.gsub(/#{Spec::Matchers::MAJOR_DEPRECATION}Bundler will only support ruby(gems)? >= .*/, "") } diff --git a/spec/bundler/other/platform_spec.rb b/spec/bundler/other/platform_spec.rb index ca74945563..96527e1641 100644 --- a/spec/bundler/other/platform_spec.rb +++ b/spec/bundler/other/platform_spec.rb @@ -633,7 +633,7 @@ G end end - it "fails if ruby version doesn't match", :bundler => "< 2" do + it "fails if ruby version doesn't match", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" gem "rails" @@ -645,7 +645,7 @@ G should_be_ruby_version_incorrect end - it "fails if engine doesn't match", :bundler => "< 2" do + it "fails if engine doesn't match", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" gem "rails" @@ -657,7 +657,7 @@ G should_be_engine_incorrect end - it "fails if engine version doesn't match", :bundler => "< 2" do + it "fails if engine version doesn't match", :bundler => "< 3" do simulate_ruby_engine "jruby" do gemfile <<-G source "file://#{gem_repo1}" @@ -671,7 +671,7 @@ G end end - it "fails when patchlevel doesn't match", :bundler => "< 2" do + it "fails when patchlevel doesn't match", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" gem "rack" @@ -928,7 +928,7 @@ G end end - context "bundle console", :bundler => "< 2" do + context "bundle console", :bundler => "< 3" do before do install_gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/bundler/plugins/source/example_spec.rb b/spec/bundler/plugins/source/example_spec.rb index fd30892f63..d9a3cd2b92 100644 --- a/spec/bundler/plugins/source/example_spec.rb +++ b/spec/bundler/plugins/source/example_spec.rb @@ -67,7 +67,7 @@ RSpec.describe "real source plugins" do expect(the_bundle).to include_gems("a-path-gem 1.0") end - it "writes to lock file", :bundler => "< 2" do + it "writes to lock file", :bundler => "< 3" do bundle "install" lockfile_should_be <<-G @@ -92,7 +92,7 @@ RSpec.describe "real source plugins" do G end - it "writes to lock file", :bundler => "2" do + it "writes to lock file", :bundler => "3" do bundle "install" lockfile_should_be <<-G @@ -359,7 +359,7 @@ RSpec.describe "real source plugins" do expect(the_bundle).to include_gems("ma-gitp-gem 1.0") end - it "writes to lock file", :bundler => "< 2" do + it "writes to lock file", :bundler => "< 3" do revision = revision_for(lib_path("ma-gitp-gem-1.0")) bundle "install" @@ -386,7 +386,7 @@ RSpec.describe "real source plugins" do G end - it "writes to lock file", :bundler => "2" do + it "writes to lock file", :bundler => "3" do revision = revision_for(lib_path("ma-gitp-gem-1.0")) bundle "install" diff --git a/spec/bundler/runtime/executable_spec.rb b/spec/bundler/runtime/executable_spec.rb index dcee234e15..7ba510a509 100644 --- a/spec/bundler/runtime/executable_spec.rb +++ b/spec/bundler/runtime/executable_spec.rb @@ -99,7 +99,7 @@ RSpec.describe "Running bin/* commands" do expect(bundled_app("bin/rackup")).not_to exist end - it "allows you to stop installing binstubs", :bundler => "< 2" do + it "allows you to stop installing binstubs", :bundler => "< 3" do bundle! "install --binstubs bin/" bundled_app("bin/rackup").rmtree bundle! "install --binstubs \"\"" @@ -110,7 +110,7 @@ RSpec.describe "Running bin/* commands" do expect(out).to include("You have not configured a value for `bin`") end - it "remembers that the option was specified", :bundler => "< 2" do + it "remembers that the option was specified", :bundler => "< 3" do gemfile <<-G source "file://#{gem_repo1}" gem "activesupport" diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 646227d931..15dd1fe190 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -1395,7 +1395,7 @@ end end describe "after setup" do - it "allows calling #gem on random objects", :bundler => "< 2" do + it "allows calling #gem on random objects", :bundler => "< 3" do install_gemfile <<-G source "file:#{gem_repo1}" gem "rack" @@ -1410,7 +1410,7 @@ end expect(out).to eq("rack-1.0.0") end - it "keeps Kernel#gem private", :bundler => "2" do + it "keeps Kernel#gem private", :bundler => "3" do install_gemfile! <<-G source "file:#{gem_repo1}" gem "rack" diff --git a/spec/bundler/runtime/with_clean_env_spec.rb b/spec/bundler/runtime/with_clean_env_spec.rb index 321f5b6415..da8e37b45d 100644 --- a/spec/bundler/runtime/with_clean_env_spec.rb +++ b/spec/bundler/runtime/with_clean_env_spec.rb @@ -63,7 +63,7 @@ RSpec.describe "Bundler.with_env helpers" do end end - describe "Bundler.clean_env", :bundler => "< 2" do + describe "Bundler.clean_env", :bundler => "< 3" do before do bundle "config path vendor/bundle" gemfile "" @@ -116,7 +116,7 @@ RSpec.describe "Bundler.with_env helpers" do end end - describe "Bundler.with_clean_env", :bundler => "< 2" do + describe "Bundler.with_clean_env", :bundler => "< 3" do it "should set ENV to clean_env in the block" do expected = Bundler.clean_env actual = Bundler.with_clean_env { ENV.to_hash } @@ -132,14 +132,14 @@ RSpec.describe "Bundler.with_env helpers" do end end - describe "Bundler.clean_system", :ruby => ">= 1.9", :bundler => "< 2" do + describe "Bundler.clean_system", :ruby => ">= 1.9", :bundler => "< 3" do it "runs system inside with_clean_env" do Bundler.clean_system(%(echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh)) expect($?.exitstatus).to eq(42) end end - describe "Bundler.clean_exec", :ruby => ">= 1.9", :bundler => "< 2" do + describe "Bundler.clean_exec", :ruby => ">= 1.9", :bundler => "< 3" do it "runs exec inside with_clean_env" do pid = Kernel.fork do Bundler.clean_exec(%(echo 'if [ "$BUNDLE_PATH" = "" ]; then exit 42; else exit 1; fi' | /bin/sh)) diff --git a/spec/bundler/update/git_spec.rb b/spec/bundler/update/git_spec.rb index b4cbb79434..d97760e84b 100644 --- a/spec/bundler/update/git_spec.rb +++ b/spec/bundler/update/git_spec.rb @@ -299,7 +299,7 @@ RSpec.describe "bundle update" do G end - it "the --source flag updates version of gems that were originally pulled in by the source", :bundler => "< 2" do + it "the --source flag updates version of gems that were originally pulled in by the source", :bundler => "> 3" do spec_lines = lib_path("bar/foo.gemspec").read.split("\n") spec_lines[5] = "s.version = '2.0'" @@ -335,7 +335,7 @@ RSpec.describe "bundle update" do G end - it "the --source flag updates version of gems that were originally pulled in by the source", :bundler => "2" do + it "the --source flag updates version of gems that were originally pulled in by the source", :bundler => "3" do spec_lines = lib_path("bar/foo.gemspec").read.split("\n") spec_lines[5] = "s.version = '2.0'" diff --git a/spec/bundler/update/redownload_spec.rb b/spec/bundler/update/redownload_spec.rb index 018d3ed2e9..2138af510c 100644 --- a/spec/bundler/update/redownload_spec.rb +++ b/spec/bundler/update/redownload_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle update", :bundler => "< 2", :ruby => ">= 2.0" do +RSpec.describe "bundle update", :bundler => "< 3", :ruby => ">= 2.0" do before :each do install_gemfile <<-G source "file://#{gem_repo1}" -- cgit v1.2.1