capistrano_sentinel 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63fcb2c5390ee0635ba551de92f6c76e30fe91a6
4
- data.tar.gz: 927e880f797908adde7bf04661b007bdb7bd64c8
3
+ metadata.gz: 5f6de2fd490ee1cf1d73e9e1b19f134189c9cfa7
4
+ data.tar.gz: caf83842315495fb25ea4c5dc3a174566e542cb8
5
5
  SHA512:
6
- metadata.gz: f56cc17119271efc5284be61cec30a2e5bb0bbeb3e3a0560a358d74853e516112403e921f30ead635b11cfbf12a8d44a0a97a68c6e055197c104e3ffd446ae88
7
- data.tar.gz: 31226b6fc03cbb04cf43694b5d82c5fbd6baf5ebcf05280cdd690e534906c615bbc89ed4ed4fccef35f81695b07587da25ee361f4662a737eca520a2108d6cc4
6
+ metadata.gz: b54133bf18bfeb9ccced785c164bfd804445be0b10549120d8bfda1c0247ae8b0bbb066839c44a98deef25508e40e101d1c79700e998c3777a829c7d3210706f
7
+ data.tar.gz: 9465f4138eaec630047a2bca161c3a6c10a4a73bcaf4bce3f72e5bb1be00c83b02d536de2f0db41b4ed801a589978a448a59225aa2d559fef95840d2b0247b68
@@ -110,7 +110,7 @@ module CapistranoSentinel
110
110
  #
111
111
  # @api public
112
112
  def subscribe(channel, data = {})
113
- log_to_file("#{@actor.class} tries to subscribe to channel #{channel}")
113
+ log_to_file("#{self.class} tries to subscribe to channel #{channel}")
114
114
  send_action('subscribe', channel, data)
115
115
  end
116
116
 
@@ -182,7 +182,7 @@ module CapistranoSentinel
182
182
  else
183
183
  final_message = JSON.dump(action: 'message', message: message)
184
184
  end
185
- log_to_file("#{@actor.class} sends JSON #{final_message}")
185
+ log_to_file("#{self.class} sends JSON #{final_message}")
186
186
  send_data(final_message)
187
187
  end
188
188
 
@@ -223,7 +223,7 @@ module CapistranoSentinel
223
223
  begin
224
224
  connect
225
225
  rescue ::Errno::ECONNREFUSED => e
226
- log_to_file("#{@actor.class} got ECONNREFUSED #{e.inspect} ")
226
+ log_to_file("#{self.class} got ECONNREFUSED #{e.inspect} ")
227
227
  sleep @options[:retry_time]
228
228
  rescue => e
229
229
  fire_on_error e
@@ -251,7 +251,7 @@ module CapistranoSentinel
251
251
  @protocol_version = handshake.version
252
252
  @active = true
253
253
  @opened = true
254
- log_to_file("#{@actor.class} got handshake finished ")
254
+ log_to_file("#{self.class} got handshake finished ")
255
255
  init_messaging
256
256
  fire_on_open
257
257
  break
@@ -270,9 +270,9 @@ module CapistranoSentinel
270
270
  end
271
271
  end
272
272
  rescue ::IO::WaitReadable => e
273
- #log_to_file("#{@actor.class} got WaitReadable #{e.inspect}")
273
+ #log_to_file("#{self.class} got WaitReadable #{e.inspect}")
274
274
  rescue ::IO::WaitWritable => e
275
- #log_to_file("#{@actor.class} got WaitWritable #{e.inspect}")
275
+ #log_to_file("#{self.class} got WaitWritable #{e.inspect}")
276
276
  # ignored
277
277
  end
278
278
  end
@@ -294,7 +294,7 @@ module CapistranoSentinel
294
294
  end
295
295
  fire_on_error CapistranoSentinel::WsProtocolError.new(frame.error) if frame.error?
296
296
  rescue => e
297
- log_to_file("#{@actor.class} crashed with #{e.inspect} #{e.backtrace}")
297
+ log_to_file("#{self.class} crashed with #{e.inspect} #{e.backtrace}")
298
298
  fire_on_error(e)
299
299
  if @socket.closed? || @socket.eof?
300
300
  @read_thread = nil
@@ -306,7 +306,7 @@ module CapistranoSentinel
306
306
  end
307
307
 
308
308
  def determine_message_type(message)
309
- log_to_file("#{@actor.class} tries to dispatch message #{message.inspect}")
309
+ log_to_file("#{self.class} tries to dispatch message #{message.inspect}")
310
310
  case message.type
311
311
  when :binary, :text
312
312
  fire_on_message(message.data)
@@ -336,27 +336,27 @@ module CapistranoSentinel
336
336
  end
337
337
 
338
338
  def fire_on_ping(message)
339
- log_to_file("#{@actor.class} tries to ping #{message.inspect}")
339
+ log_to_file("#{self.class} tries to ping #{message.inspect}")
340
340
  @on_ping.call(message) if @on_ping
341
341
  end
342
342
 
343
343
  def fire_on_message(message)
344
- log_to_file("#{@actor.class} tries to fire_on_message #{message.inspect}")
344
+ log_to_file("#{self.class} tries to fire_on_message #{message.inspect}")
345
345
  @on_message.call(message) if @on_message
346
346
  end
347
347
 
348
348
  def fire_on_open
349
- log_to_file("#{@actor.class} tries to on_open ")
349
+ log_to_file("#{self.class} tries to on_open ")
350
350
  @on_open.call() if @on_open
351
351
  end
352
352
 
353
353
  def fire_on_error(error)
354
- log_to_file("#{@actor.class} tries to on_error with #{error.inspect} ")
354
+ log_to_file("#{self.class} tries to on_error with #{error.inspect} ")
355
355
  @on_error.call(error) if @on_error
356
356
  end
357
357
 
358
358
  def fire_on_close(message = nil)
359
- log_to_file("#{@actor.class} tries to fire_on_close with #{message.inspect} ")
359
+ log_to_file("#{self.class} tries to fire_on_close with #{message.inspect} ")
360
360
  @active = false
361
361
  @closed = true
362
362
  @on_close.call(message) if @on_close
@@ -17,7 +17,7 @@ module CapistranoSentinel
17
17
  # minor release version
18
18
  MINOR = 0
19
19
  # tiny release version
20
- TINY = 6
20
+ TINY = 7
21
21
  # prelease version ( set this only if it is a prelease)
22
22
  PRE = nil
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_sentinel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada