bender-bot 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/bender/main.rb +22 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c283ea7083ad833690d22b910550e2ea8c611011
|
4
|
+
data.tar.gz: 9b621bcb3cf8ac33b63ca2e2f3e9a213708b5cc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eff378cba2f9b35d3bedda415a8d488c8a18d2a72e74e2de3ecbd2c270e53cdccf6acc48aeb4ea0a6f4e0ef4595f360c7a59b76e388438f84515eea2ad77b6a
|
7
|
+
data.tar.gz: acfb05cfdc199ce95a640d970c6da58f49ac244ff640527edbe9b375cf282e88af1fb055e6629a420981fac6423017fe02ae028dc81c699339336fa489126e54
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.8
|
data/lib/bender/main.rb
CHANGED
@@ -283,8 +283,17 @@ module Bender
|
|
283
283
|
|
284
284
|
Thread.new do
|
285
285
|
loop do
|
286
|
-
|
287
|
-
|
286
|
+
begin
|
287
|
+
resp = http.request req
|
288
|
+
data = JSON.parse(resp.body)
|
289
|
+
rescue StandardError => e
|
290
|
+
log.error \
|
291
|
+
message: 'Could not periodically refresh users',
|
292
|
+
error: e
|
293
|
+
sleep 5
|
294
|
+
next
|
295
|
+
end
|
296
|
+
|
288
297
|
users = data.inject({}) do |h, user|
|
289
298
|
h[user['key']] = {
|
290
299
|
nick: user['key'],
|
@@ -317,8 +326,17 @@ module Bender
|
|
317
326
|
|
318
327
|
Thread.new do
|
319
328
|
loop do
|
320
|
-
|
321
|
-
|
329
|
+
begin
|
330
|
+
resp = http.request req
|
331
|
+
data = JSON.parse resp.body
|
332
|
+
rescue StandardError => e
|
333
|
+
log.error \
|
334
|
+
message: 'Could not periodically refresh group',
|
335
|
+
error: e
|
336
|
+
sleep 5
|
337
|
+
next
|
338
|
+
end
|
339
|
+
|
322
340
|
user_names = data['users']['items'].map { |u| u['displayName'] }
|
323
341
|
bot.store['group'] = user_names
|
324
342
|
sleep options.group_refresh
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bender-bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|