From 2610e6c7fc68a7f7ae48f99fea4c082838944665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 14 Feb 2019 14:31:12 +0100 Subject: Change some specs checking the wrong stream --- spec/runtime/with_unbundled_env_spec.rb | 8 ++++---- spec/update/redownload_spec.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb index 5ddcc24ed4..6de23494f3 100644 --- a/spec/runtime/with_unbundled_env_spec.rb +++ b/spec/runtime/with_unbundled_env_spec.rb @@ -106,7 +106,7 @@ RSpec.describe "Bundler.with_env helpers" do it "prints a deprecation", :bundler => 2 do code = "Bundler.clean_env" bundle_exec_ruby! code.dump - expect(last_command.stdboth).to include( + expect(err).to include( "[DEPRECATED FOR 2.0] `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`" ) @@ -115,7 +115,7 @@ RSpec.describe "Bundler.with_env helpers" do it "does not print a deprecation", :bundler => "< 2" do code = "Bundler.clean_env" bundle_exec_ruby! code.dump - expect(last_command.stdboth).not_to include( + expect(out).not_to include( "[DEPRECATED FOR 2.0] `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`" ) @@ -156,7 +156,7 @@ RSpec.describe "Bundler.with_env helpers" do it "prints a deprecation", :bundler => 2 do code = "Bundler.with_clean_env {}" bundle_exec_ruby! code.dump - expect(last_command.stdboth).to include( + expect(err).to include( "[DEPRECATED FOR 2.0] `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`" ) @@ -165,7 +165,7 @@ RSpec.describe "Bundler.with_env helpers" do it "does not print a deprecation", :bundler => "< 2" do code = "Bundler.with_clean_env {}" bundle_exec_ruby! code.dump - expect(last_command.stdboth).not_to include( + expect(out).not_to include( "[DEPRECATED FOR 2.0] `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`" ) diff --git a/spec/update/redownload_spec.rb b/spec/update/redownload_spec.rb index 2653d5d1a3..2c0ed3ad38 100644 --- a/spec/update/redownload_spec.rb +++ b/spec/update/redownload_spec.rb @@ -33,12 +33,12 @@ RSpec.describe "bundle update" do describe "with --redownload" do it "does not show a deprecation when single flag passed" do bundle! "update rack --redownload" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when single multiple flags passed" do bundle! "update rack --no-color --redownload" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" end end end -- cgit v1.2.1 From 149f1ce04bde47d72a62569143be0484cf4bdbba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 14 Feb 2019 14:32:02 +0100 Subject: Reword deprecation messages Including the version is confusing, in my opinion, because it's unclear whether it refers to the future version of removal, or to the current running version. --- lib/bundler/shared_helpers.rb | 4 ++-- spec/commands/show_spec.rb | 8 ++++---- spec/install/redownload_spec.rb | 12 ++++++------ spec/runtime/with_unbundled_env_spec.rb | 8 ++++---- spec/support/matchers.rb | 2 +- spec/update/redownload_spec.rb | 12 ++++++------ 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 02b3801c44..e28f9e6f39 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -144,13 +144,13 @@ module Bundler bundler_major_version = Bundler.bundler_major_version if bundler_major_version > major_version require "bundler/errors" - raise DeprecatedError, "[REMOVED FROM #{major_version.succ}.0] #{message}" + raise DeprecatedError, "[REMOVED] #{message}" end return unless bundler_major_version >= major_version || prints_major_deprecations? @major_deprecation_ui ||= Bundler::UI::Shell.new("no-color" => true) ui = Bundler.ui.is_a?(@major_deprecation_ui.class) ? Bundler.ui : @major_deprecation_ui - ui.warn("[DEPRECATED FOR #{major_version}.0] #{message}") + ui.warn("[DEPRECATED] #{message}") end def print_major_deprecations! diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb index 08b106d0a0..6692fb0cfb 100644 --- a/spec/commands/show_spec.rb +++ b/spec/commands/show_spec.rb @@ -32,7 +32,7 @@ RSpec.describe "bundle show" do it "prints deprecation", :bundler => "2" do bundle "show rails" - expect(err).to eq("[DEPRECATED FOR 2.0] use `bundle info rails` instead of `bundle show rails`") + expect(err).to eq("[DEPRECATED] use `bundle info rails` instead of `bundle show rails`") end it "prints path if gem exists in bundle (with --paths option)" do @@ -42,7 +42,7 @@ RSpec.describe "bundle show" do it "prints deprecation when called with a gem and the --paths option", :bundler => "2" do bundle "show rails --paths" - expect(err).to eq("[DEPRECATED FOR 2.0] use `bundle info rails --path` instead of `bundle show rails --paths`") + expect(err).to eq("[DEPRECATED] use `bundle info rails --path` instead of `bundle show rails --paths`") end it "warns if path no longer exists on disk" do @@ -61,7 +61,7 @@ RSpec.describe "bundle show" do it "prints deprecation when called with bundler", :bundler => "2" do bundle "show bundler" - expect(err).to eq("[DEPRECATED FOR 2.0] use `bundle info bundler` instead of `bundle show bundler`") + expect(err).to eq("[DEPRECATED] use `bundle info bundler` instead of `bundle show bundler`") end it "complains if gem not in bundle" do bundle "show missing" @@ -82,7 +82,7 @@ RSpec.describe "bundle show" do it "prints a deprecation when called with the --paths option", :bundler => 2 do bundle "show --paths" - expect(err).to eq("[DEPRECATED FOR 2.0] use `bundle list` instead of `bundle show --paths`") + expect(err).to eq("[DEPRECATED] use `bundle list` instead of `bundle show --paths`") end it "prints summary of gems" do diff --git a/spec/install/redownload_spec.rb b/spec/install/redownload_spec.rb index 141a2e80d5..de726c4562 100644 --- a/spec/install/redownload_spec.rb +++ b/spec/install/redownload_spec.rb @@ -63,22 +63,22 @@ RSpec.describe "bundle install" do it "shows a deprecation when single flag passed", :bundler => 2 do bundle! "install --force" - expect(err).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "shows a deprecation when multiple flags passed", :bundler => 2 do bundle! "install --no-color --force" - expect(err).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when single flag passed", :bundler => "< 2" do bundle! "install --force" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(out).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when multiple flags passed", :bundler => "< 2" do bundle! "install --no-color --force" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(out).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end end @@ -89,12 +89,12 @@ RSpec.describe "bundle install" do it "does not show a deprecation when single flag passed" do bundle! "install --redownload" - expect(err).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when single multiple flags passed" do bundle! "install --no-color --redownload" - expect(err).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end end end diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb index 6de23494f3..605bed8254 100644 --- a/spec/runtime/with_unbundled_env_spec.rb +++ b/spec/runtime/with_unbundled_env_spec.rb @@ -107,7 +107,7 @@ RSpec.describe "Bundler.with_env helpers" do code = "Bundler.clean_env" bundle_exec_ruby! code.dump expect(err).to include( - "[DEPRECATED FOR 2.0] `Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \ + "[DEPRECATED] `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`" ) end @@ -116,7 +116,7 @@ RSpec.describe "Bundler.with_env helpers" do code = "Bundler.clean_env" bundle_exec_ruby! code.dump expect(out).not_to include( - "[DEPRECATED FOR 2.0] `Bundler.clean_env` has been deprecated in favor of `Bundler.unbundled_env`. " \ + "[DEPRECATED] `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`" ) end @@ -157,7 +157,7 @@ RSpec.describe "Bundler.with_env helpers" do code = "Bundler.with_clean_env {}" bundle_exec_ruby! code.dump expect(err).to include( - "[DEPRECATED FOR 2.0] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \ + "[DEPRECATED] `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`" ) end @@ -166,7 +166,7 @@ RSpec.describe "Bundler.with_env helpers" do code = "Bundler.with_clean_env {}" bundle_exec_ruby! code.dump expect(out).not_to include( - "[DEPRECATED FOR 2.0] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. " \ + "[DEPRECATED] `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`" ) end diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 18ccf38fb1..c39f2881a6 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -60,7 +60,7 @@ module Spec end end - MAJOR_DEPRECATION = /^\[DEPRECATED FOR 2\.0\]\s*/ + MAJOR_DEPRECATION = /^\[DEPRECATED\]\s*/ RSpec::Matchers.define :eq_err do |expected| diffable diff --git a/spec/update/redownload_spec.rb b/spec/update/redownload_spec.rb index 2c0ed3ad38..b70c009248 100644 --- a/spec/update/redownload_spec.rb +++ b/spec/update/redownload_spec.rb @@ -11,34 +11,34 @@ RSpec.describe "bundle update" do describe "with --force" do it "shows a deprecation when single flag passed", :bundler => 2 do bundle! "update rack --force" - expect(err).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "shows a deprecation when multiple flags passed", :bundler => 2 do bundle! "update rack --no-color --force" - expect(err).to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when single flag passed", :bundler => "< 2" do bundle! "update rack --force" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(out).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when multiple flags passed", :bundler => "< 2" do bundle! "update rack --no-color --force" - expect(out).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(out).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end end describe "with --redownload" do it "does not show a deprecation when single flag passed" do bundle! "update rack --redownload" - expect(err).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end it "does not show a deprecation when single multiple flags passed" do bundle! "update rack --no-color --redownload" - expect(err).not_to include "[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`" + expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`" end end end -- cgit v1.2.1 From f626de26bdd4decd66a09a2cd6146e87caf640a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 23 Jan 2019 23:03:53 -0300 Subject: Remove deprecation releases --- lib/bundler/shared_helpers.rb | 3 +-- spec/other/major_deprecation_spec.rb | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index e28f9e6f39..e0cb61e03f 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -374,8 +374,7 @@ module Bundler def prints_major_deprecations? require "bundler" - deprecation_release = Bundler::VERSION.split(".").drop(1).include?("99") - return false if !deprecation_release && !Bundler.settings[:major_deprecations] + return false unless Bundler.settings[:major_deprecations] require "bundler/deprecate" return false if Bundler::Deprecate.skip true diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 800c7b4b88..2e199c0e79 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -4,22 +4,6 @@ RSpec.describe "major deprecations", :bundler => "< 2" do let(:warnings) { last_command.bundler_err } # change to err in 2.0 let(:warnings_without_version_messages) { warnings.gsub(/#{Spec::Matchers::MAJOR_DEPRECATION}Bundler will only support ruby(gems)? >= .*/, "") } - context "in a .99 version" do - before do - simulate_bundler_version "1.99.1" - bundle "config unset major_deprecations" - end - - it "prints major deprecations without being configured" do - ruby <<-R - require "bundler" - Bundler::SharedHelpers.major_deprecation(Bundler::VERSION) - R - - expect(warnings).to have_major_deprecation("1.99.1") - end - end - before do bundle "config set major_deprecations true" -- cgit v1.2.1 From a6f593fe4d32ab2dde6ffd24a623dd8d1b783b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 24 Jan 2019 18:26:55 -0300 Subject: Turn on deprecations by default --- lib/bundler/feature_flag.rb | 1 + lib/bundler/shared_helpers.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index 0adbd9190f..5507c38ec3 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -44,6 +44,7 @@ module Bundler settings_flag(:init_gems_rb) { bundler_2_mode? } settings_flag(:list_command) { bundler_2_mode? } settings_flag(:lockfile_uses_separate_rubygems_sources) { bundler_2_mode? } + settings_flag(:major_deprecations) { bundler_2_mode? } settings_flag(:only_update_to_newer_versions) { bundler_2_mode? } settings_flag(:path_relative_to_cwd) { bundler_2_mode? } settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") } diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index e0cb61e03f..c5c11c723d 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -374,7 +374,7 @@ module Bundler def prints_major_deprecations? require "bundler" - return false unless Bundler.settings[:major_deprecations] + return false unless Bundler.feature_flag.major_deprecations? require "bundler/deprecate" return false if Bundler::Deprecate.skip true -- cgit v1.2.1 From 76c411d455cbca8cf6cd3dddf1488dd0310f0bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 19 Feb 2019 10:09:43 +0100 Subject: Remove major_deprecations feature flag Leave it as a setting with default true value. --- lib/bundler/feature_flag.rb | 1 - lib/bundler/settings.rb | 1 + lib/bundler/shared_helpers.rb | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index 5507c38ec3..0adbd9190f 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -44,7 +44,6 @@ module Bundler settings_flag(:init_gems_rb) { bundler_2_mode? } settings_flag(:list_command) { bundler_2_mode? } settings_flag(:lockfile_uses_separate_rubygems_sources) { bundler_2_mode? } - settings_flag(:major_deprecations) { bundler_2_mode? } settings_flag(:only_update_to_newer_versions) { bundler_2_mode? } settings_flag(:path_relative_to_cwd) { bundler_2_mode? } settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") } diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 79690d31aa..15c3ba1881 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -76,6 +76,7 @@ module Bundler ].freeze DEFAULT_CONFIG = { + :major_deprecations => true, :disable_version_check => true, :prefer_patch => false, :redirect => 5, diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index c5c11c723d..e0cb61e03f 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -374,7 +374,7 @@ module Bundler def prints_major_deprecations? require "bundler" - return false unless Bundler.feature_flag.major_deprecations? + return false unless Bundler.settings[:major_deprecations] require "bundler/deprecate" return false if Bundler::Deprecate.skip true -- cgit v1.2.1 From 82d41768b73db8b4a994bc465a12fe2440efa434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 21 Feb 2019 10:51:51 +0100 Subject: Fix deprecations bug Deprecations enabled or not, we only want to print deprecations for the running major version, never for future versions. --- lib/bundler/shared_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index e0cb61e03f..ba2808e034 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -147,7 +147,7 @@ module Bundler raise DeprecatedError, "[REMOVED] #{message}" end - return unless bundler_major_version >= major_version || prints_major_deprecations? + return unless bundler_major_version >= major_version && prints_major_deprecations? @major_deprecation_ui ||= Bundler::UI::Shell.new("no-color" => true) ui = Bundler.ui.is_a?(@major_deprecation_ui.class) ? Bundler.ui : @major_deprecation_ui ui.warn("[DEPRECATED] #{message}") -- cgit v1.2.1 From 85f194d805a13f1e920ebc6e0e372345b5890be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 21 Feb 2019 13:39:49 +0100 Subject: Remove now redundant configs Since deprecations are enabled by default. --- spec/install/gemfile/sources_spec.rb | 3 --- spec/other/major_deprecation_spec.rb | 2 -- 2 files changed, 5 deletions(-) diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index 0af77cf862..c8f46e48c8 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -25,7 +25,6 @@ RSpec.describe "bundle install with gems on multiple sources" do gem "rack-obama" gem "rack" G - bundle "config set major_deprecations true" end it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first", :bundler => "< 2" do @@ -55,7 +54,6 @@ RSpec.describe "bundle install with gems on multiple sources" do gem "rack-obama" gem "rack", "1.0.0" # force it to install the working version in repo1 G - bundle "config set major_deprecations true" end it "warns about ambiguous gems, but installs anyway", :bundler => "< 2" do @@ -249,7 +247,6 @@ RSpec.describe "bundle install with gems on multiple sources" do end it "installs from the other source and warns about ambiguous gems", :bundler => "< 2" do - bundle "config set major_deprecations true" bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 2e199c0e79..6e278dc45d 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -5,8 +5,6 @@ RSpec.describe "major deprecations", :bundler => "< 2" do let(:warnings_without_version_messages) { warnings.gsub(/#{Spec::Matchers::MAJOR_DEPRECATION}Bundler will only support ruby(gems)? >= .*/, "") } before do - bundle "config set major_deprecations true" - create_file "gems.rb", <<-G source "file:#{gem_repo1}" ruby #{RUBY_VERSION.dump} -- cgit v1.2.1 From fda9db6b3cd5af72f4d11927116ca5f027c16eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 21 Feb 2019 13:42:30 +0100 Subject: Rename major_deprecations to silence_deprecations --- lib/bundler/settings.rb | 4 ++-- lib/bundler/shared_helpers.rb | 2 +- man/bundle-config.ronn | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 15c3ba1881..ff9a5f57af 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -41,7 +41,6 @@ module Bundler init_gems_rb list_command lockfile_uses_separate_rubygems_sources - major_deprecations no_install no_prune only_update_to_newer_versions @@ -52,6 +51,7 @@ module Bundler prefer_patch print_only_version_number setup_makes_kernel_gem_public + silence_deprecations silence_root_warning skip_default_git_sources specific_platform @@ -76,7 +76,7 @@ module Bundler ].freeze DEFAULT_CONFIG = { - :major_deprecations => true, + :silence_deprecations => false, :disable_version_check => true, :prefer_patch => false, :redirect => 5, diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index ba2808e034..ed88caf8cf 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -374,7 +374,7 @@ module Bundler def prints_major_deprecations? require "bundler" - return false unless Bundler.settings[:major_deprecations] + return false if Bundler.settings[:silence_deprecations] require "bundler/deprecate" return false if Bundler::Deprecate.skip true diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn index 64f0fea743..0b61cbeca0 100644 --- a/man/bundle-config.ronn +++ b/man/bundle-config.ronn @@ -210,9 +210,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html). The number of gems Bundler can install in parallel. Defaults to 1. * `list_command` (`BUNDLE_LIST_COMMAND`) Enable new list command feature -* `major_deprecations` (`BUNDLE_MAJOR_DEPRECATIONS`): - Whether Bundler should print deprecation warnings for behavior that will - be changed in the next major version. * `no_install` (`BUNDLE_NO_INSTALL`): Whether `bundle package` should skip installing gems. * `no_prune` (`BUNDLE_NO_PRUNE`): @@ -247,6 +244,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html). * `shebang` (`BUNDLE_SHEBANG`): The program name that should be invoked for generated binstubs. Defaults to the ruby install name used to generate the binstub. +* `silence_deprecations` (`BUNDLE_SILENCE_DEPRECATIONS`): + Whether Bundler should silence deprecation warnings for behavior that will + be changed in the next major version. * `silence_root_warning` (`BUNDLE_SILENCE_ROOT_WARNING`): Silence the warning Bundler prints when installing gems as root. * `skip_default_git_sources` (`BUNDLE_SKIP_DEFAULT_GIT_SOURCES`): -- cgit v1.2.1