summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-10 10:21:07 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-13 12:44:00 +0100
commit89f12a9fc0f3b872c319c3138da424d89cc70026 (patch)
treef849da2859ff1300fd6a16ffc878b8507f153c9e
parent6394536271a0326efd4ed3544b78e528da7e90b1 (diff)
downloadbundler-undeprecate_argless_config_and_update.tar.gz
Delay deprecation of `bundle config` and `bundle update` without argsundeprecate_argless_config_and_update
-rw-r--r--lib/bundler/cli/config.rb2
-rw-r--r--lib/bundler/cli/update.rb2
-rw-r--r--lib/bundler/feature_flag.rb2
-rw-r--r--spec/other/major_deprecation_spec.rb18
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb
index 78e035aa02..8d2aba0916 100644
--- a/lib/bundler/cli/config.rb
+++ b/lib/bundler/cli/config.rb
@@ -25,7 +25,7 @@ module Bundler
["config", "get", ARGV[1]]
end
- SharedHelpers.major_deprecation 2,
+ SharedHelpers.major_deprecation 3,
"Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle #{new_args.join(" ")}` instead."
Base.new(options, name, value, self).run
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index afd386bd54..529dd9c94d 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -22,7 +22,7 @@ module Bundler
if Bundler.feature_flag.update_requires_all_flag?
raise InvalidOption, "To update everything, pass the `--all` flag."
end
- SharedHelpers.major_deprecation 2, "Pass --all to `bundle update` to update everything"
+ SharedHelpers.major_deprecation 3, "Pass --all to `bundle update` to update everything"
elsif !full_update && options[:all]
raise InvalidOption, "Cannot specify --all along with specific options."
end
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index 5e1932e626..01739ec4aa 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -46,7 +46,7 @@ module Bundler
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(:update_requires_all_flag) { bundler_4_mode? }
settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_3_mode? }
settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index f743bccb92..df2fdd263a 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -127,7 +127,7 @@ RSpec.describe "major deprecations" do
bundle! "config"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config list` instead.")
end
@@ -139,7 +139,7 @@ RSpec.describe "major deprecations" do
bundle! "config waka"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config get waka` instead.")
end
@@ -151,7 +151,7 @@ RSpec.describe "major deprecations" do
bundle! "config waka wakapun"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config set waka wakapun` instead.")
end
@@ -163,7 +163,7 @@ RSpec.describe "major deprecations" do
bundle! "config --local waka wakapun"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config set --local waka wakapun` instead.")
end
@@ -175,7 +175,7 @@ RSpec.describe "major deprecations" do
bundle! "config --global waka wakapun"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config set --global waka wakapun` instead.")
end
@@ -187,7 +187,7 @@ RSpec.describe "major deprecations" do
bundle! "config --delete waka"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config unset waka` instead.")
end
@@ -199,7 +199,7 @@ RSpec.describe "major deprecations" do
bundle! "config --delete --local waka"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config unset --local waka` instead.")
end
@@ -211,7 +211,7 @@ RSpec.describe "major deprecations" do
bundle! "config --delete --global waka"
end
- it "warns", :bundler => "2" do
+ it "warns", :bundler => "3" do
expect(deprecations).to include("Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle config unset --global waka` instead.")
end
@@ -227,7 +227,7 @@ RSpec.describe "major deprecations" do
G
end
- it "warns when no options are given", :bundler => "2" do
+ it "warns when no options are given", :bundler => "3" do
bundle! "update"
expect(deprecations).to include("Pass --all to `bundle update` to update everything")
end