Class: Isbumiawake::Chef::Handler

Inherits:
Chef::Handler
  • Object
show all
Defined in:
lib/isbumiawake/chef/handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Handler

Returns a new instance of Handler.



7
8
9
# File 'lib/isbumiawake/chef/handler.rb', line 7

def initialize(args)
  @url = args["url"]
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/isbumiawake/chef/handler.rb', line 15

def message
  "Chef run on node #{node.fqdn} #{success? ? "successfully" : "NOT successfully"} completed in #{elapsed_time} (#{start_time}-#{end_time}) and updated: #{updated_resources.join(",")}"
end

#reportObject



11
12
13
# File 'lib/isbumiawake/chef/handler.rb', line 11

def report
  RestClient.post @url, :message => self.message
end