chef-handler-xmpp 0.1.4 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/chef/handler/xmpphandler.rb +7 -9
  2. metadata +2 -2
@@ -7,26 +7,24 @@ class Chef
7
7
  class Handler
8
8
  class Xmpphandler < Chef::Handler
9
9
  def report
10
- subject = "Chef run failed on #{node.name}\n"
11
-
12
10
  if run_status.success?
13
- text = "Chef complete on #{node.name} in #{run_status.elapsed_time}"
11
+ # text = "Chef complete on #{node.name} in #{run_status.elapsed_time}"
14
12
  else
15
- text = "Chef failed on #{node.name} with #{run_status.exception}"
13
+ # text = "Chef failed on #{node.name} with #{run_status.exception}"
16
14
  end
17
-
15
+ text = "testing"
18
16
 
19
17
  jid = "chef010101@gmail.com"
20
18
  pwd = "starblue45"
21
19
 
22
- recipient = ["mynta1011@gmail.com", "paige@connectxyz.com"]
20
+ recipients = [ "mynta1011@gmail.com", "paige@connectxyz.com" ]
23
21
 
24
22
  robot = Jabber::Client::new(Jabber::JID::new(jid))
25
23
  robot.connect
26
24
  robot.auth(pwd)
27
25
 
28
- recipient.each do |a|
29
- message = Jabber::Message::new("#{a}", text)
26
+ recipients.each do |recipient|
27
+ message = Jabber::Message::new("#{recipient}", text)
30
28
  message.set_type(:chat)
31
29
 
32
30
  robot.send message
@@ -34,4 +32,4 @@ class Chef
34
32
  end
35
33
  end
36
34
  end
37
- end
35
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-xmpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-11 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Chef report handler to send messages to xmpp/jabber/gchat accounts.
15
15
  email: jenkinda@uw.edu