Class: Chef::Formatters::Doge
- Inherits:
-
Formatters::Base
- Object
- Formatters::Base
- Chef::Formatters::Doge
- Defined in:
- lib/doge-chef-formatter.rb
Instance Method Summary collapse
- #converge_complete ⇒ Object
- #converge_start(run_context) ⇒ Object
-
#cookbook_resolution_start(expanded_run_list) ⇒ Object
Called before the cookbook collection is fetched from the server.
-
#cookbook_sync_complete ⇒ Object
Called after all cookbooks have been sync’d.
- #cookbook_sync_start(cookbook_count) ⇒ Object
-
#initialize(out, err) ⇒ Doge
constructor
Override parent class.
-
#library_load_start(file_count) ⇒ Object
Called when cookbook loading starts.
- #resource_action_start(resource, action, notification_type = nil, notifier = nil) ⇒ Object
-
#run_start(version) ⇒ Object
Called at the very start of a Chef Run.
-
#synchronized_cookbook(cookbook_name) ⇒ Object
Called when cookbook
cookbook_name
has been sync’d.
Constructor Details
#initialize(out, err) ⇒ Doge
Override parent class
11 12 13 |
# File 'lib/doge-chef-formatter.rb', line 11 def initialize(out, err) @output = Dogeputter.new(out, err) end |
Instance Method Details
#converge_complete ⇒ Object
43 44 45 |
# File 'lib/doge-chef-formatter.rb', line 43 def converge_complete puts 'System converged. Wow. Much resources.' end |
#converge_start(run_context) ⇒ Object
39 40 41 |
# File 'lib/doge-chef-formatter.rb', line 39 def converge_start(run_context) puts "#{random_doge_prefix} converge #{run_context.resource_collection.all_resources.size} resources" end |
#cookbook_resolution_start(expanded_run_list) ⇒ Object
Called before the cookbook collection is fetched from the server.
21 22 23 |
# File 'lib/doge-chef-formatter.rb', line 21 def cookbook_resolution_start() puts "Very run list: #{expanded_run_list.inspect}" end |
#cookbook_sync_complete ⇒ Object
Called after all cookbooks have been sync’d.
35 36 37 |
# File 'lib/doge-chef-formatter.rb', line 35 def cookbook_sync_complete puts "#{random_doge_prefix} finish cookbook synchronization" end |
#cookbook_sync_start(cookbook_count) ⇒ Object
25 26 27 |
# File 'lib/doge-chef-formatter.rb', line 25 def cookbook_sync_start(cookbook_count) puts "#{random_doge_prefix} cookbook synchronization" end |
#library_load_start(file_count) ⇒ Object
Called when cookbook loading starts.
48 49 50 |
# File 'lib/doge-chef-formatter.rb', line 48 def library_load_start(file_count) puts "#{random_doge_prefix} compilation" end |
#resource_action_start(resource, action, notification_type = nil, notifier = nil) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/doge-chef-formatter.rb', line 52 def resource_action_start(resource, action, notification_type=nil, notifier=nil) if resource.cookbook_name && resource.recipe_name resource_recipe = "#{resource.cookbook_name}::#{resource.recipe_name}" else resource_recipe = "<wow, so much LWRP>" end if resource_recipe != @current_recipe puts "Recipe: #{resource_recipe}" @current_recipe = resource_recipe end puts " * #{resource} action #{action}" end |
#run_start(version) ⇒ Object
Called at the very start of a Chef Run
16 17 18 |
# File 'lib/doge-chef-formatter.rb', line 16 def run_start(version) puts "Starting Chef Client, version #{version}" end |
#synchronized_cookbook(cookbook_name) ⇒ Object
Called when cookbook cookbook_name
has been sync’d
30 31 32 |
# File 'lib/doge-chef-formatter.rb', line 30 def synchronized_cookbook(cookbook_name) puts " - #{random_doge_prefix.downcase} #{cookbook_name}" end |