aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-06-21 13:10:32 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-06-23 18:41:36 -0500
commit6ea13f5f956c474e48af1acdc65d571d9d55c592 (patch)
treebb7e920a04e2f6b677e7734c7ae2b87f573535ee /lib
parent521a81708044b4dda51a98db8d5fb817715dbff1 (diff)
downloadbundler-6ea13f5f956c474e48af1acdc65d571d9d55c592.tar.gz
[UI] Add support for printing major deprecations
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/settings.rb1
-rw-r--r--lib/bundler/ui/shell.rb5
-rw-r--r--lib/bundler/ui/silent.rb3
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 0a2c2361..46333c89 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -11,6 +11,7 @@ module Bundler
gem.coc
gem.mit
ignore_messages
+ major_deprecations
no_install
no_prune
plugins
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index 1317b183..4422b930 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -79,6 +79,11 @@ module Bundler
tell_me(msg, nil, newline)
end
+ def major_deprecation(message)
+ return unless Bundler.settings[:major_deprecations]
+ warn(message)
+ end
+
def silence
old_level = @level
@level = "silent"
diff --git a/lib/bundler/ui/silent.rb b/lib/bundler/ui/silent.rb
index af512ece..02978fc6 100644
--- a/lib/bundler/ui/silent.rb
+++ b/lib/bundler/ui/silent.rb
@@ -40,6 +40,9 @@ module Bundler
def trace(message, newline = nil)
end
+ def major_deprecation(message)
+ end
+
def silence
yield
end