summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-26 22:24:46 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-28 16:41:21 +0100
commita30cd4b6f4c92372b9c8581eec6e38fb5c610c59 (patch)
treef0299ea8b1ffbc1f8b335d8ddff2abc099c2fb1c
parent4fbf085ea2748436755751e59240f3ab042cfcd7 (diff)
downloadbundler-a30cd4b6f4c92372b9c8581eec6e38fb5c610c59.tar.gz
Delay `bundle console` removal to bundler 3
-rw-r--r--lib/bundler/feature_flag.rb2
-rw-r--r--spec/other/major_deprecation_spec.rb6
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index 4dd104e3b2..e98ed8dabf 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -33,7 +33,7 @@ module Bundler
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(:console_command) { !bundler_3_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? }
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 9f222e6046..03f86eff7b 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -228,7 +228,11 @@ The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add
bundle "console"
end
- it "prints a deprecation warning" do
+ it "does not print a deprecation warning", :bundler => "< 2" do
+ expect(warnings).not_to have_major_deprecation
+ end
+
+ it "prints a deprecation warning", :bundler => "2" do
expect(warnings).to have_major_deprecation \
a_string_including("bundle console will be replaced by `bin/console` generated by `bundle gem <name>`")
end