pubnub 3.5.6 → 3.5.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pubnub might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97103d018346c35eca2cae5f18ad3a8768e22f20
4
- data.tar.gz: efdd09077c366778e2068af213ee183605c0b189
3
+ metadata.gz: 3a5b067a186ac8cad4a23dcc47f1fcd9b5946e74
4
+ data.tar.gz: 22198f7ac785f8f4acb8465b25e1f670ae24a625
5
5
  SHA512:
6
- metadata.gz: 1fb41e358ec6d0945bfe0327eab1ee02be19eb5aa7e0122ff341a82c45c850564ef5bbda5bc535997e1622890cc705e644720a19364610725d9f68f3d1b5eceb
7
- data.tar.gz: 81452a6e37ee55135903888b46435102f46e19e92ea183533ebef3e4144dc817a306c32e021665137f7f5aec90b8d27335a3878bec2e355b5c2e6f8df213f746
6
+ metadata.gz: 1c7df9d63c3948aff1855fe8533431c75810002004be898fe52f22dbe1671ede92e98ccf593797cf0c80341435b3f468ac9ceb3b08ad243aa243b065c9278daa
7
+ data.tar.gz: c3934bc9abec0e243bb0ab18fbf32503f40f35d7f066df0d88130133efaf52bef08b88ea0b250025c7dc5c0171a1648de7b0b33d320b0cfee5131c1869a55db7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pubnub (3.5.6)
4
+ pubnub (3.5.7)
5
5
  eventmachine
6
6
  json
7
7
  net-http-persistent
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.5.6
1
+ 3.5.7
@@ -23,7 +23,8 @@ sleep(5)
23
23
  puts("Subscribing on ch ping_3 via a CSV list of channels.")
24
24
 
25
25
  ## You can pass a string, or a CSV string of the new channel(s)
26
- p.subscribe(:channel => "ping_3,a", :http_sync => false){ |envelope| puts "block 1: channel: #{envelope.channel}: #{envelope.message}" }
26
+ # p.subscribe(:channel => "ping_3,a", :http_sync => false){ |envelope| puts "block 1: channel: #{envelope.channel}: #{envelope.message}" }
27
+ p.subscribe(:channel => "ping_3", :http_sync => false){ |envelope| puts "block 1: channel: #{envelope.channel}: #{envelope.message}" }
27
28
  sleep(3)
28
29
 
29
30
  ## You can also pass an array of channels to subscribe
data/lib/pubnub/event.rb CHANGED
@@ -37,17 +37,23 @@ module Pubnub
37
37
  end
38
38
 
39
39
  def start_event(app, count = 0)
40
- if count <= app.env[:max_retries]
41
- $logger.debug('Pubnub'){'Event#start_event | sending request'}
42
- $logger.debug('Pubnub'){"Event#start_event | tt: #{@timetoken}; ctt #{app.env[:timetoken]}"}
43
- @response = get_connection(app).request(uri(app))
44
- end
40
+ begin
41
+ if count <= app.env[:max_retries]
42
+ $logger.debug('Pubnub'){'Event#start_event | sending request'}
43
+ $logger.debug('Pubnub'){"Event#start_event | tt: #{@timetoken}; ctt #{app.env[:timetoken]}"}
44
+ @response = get_connection(app).request(uri(app))
45
+ end
45
46
 
46
- error = response_error(@response, app)
47
+ error = response_error(@response, app)
47
48
 
48
- if ![error].flatten.include?(:json) || count > app.env[:max_retries]
49
- handle_response(@response, app, error)
50
- else
49
+ if ![error].flatten.include?(:json) || count > app.env[:max_retries]
50
+ handle_response(@response, app, error)
51
+ else
52
+ start_event(app, count + 1)
53
+ end
54
+ rescue => e
55
+ $logger.error('Pubnub'){e}
56
+ $logger.error('Pubnub'){e.inspect}
51
57
  start_event(app, count + 1)
52
58
  end
53
59
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pubnub
2
- VERSION = '3.5.6'
2
+ VERSION = '3.5.7'
3
3
  end
data/pubnub.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'pubnub'
5
- s.version = '3.5.6'
5
+ s.version = '3.5.7'
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ['PubNub']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubnub
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.6
4
+ version: 3.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - PubNub