pubnub 4.0.21 → 4.0.22

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.

Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.pubnub.yml +91 -84
  3. data/CHANGELOG.md +9 -0
  4. data/Gemfile.lock +1 -1
  5. data/VERSION +1 -1
  6. data/fixtures/vcr_cassettes/lib/signatures/all-letters.yml +43 -0
  7. data/fixtures/vcr_cassettes/lib/signatures/channel_registration.yml +180 -0
  8. data/fixtures/vcr_cassettes/lib/signatures/heartbeat.yml +46 -0
  9. data/fixtures/vcr_cassettes/lib/signatures/here_now.yml +47 -0
  10. data/fixtures/vcr_cassettes/lib/signatures/history.yml +46 -0
  11. data/fixtures/vcr_cassettes/lib/signatures/leave.yml +46 -0
  12. data/fixtures/vcr_cassettes/lib/signatures/presence.yml +40 -0
  13. data/fixtures/vcr_cassettes/lib/signatures/publish.yml +40 -0
  14. data/fixtures/vcr_cassettes/lib/signatures/special.yml +43 -0
  15. data/fixtures/vcr_cassettes/lib/signatures/state.yml +92 -0
  16. data/fixtures/vcr_cassettes/lib/signatures/subscribe.yml +40 -0
  17. data/fixtures/vcr_cassettes/lib/signatures/where_now.yml +47 -0
  18. data/fixtures/vcr_cassettes/lib/signatures/wildcard.yml +43 -0
  19. data/lib/pubnub/event/signature.rb +1 -3
  20. data/lib/pubnub/events/channel_registration.rb +2 -2
  21. data/lib/pubnub/events/here_now.rb +1 -1
  22. data/lib/pubnub/events/history.rb +1 -1
  23. data/lib/pubnub/events/presence.rb +1 -1
  24. data/lib/pubnub/events/publish.rb +1 -1
  25. data/lib/pubnub/events/set_state.rb +1 -1
  26. data/lib/pubnub/events/state.rb +1 -1
  27. data/lib/pubnub/events/where_now.rb +1 -1
  28. data/lib/pubnub/formatter.rb +4 -4
  29. data/lib/pubnub/pam.rb +4 -7
  30. data/lib/pubnub/version.rb +1 -1
  31. data/spec/lib/event_spec.rb +52 -52
  32. data/spec/lib/signatures_spec.rb +277 -0
  33. metadata +18 -3
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/presence/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel/a!@%23$%25%5E&()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/heartbeat?heartbeat=10&pnsdk=PubNub-Ruby/4.0.21&signature=5n3Auh0NRdeU4%2BttBZdI1S/Uih2PoGEv%2BX3%2BPDXA2gI=&timestamp=1496400995&uuid=test
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 10:56:35 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 10:56:35 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '55'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Methods:
32
+ - OPTIONS, GET, POST
33
+ Cache-Control:
34
+ - no-cache
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub Presence
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "message": "OK", "service": "Presence"}'
44
+ http_version:
45
+ recorded_at: Fri, 02 Jun 2017 10:56:35 GMT
46
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/presence/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z?pnsdk=PubNub-Ruby/4.0.21&signature=TCAR%2BkkCtGwRwBLF6k7jFjXnBBcnFHqo4GQDX7MLVNQ=&timestamp=1496401140&uuid=test
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 10:59:00 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 10:59:00 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '84'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Methods:
32
+ - OPTIONS, GET, POST
33
+ Cache-Control:
34
+ - no-cache
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub Presence
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "message": "OK", "occupancy": 0, "uuids": [], "service":
44
+ "Presence"}'
45
+ http_version:
46
+ recorded_at: Fri, 02 Jun 2017 10:59:00 GMT
47
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/history/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z?pnsdk=PubNub-Ruby/4.0.21&signature=KCt9K%2Bd/tAw5UgFax5%2BuwBf6iVPp8pQ4DHG2bX%2B7k/s=&timestamp=1496396745&uuid=test
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 09:45:45 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 09:45:45 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '8'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: "[[],0,0]"
44
+ http_version:
45
+ recorded_at: Fri, 02 Jun 2017 09:45:45 GMT
46
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/presence/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/leave?pnsdk=PubNub-Ruby/4.0.21&signature=kJUHWOmTP7r0hw6Ji6bY2xfIrrph1ZsOf9TGW3Rr2us=&timestamp=1496401409&uuid=test
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 11:03:29 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 11:03:30 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '74'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Methods:
32
+ - OPTIONS, GET, POST
33
+ Cache-Control:
34
+ - no-cache
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub Presence
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "message": "OK", "action": "leave", "service": "Presence"}'
44
+ http_version:
45
+ recorded_at: Fri, 02 Jun 2017 11:03:30 GMT
46
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/subscribe/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/a%2521%2540%2523%2524%2525%255E%2526*%2528%2529%25C5%25BB%25C3%2593%25C5%2581%255B%255D%257B%257D%2522%2522%253C%253E%253F%253F%257E%2560Z-pnpres/0?pnsdk=PubNub-Ruby/4.0.21&signature=Fk7Vsz4y3KOeWN7LjGCskmkhBaE0mvCc1ewpLv7Z%2B8E=&t=%7B%22r%22:0,%22t%22:0%7D&timestamp=1496401532&uuid=test
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 11:05:32 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 11:05:33 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '45'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"t":{"t":"14964015330103493","r":12},"m":[]}'
38
+ http_version:
39
+ recorded_at: Fri, 02 Jun 2017 11:05:33 GMT
40
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/publish/pub-c-cd48c41a-afce-4f37-8b3b-7fafccf52e2d/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/0/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/0/%22a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%5C%22%5C%22%3C%3E%3F%3F~%60Z%22?ortt=%7B%22t%22:14963961271418600%7D&pnsdk=PubNub-Ruby/4.0.21&seqn=1&signature=B8naUKNKIi4R7N%2BpqHwqRO1o5NFCprb6VlsZ6fAnLN0=&timestamp=1496396127&uuid=test
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 09:35:27 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 09:35:27 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '30'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ body:
36
+ encoding: UTF-8
37
+ string: '[1,"Sent","14963961275525173"]'
38
+ http_version:
39
+ recorded_at: Fri, 02 Jun 2017 09:35:27 GMT
40
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe?channel=a!@%23$%25%5E%26*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E??~%60Z&m=1&pnsdk=PubNub-Ruby/4.0.21&r=1&signature=DFShNuyFGM1ryktwaS0iFPnRM459eDpAe1oxFEVNyuQ=&timestamp=1496242824&ttl=1440&uuid=test&w=1
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Wed, 31 May 2017 15:00:24 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Wed, 31 May 2017 15:00:24 GMT
23
+ Content-Type:
24
+ - text/javascript; charset=UTF-8
25
+ Content-Length:
26
+ - '231'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Methods:
32
+ - GET
33
+ Access-Control-Allow-Headers:
34
+ - Origin, X-Requested-With, Content-Type, Accept
35
+ Cache-Control:
36
+ - no-cache, no-store, must-revalidate
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"message":"Success","payload":{"level":"channel","subscribe_key":"sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe","ttl":1440,"channels":{"a!@#$%^&*()ŻÓŁ[]{}\"\"<>??~`Z":{"r":1,"w":1,"m":1}}},"service":"Access
40
+ Manager","status":200}'
41
+ http_version:
42
+ recorded_at: Wed, 31 May 2017 15:00:24 GMT
43
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,92 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/presence/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/uuid/a!@%23$%25%5E&()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/data?pnsdk=PubNub-Ruby/4.0.21&signature=0qsr3iEtrhHAlRHTo0vWxoDjwGaLYd84sfN%2BDItQ4mY=&state=%7B%22something%22:%22a!@%23$%25%5E%26*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%5C%22%5C%22%3C%3E??~%60Z%22%7D&timestamp=1496402248&uuid=a!@%23$%25%5E%26()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E??~%60Z
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 11:17:28 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 11:17:28 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '129'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Methods:
32
+ - OPTIONS, GET, POST
33
+ Cache-Control:
34
+ - no-cache
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub Presence
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "message": "OK", "payload": {"something": "a!@#$%^&*()\u017b\u00d3\u0141[]{}\"\"<>??~`Z"},
44
+ "service": "Presence"}'
45
+ http_version:
46
+ recorded_at: Fri, 02 Jun 2017 11:17:28 GMT
47
+ - request:
48
+ method: get
49
+ uri: http://ps.pndsn.com/v2/presence/sub_key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/uuid/a!@%23$%25%5E&()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z?pnsdk=PubNub-Ruby/4.0.21&signature=8eeA8A2RRX3635Tcii1h8NmJ9nt%2BSHTC/e1Xxn/97Mg=&timestamp=1496402248&uuid=a!@%23$%25%5E%26()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E??~%60Z
50
+ body:
51
+ encoding: UTF-8
52
+ string: ''
53
+ headers:
54
+ User-Agent:
55
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
56
+ Accept:
57
+ - "*/*"
58
+ Date:
59
+ - Fri, 02 Jun 2017 11:17:28 GMT
60
+ response:
61
+ status:
62
+ code: 200
63
+ message: OK
64
+ headers:
65
+ Date:
66
+ - Fri, 02 Jun 2017 11:17:28 GMT
67
+ Content-Type:
68
+ - text/javascript; charset="UTF-8"
69
+ Content-Length:
70
+ - '243'
71
+ Connection:
72
+ - keep-alive
73
+ Access-Control-Allow-Origin:
74
+ - "*"
75
+ Access-Control-Allow-Methods:
76
+ - OPTIONS, GET, POST
77
+ Cache-Control:
78
+ - no-cache
79
+ Accept-Ranges:
80
+ - bytes
81
+ Age:
82
+ - '0'
83
+ Server:
84
+ - Pubnub Presence
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"status": 200, "message": "OK", "payload": {"something": "a!@#$%^&*()\u017b\u00d3\u0141[]{}\"\"<>??~`Z"},
88
+ "uuid": "a!@#$%^&()\u017b\u00d3\u0141[]{}\"\"<>??~`Z", "channel": "a!@#$%^&*()\u017b\u00d3\u0141[]{}\"\"<>??~`Z",
89
+ "service": "Presence"}'
90
+ http_version:
91
+ recorded_at: Fri, 02 Jun 2017 11:17:28 GMT
92
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/subscribe/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/0?pnsdk=PubNub-Ruby/4.0.21&signature=LYKV6zDYIc6pT3NjDr2SkurYZE3TrRJI9%2B0FE90vTnE=&t=%7B%22r%22:0,%22t%22:0%7D&timestamp=1496397558&uuid=test
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 02 Jun 2017 09:59:18 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 09:59:18 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '45'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"t":{"t":"14963975584453967","r":12},"m":[]}'
38
+ http_version:
39
+ recorded_at: Fri, 02 Jun 2017 09:59:18 GMT
40
+ recorded_with: VCR 3.0.1