chef-handler-xmpp 0.1.2 → 0.1.3
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.
- data/lib/chef/handler/xmpphandler.rb +21 -21
- metadata +2 -2
@@ -7,30 +7,30 @@ class Chef
|
|
7
7
|
class Handler
|
8
8
|
class Xmpphandler < Chef::Handler
|
9
9
|
def report
|
10
|
-
|
10
|
+
subject = "Chef run failed on #{node.name}\n"
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
if run_status.success?
|
13
|
+
text = "Chef complete on #{node.name} in #{run_status.elapsed_time}"
|
14
|
+
else
|
15
|
+
text = "Chef failed on #{node.name} with #{run_status.exception}"
|
16
|
+
end
|
17
17
|
|
18
|
-
|
19
|
-
jid = "chef010101@gmail.com"
|
20
|
-
pwd = "starblue45"
|
21
|
-
|
22
|
-
recipient = ["mynta1011@gmail.com", "paige@connectxyz.com"]
|
23
|
-
|
24
|
-
robot = Jabber::Client::new(Jabber::JID::new(jid))
|
25
|
-
robot.connect
|
26
|
-
robot.auth(pwd)
|
27
|
-
|
28
|
-
recipient.each do |a|
|
29
|
-
message = Jabber::Message::new("#{a}", text)
|
30
|
-
message.set_type(:chat)
|
31
18
|
|
32
|
-
|
33
|
-
|
19
|
+
jid = "chef010101@gmail.com"
|
20
|
+
pwd = "starblue45"
|
21
|
+
|
22
|
+
recipient = ["mynta1011@gmail.com", "paige@connectxyz.com"]
|
23
|
+
|
24
|
+
robot = Jabber::Client::new(Jabber::JID::new(jid))
|
25
|
+
robot.connect
|
26
|
+
robot.auth(pwd)
|
27
|
+
|
28
|
+
recipient.each do |a|
|
29
|
+
message = Jabber::Message::new("#{a}", text)
|
30
|
+
message.set_type(:chat)
|
31
|
+
|
32
|
+
robot.send message
|
33
|
+
end
|
34
34
|
end
|
35
35
|
end
|
36
36
|
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
|
+
version: 0.1.3
|
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-
|
12
|
+
date: 2013-04-11 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
|