hipchat_smart 1.1.1 → 1.2.0
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.
- checksums.yaml +4 -4
- data/lib/hipchat_smart.rb +14 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2906af70ddff61312328c7ca71c58e80c1dd96b30360e26ccb12da485e6bd2e4
|
|
4
|
+
data.tar.gz: d3d46eb01d400fd30809bbf3651b0fe8b1471b7ac26d21b80e35ccae8f7e4a48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: baab5c11841939f80a2e85f52ee619d5a5e70f727384db6b4bc28fc375d64de6b1b01e963f1c8e9289693444824f0a16cff621baeee358d4be604d94ec6ec422
|
|
7
|
+
data.tar.gz: 2c516410d9c80fb71ca7835dad612fd0cd70b0584aeaeb77fbcb86fe4f5d74be6a6cd8bfea36bfebbdfedf111af1c3c61e618ad83e0ca7bb1bf1b3e22dea7e66
|
data/lib/hipchat_smart.rb
CHANGED
|
@@ -96,9 +96,9 @@ class Bot
|
|
|
96
96
|
client.on_exception do |exc, jab, where|
|
|
97
97
|
@logger.fatal "CLIENT EXCEPTION on #{where}: #{exc}"
|
|
98
98
|
sleep 10
|
|
99
|
-
|
|
99
|
+
reconnect(client)
|
|
100
100
|
end
|
|
101
|
-
config.delete(:password)
|
|
101
|
+
#config.delete(:password)
|
|
102
102
|
client.send(Jabber::Presence.new.set_type(:available))
|
|
103
103
|
|
|
104
104
|
self.roster = Jabber::Roster::Helper.new(client)
|
|
@@ -110,6 +110,18 @@ class Bot
|
|
|
110
110
|
self
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
+
def reconnect(cli)
|
|
114
|
+
@logger.fatal "RECONNECTING CLIENT"
|
|
115
|
+
begin
|
|
116
|
+
cli.connect
|
|
117
|
+
cli.auth(config[:password])
|
|
118
|
+
cli.send(Jabber::Presence.new.set_type(:available))
|
|
119
|
+
rescue Exception => stack
|
|
120
|
+
@logger.fatal stack
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
end
|
|
124
|
+
|
|
113
125
|
def update_bots_file
|
|
114
126
|
file = File.open($0.gsub(".rb", "_bots.rb"), 'w')
|
|
115
127
|
bots_created=@bots_created.dup
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hipchat_smart
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mario Ruiz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-04-
|
|
11
|
+
date: 2018-04-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xmpp4r
|