bender-bot 0.4.3 → 0.4.4

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 +7 -6
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cd5a24c116633990f56c202c89d34bad627a0d8
4
- data.tar.gz: 61984589dafa9cd50bd68654379f44ddfe11d7d0
3
+ metadata.gz: eb5513228c548c513ce2e5d9ac1334533fe1585e
4
+ data.tar.gz: b04c3ce4225699684f13608dcb45b1ee8787c066
5
5
  SHA512:
6
- metadata.gz: 28c70600bce22bf5a4ccdca6ce237365d353730fdedd13c8ec42c04d5df62744a347bc203ba583081bce18404c1284364c851fe287b6879f0871e07e8b28490d
7
- data.tar.gz: 59d32095fe69c7696f79890c2a2fb8f5105785013cb5b2913453cbbe3e4ea67e6f070912f8c3dd4894f6f72c011198651f0ad026d287ef9602de4e0f7d0e5ea5
6
+ metadata.gz: 0c5c2be4556cbf32baaf45fe51b9558a0865b1a29e6623f5b3fe2a697aaa93f13e6c6158d18211b257dc3d54fecc35f120cabd43c5d6b3fa1a3af3345ef774b5
7
+ data.tar.gz: b0df342ecf533c2059392f88993e1733669521d57c0aded6b520c9bb88a6a447b3d16de10e5ecd4cb39d827d40d9585a42aa0dfc325f99cc9793b15dc91ed08e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.4
data/lib/bender/main.rb CHANGED
@@ -184,7 +184,7 @@ module Bender
184
184
  @room_name ||= bot.store['primary_room_name'] || new_room['name']
185
185
  @room_topic ||= bot.store['primary_room_topic'] || new_room['topic']
186
186
 
187
- @open = 0 unless defined? @open
187
+ @open = 1 unless defined? @open
188
188
 
189
189
  log.info \
190
190
  primary_room_name: bot.store['primary_room_name'],
@@ -197,8 +197,8 @@ module Bender
197
197
 
198
198
  if open_incidents.empty?
199
199
  if @open
200
- new_room['name'] = @room_name
201
- new_room['topic'] = @room_topic
200
+ new_room['name'] = '[NONE] Production Incident'
201
+ new_room['topic'] = 'Good news everyone! No open incidents at the moment'
202
202
  begin
203
203
  room.update_room(new_room)
204
204
  rescue NoMethodError
@@ -215,8 +215,9 @@ module Bender
215
215
  end
216
216
 
217
217
  unless @open == open_incidents.size
218
- new_room['name'] = 'DANGER WILL ROBINSON'
219
- new_room['topic'] = '%d open incicents!' % open_incidents.size
218
+ new_room['name'] = '[IN PROGRESS] Production Incident'
219
+ tha_news = open_incidents.size == 1 ? "There's an open incident" : "There are #{open_incidents.size} open incidents"
220
+ new_room['topic'] = "Terrible news everyone! #{tha_news}"
220
221
  begin
221
222
  room.update_room(new_room)
222
223
  rescue NoMethodError
@@ -255,7 +256,7 @@ module Bender
255
256
  sleep options.issue_refresh
256
257
  rescue HipChat::UnknownResponseCode
257
258
  log.warn 'HipChat::UnknownResponseCode in set_room_name_and_topic'
258
- sleep 1
259
+ sleep 2
259
260
  end
260
261
  end
261
262
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bender-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer