pubnub 4.2.5 → 4.2.6

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
  SHA256:
3
- metadata.gz: 86e45590c51fc5c68bc1338d7e328647e388825f3d880a3e80ffc1e2c5c64240
4
- data.tar.gz: 0f5e0dc7e964e9deb5a52ef9a78281ec5819a8ac6059e52ae10ca8ec872ea800
3
+ metadata.gz: 3f7a81a88398281f6a7aabc7b3a6cfdc12c3f2c69d3f38648f35de7143e325d4
4
+ data.tar.gz: cc0ceed081a5b115b283fe9ccc0e344e9865b815e3fef4b02ef24c01ea4d9507
5
5
  SHA512:
6
- metadata.gz: 19b6fc85836903d3baea82171224b3fad0178b89ebb6efa4a18d831e412d1b7ca74cb37a035d3051cb33c13ac4211483f6940ad831ee729a86506cd5e8fc6071
7
- data.tar.gz: 2daad3e26f3398ad1d77811557930c230b87016e09269b595458b486e941063296d78addb422d70c786f653a19ba5a3305bd29cf2a190492f65899107b1c40d3
6
+ metadata.gz: 1a715e51fcc684a51fb1ef192f95780ebf3c815c6fe0cf2c67df58a38a697be9a80e9a52541abe6a4202ebd2dc0f2b330b7c82ea261230bb95e6c3e73cb4509a
7
+ data.tar.gz: b4d7f702196a4aa9c32b4ca94c12ec9281ab37ad083175a021ef798f5b3148d3820abde80454b999b9609001e3bc76d61b27d62430c03e2f71166186cc0f91fb
@@ -1,6 +1,16 @@
1
1
  ---
2
- version: "4.2.5"
2
+ version: "4.2.6"
3
3
  changelog:
4
+ -
5
+ changes:
6
+ -
7
+ text: "History can now respond with message meta information."
8
+ type: feature
9
+ -
10
+ text: "Added official support for Ruby 2.7X\u2028\u2028fix: Decrypt History messages\u2028\u2028History properly decrypts messages when using the \"include_token\" parameter."
11
+ type: feature
12
+ date: 25-08-2020
13
+ version: v4.2.6
4
14
  -
5
15
  changes:
6
16
  -
@@ -27,7 +37,7 @@ changelog:
27
37
  text: "Resolved issue with subscribe loop where the connection was reinitiated after receiving a 4xx error code from the server"
28
38
  type: bugfix
29
39
  date: 14-02-2020
30
- version: "4.2.5"
40
+ version: "4.2.6"
31
41
  -
32
42
  changes:
33
43
  -
@@ -123,210 +133,210 @@ changelog:
123
133
  date: 26-07-2017
124
134
  version: "4.0.23"
125
135
  -
126
- changes:
127
- -
136
+ changes:
137
+ -
128
138
  text: "Fixed signature generation and channel name escaping"
129
139
  type: bug
130
140
  date: 31-05-2017
131
141
  version: "4.0.22"
132
- -
133
- changes:
134
- -
142
+ -
143
+ changes:
144
+ -
135
145
  text: "Fixed signature generation"
136
146
  type: bug
137
147
  date: 18-04-2017
138
148
  version: "4.0.21"
139
- -
140
- changes:
141
- -
149
+ -
150
+ changes:
151
+ -
142
152
  text: "origin can now be set in initialized client"
143
153
  type: improvement
144
- -
154
+ -
145
155
  text: "presence interval support"
146
156
  type: improvement
147
- -
157
+ -
148
158
  text: "allows using multiple cipher keys"
149
159
  type: improvement
150
160
  date: 11-04-2017
151
161
  version: "4.0.20"
152
- -
153
- changes:
154
- -
162
+ -
163
+ changes:
164
+ -
155
165
  text: "Fixed sync subscribe not terminating actors"
156
166
  type: bug
157
167
  date: 02-03-2017
158
168
  version: v4.0.18
159
- -
160
- changes:
161
- -
169
+ -
170
+ changes:
171
+ -
162
172
  text: "Added a bit more debug logging"
163
173
  type: improvement
164
- -
174
+ -
165
175
  text: "Updated default origin"
166
176
  type: improvement
167
177
  date: 21-12-2016
168
178
  version: v4.0.17
169
- -
170
- changes:
171
- -
179
+ -
180
+ changes:
181
+ -
172
182
  text: "Fixed missing channel group parameter in leave event"
173
183
  type: bug
174
184
  date: ~
175
185
  version: v4.0.16
176
- -
177
- changes:
178
- -
186
+ -
187
+ changes:
188
+ -
179
189
  text: "Fixed PAM signature when some special characters are present"
180
190
  type: bug
181
191
  date: ~
182
192
  version: v4.0.15
183
- -
184
- changes:
185
- -
193
+ -
194
+ changes:
195
+ -
186
196
  text: "Added ttl parameter for publish"
187
197
  type: improvement
188
198
  date: ~
189
199
  version: v4.0.14
190
- -
191
- changes:
192
- -
200
+ -
201
+ changes:
202
+ -
193
203
  text: "Changed init message log level to debug"
194
204
  type: improvement
195
205
  date: ~
196
206
  version: v4.0.13
197
- -
198
- changes:
199
- -
207
+ -
208
+ changes:
209
+ -
200
210
  text: "Added alert on catchup failure (REQUEST_MESSAGE_COUNT_EXCEEDED)"
201
211
  type: improvement
202
212
  date: ~
203
213
  version: v4.0.12
204
- -
205
- changes:
206
- -
214
+ -
215
+ changes:
216
+ -
207
217
  text: "Added super admin mode (Enabled when secret key is set on Pubnub::Client init)"
208
218
  type: improvement
209
219
  date: ~
210
220
  version: v4.0.11
211
- -
212
- changes:
213
- -
221
+ -
222
+ changes:
223
+ -
214
224
  text: "Better single events timeout handling"
215
225
  type: improvement
216
- -
226
+ -
217
227
  text: "DRYed envelope formatting a bit"
218
228
  type: improvement
219
229
  date: ~
220
230
  version: v4.0.10
221
- -
222
- changes:
223
- -
231
+ -
232
+ changes:
233
+ -
224
234
  text: "Removed json dependency"
225
235
  type: improvement
226
- -
236
+ -
227
237
  text: "Updated dependecies"
228
238
  type: improvement
229
239
  date: ~
230
240
  version: v4.0.9
231
- -
232
- changes:
233
- -
241
+ -
242
+ changes:
243
+ -
234
244
  text: "Updated dry-validation."
235
245
  type: improvement
236
- -
246
+ -
237
247
  text: "Dropped support for ruby 2.0."
238
248
  type: improvement
239
249
  date: ~
240
250
  version: v4.0.8
241
- -
242
- changes:
243
- -
251
+ -
252
+ changes:
253
+ -
244
254
  text: "Added message decrypting in history."
245
255
  type: improvement
246
256
  date: ~
247
257
  version: v4.0.7
248
- -
249
- changes:
250
- -
258
+ -
259
+ changes:
260
+ -
251
261
  text: "channel and channels are the same argument."
252
262
  type: improvement
253
- -
263
+ -
254
264
  text: "channel_group and channel_groups are the same argument."
255
265
  type: improvement
256
- -
266
+ -
257
267
  text: "added `with_presence` flag for subscribe, default false."
258
268
  type: improvement
259
269
  date: ~
260
270
  version: v4.0.6
261
- -
262
- changes:
263
- -
271
+ -
272
+ changes:
273
+ -
264
274
  text: "Required CGI."
265
275
  type: improvement
266
276
  version: v4.0.5
267
- -
268
- changes:
269
- -
277
+ -
278
+ changes:
279
+ -
270
280
  text: Added
271
281
  type: feature
272
282
  version: v4.0.2
273
- -
274
- changes:
275
- -
283
+ -
284
+ changes:
285
+ -
276
286
  text: "Updated dry-validation and EnvelopeSchema."
277
287
  type: improvement
278
288
  version: v4.0.1
279
- -
280
- changes:
281
- -
289
+ -
290
+ changes:
291
+ -
282
292
  text: "Removed auth_key and uuid setters (#set_auth_key,"
283
293
  type: feature
284
- -
294
+ -
285
295
  text: Added
286
296
  type: improvement
287
297
  version: v4.0.0
288
- -
289
- changes:
290
- -
298
+ -
299
+ changes:
300
+ -
291
301
  text: "Restored auth_key and uuid setters. Important notice: they will be removed"
292
302
  type: improvement
293
303
  version: v3.8.3
294
- -
295
- changes:
296
- -
304
+ -
305
+ changes:
306
+ -
297
307
  text: "Added :include_token parameter to history call."
298
308
  type: feature
299
309
  version: v3.8.2
300
- -
301
- changes:
302
- -
310
+ -
311
+ changes:
312
+ -
303
313
  text: "Updated celluloid dependency."
304
314
  type: improvement
305
315
  version: v3.8.1
306
- -
307
- changes:
308
- -
316
+ -
317
+ changes:
318
+ -
309
319
  text: "Release of celluloid version of pubnub gem. It's complete rewrite but public API doesn't change."
310
320
  type: improvement
311
321
  version: v3.8.0
312
- features:
313
- access:
322
+ features:
323
+ access:
314
324
  - ACCESS-GRANT
315
325
  - ACCESS-SECRET-KEY-ALL-ACCESS
316
- channel-groups:
326
+ channel-groups:
317
327
  - CHANNEL-GROUPS-ADD-CHANNELS
318
328
  - CHANNEL-GROUPS-REMOVE-CHANNELS
319
329
  - CHANNEL-GROUPS-REMOVE-GROUPS
320
330
  - CHANNEL-GROUPS-LIST-CHANNELS-IN-GROUP
321
- notify:
331
+ notify:
322
332
  - REQUEST-MESSAGE-COUNT-EXCEEDED
323
- presence:
333
+ presence:
324
334
  - PRESENCE-HERE-NOW
325
335
  - PRESENCE-WHERE-NOW
326
336
  - PRESENCE-SET-STATE
327
337
  - PRESENCE-GET-STATE
328
338
  - PRESENCE-HEARTBEAT
329
- publish:
339
+ publish:
330
340
  - PUBLISH-STORE-FLAG
331
341
  - PUBLISH-RAW-JSON
332
342
  - PUBLISH-WITH-METADATA
@@ -335,14 +345,14 @@ features:
335
345
  - PUBLISH-SYNC
336
346
  - PUBLISH-ASYNC
337
347
  - PUBLISH-MESSAGE-TTL
338
- storage:
348
+ storage:
339
349
  - STORAGE-REVERSE
340
350
  - STORAGE-INCLUDE-TIMETOKEN
341
351
  - STORAGE-START-END
342
352
  - STORAGE-COUNT
343
353
  - STORAGE-DELETE-MESSAGES
344
354
  - STORAGE-MESSAGE-COUNT
345
- subscribe:
355
+ subscribe:
346
356
  - SUBSCRIBE-CHANNELS
347
357
  - SUBSCRIBE-CHANNEL-GROUPS
348
358
  - SUBSCRIBE-PRESENCE-CHANNELS
@@ -377,18 +387,18 @@ features:
377
387
  - OBJECTS-ADD-MEMBERS
378
388
  - OBJECTS-REMOVE-MEMBERS
379
389
  - OBJECTS-UPDATE-MEMBERS
380
- time:
390
+ time:
381
391
  - TIME-TIME
382
392
  name: ruby
383
393
  schema: 1
384
394
  scm: github.com/pubnub/ruby
385
- supported-platforms:
386
- -
387
- editors:
395
+ supported-platforms:
396
+ -
397
+ editors:
388
398
  - "ruby 2.6"
389
399
  - "ruby 2.5"
390
400
  - "ruby 2.4"
391
- platforms:
401
+ platforms:
392
402
  - "FreeBSD 8-STABLE or later, amd64, 386"
393
403
  - "Linux 2.6 or later, amd64, 386"
394
404
  - "macOS 10.8 or later, amd64"
@@ -17,18 +17,20 @@ stages:
17
17
  jobs:
18
18
  include:
19
19
  - stage: "test"
20
- name: 'Ruby 2.4.4'
21
- rvm: '2.4.4'
20
+ name: 'Ruby 2.4.10'
21
+ rvm: '2.4.10'
22
22
  script: bundle exec rspec
23
- - name: 'Ruby 2.5.1'
24
- rvm: '2.5.1'
23
+ - name: 'Ruby 2.5.8'
24
+ rvm: '2.5.8'
25
25
  script: bundle exec rspec
26
- - name: 'Ruby 2.6.3'
27
- rvm: '2.6.3'
26
+ - name: 'Ruby 2.6.6'
27
+ rvm: '2.6.6'
28
+ script: bundle exec rspec
29
+ - name: 'Ruby 2.7.1'
30
+ rvm: '2.7.1'
28
31
  script: bundle exec rspec
29
32
  - name: 'Ruby JRuby'
30
33
  rvm: 'jruby-head'
31
34
  env: JRUBY_OPTS="--server -J-Xms1500m -J-Xmx1500m -J-XX:+UseConcMarkSweepGC -J-XX:-UseGCOverheadLimit -J-XX:+CMSClassUnloadingEnabled"
32
35
  jdk: oraclejdk11
33
36
  script: bundle exec rspec
34
-
@@ -1,14 +1,19 @@
1
+ ##### v4.2.6
2
+
3
+ - History can now respond with message meta information.
4
+ - Added official support for Ruby 2.7X20282028fix: Decrypt History messages20282028History properly decrypts messages when using the "include_token" parameter.
5
+
1
6
  ##### v4.2.5
2
7
 
3
- - Updated Subscribe endpoint tests to use an unsorted channels list.
4
- - Fixed Message Counts channel timetokens by disabling alphabetic sorting of the channels list.
8
+ - Updated Subscribe endpoint tests to use an unsorted channels list.
9
+ - Fixed Message Counts channel timetokens by disabling alphabetic sorting of the channels list.
5
10
 
6
11
  ##### v4.2.4
7
12
 
8
- - Update Grant, Revoke and Audit PAM tests to use v2 paths instead of v1.
13
+ - Update Grant, Revoke and Audit PAM tests to use v2 paths instead of v1.
9
14
  - Replace event name with full endpoint path in PAM signatures, for compatibility with PAM v2 signatures. Addresses the following PRs from [@stefan-qsd](https://github.com/stefan-qsd): [#112](https://github.com/pubnub/ruby/pull/112).
10
- - Change paths for PAM endpoints from v1 to v2.
11
- - Update PAM signature generator to correctly sort the query string parameters based on key instead of combined key and value.
15
+ - Change paths for PAM endpoints from v1 to v2.
16
+ - Update PAM signature generator to correctly sort the query string parameters based on key instead of combined key and value.
12
17
 
13
18
  ##### 4.2.3
14
19
  * Resolved issue with subscribe loop where the connection was reinitiated after receiving a 4xx error code from the server
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pubnub (4.2.5)
4
+ pubnub (4.2.6)
5
+ addressable (>= 2.0.0)
5
6
  concurrent-ruby (~> 1.1.5)
6
7
  concurrent-ruby-edge (~> 0.5.0)
7
8
  dry-validation (~> 1.0)
@@ -12,26 +13,27 @@ PATH
12
13
  GEM
13
14
  remote: https://rubygems.org/
14
15
  specs:
15
- addressable (2.6.0)
16
- public_suffix (>= 2.0.2, < 4.0)
17
- ast (2.4.0)
16
+ addressable (2.7.0)
17
+ public_suffix (>= 2.0.2, < 5.0)
18
+ ast (2.4.1)
18
19
  awesome_print (1.8.0)
19
20
  binding_of_caller (0.8.0)
20
21
  debug_inspector (>= 0.0.1)
21
- codacy-coverage (2.1.0)
22
+ codacy-coverage (2.2.1)
22
23
  simplecov
23
- coderay (1.1.2)
24
- concurrent-ruby (1.1.5)
24
+ coderay (1.1.3)
25
+ concurrent-ruby (1.1.6)
25
26
  concurrent-ruby-edge (0.5.0)
26
27
  concurrent-ruby (~> 1.1.5)
27
28
  crack (0.4.3)
28
29
  safe_yaml (~> 1.0.0)
29
30
  debug_inspector (0.0.3)
30
- diff-lcs (1.3)
31
+ diff-lcs (1.4.4)
31
32
  docile (1.3.2)
32
- dry-configurable (0.9.0)
33
+ dry-configurable (0.11.6)
33
34
  concurrent-ruby (~> 1.0)
34
35
  dry-core (~> 0.4, >= 0.4.7)
36
+ dry-equalizer (~> 0.2)
35
37
  dry-container (0.7.2)
36
38
  concurrent-ruby (~> 1.0)
37
39
  dry-configurable (~> 0.1, >= 0.1.3)
@@ -39,108 +41,100 @@ GEM
39
41
  concurrent-ruby (~> 1.0)
40
42
  dry-equalizer (0.3.0)
41
43
  dry-inflector (0.2.0)
42
- dry-initializer (3.0.2)
43
- dry-logic (1.0.5)
44
+ dry-initializer (3.0.3)
45
+ dry-logic (1.0.6)
44
46
  concurrent-ruby (~> 1.0)
45
47
  dry-core (~> 0.2)
46
48
  dry-equalizer (~> 0.2)
47
- dry-schema (1.4.1)
49
+ dry-schema (1.5.2)
48
50
  concurrent-ruby (~> 1.0)
49
51
  dry-configurable (~> 0.8, >= 0.8.3)
50
52
  dry-core (~> 0.4)
51
53
  dry-equalizer (~> 0.2)
52
54
  dry-initializer (~> 3.0)
53
55
  dry-logic (~> 1.0)
54
- dry-types (~> 1.2)
55
- dry-types (1.2.1)
56
+ dry-types (~> 1.4)
57
+ dry-types (1.4.0)
56
58
  concurrent-ruby (~> 1.0)
57
59
  dry-container (~> 0.3)
58
60
  dry-core (~> 0.4, >= 0.4.4)
59
- dry-equalizer (~> 0.2, >= 0.2.2)
61
+ dry-equalizer (~> 0.3)
60
62
  dry-inflector (~> 0.1, >= 0.1.2)
61
63
  dry-logic (~> 1.0, >= 1.0.2)
62
- dry-validation (1.3.1)
64
+ dry-validation (1.5.3)
63
65
  concurrent-ruby (~> 1.0)
64
66
  dry-container (~> 0.7, >= 0.7.1)
65
67
  dry-core (~> 0.4)
66
68
  dry-equalizer (~> 0.2)
67
69
  dry-initializer (~> 3.0)
68
- dry-schema (~> 1.0, >= 1.3.1)
69
- ffi (1.11.1-java)
70
- hashdiff (1.0.0)
70
+ dry-schema (~> 1.5)
71
+ hashdiff (1.0.1)
71
72
  httpclient (2.8.3)
72
73
  interception (0.5)
73
- jaro_winkler (1.5.3)
74
- jaro_winkler (1.5.3-java)
75
- json (2.2.0)
76
- json (2.2.0-java)
77
- method_source (0.9.2)
78
- parallel (1.17.0)
79
- parser (2.6.3.0)
80
- ast (~> 2.4.0)
81
- pry (0.12.2)
82
- coderay (~> 1.1.0)
83
- method_source (~> 0.9.0)
84
- pry (0.12.2-java)
85
- coderay (~> 1.1.0)
86
- method_source (~> 0.9.0)
87
- spoon (~> 0.0)
88
- pry-rescue (1.5.0)
74
+ json (2.3.1)
75
+ method_source (1.0.0)
76
+ parallel (1.19.2)
77
+ parser (2.7.1.4)
78
+ ast (~> 2.4.1)
79
+ pry (0.13.1)
80
+ coderay (~> 1.1)
81
+ method_source (~> 1.0)
82
+ pry-rescue (1.5.2)
89
83
  interception (>= 0.5)
90
84
  pry (>= 0.12.0)
91
- pry-stack_explorer (0.4.9.3)
92
- binding_of_caller (>= 0.7)
93
- pry (>= 0.9.11)
94
- public_suffix (3.1.1)
85
+ pry-stack_explorer (0.4.11)
86
+ binding_of_caller (~> 0.7)
87
+ pry (~> 0.13)
88
+ public_suffix (4.0.5)
95
89
  rainbow (3.0.0)
90
+ regexp_parser (1.7.1)
91
+ rexml (3.2.4)
96
92
  rr (1.2.1)
97
- rspec (3.8.0)
98
- rspec-core (~> 3.8.0)
99
- rspec-expectations (~> 3.8.0)
100
- rspec-mocks (~> 3.8.0)
101
- rspec-core (3.8.2)
102
- rspec-support (~> 3.8.0)
103
- rspec-expectations (3.8.4)
93
+ rspec (3.9.0)
94
+ rspec-core (~> 3.9.0)
95
+ rspec-expectations (~> 3.9.0)
96
+ rspec-mocks (~> 3.9.0)
97
+ rspec-core (3.9.2)
98
+ rspec-support (~> 3.9.3)
99
+ rspec-expectations (3.9.2)
104
100
  diff-lcs (>= 1.2.0, < 2.0)
105
- rspec-support (~> 3.8.0)
106
- rspec-mocks (3.8.1)
101
+ rspec-support (~> 3.9.0)
102
+ rspec-mocks (3.9.1)
107
103
  diff-lcs (>= 1.2.0, < 2.0)
108
- rspec-support (~> 3.8.0)
109
- rspec-retry (0.6.1)
104
+ rspec-support (~> 3.9.0)
105
+ rspec-retry (0.6.2)
110
106
  rspec-core (> 3.3)
111
- rspec-support (3.8.2)
112
- rubocop (0.73.0)
113
- jaro_winkler (~> 1.5.1)
107
+ rspec-support (3.9.3)
108
+ rubocop (0.89.0)
114
109
  parallel (~> 1.10)
115
- parser (>= 2.6)
110
+ parser (>= 2.7.1.1)
116
111
  rainbow (>= 2.2.2, < 4.0)
112
+ regexp_parser (>= 1.7)
113
+ rexml
114
+ rubocop-ast (>= 0.1.0, < 1.0)
117
115
  ruby-progressbar (~> 1.7)
118
- unicode-display_width (>= 1.4.0, < 1.7)
116
+ unicode-display_width (>= 1.4.0, < 2.0)
117
+ rubocop-ast (0.3.0)
118
+ parser (>= 2.7.1.4)
119
119
  ruby-progressbar (1.10.1)
120
120
  safe_yaml (1.0.5)
121
- simplecov (0.17.0)
121
+ simplecov (0.18.5)
122
122
  docile (~> 1.1)
123
- json (>= 1.8, < 3)
124
- simplecov-html (~> 0.10.0)
125
- simplecov-html (0.10.2)
126
- spoon (0.0.6)
127
- ffi
123
+ simplecov-html (~> 0.11)
124
+ simplecov-html (0.12.2)
128
125
  timers (4.3.0)
129
- unicode-display_width (1.6.0)
130
- vcr (5.0.0)
131
- webmock (3.6.0)
126
+ unicode-display_width (1.7.0)
127
+ vcr (6.0.0)
128
+ webmock (3.8.3)
132
129
  addressable (>= 2.3.6)
133
130
  crack (>= 0.3.2)
134
131
  hashdiff (>= 0.4.0, < 2.0.0)
135
132
 
136
133
  PLATFORMS
137
- java
138
134
  ruby
139
- x64-mingw32
140
135
 
141
136
  DEPENDENCIES
142
137
  awesome_print
143
- bundler (~> 1.7)
144
138
  codacy-coverage
145
139
  pry
146
140
  pry-rescue
@@ -155,4 +149,4 @@ DEPENDENCIES
155
149
  webmock
156
150
 
157
151
  BUNDLED WITH
158
- 2.0.2
152
+ 2.1.4
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  # Complete Documentation
8
8
  Available at https://www.pubnub.com/docs/ruby/pubnub-ruby-sdk-v4 **v4.x**
9
9
 
10
- ## PubNub Gem version 4.2.5
10
+ ## PubNub Gem version 4.2.6
11
11
 
12
12
  ##### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
13
13
  ##### http://www.pubnub.com/account
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.2.5
1
+ 4.2.6
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/history/sub-key/sub-a-mock-key/channel/rubytest?auth=ruby-test-auth-client-one&include_meta=true&pnsdk=PubNub-Ruby/4.2.5&uuid=ruby-test-uuid-client-one
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.5.3 (2018-10-18))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 04 Aug 2020 20:53:59 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 04 Aug 2020 20:53:59 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '130'
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: '[[{"message": {"message": "text"}, "timetoken": 15965666789169854,
44
+ "meta": {"metaKey": "metaValue"}}],15965666789169854,15965666789169854]'
45
+ recorded_at: Tue, 04 Aug 2020 20:53:59 GMT
46
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/history/sub-key/sub-a-mock-key/channel/rubytest?auth=ruby-test-auth-client-one&count=10&include_meta=true&pnsdk=PubNub-Ruby/4.2.5&uuid=ruby-test-uuid-client-one
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.4.10 (2020-03-31))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 18 Aug 2020 22:11:06 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 18 Aug 2020 22:11:06 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '123'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, DELETE, OPTIONS
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: '[[{"message": "wdjzGfMFLREacKDtVrgDgA==", "timetoken": 15965666789169854,
44
+ "meta": ""}],15965666789169854,15965666789169854]'
45
+ recorded_at: Tue, 18 Aug 2020 22:11:06 GMT
46
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/history/sub-key/sub-a-mock-key/channel/rubytest?auth=ruby-test-auth-client-one&count=10&include_token=true&pnsdk=PubNub-Ruby/4.2.5&uuid=ruby-test-uuid-client-one
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.4.10 (2020-03-31))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 18 Aug 2020 22:13:02 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 18 Aug 2020 22:13:02 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '111'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, DELETE, OPTIONS
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: '[[{"message": "wdjzGfMFLREacKDtVrgDgA==", "timetoken": 15965666789169854}],15965666789169854,15965666789169854]'
44
+ recorded_at: Tue, 18 Aug 2020 22:13:02 GMT
45
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v2/history/sub-key/sub-a-mock-key/channel/rubytest?auth=ruby-test-auth-client-one&count=10&pnsdk=PubNub-Ruby/4.2.5&uuid=ruby-test-uuid-client-one
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.4.10 (2020-03-31))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 18 Aug 2020 21:55:21 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 18 Aug 2020 21:55:21 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '66'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, DELETE, OPTIONS
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: '[["wdjzGfMFLREacKDtVrgDgA=="],15965666789169854,15965666789169854]'
44
+ recorded_at: Tue, 18 Aug 2020 21:55:21 GMT
45
+ recorded_with: VCR 6.0.0
@@ -12,7 +12,7 @@ module Pubnub
12
12
  sync = options[:http_sync]
13
13
  start_tt = options.fetch(:start)
14
14
  end_tt = options.fetch(:end)
15
- if sync
15
+ if sync
16
16
  sync_paged_history(channel, page, limit, callback, start: start_tt, end: end_tt)
17
17
  else
18
18
  async_paged_history(options)
@@ -149,7 +149,7 @@ module Pubnub
149
149
  group action read write manage ttl presence start
150
150
  end count reverse presence_callback store skip_validate
151
151
  state channel_group channel_groups compressed meta customs include_token
152
- replicate with_presence cipher_key_selector]
152
+ replicate with_presence cipher_key_selector include_meta]
153
153
 
154
154
  options = options.each_with_object({}) { |option, obj| obj[option.first.to_sym] = option.last }
155
155
 
@@ -21,8 +21,12 @@ module Pubnub
21
21
  message['timetoken'] if @include_token
22
22
  end
23
23
 
24
+ def meta(message)
25
+ message['meta'] if @include_meta
26
+ end
27
+
24
28
  def message(message)
25
- if @include_token
29
+ if @include_token || @include_meta
26
30
  message['message']
27
31
  else
28
32
  message
@@ -53,16 +57,27 @@ module Pubnub
53
57
  params[:count] = @count if @count
54
58
  params[:reverse] = 'true' if @reverse
55
59
  params[:include_token] = 'true' if @include_token
60
+ params[:include_meta] = 'true' if @include_meta
56
61
  params
57
62
  end
58
63
 
64
+ def decrypt_history(message, crypto)
65
+ if @include_token || @include_meta
66
+ message['message'] = JSON.parse(crypto.decrypt(message['message']), quirks_mode: true)
67
+
68
+ message
69
+ else
70
+ JSON.parse(crypto.decrypt(message), quirks_mode: true)
71
+ end
72
+ end
73
+
59
74
  def valid_envelope(parsed_response, req_res_objects)
60
75
  messages = parsed_response[0]
61
76
 
62
77
  if (@cipher_key || @app.env[:cipher_key] || @cipher_key_selector || @app.env[:cipher_key_selector]) && messages
63
78
  cipher_key = compute_cipher_key(parsed_response)
64
79
  crypto = Crypto.new(cipher_key)
65
- messages = messages.map { |message| JSON.parse(crypto.decrypt(message), quirks_mode: true) }
80
+ messages = messages.map { |message| decrypt_history(message, crypto) }
66
81
  end
67
82
 
68
83
  start = parsed_response[1]
@@ -1,4 +1,5 @@
1
1
  require 'cgi'
2
+ require "addressable/uri"
2
3
 
3
4
  # Toplevel Pubnub module.
4
5
  module Pubnub
@@ -35,8 +36,7 @@ module Pubnub
35
36
  if cipher_key
36
37
  pc = Pubnub::Crypto.new(cipher_key)
37
38
  message = pc.encrypt(message).to_json
38
- # rubocop:disable Lint/UriEscapeUnescape
39
- message = URI.escape(message) if uri_escape
39
+ message = Addressable::URI.escape(message) if uri_escape
40
40
  else
41
41
  message = message.to_json
42
42
  message = Formatter.encode(message) if uri_escape
@@ -1,4 +1,4 @@
1
1
  # Toplevel Pubnub module.
2
2
  module Pubnub
3
- VERSION = '4.2.5'.freeze
3
+ VERSION = '4.2.6'.freeze
4
4
  end
@@ -18,11 +18,11 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ['lib']
19
19
  spec.required_ruby_version = '>= 2.4'
20
20
 
21
+ spec.add_dependency 'addressable', '>= 2.0.0'
21
22
  spec.add_dependency 'concurrent-ruby', '~> 1.1.5'
22
23
  spec.add_dependency 'concurrent-ruby-edge', '~> 0.5.0'
23
24
  spec.add_dependency 'dry-validation', '~> 1.0'
24
25
  spec.add_dependency 'httpclient', '~> 2.8', '>= 2.8.3'
25
26
  spec.add_dependency 'json', '>= 2.2.0', '< 3'
26
27
  spec.add_dependency 'timers', '>= 4.3.0'
27
- spec.add_development_dependency 'bundler', '~> 1.7'
28
28
  end
@@ -18,6 +18,91 @@ describe Pubnub::History do
18
18
  example.run_with_retry retry: 10
19
19
  end
20
20
 
21
+ it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback__nil___include_meta__true_" do
22
+ VCR.use_cassette("examples/history/100", :record => :none) do
23
+ envelope = @pubnub.history(channel: :rubytest, include_meta: true, http_sync: true)
24
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
25
+ expect(envelope.error?).to eq false
26
+
27
+ expect(envelope.status[:code]).to eq(200)
28
+ expect(envelope.status[:category]).to eq(:ack)
29
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
30
+
31
+ expect(envelope.result[:code]).to eq(200)
32
+ expect(envelope.result[:operation]).to eq(:history)
33
+ expect(envelope.result[:data]).to eq({:messages => [{"message" => {"message"=>"text"}, "meta" => {"metaKey"=>"metaValue"}, "timetoken" => 15965666789169854}], :end => 15965666789169854, :start => 15965666789169854})
34
+ end
35
+ end
36
+
37
+ it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback__nil___encrypted__true_" do
38
+ @pubnub = Pubnub.new(
39
+ publish_key: "pub-a-mock-key",
40
+ subscribe_key: "sub-a-mock-key",
41
+ uuid: "ruby-test-uuid-client-one",
42
+ auth_key: "ruby-test-auth-client-one",
43
+ cipher_key: "super-secret-cipher-key",
44
+ )
45
+ VCR.use_cassette("examples/history/no_includes__encrypted", :record => :none) do
46
+ envelope = @pubnub.history(channel: :rubytest, count: 10, http_sync: true)
47
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
48
+ expect(envelope.error?).to eq false
49
+
50
+ expect(envelope.status[:code]).to eq(200)
51
+ expect(envelope.status[:category]).to eq(:ack)
52
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
53
+
54
+ expect(envelope.result[:code]).to eq(200)
55
+ expect(envelope.result[:operation]).to eq(:history)
56
+ expect(envelope.result[:data]).to eq({:messages => [100], :end => 15965666789169854, :start => 15965666789169854})
57
+ end
58
+ end
59
+
60
+ it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback__nil___include_meta__true___encrypted__true_" do
61
+ @pubnub = Pubnub.new(
62
+ publish_key: "pub-a-mock-key",
63
+ subscribe_key: "sub-a-mock-key",
64
+ uuid: "ruby-test-uuid-client-one",
65
+ auth_key: "ruby-test-auth-client-one",
66
+ cipher_key: "super-secret-cipher-key",
67
+ )
68
+ VCR.use_cassette("examples/history/include_meta__encrypted", :record => :none) do
69
+ envelope = @pubnub.history(channel: :rubytest, count: 10, include_meta: true, http_sync: true)
70
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
71
+ expect(envelope.error?).to eq false
72
+
73
+ expect(envelope.status[:code]).to eq(200)
74
+ expect(envelope.status[:category]).to eq(:ack)
75
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
76
+
77
+ expect(envelope.result[:code]).to eq(200)
78
+ expect(envelope.result[:operation]).to eq(:history)
79
+ expect(envelope.result[:data]).to eq({:messages => [{"message" => 100, "meta" => "", "timetoken" => 15965666789169854}], :end => 15965666789169854, :start => 15965666789169854})
80
+ end
81
+ end
82
+
83
+ it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback__nil___include_token__true___encrypted__true_" do
84
+ @pubnub = Pubnub.new(
85
+ publish_key: "pub-a-mock-key",
86
+ subscribe_key: "sub-a-mock-key",
87
+ uuid: "ruby-test-uuid-client-one",
88
+ auth_key: "ruby-test-auth-client-one",
89
+ cipher_key: "super-secret-cipher-key",
90
+ )
91
+ VCR.use_cassette("examples/history/include_token__encrypted", :record => :none) do
92
+ envelope = @pubnub.history(channel: :rubytest, count: 10, include_token: true, http_sync: true)
93
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
94
+ expect(envelope.error?).to eq false
95
+
96
+ expect(envelope.status[:code]).to eq(200)
97
+ expect(envelope.status[:category]).to eq(:ack)
98
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
99
+
100
+ expect(envelope.result[:code]).to eq(200)
101
+ expect(envelope.result[:operation]).to eq(:history)
102
+ expect(envelope.result[:data]).to eq({:messages => [{"message" => 100, "timetoken" => 15965666789169854}], :end => 15965666789169854, :start => 15965666789169854})
103
+ end
104
+ end
105
+
21
106
  it "__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__true___callback__nil_" do
22
107
  VCR.use_cassette("examples/history/53", record: :none) do
23
108
  envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, http_sync: true)
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubnub
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.5
4
+ version: 4.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - PubNub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-02 00:00:00.000000000 Z
11
+ date: 2020-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: addressable
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: concurrent-ruby
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -106,20 +120,6 @@ dependencies:
106
120
  - - ">="
107
121
  - !ruby/object:Gem::Version
108
122
  version: 4.3.0
109
- - !ruby/object:Gem::Dependency
110
- name: bundler
111
- requirement: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - "~>"
114
- - !ruby/object:Gem::Version
115
- version: '1.7'
116
- type: :development
117
- prerelease: false
118
- version_requirements: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - "~>"
121
- - !ruby/object:Gem::Version
122
- version: '1.7'
123
123
  description: Ruby anywhere in the world in 250ms with PubNub!
124
124
  email:
125
125
  - support@pubnub.com
@@ -3759,6 +3759,7 @@ files:
3759
3759
  - fixtures/vcr_cassettes/examples/history/0.yml
3760
3760
  - fixtures/vcr_cassettes/examples/history/1.yml
3761
3761
  - fixtures/vcr_cassettes/examples/history/10.yml
3762
+ - fixtures/vcr_cassettes/examples/history/100.yml
3762
3763
  - fixtures/vcr_cassettes/examples/history/11.yml
3763
3764
  - fixtures/vcr_cassettes/examples/history/12.yml
3764
3765
  - fixtures/vcr_cassettes/examples/history/13.yml
@@ -3828,6 +3829,9 @@ files:
3828
3829
  - fixtures/vcr_cassettes/examples/history/71.yml
3829
3830
  - fixtures/vcr_cassettes/examples/history/8.yml
3830
3831
  - fixtures/vcr_cassettes/examples/history/9.yml
3832
+ - fixtures/vcr_cassettes/examples/history/include_meta__encrypted.yml
3833
+ - fixtures/vcr_cassettes/examples/history/include_token__encrypted.yml
3834
+ - fixtures/vcr_cassettes/examples/history/no_includes__encrypted.yml
3831
3835
  - fixtures/vcr_cassettes/examples/leave/0.yml
3832
3836
  - fixtures/vcr_cassettes/examples/leave/1.yml
3833
3837
  - fixtures/vcr_cassettes/examples/leave/10.yml
@@ -10762,7 +10766,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
10762
10766
  - !ruby/object:Gem::Version
10763
10767
  version: '0'
10764
10768
  requirements: []
10765
- rubygems_version: 3.1.3
10769
+ rubygems_version: 3.1.4
10766
10770
  signing_key:
10767
10771
  specification_version: 4
10768
10772
  summary: PubNub Official Ruby gem.