summaryrefslogtreecommitdiff
path: root/lib/chef/formatters/doc.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-01 15:47:30 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-09 09:16:06 -0800
commitaa74c0ac58393e9186c2ebecbc3144c2c8d2ee85 (patch)
tree13a59b98b8c643e9bfe3b0a0958ddc396d609f46 /lib/chef/formatters/doc.rb
parent99ea57ca5bdd46902855a7cd80b86d24d3371486 (diff)
downloadchef-aa74c0ac58393e9186c2ebecbc3144c2c8d2ee85.tar.gz
get the formatting for cookbook gems correct
this leverages the PR: https://github.com/bundler/bundler/pull/4245 to redirect output from bundler into chef's logger/formatter to get the UI right. if you don't have that in the external bundler you'll just get output on STDOUT. fix is to upgrade bundler.
Diffstat (limited to 'lib/chef/formatters/doc.rb')
-rw-r--r--lib/chef/formatters/doc.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index 5462241049..b7c65b9739 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -180,6 +180,31 @@ class Chef
unindent
end
+ # Called when starting to collect gems from the cookbooks
+ def cookbook_gem_start(gems)
+ puts_line "Installing Cookbook Gems:"
+ indent
+ end
+
+ # Called when the result of installing the bundle is to install the gem
+ def cookbook_gem_installing(gem, version)
+ puts_line "- Installing #{gem} #{version}", :green
+ end
+
+ # Called when the result of installing the bundle is to use the gem
+ def cookbook_gem_using(gem, version)
+ puts_line "- Using #{gem} #{version}"
+ end
+
+ # Called when finished installing cookbook gems
+ def cookbook_gem_finished
+ unindent
+ end
+
+ def cookbook_gem_failed(exception)
+ unindent
+ end
+
# Called when cookbook loading starts.
def library_load_start(file_count)
puts_line "Compiling Cookbooks..."