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.rb | |
parent | 079dfa1812e0f23a74c86e271245504b069b4c17 (diff) | |
download | ruby-73440e1ef21e1dd7ca590e402d37b835b9b1f0bb.tar.gz |
[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.rb')
-rw-r--r-- | lib/bundler.rb | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index bc28b24e2e..f4f9891247 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -346,13 +346,13 @@ module Bundler # @deprecated Use `unbundled_env` instead def clean_env - Bundler::SharedHelpers.major_deprecation( - 2, + message = "`Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \ - "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`", - :print_caller_location => true - ) - + "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`" + removed_message = + "`Bundler.clean_env` has been removed in favor of `Bundler.unbundled_env`. " \ + "If you instead want the environment before bundler was originally loaded, use `Bundler.original_env`" + Bundler::SharedHelpers.major_deprecation(2, message, :removed_message => removed_message, :print_caller_location => true) unbundled_env end @@ -389,13 +389,13 @@ module Bundler # @deprecated Use `with_unbundled_env` instead def with_clean_env - Bundler::SharedHelpers.major_deprecation( - 2, + message = "`Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \ - "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`", - :print_caller_location => true - ) - + "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`" + removed_message = + "`Bundler.with_clean_env` has been removed in favor of `Bundler.with_unbundled_env`. " \ + "If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env`" + Bundler::SharedHelpers.major_deprecation(2, message, :removed_message => removed_message, :print_caller_location => true) with_env(unbundled_env) { yield } end @@ -411,13 +411,13 @@ module Bundler # @deprecated Use `unbundled_system` instead def clean_system(*args) - Bundler::SharedHelpers.major_deprecation( - 2, + message = "`Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. " \ - "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`", - :print_caller_location => true - ) - + "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`" + removed_message = + "`Bundler.clean_system` has been removed in favor of `Bundler.unbundled_system`. " \ + "If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system`" + Bundler::SharedHelpers.major_deprecation(2, message, :removed_message => removed_message, :print_caller_location => true) with_env(unbundled_env) { Kernel.system(*args) } end @@ -433,13 +433,13 @@ module Bundler # @deprecated Use `unbundled_exec` instead def clean_exec(*args) - Bundler::SharedHelpers.major_deprecation( - 2, + message = "`Bundler.clean_exec` has been deprecated in favor of `Bundler.unbundled_exec`. " \ - "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`", - :print_caller_location => true - ) - + "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`" + removed_message = + "`Bundler.clean_exec` has been removed in favor of `Bundler.unbundled_exec`. " \ + "If you instead want to exec to a command in the environment before bundler was originally loaded, use `Bundler.original_exec`" + Bundler::SharedHelpers.major_deprecation(2, message, :removed_message => removed_message, :print_caller_location => true) with_env(unbundled_env) { Kernel.exec(*args) } end |