summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-08-17 23:07:23 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-08-17 23:07:23 -0500
commit7e3bd288294e05eec7a53b6f86bf17fef9364125 (patch)
tree38830bf9ec38ac17f3698be141cc63142aac01c8
parent54ff7a4fb827ec36d5cac2fac843993f28b19077 (diff)
downloadbundler-seg-deprecations-99-versions.tar.gz
[SharedHelpers] Always print major deprecations on .99 versionsseg-deprecations-99-versions
-rw-r--r--lib/bundler/shared_helpers.rb3
-rw-r--r--spec/other/major_deprecation_spec.rb16
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"