diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-08-17 23:07:23 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-17 23:07:23 -0500 |
commit | 7e3bd288294e05eec7a53b6f86bf17fef9364125 (patch) | |
tree | 38830bf9ec38ac17f3698be141cc63142aac01c8 | |
parent | 54ff7a4fb827ec36d5cac2fac843993f28b19077 (diff) | |
download | bundler-7e3bd288294e05eec7a53b6f86bf17fef9364125.tar.gz |
[SharedHelpers] Always print major deprecations on .99 versionsseg-deprecations-99-versions
-rw-r--r-- | lib/bundler/shared_helpers.rb | 3 | ||||
-rw-r--r-- | spec/other/major_deprecation_spec.rb | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 69543356a2..ca4eafd623 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -224,7 +224,8 @@ module Bundler def prints_major_deprecations? require "bundler" - return false unless Bundler.settings[:major_deprecations] + deprecation_release = Bundler::VERSION.split(".").drop(1).include?("99") + return false if !deprecation_release && !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 c8a2633279..6505023d13 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -4,6 +4,22 @@ require "spec_helper" describe "major deprecations" do let(:warnings) { out } # change to err in 2.0 + context "in a .99 version" do + before do + simulate_bundler_version "1.99.1" + bundle "config --delete 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 major_deprecations true" |