Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Delay deprecation of bundle config and bundle update without args
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Dec 13, 2019
1 parent 6394536 commit 5dc6b59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/cli/config.rb
Expand Up @@ -25,7 +25,7 @@ def base(name = nil, *value)
["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
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/feature_flag.rb
Expand Up @@ -46,7 +46,7 @@ def self.settings_method(name, key, &default)
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 }
Expand Down
18 changes: 9 additions & 9 deletions spec/other/major_deprecation_spec.rb
Expand Up @@ -127,7 +127,7 @@
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

Expand All @@ -139,7 +139,7 @@
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

Expand All @@ -151,7 +151,7 @@
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

Expand All @@ -163,7 +163,7 @@
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

Expand All @@ -175,7 +175,7 @@
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

Expand All @@ -187,7 +187,7 @@
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

Expand All @@ -199,7 +199,7 @@
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

Expand All @@ -211,7 +211,7 @@
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

Expand All @@ -227,7 +227,7 @@
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
Expand Down

0 comments on commit 5dc6b59

Please sign in to comment.