diff options
author | Eric Mueller <nevinera@gmail.com> | 2023-11-29 22:40:10 -0500 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-12-01 17:52:38 +0000 |
commit | 73440e1ef21e1dd7ca590e402d37b835b9b1f0bb (patch) | |
tree | 7757e2c5e22bde407cb90fded3ca17465eddb176 /lib/bundler/cli | |
parent | 079dfa1812e0f23a74c86e271245504b069b4c17 (diff) |
[rubygems/rubygems] Many major_deprecations supply :removed_message
Generally the removed message is very similar, but often it needs to
specify that the feature has "been removed" instead of "will be
removed", or "been deprecated". And a few chunks of text needed more
substantial updates. And a number of them seemed to have been carefully
crafted to make sense in either context, so I left those alone.
https://github.com/rubygems/rubygems/commit/8d42cf9104
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r-- | lib/bundler/cli/config.rb | 5 | ||||
-rw-r--r-- | lib/bundler/cli/console.rb | 5 | ||||
-rw-r--r-- | lib/bundler/cli/gem.rb | 11 | ||||
-rw-r--r-- | lib/bundler/cli/install.rb | 3 |
4 files changed, 16 insertions, 8 deletions
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb index e1222c75dd..30b22cf2d5 100644 --- a/lib/bundler/cli/config.rb +++ b/lib/bundler/cli/config.rb @@ -25,8 +25,9 @@ module Bundler ["config", "get", ARGV[1]] end - 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." + message = "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." + removed_message = "Using the `config` command without a subcommand [list, get, set, unset] is has been removed. Use `bundle #{new_args.join(" ")}` instead." + SharedHelpers.major_deprecation 3, message, :removed_message => removed_message Base.new(options, name, value, self).run end diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb index 1eb8ea8254..a3891723f9 100644 --- a/lib/bundler/cli/console.rb +++ b/lib/bundler/cli/console.rb @@ -9,8 +9,9 @@ module Bundler end def run - Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \ - "by `bin/console` generated by `bundle gem <name>`" + message = "bundle console will be replaced by `bin/console` generated by `bundle gem <name>`" + removed_message = "bundle console has been replaced by `bin/console` generated by `bundle gem <name>`" + Bundler::SharedHelpers.major_deprecation 2, message, :removed_message => removed_message group ? Bundler.require(:default, *group.split(" ").map!(&:to_sym)) : Bundler.require ARGV.clear diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index fb064ed702..aef45d19e1 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -380,15 +380,20 @@ module Bundler def deprecated_rubocop_option if !options[:rubocop].nil? if options[:rubocop] - Bundler::SharedHelpers.major_deprecation 2, "--rubocop is deprecated, use --linter=rubocop" + Bundler::SharedHelpers.major_deprecation 2, + "--rubocop is deprecated, use --linter=rubocop", + :removed_message => "--rubocop has been removed, use --linter=rubocop" "rubocop" else - Bundler::SharedHelpers.major_deprecation 2, "--no-rubocop is deprecated, use --linter" + Bundler::SharedHelpers.major_deprecation 2, + "--no-rubocop is deprecated, use --linter", + :removed_message => "--no-rubocop has been removed, use --linter" false end elsif !Bundler.settings["gem.rubocop"].nil? Bundler::SharedHelpers.major_deprecation 2, - "config gem.rubocop is deprecated; we've updated your config to use gem.linter instead" + "config gem.rubocop is deprecated; we've updated your config to use gem.linter instead", + :removed_message => "config gem.rubocop has been removed; we've updated your config to use gem.linter instead" Bundler.settings["gem.rubocop"] ? "rubocop" : false end end diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index f7228db623..c7d287e45f 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -51,7 +51,8 @@ module Bundler if options["binstubs"] Bundler::SharedHelpers.major_deprecation 2, - "The --binstubs option will be removed in favor of `bundle binstubs --all`" + "The --binstubs option will be removed in favor of `bundle binstubs --all`", + :removed_message => "The --binstubs option have been removed in favor of `bundle binstubs --all`" end Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins? |