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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a00f68d0e493807b33f22560d5cacfb4fede783
4
- data.tar.gz: 82f017d06fb21f79fa9e119464a364191abe32d0
3
+ metadata.gz: 0d7d15f3c1f519a978e6f12b92fdc10c51753205
4
+ data.tar.gz: 691e2f2ba026b3833815d05c6e7aa8a719046dee
5
5
  SHA512:
6
- metadata.gz: 6e5fce4d22e00cb14966788e1f18cb9ce2e7ced7df732f5a66384f016e083c26148730b651d6a65d7e112e246dbf1a8aa749351a744bdacdb1e9a294c672f37b
7
- data.tar.gz: 29d15a7fbe35e9fe6cc940f3dcff96bd680027adf40855680cca5e53ee413c8dfb9d9129657c7cb6db8d36b7de9172ca2fc7ba61d4fe3af9a364244000a9df84
6
+ metadata.gz: 084e53aa0b103379ec4d8d4496946e91c1bc5139d96537dcfd1dd7d0e0f2b4bbfe7d7fa5a0fa386ed871b14481d34eec83023fcec128cfc3d5938232ceae268b
7
+ data.tar.gz: f9c31a7516a831f67db353f0d4a48b0d0521f01bf9402aaebda95f74b67fe02d8a0d999192e23c7c001439c49a8b6d177a7120572937de5e18fbd62b85748347
data/.pubnub.yml CHANGED
@@ -1,111 +1,117 @@
1
- ---
2
- version: "4.0.21"
3
- changelog:
4
- -
5
- changes:
6
- -
7
- text: "Fixed signature generation"
8
- type: bug
1
+ ---
2
+ changelog:
3
+ -
4
+ changes:
5
+ -
6
+ text: "Fixed signature generation and channel name escaping"
7
+ type: bug
8
+ date: 31-05-2017
9
+ version: "4.0.22"
10
+ -
11
+ changes:
12
+ -
13
+ text: "Fixed signature generation"
14
+ type: bug
9
15
  date: 18-04-2017
10
- version: 4.0.21
11
- -
12
- changes:
13
- -
14
- text: "origin can now be set in initialized client"
15
- type: improvement
16
- -
17
- text: "presence interval support"
18
- type: improvement
19
- -
20
- text: "allows using multiple cipher keys"
21
- type: improvement
16
+ version: "4.0.21"
17
+ -
18
+ changes:
19
+ -
20
+ text: "origin can now be set in initialized client"
21
+ type: improvement
22
+ -
23
+ text: "presence interval support"
24
+ type: improvement
25
+ -
26
+ text: "allows using multiple cipher keys"
27
+ type: improvement
22
28
  date: 11-04-2017
23
- version: 4.0.20
24
- -
25
- changes:
26
- -
29
+ version: "4.0.20"
30
+ -
31
+ changes:
32
+ -
27
33
  text: "Fixed sync subscribe not terminating actors"
28
34
  type: bug
29
35
  date: 02-03-2017
30
36
  version: v4.0.18
31
- -
32
- changes:
33
- -
37
+ -
38
+ changes:
39
+ -
34
40
  text: "Added a bit more debug logging"
35
41
  type: improvement
36
- -
42
+ -
37
43
  text: "Updated default origin"
38
44
  type: improvement
39
45
  date: 21-12-2016
40
46
  version: v4.0.17
41
- -
42
- changes:
43
- -
47
+ -
48
+ changes:
49
+ -
44
50
  text: "Fixed missing channel group parameter in leave event"
45
51
  type: bug
46
52
  date: ~
47
53
  version: v4.0.16
48
- -
49
- changes:
50
- -
54
+ -
55
+ changes:
56
+ -
51
57
  text: "Fixed PAM signature when some special characters are present"
52
58
  type: bug
53
59
  date: ~
54
60
  version: v4.0.15
55
- -
56
- changes:
57
- -
61
+ -
62
+ changes:
63
+ -
58
64
  text: "Added ttl parameter for publish"
59
65
  type: improvement
60
66
  date: ~
61
67
  version: v4.0.14
62
- -
63
- changes:
64
- -
68
+ -
69
+ changes:
70
+ -
65
71
  text: "Changed init message log level to debug"
66
72
  type: improvement
67
73
  date: ~
68
74
  version: v4.0.13
69
- -
70
- changes:
71
- -
75
+ -
76
+ changes:
77
+ -
72
78
  text: "Added alert on catchup failure (REQUEST_MESSAGE_COUNT_EXCEEDED)"
73
79
  type: improvement
74
80
  date: ~
75
81
  version: v4.0.12
76
- -
77
- changes:
78
- -
82
+ -
83
+ changes:
84
+ -
79
85
  text: "Added super admin mode (Enabled when secret key is set on Pubnub::Client init)"
80
86
  type: improvement
81
87
  date: ~
82
88
  version: v4.0.11
83
- -
84
- changes:
85
- -
89
+ -
90
+ changes:
91
+ -
86
92
  text: "Better single events timeout handling"
87
93
  type: improvement
88
- -
94
+ -
89
95
  text: "DRYed envelope formatting a bit"
90
96
  type: improvement
91
97
  date: ~
92
98
  version: v4.0.10
93
- -
94
- changes:
95
- -
99
+ -
100
+ changes:
101
+ -
96
102
  text: "Removed json dependency"
97
103
  type: improvement
98
- -
104
+ -
99
105
  text: "Updated dependecies"
100
106
  type: improvement
101
107
  date: ~
102
108
  version: v4.0.9
103
- -
104
- changes:
105
- -
109
+ -
110
+ changes:
111
+ -
106
112
  text: "Updated dry-validation."
107
113
  type: improvement
108
- -
114
+ -
109
115
  text: "Dropped support for ruby 2.0."
110
116
  type: improvement
111
117
  date: ~
@@ -182,21 +188,23 @@ changelog:
182
188
  type: improvement
183
189
  version: v3.8.0
184
190
  features:
185
- access:
191
+ access:
186
192
  - ACCESS-GRANT
187
- - ACCESS-SECRET-KEY-ALL-ACCESS
188
- channel-groups:
193
+ - ACCESS-SECRET-KEY-ALL-ACCESS
194
+ channel-groups:
189
195
  - CHANNEL-GROUPS-ADD-CHANNELS
190
196
  - CHANNEL-GROUPS-REMOVE-CHANNELS
191
197
  - CHANNEL-GROUPS-REMOVE-GROUPS
192
198
  - CHANNEL-GROUPS-LIST-CHANNELS-IN-GROUP
193
- presence:
199
+ notify:
200
+ - REQUEST-MESSAGE-COUNT-EXCEEDED
201
+ presence:
194
202
  - PRESENCE-HERE-NOW
195
203
  - PRESENCE-WHERE-NOW
196
204
  - PRESENCE-SET-STATE
197
205
  - PRESENCE-GET-STATE
198
206
  - PRESENCE-HEARTBEAT
199
- publish:
207
+ publish:
200
208
  - PUBLISH-STORE-FLAG
201
209
  - PUBLISH-RAW-JSON
202
210
  - PUBLISH-WITH-METADATA
@@ -205,14 +213,12 @@ features:
205
213
  - PUBLISH-SYNC
206
214
  - PUBLISH-ASYNC
207
215
  - PUBLISH-MESSAGE-TTL
208
- storage:
216
+ storage:
209
217
  - STORAGE-REVERSE
210
218
  - STORAGE-INCLUDE-TIMETOKEN
211
219
  - STORAGE-START-END
212
220
  - STORAGE-COUNT
213
- time:
214
- - TIME-TIME
215
- subscribe:
221
+ subscribe:
216
222
  - SUBSCRIBE-CHANNELS
217
223
  - SUBSCRIBE-CHANNEL-GROUPS
218
224
  - SUBSCRIBE-PRESENCE-CHANNELS
@@ -220,23 +226,24 @@ features:
220
226
  - SUBSCRIBE-WITH-TIMETOKEN
221
227
  - SUBSCRIBE-WILDCARD
222
228
  - SUBSCRIBE-FILTER-EXPRESSION
223
- notify:
224
- - REQUEST-MESSAGE-COUNT-EXCEEDED
225
- supported-platforms:
226
- -
227
- version: PubNub Ruby SDK
228
- platforms:
229
- - FreeBSD 8-STABLE or later, amd64, 386.
230
- - Linux 2.6 or later, amd64, 386.
231
- - Mac OS X 10.8 or later, amd64
232
- - Windows 7 or later, amd64, 386, use rubyinstaller and dev pack.
233
- - Apart from the above, PubNub Ruby SDK works on mostly all platforms where the supported Ruby versions work. To use ssl connection, Ruby should be compiled with openssl support.
234
- editors:
235
- - ruby 2.4.0
236
- - ruby 2.3.3
237
- - ruby 2.2.6
238
- - ruby 2.1.10
239
- - jruby-9.1.8.0
229
+ time:
230
+ - TIME-TIME
240
231
  name: ruby
241
232
  schema: 1
242
233
  scm: github.com/pubnub/ruby
234
+ supported-platforms:
235
+ -
236
+ editors:
237
+ - "ruby 2.4.0"
238
+ - "ruby 2.3.3"
239
+ - "ruby 2.2.6"
240
+ - "ruby 2.1.10"
241
+ - jruby-9.1.8.0
242
+ platforms:
243
+ - "FreeBSD 8-STABLE or later, amd64, 386."
244
+ - "Linux 2.6 or later, amd64, 386."
245
+ - "Mac OS X 10.8 or later, amd64"
246
+ - "Windows 7 or later, amd64, 386, use rubyinstaller and dev pack."
247
+ - "Apart from the above, PubNub Ruby SDK works on mostly all platforms where the supported Ruby versions work. To use ssl connection, Ruby should be compiled with openssl support."
248
+ version: "PubNub Ruby SDK"
249
+ version: "4.0.22"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ##### 4.0.22
2
+ * Fixed signature generation and channel name escaping
3
+
4
+ ##### 4.0.21
5
+ * Fixed signature generation
6
+
7
+ ##### 4.0.20
8
+ * Allowing using multiple cipher keys
9
+
1
10
  ##### 4.0.19
2
11
  * Fixed sync subscribe.
3
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pubnub (4.0.20)
4
+ pubnub (4.0.21)
5
5
  celluloid (~> 0.17)
6
6
  dry-validation (~> 0.10)
7
7
  httpclient (~> 2.8)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.21
1
+ 4.0.22
@@ -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=demo&m=1&pnsdk=PubNub-Ruby/4.0.21&r=1&signature=bIANk0l7J3Ya1n1ydlQUa3rX5_tI4tjuSfcQAkYWAAY=&timestamp=1496242823&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:23 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Wed, 31 May 2017 15:00:23 GMT
23
+ Content-Type:
24
+ - text/javascript; charset=UTF-8
25
+ Content-Length:
26
+ - '203'
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":{"demo":{"r":1,"w":1,"m":1}}},"service":"Access
40
+ Manager","status":200}'
41
+ http_version:
42
+ recorded_at: Wed, 31 May 2017 15:00:23 GMT
43
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,180 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel-group/a!@%23$%25%5E&()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z?add=a!@%23$%25%5E%26()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E??~%60Z&pnsdk=PubNub-Ruby/4.0.21&signature=kjmyFn1ttT%2BHAcKpOTZZigASBRH1/l528KOHmamcgsg=&timestamp=1496400706&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:51:46 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 02 Jun 2017 10:51:46 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '79'
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: '{"status": 200, "message": "OK", "service": "channel-registry", "error":
44
+ false}'
45
+ http_version:
46
+ recorded_at: Fri, 02 Jun 2017 10:51:46 GMT
47
+ - request:
48
+ method: get
49
+ uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel-group/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=k2%2Bce2JIuB1kFZoCZCGoxqKZPbJrrgqriSOkMrqEjPI=&timestamp=1496400706&uuid=test
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 10:51:46 GMT
60
+ response:
61
+ status:
62
+ code: 200
63
+ message: OK
64
+ headers:
65
+ Date:
66
+ - Fri, 02 Jun 2017 10:51:46 GMT
67
+ Content-Type:
68
+ - text/javascript; charset="UTF-8"
69
+ Content-Length:
70
+ - '168'
71
+ Connection:
72
+ - keep-alive
73
+ Cache-Control:
74
+ - no-cache
75
+ Access-Control-Allow-Origin:
76
+ - "*"
77
+ Access-Control-Allow-Methods:
78
+ - GET
79
+ Accept-Ranges:
80
+ - bytes
81
+ Age:
82
+ - '0'
83
+ Server:
84
+ - Pubnub
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"status": 200, "payload": {"channels": ["a!@#$%^&()ŻÓŁ[]{}\"\"<>??~`Z"],
88
+ "group": "a!@#$%^&()ŻÓŁ[]{}\"\"<>??~`Z"}, "service": "channel-registry", "error":
89
+ false}'
90
+ http_version:
91
+ recorded_at: Fri, 02 Jun 2017 10:51:46 GMT
92
+ - request:
93
+ method: get
94
+ uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel-group/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&remove=a!@%23$%25%5E%26()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E??~%60Z&signature=JcO20Q6GH2xmAbNizJ1t4gnfj44Gohct2PfpvlZxGc8=&timestamp=1496400706&uuid=test
95
+ body:
96
+ encoding: UTF-8
97
+ string: ''
98
+ headers:
99
+ User-Agent:
100
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
101
+ Accept:
102
+ - "*/*"
103
+ Date:
104
+ - Fri, 02 Jun 2017 10:51:46 GMT
105
+ response:
106
+ status:
107
+ code: 200
108
+ message: OK
109
+ headers:
110
+ Date:
111
+ - Fri, 02 Jun 2017 10:51:46 GMT
112
+ Content-Type:
113
+ - text/javascript; charset="UTF-8"
114
+ Content-Length:
115
+ - '79'
116
+ Connection:
117
+ - keep-alive
118
+ Cache-Control:
119
+ - no-cache
120
+ Access-Control-Allow-Origin:
121
+ - "*"
122
+ Access-Control-Allow-Methods:
123
+ - GET
124
+ Accept-Ranges:
125
+ - bytes
126
+ Age:
127
+ - '0'
128
+ Server:
129
+ - Pubnub
130
+ body:
131
+ encoding: UTF-8
132
+ string: '{"status": 200, "message": "OK", "service": "channel-registry", "error":
133
+ false}'
134
+ http_version:
135
+ recorded_at: Fri, 02 Jun 2017 10:51:46 GMT
136
+ - request:
137
+ method: get
138
+ uri: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-b6df3d38-45e3-11e7-86e2-02ee2ddab7fe/channel-group/a!@%23$%25%5E&()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z/remove?pnsdk=PubNub-Ruby/4.0.21&signature=CRTxmth8MPcoFQXfVaJ24otecZwUwvcqRrsaqcmqK80=&timestamp=1496400706&uuid=test
139
+ body:
140
+ encoding: UTF-8
141
+ string: ''
142
+ headers:
143
+ User-Agent:
144
+ - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01))
145
+ Accept:
146
+ - "*/*"
147
+ Date:
148
+ - Fri, 02 Jun 2017 10:51:46 GMT
149
+ response:
150
+ status:
151
+ code: 200
152
+ message: OK
153
+ headers:
154
+ Date:
155
+ - Fri, 02 Jun 2017 10:51:46 GMT
156
+ Content-Type:
157
+ - text/javascript; charset="UTF-8"
158
+ Content-Length:
159
+ - '79'
160
+ Connection:
161
+ - keep-alive
162
+ Cache-Control:
163
+ - no-cache
164
+ Access-Control-Allow-Origin:
165
+ - "*"
166
+ Access-Control-Allow-Methods:
167
+ - GET
168
+ Accept-Ranges:
169
+ - bytes
170
+ Age:
171
+ - '0'
172
+ Server:
173
+ - Pubnub
174
+ body:
175
+ encoding: UTF-8
176
+ string: '{"status": 200, "message": "OK", "service": "channel-registry", "error":
177
+ false}'
178
+ http_version:
179
+ recorded_at: Fri, 02 Jun 2017 10:51:46 GMT
180
+ recorded_with: VCR 3.0.1