From 3b6f32e58c5d40ed9bb33585afd6c62512cfec13 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Wed, 6 May 2015 12:00:06 -0700 Subject: Allow inspection of event dispatch's subscribers --- lib/chef/event_dispatch/dispatcher.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/chef/event_dispatch') diff --git a/lib/chef/event_dispatch/dispatcher.rb b/lib/chef/event_dispatch/dispatcher.rb index 9f43f14311..370f8c51b4 100644 --- a/lib/chef/event_dispatch/dispatcher.rb +++ b/lib/chef/event_dispatch/dispatcher.rb @@ -9,6 +9,8 @@ class Chef # the registered subscribers. class Dispatcher < Base + attr_reader :subscribers + def initialize(*subscribers) @subscribers = subscribers end -- cgit v1.2.1 From 92cb65508c198d04fb12e1e99475c80bd8a16c4a Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Fri, 22 May 2015 09:27:48 -0700 Subject: Display policy name and ID during the chef run --- lib/chef/event_dispatch/base.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/chef/event_dispatch') diff --git a/lib/chef/event_dispatch/base.rb b/lib/chef/event_dispatch/base.rb index 7274105802..93caa62a65 100644 --- a/lib/chef/event_dispatch/base.rb +++ b/lib/chef/event_dispatch/base.rb @@ -82,6 +82,11 @@ class Chef def node_load_completed(node, expanded_run_list, config) end + # Called after the Policyfile was loaded. This event only occurs when + # chef is in policyfile mode. + def policyfile_loaded(policy) + end + # Called before the cookbook collection is fetched from the server. def cookbook_resolution_start(expanded_run_list) end -- cgit v1.2.1 From 3e1cbd6856eda733a1ed800184d8545e5d070e8e Mon Sep 17 00:00:00 2001 From: Serdar Sutay Date: Thu, 21 May 2015 14:03:31 -0700 Subject: Make sure the audit mode output is reflected both in the logs and in the formatter output. --- lib/chef/event_dispatch/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/chef/event_dispatch') diff --git a/lib/chef/event_dispatch/base.rb b/lib/chef/event_dispatch/base.rb index 93caa62a65..73fe25ec13 100644 --- a/lib/chef/event_dispatch/base.rb +++ b/lib/chef/event_dispatch/base.rb @@ -244,13 +244,13 @@ class Chef end # Called when audit phase successfully finishes - def audit_phase_complete + def audit_phase_complete(audit_output) end # Called if there is an uncaught exception during the audit phase. The audit runner should # be catching and handling errors from the examples, so this is only uncaught errors (like # bugs in our handling code) - def audit_phase_failed(exception) + def audit_phase_failed(exception, audit_output) end # Signifies the start of a `control_group` block with a defined name -- cgit v1.2.1