pubnub 3.7.11 → 3.7.12
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 +4 -4
- data/.travis.yml +7 -0
- data/CHANGELOG.txt +3 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +13 -17
- data/README.md +4 -1
- data/VERSION +1 -1
- data/fixtures/vcr_cassettes/new_ones/publish/store-false.yml +44 -0
- data/fixtures/vcr_cassettes/new_ones/publish/store-true.yml +44 -0
- data/lib/pubnub/event.rb +8 -0
- data/lib/pubnub/events/publish.rb +6 -0
- data/lib/pubnub/formatter.rb +1 -1
- data/lib/pubnub/version.rb +1 -1
- data/spec/lib/integration/publish_spec.rb +40 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e8b8244c03f5eb4b0035cb7c37cdda29ad8f353
|
4
|
+
data.tar.gz: 686f762c16665459605d52e7de28636035d72d9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c237393688ae8bdc7194ebbbe3a3093da68240dbe0292ce28519c99b10e62ce19289708e718b79c8f6bb29ce74059925454e9be7580f78f7e811583ab35ec7bc
|
7
|
+
data.tar.gz: e3b348410c6c0fb034f705dc668d2f52489b1121054f764b0cc40d091e3674b0f5e9e3baaf67d0536f5a8191d87fbf9c656fde1e749c912d68f6e90e2689c3e2
|
data/.travis.yml
ADDED
data/CHANGELOG.txt
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pubnub (3.7.
|
4
|
+
pubnub (3.7.12)
|
5
5
|
eventmachine (~> 1.0)
|
6
6
|
json (~> 1.8)
|
7
7
|
net-http-persistent (~> 2.9)
|
@@ -9,22 +9,21 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
addressable (2.
|
13
|
-
|
14
|
-
|
15
|
-
crack (0.4.2)
|
12
|
+
addressable (2.4.0)
|
13
|
+
coderay (1.1.1)
|
14
|
+
crack (0.4.3)
|
16
15
|
safe_yaml (~> 1.0.0)
|
17
16
|
diff-lcs (1.2.5)
|
18
17
|
eventmachine (1.2.0.1)
|
18
|
+
hashdiff (0.3.0)
|
19
19
|
json (1.8.3)
|
20
|
-
memory_profiler (0.0.4)
|
21
20
|
method_source (0.8.2)
|
22
21
|
net-http-persistent (2.9.4)
|
23
|
-
pry (0.10.
|
22
|
+
pry (0.10.4)
|
24
23
|
coderay (~> 1.1.0)
|
25
24
|
method_source (~> 0.8.1)
|
26
25
|
slop (~> 3.4)
|
27
|
-
rr (1.
|
26
|
+
rr (1.2.0)
|
28
27
|
rspec (2.14.0)
|
29
28
|
rspec-core (~> 2.14.0)
|
30
29
|
rspec-expectations (~> 2.14.0)
|
@@ -33,28 +32,25 @@ GEM
|
|
33
32
|
rspec-expectations (2.14.5)
|
34
33
|
diff-lcs (>= 1.1.3, < 2.0)
|
35
34
|
rspec-mocks (2.14.6)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
webmock (1.18.0)
|
35
|
+
safe_yaml (1.0.4)
|
36
|
+
slop (3.6.0)
|
37
|
+
vcr (3.0.3)
|
38
|
+
webmock (2.1.0)
|
41
39
|
addressable (>= 2.3.6)
|
42
40
|
crack (>= 0.3.2)
|
41
|
+
hashdiff
|
43
42
|
|
44
43
|
PLATFORMS
|
45
44
|
ruby
|
46
45
|
|
47
46
|
DEPENDENCIES
|
48
|
-
awesome_print
|
49
47
|
bundler (~> 1.6)
|
50
|
-
memory_profiler
|
51
48
|
pry
|
52
49
|
pubnub!
|
53
50
|
rr
|
54
51
|
rspec (= 2.14)
|
55
|
-
ruby-prof
|
56
52
|
vcr
|
57
53
|
webmock
|
58
54
|
|
59
55
|
BUNDLED WITH
|
60
|
-
1.
|
56
|
+
1.13.6
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Give it a try and share with us your thoughts!
|
|
6
6
|
|
7
7
|
# Please direct all Support Questions and Concerns to Support@PubNub.com
|
8
8
|
|
9
|
-
## PubNub Gem version 3.7.
|
9
|
+
## PubNub Gem version 3.7.12
|
10
10
|
|
11
11
|
##### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
|
12
12
|
##### http://www.pubnub.com/account
|
@@ -16,6 +16,9 @@ www.pubnub.com - PubNub Real-time Push Service in the Cloud.
|
|
16
16
|
|
17
17
|
The PubNub Network is a blazingly fast Global Messaging Service for building real-time web and mobile apps. Thousands of apps and developers rely on PubNub for delivering human-perceptive real-time experiences that scale to millions of users worldwide. PubNub delivers the infrastructure needed to build amazing Mobile, MMO games, social apps, business collaborative solutions, and more.
|
18
18
|
|
19
|
+
### Travis
|
20
|
+
[![Build Status](https://travis-ci.org/pubnub/ruby.svg?branch=master)](https://travis-ci.org/pubnub/ruby)
|
21
|
+
|
19
22
|
### Upgrading from PubNub 3.5.x
|
20
23
|
|
21
24
|
We've made the response format compatible across all operations. This may break existing parsing of whereNow, leave, state, and PAM responses. So if you are monitoring these operation responses, please be sure to modify your code accordingly.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.7.
|
1
|
+
3.7.12
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://pubsub.pubnub.com/publish/demo/demo/0/whatever/0/%22whatever%22?auth=demoish_authkey&pnsdk=PubNub-Ruby/3.7.11&store=0&uuid=tester
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Connection:
|
17
|
+
- keep-alive
|
18
|
+
Keep-Alive:
|
19
|
+
- 30
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Fri, 04 Nov 2016 14:14:21 GMT
|
27
|
+
Content-Type:
|
28
|
+
- text/javascript; charset="UTF-8"
|
29
|
+
Content-Length:
|
30
|
+
- '30'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cache-Control:
|
34
|
+
- no-cache
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
Access-Control-Allow-Methods:
|
38
|
+
- GET
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '[1,"Sent","14782688616906394"]'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Fri, 04 Nov 2016 14:14:21 GMT
|
44
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://pubsub.pubnub.com/publish/demo/demo/0/whatever/0/%22whatever%22?auth=demoish_authkey&pnsdk=PubNub-Ruby/3.7.11&store=1&uuid=tester
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Connection:
|
17
|
+
- keep-alive
|
18
|
+
Keep-Alive:
|
19
|
+
- 30
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Fri, 04 Nov 2016 14:12:49 GMT
|
27
|
+
Content-Type:
|
28
|
+
- text/javascript; charset="UTF-8"
|
29
|
+
Content-Length:
|
30
|
+
- '30'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Cache-Control:
|
34
|
+
- no-cache
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
Access-Control-Allow-Methods:
|
38
|
+
- GET
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '[1,"Sent","14782687699606329"]'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Fri, 04 Nov 2016 14:12:49 GMT
|
44
|
+
recorded_with: VCR 3.0.3
|
data/lib/pubnub/event.rb
CHANGED
@@ -31,6 +31,14 @@ module Pubnub
|
|
31
31
|
@channel = format_channels(@channel)
|
32
32
|
@channel_group = format_channel_group(options[:group], false)
|
33
33
|
@original_channel = format_channels(@channel, false)
|
34
|
+
|
35
|
+
case(options[:store])
|
36
|
+
when true
|
37
|
+
@store = 1
|
38
|
+
when false
|
39
|
+
@store = 0
|
40
|
+
end
|
41
|
+
|
34
42
|
Pubnub.logger.debug(:pubnub){"Event#initialize | Initialized #{self.class.to_s}"}
|
35
43
|
end
|
36
44
|
|
data/lib/pubnub/formatter.rb
CHANGED
data/lib/pubnub/version.rb
CHANGED
@@ -36,6 +36,46 @@ describe '#publish' do
|
|
36
36
|
@pubnub.uuid = 'tester'
|
37
37
|
end
|
38
38
|
|
39
|
+
it 'publishes with store' do
|
40
|
+
VCR.use_cassette('new_ones/publish/store-true', :record => :once) do
|
41
|
+
@pubnub.publish(
|
42
|
+
:message => 'whatever',
|
43
|
+
:channel => 'whatever',
|
44
|
+
:store => true,
|
45
|
+
:callback => @callback
|
46
|
+
)
|
47
|
+
|
48
|
+
eventually do
|
49
|
+
@envelopes.size.should eq 1
|
50
|
+
@envelopes.first.response_message.should eq 'Sent'
|
51
|
+
@envelopes.first.status.should eq 200
|
52
|
+
@envelopes.first.channel.should eq 'whatever'
|
53
|
+
@envelopes.first.message.should eq('whatever')
|
54
|
+
@envelopes.first.timetoken.blank?.should eq false
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'publishes without store' do
|
60
|
+
VCR.use_cassette('new_ones/publish/store-false', :record => :once) do
|
61
|
+
@pubnub.publish(
|
62
|
+
:message => 'whatever',
|
63
|
+
:channel => 'whatever',
|
64
|
+
:store => false,
|
65
|
+
:callback => @callback
|
66
|
+
)
|
67
|
+
|
68
|
+
eventually do
|
69
|
+
@envelopes.size.should eq 1
|
70
|
+
@envelopes.first.response_message.should eq 'Sent'
|
71
|
+
@envelopes.first.status.should eq 200
|
72
|
+
@envelopes.first.channel.should eq 'whatever'
|
73
|
+
@envelopes.first.message.should eq('whatever')
|
74
|
+
@envelopes.first.timetoken.blank?.should eq false
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
39
79
|
context 'gets status 200 response' do
|
40
80
|
context 'with valid json' do
|
41
81
|
context 'its asynchronous' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubnub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PubNub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -74,6 +74,7 @@ extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
77
78
|
- 3.5_to_3.6_upgrade_notes.md
|
78
79
|
- CHANGELOG.txt
|
79
80
|
- Gemfile
|
@@ -456,6 +457,8 @@ files:
|
|
456
457
|
- fixtures/vcr_cassettes/new_ones/publish/publish-https-non200-invalid.yml
|
457
458
|
- fixtures/vcr_cassettes/new_ones/publish/publish-https-non200-valid.yml
|
458
459
|
- fixtures/vcr_cassettes/new_ones/publish/publish-plain-array-of-hashes.yml
|
460
|
+
- fixtures/vcr_cassettes/new_ones/publish/store-false.yml
|
461
|
+
- fixtures/vcr_cassettes/new_ones/publish/store-true.yml
|
459
462
|
- fixtures/vcr_cassettes/non-heartbeated-subscribe.yml
|
460
463
|
- fixtures/vcr_cassettes/paged-history-async.yml
|
461
464
|
- fixtures/vcr_cassettes/paged-history-pages-async.yml
|
@@ -807,7 +810,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
807
810
|
version: '0'
|
808
811
|
requirements: []
|
809
812
|
rubyforge_project:
|
810
|
-
rubygems_version: 2.
|
813
|
+
rubygems_version: 2.4.5.1
|
811
814
|
signing_key:
|
812
815
|
specification_version: 4
|
813
816
|
summary: PubNub Official Ruby gem.
|