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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/bender/main.rb +22 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82832a6c00a1806324e10622ec17f86e0d268818
4
- data.tar.gz: b3d962d587773e59515557d771acb4b1b272b589
3
+ metadata.gz: c283ea7083ad833690d22b910550e2ea8c611011
4
+ data.tar.gz: 9b621bcb3cf8ac33b63ca2e2f3e9a213708b5cc4
5
5
  SHA512:
6
- metadata.gz: 1538a70a820675a2e38499a06100c7aef26399c47ccfe4d81af3525dac6f0c903dc7bc7b796bc768fab000f37dfe3e5e91a77c2dd64dc6cb6b1e85e3dc19d9c7
7
- data.tar.gz: bab50ed9471cb74f0805f90c00096540eb5a6cf25186f464e31aff1cdbe96da5be5b73b8ca4e554dc43e8d0e8ad3a5279fdb1831ba2fc8ce654d0bb09d863db1
6
+ metadata.gz: 1eff378cba2f9b35d3bedda415a8d488c8a18d2a72e74e2de3ecbd2c270e53cdccf6acc48aeb4ea0a6f4e0ef4595f360c7a59b76e388438f84515eea2ad77b6a
7
+ data.tar.gz: acfb05cfdc199ce95a640d970c6da58f49ac244ff640527edbe9b375cf282e88af1fb055e6629a420981fac6423017fe02ae028dc81c699339336fa489126e54
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.7
1
+ 0.4.8
@@ -283,8 +283,17 @@ module Bender
283
283
 
284
284
  Thread.new do
285
285
  loop do
286
- resp = http.request req
287
- data = JSON.parse(resp.body)
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
- resp = http.request req
321
- data = JSON.parse(resp.body)
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.7
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-28 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor