11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/campfire_handler.rb', line 11
def report()
if run_status.failed?
Chef::Log.error("Creating Campfire exception report")
campfire = Tinder::Campfire.new(@config[:subdomain], :token => @config[:token])
campfire.rooms.first.speak("#{node.hostname} #{run_status.formatted_exception}")
campfire.rooms.first.paste(Array(backtrace).join("\n"))
end
if run_status.success? && @config[:updated_resources] == true
Chef::Log.info("Sending Campfire updated resources report")
campfire = Tinder::Campfire.new(@config[:subdomain], :token => @config[:token])
campfire.rooms.first.speak("#{node.hostname} recent updated resources:")
run_status.updated_resources.each {|r| campfire.rooms.first.paste(" #{r.to_s}") }
end
end
|