summaryrefslogtreecommitdiff
path: root/lib/bundler/ui.rb
diff options
context:
space:
mode:
authorJamie Macey <jamie.git@tracefunc.com>2010-06-09 11:34:52 +0800
committerAndre Arko <website+github.com@arko.net>2010-06-10 03:54:14 +0800
commit693530f2e67d5c728ae5034e864ffb26131ad342 (patch)
treeacab9be2b148cee4b78d877b8c8f8b5f8cdf263c /lib/bundler/ui.rb
parent105654a31e07e9b0a198f1a5a5ec94e365854edf (diff)
downloadbundler-693530f2e67d5c728ae5034e864ffb26131ad342.tar.gz
fixes #224 add --quiet flag for install
Diffstat (limited to 'lib/bundler/ui.rb')
-rw-r--r--lib/bundler/ui.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/bundler/ui.rb b/lib/bundler/ui.rb
index 7742b9b353..df2199d7f5 100644
--- a/lib/bundler/ui.rb
+++ b/lib/bundler/ui.rb
@@ -15,18 +15,19 @@ module Bundler
class Shell < UI
def initialize(shell)
@shell = shell
+ @quiet = false
end
def debug(msg)
- @shell.say(msg) if ENV['DEBUG']
+ @shell.say(msg) if ENV['DEBUG'] && !@quiet
end
def info(msg)
- @shell.say(msg)
+ @shell.say(msg) if !@quiet
end
def confirm(msg)
- @shell.say(msg, :green)
+ @shell.say(msg, :green) if !@quiet
end
def warn(msg)
@@ -36,6 +37,10 @@ module Bundler
def error(msg)
@shell.say(msg, :red)
end
+
+ def be_quiet!
+ @quiet = true
+ end
end
class RGProxy < Gem::SilentUI
@@ -52,4 +57,4 @@ module Bundler
end
end
end
-end \ No newline at end of file
+end