From 73440e1ef21e1dd7ca590e402d37b835b9b1f0bb Mon Sep 17 00:00:00 2001 From: Eric Mueller Date: Wed, 29 Nov 2023 22:40:10 -0500 Subject: [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 --- lib/bundler.rb | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'lib/bundler.rb') 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 -- cgit v1.2.3