From a30cd4b6f4c92372b9c8581eec6e38fb5c610c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 26 Feb 2019 22:24:46 +0100 Subject: Delay `bundle console` removal to bundler 3 --- lib/bundler/feature_flag.rb | 2 +- spec/other/major_deprecation_spec.rb | 6 +++++- 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 `") end -- cgit v1.2.1