ably 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/check.yml +1 -1
  3. data/CHANGELOG.md +17 -0
  4. data/README.md +24 -7
  5. data/SPEC.md +1722 -853
  6. data/ably.gemspec +1 -1
  7. data/lib/ably/auth.rb +19 -11
  8. data/lib/ably/models/protocol_message.rb +5 -26
  9. data/lib/ably/modules/safe_deferrable.rb +2 -2
  10. data/lib/ably/modules/state_emitter.rb +1 -1
  11. data/lib/ably/realtime/auth.rb +4 -0
  12. data/lib/ably/realtime/channel/channel_manager.rb +51 -48
  13. data/lib/ably/realtime/channel/channel_properties.rb +9 -0
  14. data/lib/ably/realtime/channel/channel_state_machine.rb +2 -0
  15. data/lib/ably/realtime/channel.rb +4 -3
  16. data/lib/ably/realtime/channels.rb +20 -0
  17. data/lib/ably/realtime/client/incoming_message_dispatcher.rb +14 -13
  18. data/lib/ably/realtime/client.rb +14 -6
  19. data/lib/ably/realtime/connection/connection_manager.rb +21 -22
  20. data/lib/ably/realtime/connection.rb +77 -109
  21. data/lib/ably/realtime/presence/members_map.rb +41 -92
  22. data/lib/ably/realtime/presence/presence_manager.rb +12 -17
  23. data/lib/ably/realtime/presence.rb +15 -6
  24. data/lib/ably/realtime/push.rb +0 -27
  25. data/lib/ably/realtime/recovery_key_context.rb +36 -0
  26. data/lib/ably/rest/client.rb +4 -6
  27. data/lib/ably/rest/push/admin.rb +1 -1
  28. data/lib/ably/rest/push.rb +0 -19
  29. data/lib/ably/util/ably_extensions.rb +29 -0
  30. data/lib/ably/util/crypto.rb +2 -2
  31. data/lib/ably/util/safe_deferrable.rb +1 -1
  32. data/lib/ably/version.rb +5 -7
  33. data/spec/acceptance/realtime/channel_history_spec.rb +8 -12
  34. data/spec/acceptance/realtime/channel_spec.rb +474 -300
  35. data/spec/acceptance/realtime/client_spec.rb +1 -1
  36. data/spec/acceptance/realtime/connection_failures_spec.rb +8 -25
  37. data/spec/acceptance/realtime/connection_spec.rb +28 -120
  38. data/spec/acceptance/realtime/message_spec.rb +23 -52
  39. data/spec/acceptance/realtime/presence_spec.rb +123 -92
  40. data/spec/acceptance/rest/channel_spec.rb +2 -2
  41. data/spec/acceptance/rest/client_spec.rb +9 -2
  42. data/spec/acceptance/rest/message_spec.rb +8 -11
  43. data/spec/acceptance/rest/push_admin_spec.rb +20 -15
  44. data/spec/shared/client_initializer_behaviour.rb +1 -1
  45. data/spec/support/markdown_spec_formatter.rb +1 -1
  46. data/spec/unit/models/protocol_message_spec.rb +0 -78
  47. data/spec/unit/models/token_details_spec.rb +4 -2
  48. data/spec/unit/realtime/channels_spec.rb +1 -1
  49. data/spec/unit/realtime/connection_spec.rb +0 -30
  50. data/spec/unit/realtime/recovery_key_context_spec.rb +36 -0
  51. data/spec/unit/util/crypto_spec.rb +15 -15
  52. metadata +9 -9
  53. data/spec/acceptance/realtime/push_spec.rb +0 -27
  54. data/spec/acceptance/rest/push_spec.rb +0 -25
data/SPEC.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ably Realtime & REST Client Library 1.1.5 Specification
1
+ # Ably Realtime & REST Client Library 1.2.6 Specification
2
2
 
3
3
  ### Ably::Realtime::Auth
4
4
  _(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_spec.rb))_
@@ -189,9 +189,11 @@ _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realt
189
189
  * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L145)
190
190
  * with option until_attach: true
191
191
  * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L172)
192
- * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L221)
192
+ * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L242)
193
+ * when channel receives update event after an attachment
194
+ * [updates attach_serial](./spec/acceptance/realtime/channel_history_spec.rb#L197)
193
195
  * and two pages of messages
194
- * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L187)
196
+ * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L208)
195
197
 
196
198
  ### Ably::Realtime::Channel
197
199
  _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_
@@ -201,8 +203,8 @@ _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/chan
201
203
  * [remains initialized when accessing a channel](./spec/acceptance/realtime/channel_spec.rb#L29)
202
204
  * [opens a connection implicitly on #attach](./spec/acceptance/realtime/channel_spec.rb#L37)
203
205
  * #attach
204
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L152)
205
- * [calls the SafeDeferrable callback on success (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L157)
206
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L240)
207
+ * [calls the SafeDeferrable callback on success (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L245)
206
208
  * when initialized
207
209
  * [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L48)
208
210
  * [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L58)
@@ -210,282 +212,337 @@ _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/chan
210
212
  * [attaches to a channel and calls the provided block (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L79)
211
213
  * [sets attach_serial property after the attachment (#RTL15a)](./spec/acceptance/realtime/channel_spec.rb#L86)
212
214
  * [sends an ATTACH and waits for an ATTACHED (#RTL4c)](./spec/acceptance/realtime/channel_spec.rb#L96)
213
- * [implicitly attaches the channel (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L120)
215
+ * [implicitly attaches the channel (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L208)
216
+ * context when channel options contain modes
217
+ * [sends an ATTACH with options as flags (#RTL4l)](./spec/acceptance/realtime/channel_spec.rb#L125)
218
+ * when channel is reattaching
219
+ * [sends ATTACH_RESUME flag along with other modes (RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L139)
220
+ * context when channel options contain params
221
+ * [sends an ATTACH with params (#RTL4k)](./spec/acceptance/realtime/channel_spec.rb#L167)
222
+ * when received attached
223
+ * [decodes flags and sets it as modes on channel options (#RTL4m)](./spec/acceptance/realtime/channel_spec.rb#L182)
224
+ * [set params as channel options params (#RTL4k1)](./spec/acceptance/realtime/channel_spec.rb#L193)
214
225
  * when the implicit channel attach fails
215
- * [registers the listener anyway (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L137)
226
+ * [registers the listener anyway (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L225)
216
227
  * when an ATTACHED acknowledge is not received on the current connection
217
- * [sends another ATTACH each time the connection becomes connected](./spec/acceptance/realtime/channel_spec.rb#L168)
228
+ * [sends another ATTACH each time the connection becomes connected](./spec/acceptance/realtime/channel_spec.rb#L256)
218
229
  * when state is :attached
219
- * [does nothing (#RTL4a)](./spec/acceptance/realtime/channel_spec.rb#L206)
230
+ * [does nothing (#RTL4a)](./spec/acceptance/realtime/channel_spec.rb#L294)
220
231
  * when state is :failed
221
- * [reattaches and sets the errorReason to nil (#RTL4g)](./spec/acceptance/realtime/channel_spec.rb#L226)
232
+ * [reattaches and sets the errorReason to nil (#RTL4g)](./spec/acceptance/realtime/channel_spec.rb#L314)
222
233
  * when state is :detaching
223
- * [does the attach operation after the completion of the pending request (#RTL4h)](./spec/acceptance/realtime/channel_spec.rb#L241)
234
+ * [does the attach operation after the completion of the pending request (#RTL4h)](./spec/acceptance/realtime/channel_spec.rb#L329)
224
235
  * with many connections and many channels on each simultaneously
225
- * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L269)
236
+ * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L359)
226
237
  * failure as a result of insufficient key permissions
227
- * [emits failed event (#RTL4e)](./spec/acceptance/realtime/channel_spec.rb#L300)
228
- * [calls the errback of the returned Deferrable (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L309)
229
- * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L317)
238
+ * [emits failed event (#RTL4e)](./spec/acceptance/realtime/channel_spec.rb#L390)
239
+ * [calls the errback of the returned Deferrable (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L399)
240
+ * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L407)
230
241
  * and subsequent authorisation with suitable permissions
231
- * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L326)
242
+ * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L416)
232
243
  * with connection state
233
- * [is initialized (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L345)
234
- * [is connecting (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L352)
235
- * [is disconnected (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L360)
244
+ * [is initialized (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L460)
245
+ * [is connecting (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L468)
246
+ * [is disconnected (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L477)
247
+ * clean attach (RTL4j)
248
+ * when channel wasn't previously attached
249
+ * [doesn't send ATTACH_RESUME](./spec/acceptance/realtime/channel_spec.rb#L492)
250
+ * when channel was explicitly detached
251
+ * [doesn't send ATTACH_RESUME](./spec/acceptance/realtime/channel_spec.rb#L507)
236
252
  * #detach
237
253
  * when state is :attached
238
- * [it detaches from a channel (#RTL5d)](./spec/acceptance/realtime/channel_spec.rb#L375)
239
- * [detaches from a channel and calls the provided block (#RTL5d, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L385)
240
- * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L395)
241
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L407)
242
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L414)
254
+ * [it detaches from a channel (#RTL5d)](./spec/acceptance/realtime/channel_spec.rb#L533)
255
+ * [detaches from a channel and calls the provided block (#RTL5d, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L546)
256
+ * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L559)
257
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L573)
258
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L583)
243
259
  * and DETACHED message is not received within realtime request timeout
244
- * [fails the deferrable and returns to the previous state (#RTL5f, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L428)
260
+ * [fails the deferrable and returns to the previous state (#RTL5f, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L600)
245
261
  * when state is :failed
246
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L448)
262
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L620)
247
263
  * when state is :attaching
248
- * [waits for the attach to complete and then moves to detached](./spec/acceptance/realtime/channel_spec.rb#L461)
264
+ * [waits for the attach to complete and then moves to detached](./spec/acceptance/realtime/channel_spec.rb#L633)
249
265
  * when state is :detaching
250
- * [ignores subsequent #detach calls but calls the callback if provided (#RTL5i)](./spec/acceptance/realtime/channel_spec.rb#L478)
266
+ * [ignores subsequent #detach calls but calls the callback if provided (#RTL5i)](./spec/acceptance/realtime/channel_spec.rb#L650)
251
267
  * when state is :suspended
252
- * [moves the channel state immediately to DETACHED state (#RTL5j)](./spec/acceptance/realtime/channel_spec.rb#L495)
268
+ * [moves the channel state immediately to DETACHED state (#RTL5j)](./spec/acceptance/realtime/channel_spec.rb#L669)
253
269
  * when state is :initialized
254
- * [does nothing as there is no channel to detach (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L515)
255
- * [returns a valid deferrable](./spec/acceptance/realtime/channel_spec.rb#L523)
270
+ * [does nothing as there is no channel to detach (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L692)
271
+ * [returns a valid deferrable](./spec/acceptance/realtime/channel_spec.rb#L700)
256
272
  * when state is :detached
257
- * [does nothing as the channel is detached (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L533)
273
+ * [does nothing as the channel is detached (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L710)
258
274
  * when connection state is
259
275
  * closing
260
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L550)
276
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L730)
261
277
  * failed and channel is failed
262
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L570)
278
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L750)
263
279
  * failed and channel is detached
264
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L592)
280
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L772)
265
281
  * initialized
266
- * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L612)
282
+ * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L792)
267
283
  * connecting
268
- * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L627)
284
+ * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L809)
269
285
  * disconnected
270
- * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L646)
286
+ * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L830)
271
287
  * automatic channel recovery
272
288
  * when an ATTACH request times out
273
- * [moves to the SUSPENDED state (#RTL4f)](./spec/acceptance/realtime/channel_spec.rb#L673)
289
+ * [moves to the SUSPENDED state (#RTL4f)](./spec/acceptance/realtime/channel_spec.rb#L859)
274
290
  * if a subsequent ATTACHED is received on an ATTACHED channel
275
- * [ignores the additional ATTACHED if resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L687)
276
- * [emits an UPDATE only when resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L701)
277
- * [emits an UPDATE when resumed is true and includes the reason error from the ProtocolMessage (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L717)
291
+ * [ignores the additional ATTACHED if resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L873)
292
+ * [emits an UPDATE only when resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L887)
293
+ * [emits an UPDATE when resumed is true and includes the reason error from the ProtocolMessage (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L903)
278
294
  * #publish
279
295
  * when channel is attached (#RTL6c1)
280
- * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L742)
296
+ * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L928)
297
+ * #(RTL17)
298
+ * when channel is initialized
299
+ * [sends messages only on attach](./spec/acceptance/realtime/channel_spec.rb#L941)
300
+ * when channel is attaching
301
+ * [sends messages only on attach](./spec/acceptance/realtime/channel_spec.rb#L956)
302
+ * when channel is detaching
303
+ * [stops sending message](./spec/acceptance/realtime/channel_spec.rb#L979)
304
+ * when channel is detached
305
+ * [stops sending message](./spec/acceptance/realtime/channel_spec.rb#L1007)
306
+ * when channel is failed
307
+ * [errors when trying to send a message](./spec/acceptance/realtime/channel_spec.rb#L1033)
281
308
  * when channel is not attached in state Initializing (#RTL6c1)
282
- * [publishes messages immediately and does not implicitly attach (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L754)
309
+ * [publishes messages immediately and does not implicitly attach (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1051)
283
310
  * when channel is Attaching (#RTL6c1)
284
- * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L771)
311
+ * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1068)
285
312
  * when channel is Detaching (#RTL6c1)
286
- * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L796)
313
+ * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1093)
287
314
  * when channel is Detached (#RTL6c1)
288
- * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L823)
315
+ * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1123)
289
316
  * with :queue_messages client option set to false (#RTL6c4)
290
317
  * and connection state connected (#RTL6c4)
291
- * [publishes the message](./spec/acceptance/realtime/channel_spec.rb#L854)
318
+ * [publishes the message](./spec/acceptance/realtime/channel_spec.rb#L1156)
292
319
  * and connection state initialized (#RTL6c4)
293
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L863)
320
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1165)
294
321
  * and connection state connecting (#RTL6c4)
295
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L873)
322
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1175)
296
323
  * and connection state disconnected (#RTL6c4)
297
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L888)
324
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1190)
298
325
  * and connection state suspended (#RTL6c4)
299
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L888)
326
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1190)
300
327
  * and connection state closing (#RTL6c4)
301
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L888)
328
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1190)
302
329
  * and connection state closed (#RTL6c4)
303
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L888)
330
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1190)
304
331
  * and the channel state is failed (#RTL6c4)
305
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L909)
332
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1211)
306
333
  * with name and data arguments
307
- * [publishes the message and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L927)
334
+ * [publishes the message and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L1229)
308
335
  * and additional attributes
309
- * [publishes the message with the attributes and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L940)
336
+ * [publishes the message with the attributes and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L1242)
310
337
  * and additional invalid attributes
311
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L953)
338
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1255)
312
339
  * with an array of Hash objects with :name and :data attributes
313
- * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L967)
340
+ * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L1269)
314
341
  * with an array of Message objects
315
- * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L995)
342
+ * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L1297)
316
343
  * nil attributes
317
344
  * when name is nil
318
- * [publishes the message without a name attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1019)
345
+ * [publishes the message without a name attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1321)
319
346
  * when data is nil
320
- * [publishes the message without a data attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1043)
347
+ * [publishes the message without a data attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1345)
321
348
  * with neither name or data attributes
322
- * [publishes the message without any attributes in the payload](./spec/acceptance/realtime/channel_spec.rb#L1067)
349
+ * [publishes the message without any attributes in the payload](./spec/acceptance/realtime/channel_spec.rb#L1369)
323
350
  * with two invalid message out of 12
324
351
  * before client_id is known (validated)
325
- * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1091)
352
+ * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1393)
326
353
  * when client_id is known (validated)
327
- * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1111)
354
+ * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1413)
328
355
  * only invalid messages
329
356
  * before client_id is known (validated)
330
- * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1130)
357
+ * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1432)
331
358
  * when client_id is known (validated)
332
- * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1149)
359
+ * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1451)
333
360
  * with many many messages and many connections simultaneously
334
- * [publishes all messages, all success callbacks are called, and a history request confirms all messages were published](./spec/acceptance/realtime/channel_spec.rb#L1163)
361
+ * [publishes all messages, all success callbacks are called, and a history request confirms all messages were published](./spec/acceptance/realtime/channel_spec.rb#L1465)
335
362
  * with more than allowed messages in a single publish
336
- * [rejects the publish](./spec/acceptance/realtime/channel_spec.rb#L1186)
363
+ * [rejects the publish](./spec/acceptance/realtime/channel_spec.rb#L1488)
337
364
  * identified clients
338
365
  * when authenticated with a wildcard client_id
339
366
  * with a valid client_id in the message
340
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1206)
367
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1508)
341
368
  * with a wildcard client_id in the message
342
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1218)
369
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1522)
343
370
  * with a non-String client_id in the message
344
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1225)
371
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1529)
345
372
  * with an empty client_id in the message
346
- * [succeeds and publishes without a client_id](./spec/acceptance/realtime/channel_spec.rb#L1232)
373
+ * [succeeds and publishes without a client_id](./spec/acceptance/realtime/channel_spec.rb#L1536)
347
374
  * when authenticated with a Token string with an implicit client_id
348
375
  * before the client is CONNECTED and the client's identity has been obtained
349
376
  * with a valid client_id in the message
350
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1252)
377
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1558)
351
378
  * with an invalid client_id in the message
352
- * [succeeds in the client library but then fails when delivered to Ably](./spec/acceptance/realtime/channel_spec.rb#L1265)
379
+ * [succeeds in the client library ( while connecting ) but then fails when delivered to Ably](./spec/acceptance/realtime/channel_spec.rb#L1573)
353
380
  * with an empty client_id in the message
354
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1276)
381
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1587)
355
382
  * after the client is CONNECTED and the client's identity is known
356
383
  * with a valid client_id in the message
357
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1290)
384
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1603)
358
385
  * with an invalid client_id in the message
359
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1304)
386
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1617)
360
387
  * with an empty client_id in the message
361
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1313)
388
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1626)
362
389
  * when authenticated with a valid client_id
363
390
  * with a valid client_id
364
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1335)
391
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1648)
365
392
  * with a wildcard client_id in the message
366
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1347)
393
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1662)
367
394
  * with an invalid client_id in the message
368
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1354)
395
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1669)
369
396
  * with an empty client_id in the message
370
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1361)
397
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1676)
371
398
  * when anonymous and no client_id
372
399
  * with a client_id in the message
373
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1380)
400
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1697)
374
401
  * with a wildcard client_id in the message
375
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1387)
402
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1704)
376
403
  * with an empty client_id in the message
377
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1394)
404
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1711)
405
+ * message size exceeded (#TO3l8)
406
+ * and max_message_size is default (65536 bytes)
407
+ * [should allow to send a message (32 bytes)](./spec/acceptance/realtime/channel_spec.rb#L1734)
408
+ * [should not allow to send a message (700000 bytes)](./spec/acceptance/realtime/channel_spec.rb#L1744)
409
+ * and max_message_size is customized (11 bytes)
410
+ * and the message size is 30 bytes
411
+ * [should not allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1765)
412
+ * and max_message_size is nil
413
+ * and the message size is 30 bytes
414
+ * [should allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1787)
415
+ * and the message size is 65537 bytes
416
+ * [should not allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1806)
378
417
  * #subscribe
379
418
  * with an event argument
380
- * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1410)
419
+ * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1826)
381
420
  * before attach
382
- * [receives messages as soon as attached](./spec/acceptance/realtime/channel_spec.rb#L1420)
421
+ * [receives messages as soon as attached](./spec/acceptance/realtime/channel_spec.rb#L1836)
383
422
  * with no event argument
384
- * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L1434)
423
+ * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L1850)
385
424
  * with a callback that raises an exception
386
- * [logs the error and continues](./spec/acceptance/realtime/channel_spec.rb#L1446)
425
+ * [logs the error and continues](./spec/acceptance/realtime/channel_spec.rb#L1862)
387
426
  * many times with different event names
388
- * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L1465)
427
+ * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L1883)
389
428
  * #unsubscribe
390
429
  * with an event argument
391
- * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1488)
430
+ * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1908)
392
431
  * with no event argument
393
- * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1501)
432
+ * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1923)
394
433
  * when connection state changes to
395
434
  * :failed
396
435
  * an :attaching channel
397
- * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1524)
436
+ * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1948)
398
437
  * an :attached channel
399
- * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1541)
400
- * [updates the channel error_reason (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1553)
438
+ * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1965)
439
+ * [updates the channel error_reason (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1979)
401
440
  * a :detached channel
402
- * [remains in the :detached state (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1567)
441
+ * [remains in the :detached state (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1995)
403
442
  * a :failed channel
404
- * [remains in the :failed state and ignores the failure error (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1586)
443
+ * [remains in the :failed state and ignores the failure error (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L2018)
405
444
  * a channel ATTACH request
406
- * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1606)
445
+ * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2040)
407
446
  * :closed
408
447
  * an :attached channel
409
- * [transitions state to :detached (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1622)
448
+ * [transitions state to :detached (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2056)
410
449
  * an :attaching channel (#RTL3b)
411
- * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L1633)
450
+ * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L2069)
412
451
  * a :detached channel
413
- * [remains in the :detached state (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1648)
452
+ * [remains in the :detached state (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2086)
414
453
  * a :failed channel
415
- * [remains in the :failed state and retains the error_reason (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1668)
454
+ * [remains in the :failed state and retains the error_reason (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2109)
416
455
  * a channel ATTACH request when connection CLOSED
417
- * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1688)
456
+ * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2131)
418
457
  * a channel ATTACH request when connection CLOSING
419
- * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1702)
458
+ * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2145)
420
459
  * :suspended
421
460
  * an :attaching channel
422
- * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1718)
461
+ * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2161)
423
462
  * an :attached channel
424
- * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1732)
425
- * [transitions state automatically to :attaching once the connection is re-established (#RTN15c3)](./spec/acceptance/realtime/channel_spec.rb#L1741)
463
+ * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2175)
464
+ * reattaching (#RTN15c3)
465
+ * [transitions state automatically to :attaching once the connection is re-established ](./spec/acceptance/realtime/channel_spec.rb#L2188)
466
+ * [sends ATTACH_RESUME flag when reattaching (RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2203)
426
467
  * a :detached channel
427
- * [remains in the :detached state (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1755)
468
+ * [remains in the :detached state (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2225)
428
469
  * a :failed channel
429
- * [remains in the :failed state and retains the error_reason (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1775)
470
+ * [remains in the :failed state and retains the error_reason (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2248)
430
471
  * a channel ATTACH request when connection SUSPENDED (#RTL4b)
431
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1797)
472
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L2272)
432
473
  * :connected
433
474
  * a :suspended channel
434
- * [is automatically reattached (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L1813)
475
+ * [is automatically reattached (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L2288)
435
476
  * when re-attach attempt fails
436
- * [returns to a suspended state (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L1830)
477
+ * [returns to a suspended state (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L2307)
437
478
  * :disconnected
438
479
  * with an initialized channel
439
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1856)
480
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2336)
440
481
  * with an attaching channel
441
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1869)
482
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2349)
442
483
  * with an attached channel
443
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1884)
484
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2364)
444
485
  * with a detached channel
445
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1896)
486
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2380)
446
487
  * with a failed channel
447
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1918)
488
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2404)
448
489
  * #presence
449
- * [returns a Ably::Realtime::Presence object](./spec/acceptance/realtime/channel_spec.rb#L1933)
490
+ * [returns a Ably::Realtime::Presence object](./spec/acceptance/realtime/channel_spec.rb#L2419)
491
+ * #set_options (#RTL16a)
492
+ * when channel is attaching
493
+ * behaves like an update that sends ATTACH message
494
+ * [sends an ATTACH message on options change](./spec/acceptance/realtime/channel_spec.rb#L2436)
495
+ * when channel is attached
496
+ * behaves like an update that sends ATTACH message
497
+ * [sends an ATTACH message on options change](./spec/acceptance/realtime/channel_spec.rb#L2436)
498
+ * when channel is initialized
499
+ * [doesn't send ATTACH message](./spec/acceptance/realtime/channel_spec.rb#L2469)
450
500
  * channel state change
451
- * [emits a ChannelStateChange object](./spec/acceptance/realtime/channel_spec.rb#L1940)
501
+ * [emits a ChannelStateChange object](./spec/acceptance/realtime/channel_spec.rb#L2485)
452
502
  * ChannelStateChange object
453
- * [has current state](./spec/acceptance/realtime/channel_spec.rb#L1949)
454
- * [has a previous state](./spec/acceptance/realtime/channel_spec.rb#L1958)
455
- * [has the event that generated the state change (#TA5)](./spec/acceptance/realtime/channel_spec.rb#L1967)
456
- * [has an empty reason when there is no error](./spec/acceptance/realtime/channel_spec.rb#L1985)
503
+ * [has current state](./spec/acceptance/realtime/channel_spec.rb#L2494)
504
+ * [has a previous state](./spec/acceptance/realtime/channel_spec.rb#L2503)
505
+ * [has the event that generated the state change (#TA5)](./spec/acceptance/realtime/channel_spec.rb#L2512)
506
+ * [has an empty reason when there is no error](./spec/acceptance/realtime/channel_spec.rb#L2530)
457
507
  * on failure
458
- * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L1998)
508
+ * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L2545)
459
509
  * #resume (#RTL2f)
460
- * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L2013)
461
- * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2021)
462
- * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2040)
463
- * when a resume fails
464
- * [is false when a resume fails to recover and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2062)
510
+ * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L2560)
511
+ * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2568)
512
+ * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2587)
513
+ * when a connection resume fails
514
+ * [is false when channel_serial goes nil (RTP5a1) and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2609)
515
+ * [is true when channel_serial is intact and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2627)
465
516
  * moves to
466
517
  * suspended
467
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2085)
468
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2108)
518
+ * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2654)
519
+ * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2677)
469
520
  * failed
470
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2085)
471
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2108)
521
+ * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2654)
522
+ * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2677)
472
523
  * when it receives a server-initiated DETACHED (#RTL13)
473
524
  * and channel is initialized (#RTL13)
474
- * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2143)
525
+ * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2712)
475
526
  * and channel is failed
476
- * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2164)
527
+ * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2733)
477
528
  * and channel is attached
478
- * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2180)
529
+ * [reattaches immediately (#RTL13a) with ATTACH_RESUME flag(RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2749)
479
530
  * and channel is suspended
480
- * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2196)
531
+ * [reattaches immediately (#RTL13a) with ATTACH_RESUME flag(RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2778)
532
+ * when connection is no longer connected
533
+ * [will not attempt to reattach (#RTL13c)](./spec/acceptance/realtime/channel_spec.rb#L2810)
481
534
  * and channel is attaching
482
- * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2218)
535
+ * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2836)
483
536
  * when it receives an ERROR ProtocolMessage
484
- * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2266)
537
+ * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2885)
485
538
 
486
539
  ### Ably::Realtime::Channels
487
540
  _(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/channels_spec.rb))_
488
541
  * using JSON protocol
542
+ * when channel supposed to trigger reattachment per RTL16a (#RTS3c1)
543
+ * [will raise an error](./spec/acceptance/realtime/channels_spec.rb#L34)
544
+ * params keys are the same but values are different
545
+ * [will raise an error](./spec/acceptance/realtime/channels_spec.rb#L50)
489
546
  * using shortcut method #channel on the client object
490
547
  * behaves like a channel
491
548
  * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6)
@@ -495,9 +552,10 @@ _(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/cha
495
552
  * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6)
496
553
  * [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L12)
497
554
  * accessing an existing channel object with different options
498
- * [overrides the existing channel options and returns the channel object](./spec/acceptance/realtime/channels_spec.rb#L41)
555
+ * [overrides the existing channel options and returns the channel object](./spec/acceptance/realtime/channels_spec.rb#L82)
556
+ * [shows deprecation warning](./spec/acceptance/realtime/channels_spec.rb#L90)
499
557
  * accessing an existing channel object without specifying any channel options
500
- * [returns the existing channel without modifying the channel options](./spec/acceptance/realtime/channels_spec.rb#L53)
558
+ * [returns the existing channel without modifying the channel options](./spec/acceptance/realtime/channels_spec.rb#L105)
501
559
  * using undocumented array accessor [] method on client#channels
502
560
  * behaves like a channel
503
561
  * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6)
@@ -531,56 +589,56 @@ _(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/clien
531
589
  * when the returned token has a client_id
532
590
  * [sets Auth#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L119)
533
591
  * [sets Client#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L127)
534
- * with a wildcard client_id token
592
+ * with a wildcard client_id token
535
593
  * and an explicit client_id in ClientOptions
536
- * [allows uses the explicit client_id in the connection](./spec/acceptance/realtime/client_spec.rb#L145)
594
+ * PENDING: *[allows uses the explicit client_id in the connection](./spec/acceptance/realtime/client_spec.rb#L146)*
537
595
  * and client_id omitted in ClientOptions
538
- * [uses the token provided clientId in the connection](./spec/acceptance/realtime/client_spec.rb#L161)
596
+ * [uses the token provided clientId in the connection](./spec/acceptance/realtime/client_spec.rb#L162)
539
597
  * with an invalid wildcard "*" :client_id
540
- * [raises an exception](./spec/acceptance/realtime/client_spec.rb#L177)
598
+ * [raises an exception](./spec/acceptance/realtime/client_spec.rb#L178)
541
599
  * realtime connection settings
542
600
  * defaults
543
- * [disconnected_retry_timeout is 15s](./spec/acceptance/realtime/client_spec.rb#L186)
544
- * [suspended_retry_timeout is 30s](./spec/acceptance/realtime/client_spec.rb#L191)
601
+ * [disconnected_retry_timeout is 15s](./spec/acceptance/realtime/client_spec.rb#L187)
602
+ * [suspended_retry_timeout is 30s](./spec/acceptance/realtime/client_spec.rb#L192)
545
603
  * overriden in ClientOptions
546
- * [disconnected_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L200)
547
- * [suspended_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L205)
604
+ * [disconnected_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L201)
605
+ * [suspended_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L206)
548
606
  * #connection
549
- * [provides access to the Connection object](./spec/acceptance/realtime/client_spec.rb#L214)
607
+ * [provides access to the Connection object](./spec/acceptance/realtime/client_spec.rb#L215)
550
608
  * #channels
551
- * [provides access to the Channels collection object](./spec/acceptance/realtime/client_spec.rb#L221)
609
+ * [provides access to the Channels collection object](./spec/acceptance/realtime/client_spec.rb#L222)
552
610
  * #auth
553
- * [provides access to the Realtime::Auth object](./spec/acceptance/realtime/client_spec.rb#L228)
611
+ * [provides access to the Realtime::Auth object](./spec/acceptance/realtime/client_spec.rb#L229)
554
612
  * #request (#RSC19*)
555
613
  * get
556
- * [returns an HttpPaginatedResponse object](./spec/acceptance/realtime/client_spec.rb#L240)
614
+ * [returns an HttpPaginatedResponse object](./spec/acceptance/realtime/client_spec.rb#L241)
557
615
  * 404 request to invalid URL
558
- * [returns an object with 404 status code and error message](./spec/acceptance/realtime/client_spec.rb#L249)
616
+ * [returns an object with 404 status code and error message](./spec/acceptance/realtime/client_spec.rb#L250)
559
617
  * paged results
560
- * [provides paging](./spec/acceptance/realtime/client_spec.rb#L263)
618
+ * [provides paging](./spec/acceptance/realtime/client_spec.rb#L264)
561
619
  * post
562
- * [supports post](./spec/acceptance/realtime/client_spec.rb#L294)
620
+ * [supports post](./spec/acceptance/realtime/client_spec.rb#L295)
563
621
  * delete
564
- * [supports delete](./spec/acceptance/realtime/client_spec.rb#L308)
622
+ * [supports delete](./spec/acceptance/realtime/client_spec.rb#L309)
565
623
  * patch
566
- * [supports patch](./spec/acceptance/realtime/client_spec.rb#L325)
624
+ * [supports patch](./spec/acceptance/realtime/client_spec.rb#L326)
567
625
  * put
568
- * [supports put](./spec/acceptance/realtime/client_spec.rb#L349)
626
+ * [supports put](./spec/acceptance/realtime/client_spec.rb#L350)
569
627
  * #publish (#TBC)
570
- * [publishing a message implicity connects and publishes the message successfully on the provided channel](./spec/acceptance/realtime/client_spec.rb#L367)
571
- * [publishing does not result in a channel being created](./spec/acceptance/realtime/client_spec.rb#L379)
572
- * [publishing supports an array of Message objects](./spec/acceptance/realtime/client_spec.rb#L407)
573
- * [publishing supports an array of Hash objects](./spec/acceptance/realtime/client_spec.rb#L419)
574
- * [publishing on a closed connection fails](./spec/acceptance/realtime/client_spec.rb#L431)
628
+ * [publishing a message implicity connects and publishes the message successfully on the provided channel](./spec/acceptance/realtime/client_spec.rb#L368)
629
+ * [publishing does not result in a channel being created](./spec/acceptance/realtime/client_spec.rb#L380)
630
+ * [publishing supports an array of Message objects](./spec/acceptance/realtime/client_spec.rb#L408)
631
+ * [publishing supports an array of Hash objects](./spec/acceptance/realtime/client_spec.rb#L420)
632
+ * [publishing on a closed connection fails](./spec/acceptance/realtime/client_spec.rb#L432)
575
633
  * with extras
576
- * [publishing supports extras](./spec/acceptance/realtime/client_spec.rb#L395)
634
+ * [publishing supports extras](./spec/acceptance/realtime/client_spec.rb#L396)
577
635
  * queue_messages ClientOption
578
636
  * when true
579
- * [will queue messages whilst connecting and publish once connected](./spec/acceptance/realtime/client_spec.rb#L447)
637
+ * [will queue messages whilst connecting and publish once connected](./spec/acceptance/realtime/client_spec.rb#L448)
580
638
  * when false
581
- * [will reject messages on an initializing connection](./spec/acceptance/realtime/client_spec.rb#L464)
639
+ * [will reject messages on an initializing connection](./spec/acceptance/realtime/client_spec.rb#L465)
582
640
  * with more than allowed messages in a single publish
583
- * [rejects the publish](./spec/acceptance/realtime/client_spec.rb#L481)
641
+ * [rejects the publish](./spec/acceptance/realtime/client_spec.rb#L482)
584
642
 
585
643
  ### Ably::Realtime::Connection failures
586
644
  _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/realtime/connection_failures_spec.rb))_
@@ -641,83 +699,88 @@ _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/r
641
699
  * [never calls the provided success block](./spec/acceptance/realtime/connection_failures_spec.rb#L542)
642
700
  * connection resume
643
701
  * when DISCONNECTED ProtocolMessage received from the server
644
- * [reconnects automatically and immediately](./spec/acceptance/realtime/connection_failures_spec.rb#L573)
702
+ * [reconnects automatically and immediately (#RTN15a)](./spec/acceptance/realtime/connection_failures_spec.rb#L573)
703
+ * when protocolMessage contains token error
704
+ * library does not have a means to renew the token (#RTN15h1)
705
+ * [moves connection state to failed](./spec/acceptance/realtime/connection_failures_spec.rb#L601)
706
+ * library have a means to renew the token (#RTN15h2)
707
+ * [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L625)
645
708
  * connection state freshness is monitored
646
- * [resumes connections when disconnected within the connection_state_ttl period (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L594)
709
+ * [resumes connections when disconnected within the connection_state_ttl period (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L649)
647
710
  * when connection_state_ttl period has passed since being disconnected
648
- * [clears the local connection state and uses a new connection when the connection_state_ttl period has passed (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L634)
711
+ * [clears the local connection state and uses a new connection when the connection_state_ttl period has passed (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L689)
649
712
  * when connection_state_ttl period has passed since last activity on the connection
650
- * [does not clear the local connection state when the connection_state_ttl period has passed since last activity, but the idle timeout has not passed (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L687)
651
- * [clears the local connection state and uses a new connection when the connection_state_ttl + max_idle_interval period has passed since last activity (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L721)
652
- * [still reattaches the channels automatically following a new connection being established (#RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L756)
713
+ * [does not clear the local connection state when the connection_state_ttl period has passed since last activity, but the idle timeout has not passed (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L742)
714
+ * [clears the local connection state and uses a new connection when the connection_state_ttl + max_idle_interval period has passed since last activity (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L774)
715
+ * [still reattaches the channels automatically following a new connection being established (#RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L807)
653
716
  * and subsequently fails to reconnect
654
- * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L815)
717
+ * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L863)
655
718
  * when websocket transport is abruptly disconnected
656
- * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L858)
719
+ * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L906)
657
720
  * hosts used
658
- * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L874)
721
+ * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L922)
659
722
  * after successfully reconnecting and resuming
660
- * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L898)
661
- * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L913)
662
- * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L939)
663
- * [retains the client_msg_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1000)
723
+ * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L946)
724
+ * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L961)
725
+ * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L987)
726
+ * [retains the client_msg_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1038)
664
727
  * when messages were published whilst the client was disconnected
665
- * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L967)
728
+ * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L1005)
666
729
  * when failing to resume
667
730
  * because the connection_key is not or no longer valid
668
- * [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L1040)
669
- * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1055)
670
- * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1093)
671
- * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1129)
672
- * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L1167)
673
- * [continues to use the client_msg_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1182)
731
+ * [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L1078)
732
+ * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1093)
733
+ * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1131)
734
+ * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1167)
735
+ * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L1205)
736
+ * [continues to use the client_msg_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1220)
674
737
  * as the DISCONNECTED window to resume has passed
675
- * [starts a new connection automatically and does not try and resume](./spec/acceptance/realtime/connection_failures_spec.rb#L1219)
738
+ * [starts a new connection automatically and does not try and resume](./spec/acceptance/realtime/connection_failures_spec.rb#L1257)
676
739
  * when an ERROR protocol message is received
677
740
  * whilst connecting
678
741
  * with a token error code in the range 40140 <= code < 40150 (#RTN14b)
679
- * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1250)
742
+ * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1288)
680
743
  * with an error code indicating an error other than a token failure (#RTN14g, #RTN15i)
681
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1266)
744
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1304)
682
745
  * with no error code indicating an error other than a token failure (#RTN14g, #RTN15i)
683
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1279)
746
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1317)
684
747
  * whilst connected
685
748
  * with a token error code in the range 40140 <= code < 40150 (#RTN14b)
686
- * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1250)
749
+ * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1288)
687
750
  * with an error code indicating an error other than a token failure (#RTN14g, #RTN15i)
688
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1266)
751
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1304)
689
752
  * with no error code indicating an error other than a token failure (#RTN14g, #RTN15i)
690
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1279)
753
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1317)
691
754
  * whilst resuming
692
755
  * with a token error code in the region 40140 <= code < 40150 (RTN15c5)
693
- * [triggers a re-authentication and then resumes the connection](./spec/acceptance/realtime/connection_failures_spec.rb#L1323)
756
+ * [triggers a re-authentication and then resumes the connection](./spec/acceptance/realtime/connection_failures_spec.rb#L1361)
694
757
  * with any other error (#RTN15c4)
695
- * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1355)
758
+ * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1395)
696
759
  * fallback host feature
697
760
  * with custom realtime websocket host option
698
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1399)
761
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1439)
699
762
  * with custom realtime websocket port option
700
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1417)
763
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1457)
701
764
  * with non-production environment
702
765
  * :fallback_hosts_use_default is unset
703
- * [uses fallback hosts by default](./spec/acceptance/realtime/connection_failures_spec.rb#L1441)
766
+ * [uses fallback hosts by default](./spec/acceptance/realtime/connection_failures_spec.rb#L1481)
704
767
  * :fallback_hosts_use_default is true
705
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k7)](./spec/acceptance/realtime/connection_failures_spec.rb#L1459)
706
- * [does not use a fallback host if the connection connects on the default host and then later becomes disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L1477)
768
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k7)](./spec/acceptance/realtime/connection_failures_spec.rb#L1499)
769
+ * [does not use a fallback host if the connection connects on the default host and then later becomes disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L1517)
707
770
  * :fallback_hosts array is provided
708
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1505)
771
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1545)
709
772
  * with production environment
710
773
  * when the Internet is down
711
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1541)
774
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1581)
712
775
  * when the Internet is up
713
776
  * and default options
714
- * [uses a fallback host + the original host once on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L1564)
715
- * [uses the primary host when suspended, and then every fallback host and the primary host again on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L1583)
716
- * [uses the correct host name for the WebSocket requests to the fallback hosts](./spec/acceptance/realtime/connection_failures_spec.rb#L1606)
777
+ * [uses a fallback host + the original host once on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L1604)
778
+ * [uses the primary host when suspended, and then every fallback host and the primary host again on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L1623)
779
+ * [uses the correct host name for the WebSocket requests to the fallback hosts](./spec/acceptance/realtime/connection_failures_spec.rb#L1646)
717
780
  * :fallback_hosts array is provided by an empty array
718
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1636)
781
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1676)
719
782
  * :fallback_hosts array is provided
720
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1656)
783
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1696)
721
784
 
722
785
  ### Ably::Realtime::Connection
723
786
  _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_
@@ -737,209 +800,216 @@ _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/c
737
800
  * that expire
738
801
  * opening a new connection
739
802
  * with almost expired tokens
740
- * [renews token every time after it expires](./spec/acceptance/realtime/connection_spec.rb#L106)
803
+ * FAILED: ~~[renews token every time after it expires](./spec/acceptance/realtime/connection_spec.rb#L107)~~
741
804
  * with immediately expired token and no fallback hosts
742
- * [renews the token on connect, and makes one immediate subsequent attempt to obtain a new token (#RSA4b)](./spec/acceptance/realtime/connection_spec.rb#L136)
805
+ * [renews the token on connect, and makes one immediate subsequent attempt to obtain a new token (#RSA4b)](./spec/acceptance/realtime/connection_spec.rb#L137)
743
806
  * when disconnected_retry_timeout is 0.5 seconds
744
- * [renews the token on connect, and continues to attempt renew based on the retry schedule](./spec/acceptance/realtime/connection_spec.rb#L151)
807
+ * [renews the token on connect, and continues to attempt renew based on the retry schedule](./spec/acceptance/realtime/connection_spec.rb#L152)
745
808
  * using implicit token auth
746
- * [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L181)
809
+ * [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L182)
747
810
  * when connected with a valid non-expired token
748
811
  * that then expires following the connection being opened
749
812
  * the server
750
- * [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L212)
813
+ * [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L213)
751
814
  * connection state
752
- * [retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L272)
815
+ * [retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L273)
753
816
  * and subsequent token is invalid
754
- * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L307)
817
+ * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L308)
755
818
  * for non-renewable tokens
756
819
  * that are expired
757
820
  * opening a new connection
758
- * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L337)
821
+ * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L338)
759
822
  * when connected
760
- * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L353)
823
+ * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L354)
761
824
  * with opaque token string that contain an implicit client_id
762
825
  * string
763
- * [sets the Client#client_id and Auth#client_id once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L373)
826
+ * [sets the Client#client_id and Auth#client_id once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L374)
764
827
  * that is incompatible with the current client client_id
765
- * [fails the connection](./spec/acceptance/realtime/connection_spec.rb#L385)
828
+ * PENDING: *[fails the connection](./spec/acceptance/realtime/connection_spec.rb#L387)*
766
829
  * wildcard
767
- * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L399)
830
+ * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L401)
768
831
  * initialization state changes
769
832
  * with implicit #connect
770
- * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L431)
833
+ * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L433)
771
834
  * with explicit #connect
772
- * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L437)
835
+ * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L439)
773
836
  * #connect with no fallbacks
774
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L447)
775
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L452)
776
- * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L459)
837
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L449)
838
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L454)
839
+ * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L461)
840
+ * when can't connect to host
841
+ * [logs error on failed connection attempt](./spec/acceptance/realtime/connection_spec.rb#L490)
842
+ * when explicitly reconnecting disconnected/suspended connection in retry (#RTN11c)
843
+ * when suspended
844
+ * [reconnects immediately](./spec/acceptance/realtime/connection_spec.rb#L530)
845
+ * when disconnected
846
+ * [reconnects immediately](./spec/acceptance/realtime/connection_spec.rb#L564)
847
+ * when reconnecting a failed connection
848
+ * [transitions all channels state to initialized and cleares error_reason](./spec/acceptance/realtime/connection_spec.rb#L594)
777
849
  * with invalid auth details
778
- * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L488)
850
+ * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L622)
779
851
  * when already connected
780
- * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L504)
852
+ * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L638)
781
853
  * connection#id
782
- * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L518)
854
+ * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L652)
783
855
  * connection#key
784
- * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L525)
856
+ * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L659)
785
857
  * once connected
786
858
  * connection#id
787
- * [is a string](./spec/acceptance/realtime/connection_spec.rb#L536)
788
- * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L543)
789
- * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L550)
859
+ * [is a string](./spec/acceptance/realtime/connection_spec.rb#L670)
860
+ * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L677)
861
+ * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L684)
790
862
  * connection#key
791
- * [is a string](./spec/acceptance/realtime/connection_spec.rb#L559)
792
- * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L566)
793
- * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L573)
863
+ * [is a string](./spec/acceptance/realtime/connection_spec.rb#L693)
864
+ * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L700)
865
+ * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L707)
794
866
  * following a previous connection being opened and closed
795
- * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L583)
867
+ * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L717)
796
868
  * when closing
797
- * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L600)
798
- * #serial connection serial
799
- * [is set to -1 when a new connection is opened](./spec/acceptance/realtime/connection_spec.rb#L617)
800
- * FAILED: ~~[is set to 0 when a message is received back](./spec/acceptance/realtime/connection_spec.rb#L640)~~
801
- * [is set to 1 when the second message is received](./spec/acceptance/realtime/connection_spec.rb#L648)
802
- * when a message is sent but the ACK has not yet been received
803
- * [the sent message msgSerial is 0 but the connection serial remains at -1](./spec/acceptance/realtime/connection_spec.rb#L625)
869
+ * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L734)
804
870
  * #msgSerial
805
871
  * when messages are queued for publish before a connection is established
806
- * [the msgSerial is always incrementing (and not reset when the new connection is established) ensuring messages are never de-duped by the realtime service](./spec/acceptance/realtime/connection_spec.rb#L676)
872
+ * [the msgSerial is always incrementing (and not reset when the new connection is established) ensuring messages are never de-duped by the realtime service](./spec/acceptance/realtime/connection_spec.rb#L758)
807
873
  * #close
808
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L696)
809
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L703)
874
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L790)
875
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L797)
810
876
  * when already closed
811
- * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L714)
877
+ * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L808)
812
878
  * when connection state is
813
879
  * :initialized
814
- * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L741)
880
+ * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L835)
881
+ * :connecting RTN12f
882
+ * :connected does not arrive when trying to close
883
+ * [moves to closed](./spec/acceptance/realtime/connection_spec.rb#L853)
884
+ * :connected arrive when trying to close
885
+ * [moves to connected and then to closed](./spec/acceptance/realtime/connection_spec.rb#L880)
815
886
  * :connected
816
- * [changes the connection state to :closing and waits for the server to confirm connection is :closed with a ProtocolMessage](./spec/acceptance/realtime/connection_spec.rb#L758)
887
+ * [changes the connection state to :closing and waits for the server to confirm connection is :closed with a ProtocolMessage](./spec/acceptance/realtime/connection_spec.rb#L901)
817
888
  * with an unresponsive connection
818
- * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L785)
889
+ * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L928)
890
+ * :suspended RTN12d
891
+ * [immediatly closes connection](./spec/acceptance/realtime/connection_spec.rb#L957)
892
+ * :disconnected RTN12d
893
+ * [immediatly closes connection](./spec/acceptance/realtime/connection_spec.rb#L992)
819
894
  * #ping
820
- * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L807)
821
- * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L817)
822
- * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L841)
895
+ * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L1025)
896
+ * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L1035)
897
+ * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L1059)
823
898
  * with incompatible states
824
899
  * when not connected
825
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L854)
900
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1072)
826
901
  * when suspended
827
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L863)
902
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1081)
828
903
  * when failed
829
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L875)
904
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1093)
830
905
  * when closed
831
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L887)
906
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1105)
832
907
  * when it becomes closed
833
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L901)
908
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1119)
834
909
  * with a success block that raises an exception
835
- * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L914)
910
+ * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L1132)
836
911
  * when ping times out
837
- * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L928)
838
- * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L947)
912
+ * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L1146)
913
+ * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L1165)
839
914
  * Heartbeats (#RTN23)
840
915
  * heartbeat interval
841
916
  * when reduced artificially
842
- * [is the sum of the max_idle_interval and realtime_request_timeout (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L974)
843
- * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L984)
844
- * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L995)
917
+ * [is the sum of the max_idle_interval and realtime_request_timeout (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L1191)
918
+ * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L1201)
919
+ * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L1212)
845
920
  * transport-level heartbeats are supported in the websocket transport
846
- * [provides the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1010)
847
- * [receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1019)
921
+ * [provides the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1227)
922
+ * [receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1236)
848
923
  * with websocket heartbeats disabled (undocumented)
849
- * [does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1035)
850
- * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1044)
924
+ * [does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1252)
925
+ * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1261)
851
926
  * #details
852
- * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1062)
853
- * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1069)
854
- * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1078)
927
+ * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1279)
928
+ * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1286)
929
+ * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1295)
855
930
  * with a different default connection_state_ttl
856
- * [updates the private Connection#connection_state_ttl when received from Ably in ConnectionDetails](./spec/acceptance/realtime/connection_spec.rb#L1099)
931
+ * [updates the private Connection#connection_state_ttl when received from Ably in ConnectionDetails](./spec/acceptance/realtime/connection_spec.rb#L1316)
857
932
  * recovery
858
933
  * #recovery_key
859
- * [is composed of connection key and serial that is kept up to date with each message ACK received](./spec/acceptance/realtime/connection_spec.rb#L1136)
860
- * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1164)
861
- * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1194)
934
+ * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1353)
935
+ * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1383)
862
936
  * opening a new connection using a recently disconnected connection's #recovery_key
863
937
  * connection#id after recovery
864
- * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L1206)
938
+ * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L1395)
865
939
  * when messages have been sent whilst the old connection is disconnected
866
940
  * the new connection
867
- * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L1242)
941
+ * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L1417)
868
942
  * when messages have been published
869
943
  * the new connection
870
- * [uses the correct msgSerial from the old connection](./spec/acceptance/realtime/connection_spec.rb#L1271)
944
+ * [uses the correct msgSerial from the old connection](./spec/acceptance/realtime/connection_spec.rb#L1446)
871
945
  * when messages are published before the new connection is recovered
872
946
  * the new connection
873
- * [uses the correct msgSerial from the old connection for the queued messages](./spec/acceptance/realtime/connection_spec.rb#L1301)
947
+ * [uses the correct msgSerial from the old connection for the queued messages](./spec/acceptance/realtime/connection_spec.rb#L1476)
874
948
  * with :recover option
875
949
  * with invalid syntax
876
- * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L1348)
877
- * with invalid formatted value sent to server
878
- * [sets the #error_reason and moves the connection to FAILED](./spec/acceptance/realtime/connection_spec.rb#L1357)
879
- * with expired (missing) value sent to server
880
- * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1372)
950
+ * [logs recovery decode error as a warning and connects successfully](./spec/acceptance/realtime/connection_spec.rb#L1523)
951
+ * with invalid connection key
952
+ * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1538)
881
953
  * with many connections simultaneously
882
- * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1391)
954
+ * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1557)
883
955
  * when a state transition is unsupported
884
- * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1411)
956
+ * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1577)
885
957
  * protocol failure
886
958
  * receiving an invalid ProtocolMessage
887
- * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1427)
959
+ * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1593)
888
960
  * undocumented method
889
961
  * #internet_up?
890
- * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1445)
962
+ * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1611)
891
963
  * internet up URL protocol
892
964
  * when using TLS for the connection
893
- * [uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1456)
965
+ * [uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1622)
894
966
  * when using a non-secured connection
895
- * [uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1466)
967
+ * [uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1632)
896
968
  * when the Internet is up
897
- * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1497)
898
- * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1504)
969
+ * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1663)
970
+ * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1670)
899
971
  * with a TLS connection
900
- * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1480)
972
+ * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1646)
901
973
  * with a non-TLS connection
902
- * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1490)
974
+ * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1656)
903
975
  * when the Internet is down
904
- * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1519)
905
- * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1526)
976
+ * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1685)
977
+ * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1692)
906
978
  * state change side effects
907
979
  * when connection enters the :disconnected state
908
- * [queues messages to be sent and all channels remain attached](./spec/acceptance/realtime/connection_spec.rb#L1540)
980
+ * [queues messages to be sent and all channels remain attached](./spec/acceptance/realtime/connection_spec.rb#L1706)
909
981
  * when connection enters the :suspended state
910
- * [moves the channels into the suspended state and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1573)
982
+ * [moves the channels into the suspended state and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1739)
911
983
  * when connection enters the :failed state
912
- * [sets all channels to failed and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1604)
984
+ * [sets all channels to failed and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1770)
913
985
  * connection state change
914
- * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1618)
915
- * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1633)
986
+ * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1784)
987
+ * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1799)
916
988
  * ConnectionStateChange object
917
- * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1641)
918
- * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1649)
919
- * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1657)
920
- * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1673)
989
+ * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1807)
990
+ * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1815)
991
+ * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1823)
992
+ * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1839)
921
993
  * on failure
922
- * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1686)
994
+ * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1852)
923
995
  * retry_in
924
- * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1701)
925
- * [is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1708)
926
- * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1718)
927
- * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1728)
996
+ * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1867)
997
+ * FAILED: ~~[is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1874)~~
998
+ * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1884)
999
+ * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1894)
928
1000
  * whilst CONNECTED
929
1001
  * when a CONNECTED message is received (#RTN24)
930
- * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1763)
931
- * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1778)
1002
+ * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1928)
1003
+ * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1943)
932
1004
  * when a CONNECTED message with an error is received
933
- * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1813)
1005
+ * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1976)
934
1006
  * version params
935
- * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1834)
936
- * [sends the lib version param lib (#RTN2g)](./spec/acceptance/realtime/connection_spec.rb#L1843)
937
- * with variant
938
- * [sends the lib version param lib with the variant (#RTN2g + #RSC7b)](./spec/acceptance/realtime/connection_spec.rb#L1863)
1007
+ * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1997)
1008
+ * [sends the lib version param agent (#RCS7d)](./spec/acceptance/realtime/connection_spec.rb#L2006)
939
1009
  * transport_params (#RTC1f)
940
- * [pases transport_params to query](./spec/acceptance/realtime/connection_spec.rb#L1877)
1010
+ * [pases transport_params to query](./spec/acceptance/realtime/connection_spec.rb#L2019)
941
1011
  * when changing default param
942
- * [overrides default param (#RTC1f1)](./spec/acceptance/realtime/connection_spec.rb#L1890)
1012
+ * [overrides default param (#RTC1f1)](./spec/acceptance/realtime/connection_spec.rb#L2032)
943
1013
 
944
1014
  ### Ably::Realtime::Channel Message
945
1015
  _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/message_spec.rb))_
@@ -954,162 +1024,518 @@ _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/mess
954
1024
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L64)
955
1025
  * Binary
956
1026
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L72)
1027
+ * a single Message object (#RSL1a)
1028
+ * [publishes the message](./spec/acceptance/realtime/message_spec.rb#L83)
1029
+ * an array of Message objects (#RSL1a)
1030
+ * [publishes three messages](./spec/acceptance/realtime/message_spec.rb#L100)
1031
+ * an array of hashes (#RSL1a)
1032
+ * [publishes three messages](./spec/acceptance/realtime/message_spec.rb#L123)
1033
+ * a name with data payload (#RSL1a, #RSL1b)
1034
+ * [publishes a message](./spec/acceptance/realtime/message_spec.rb#L144)
957
1035
  * with supported extra payload content type (#RTL6h, #RSL6a2)
958
1036
  * JSON Object (Hash)
959
- * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L93)
1037
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L170)
960
1038
  * JSON Array
961
- * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L101)
1039
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L178)
962
1040
  * nil
963
- * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L107)
1041
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L184)
964
1042
  * with unsupported data payload content type
965
1043
  * Integer
966
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L118)
1044
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L195)
967
1045
  * Float
968
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L127)
1046
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L204)
969
1047
  * Boolean
970
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L136)
1048
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L213)
971
1049
  * False
972
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L145)
1050
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L222)
973
1051
  * with ASCII_8BIT message name
974
- * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L154)
1052
+ * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L231)
975
1053
  * when the message publisher has a client_id
976
- * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L170)
1054
+ * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L247)
977
1055
  * #connection_id attribute
978
1056
  * over realtime
979
- * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L183)
1057
+ * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L260)
980
1058
  * when retrieved over REST
981
- * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L195)
1059
+ * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L272)
982
1060
  * local echo when published
983
- * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L207)
1061
+ * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L284)
984
1062
  * with :echo_messages option set to false
985
- * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L227)
986
- * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L246)
987
- * [will echo messages with a valid connection_id to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L259)
1063
+ * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L304)
1064
+ * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L322)
1065
+ * [will echo messages with a valid connection_id to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L335)
988
1066
  * publishing lots of messages across two connections
989
- * [sends and receives the messages on both opened connections and calls the success callbacks for each message published](./spec/acceptance/realtime/message_spec.rb#L285)
1067
+ * [sends and receives the messages on both opened connections and calls the success callbacks for each message published](./spec/acceptance/realtime/message_spec.rb#L361)
990
1068
  * without suitable publishing permissions
991
- * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L330)
992
- * server incorrectly resends a message that was already received by the client library
993
- * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L349)
1069
+ * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L406)
994
1070
  * encoding and decoding encrypted messages
995
1071
  * with AES-128-CBC using crypto-data-128.json fixtures (#RTL7d)
996
1072
  * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
997
1073
  * behaves like an Ably encrypter and decrypter
998
1074
  * with #publish and #subscribe
999
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1000
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1075
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1076
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1001
1077
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
1002
1078
  * behaves like an Ably encrypter and decrypter
1003
1079
  * with #publish and #subscribe
1004
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1005
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1080
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1081
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1006
1082
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
1007
1083
  * behaves like an Ably encrypter and decrypter
1008
1084
  * with #publish and #subscribe
1009
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1010
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1085
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1086
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1011
1087
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
1012
1088
  * behaves like an Ably encrypter and decrypter
1013
1089
  * with #publish and #subscribe
1014
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1015
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1090
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1091
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1016
1092
  * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d)
1017
1093
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
1018
1094
  * behaves like an Ably encrypter and decrypter
1019
1095
  * with #publish and #subscribe
1020
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1021
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1096
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1097
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1022
1098
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
1023
1099
  * behaves like an Ably encrypter and decrypter
1024
1100
  * with #publish and #subscribe
1025
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1026
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1101
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1102
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1027
1103
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
1028
1104
  * behaves like an Ably encrypter and decrypter
1029
1105
  * with #publish and #subscribe
1030
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1031
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1106
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1107
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1032
1108
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
1033
1109
  * behaves like an Ably encrypter and decrypter
1034
1110
  * with #publish and #subscribe
1035
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L416)
1036
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L436)
1111
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1112
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1113
+ * item 4 with encrypted encoding cipher+aes-256-cbc/base64
1114
+ * behaves like an Ably encrypter and decrypter
1115
+ * with #publish and #subscribe
1116
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1117
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1118
+ * item 5 with encrypted encoding cipher+aes-256-cbc/base64
1119
+ * behaves like an Ably encrypter and decrypter
1120
+ * with #publish and #subscribe
1121
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1122
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1123
+ * item 6 with encrypted encoding cipher+aes-256-cbc/base64
1124
+ * behaves like an Ably encrypter and decrypter
1125
+ * with #publish and #subscribe
1126
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1127
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1128
+ * item 7 with encrypted encoding cipher+aes-256-cbc/base64
1129
+ * behaves like an Ably encrypter and decrypter
1130
+ * with #publish and #subscribe
1131
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1132
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1133
+ * item 8 with encrypted encoding cipher+aes-256-cbc/base64
1134
+ * behaves like an Ably encrypter and decrypter
1135
+ * with #publish and #subscribe
1136
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1137
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1138
+ * item 9 with encrypted encoding cipher+aes-256-cbc/base64
1139
+ * behaves like an Ably encrypter and decrypter
1140
+ * with #publish and #subscribe
1141
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1142
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1143
+ * item 10 with encrypted encoding cipher+aes-256-cbc/base64
1144
+ * behaves like an Ably encrypter and decrypter
1145
+ * with #publish and #subscribe
1146
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1147
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1148
+ * item 11 with encrypted encoding cipher+aes-256-cbc/base64
1149
+ * behaves like an Ably encrypter and decrypter
1150
+ * with #publish and #subscribe
1151
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1152
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1153
+ * item 12 with encrypted encoding cipher+aes-256-cbc/base64
1154
+ * behaves like an Ably encrypter and decrypter
1155
+ * with #publish and #subscribe
1156
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1157
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1158
+ * item 13 with encrypted encoding cipher+aes-256-cbc/base64
1159
+ * behaves like an Ably encrypter and decrypter
1160
+ * with #publish and #subscribe
1161
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1162
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1163
+ * item 14 with encrypted encoding cipher+aes-256-cbc/base64
1164
+ * behaves like an Ably encrypter and decrypter
1165
+ * with #publish and #subscribe
1166
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1167
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1168
+ * item 15 with encrypted encoding cipher+aes-256-cbc/base64
1169
+ * behaves like an Ably encrypter and decrypter
1170
+ * with #publish and #subscribe
1171
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1172
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1173
+ * item 16 with encrypted encoding cipher+aes-256-cbc/base64
1174
+ * behaves like an Ably encrypter and decrypter
1175
+ * with #publish and #subscribe
1176
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1177
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1178
+ * item 17 with encrypted encoding cipher+aes-256-cbc/base64
1179
+ * behaves like an Ably encrypter and decrypter
1180
+ * with #publish and #subscribe
1181
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1182
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1183
+ * item 18 with encrypted encoding cipher+aes-256-cbc/base64
1184
+ * behaves like an Ably encrypter and decrypter
1185
+ * with #publish and #subscribe
1186
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1187
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1188
+ * item 19 with encrypted encoding cipher+aes-256-cbc/base64
1189
+ * behaves like an Ably encrypter and decrypter
1190
+ * with #publish and #subscribe
1191
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1192
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1193
+ * item 20 with encrypted encoding cipher+aes-256-cbc/base64
1194
+ * behaves like an Ably encrypter and decrypter
1195
+ * with #publish and #subscribe
1196
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1197
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1198
+ * item 21 with encrypted encoding cipher+aes-256-cbc/base64
1199
+ * behaves like an Ably encrypter and decrypter
1200
+ * with #publish and #subscribe
1201
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1202
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1203
+ * item 22 with encrypted encoding cipher+aes-256-cbc/base64
1204
+ * behaves like an Ably encrypter and decrypter
1205
+ * with #publish and #subscribe
1206
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1207
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1208
+ * item 23 with encrypted encoding cipher+aes-256-cbc/base64
1209
+ * behaves like an Ably encrypter and decrypter
1210
+ * with #publish and #subscribe
1211
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1212
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1213
+ * item 24 with encrypted encoding cipher+aes-256-cbc/base64
1214
+ * behaves like an Ably encrypter and decrypter
1215
+ * with #publish and #subscribe
1216
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1217
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1218
+ * item 25 with encrypted encoding cipher+aes-256-cbc/base64
1219
+ * behaves like an Ably encrypter and decrypter
1220
+ * with #publish and #subscribe
1221
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1222
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1223
+ * item 26 with encrypted encoding cipher+aes-256-cbc/base64
1224
+ * behaves like an Ably encrypter and decrypter
1225
+ * with #publish and #subscribe
1226
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1227
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1228
+ * item 27 with encrypted encoding cipher+aes-256-cbc/base64
1229
+ * behaves like an Ably encrypter and decrypter
1230
+ * with #publish and #subscribe
1231
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1232
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1233
+ * item 28 with encrypted encoding cipher+aes-256-cbc/base64
1234
+ * behaves like an Ably encrypter and decrypter
1235
+ * with #publish and #subscribe
1236
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1237
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1238
+ * item 29 with encrypted encoding cipher+aes-256-cbc/base64
1239
+ * behaves like an Ably encrypter and decrypter
1240
+ * with #publish and #subscribe
1241
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1242
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1243
+ * item 30 with encrypted encoding cipher+aes-256-cbc/base64
1244
+ * behaves like an Ably encrypter and decrypter
1245
+ * with #publish and #subscribe
1246
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1247
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1248
+ * item 31 with encrypted encoding cipher+aes-256-cbc/base64
1249
+ * behaves like an Ably encrypter and decrypter
1250
+ * with #publish and #subscribe
1251
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1252
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1253
+ * item 32 with encrypted encoding cipher+aes-256-cbc/base64
1254
+ * behaves like an Ably encrypter and decrypter
1255
+ * with #publish and #subscribe
1256
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1257
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1258
+ * item 33 with encrypted encoding cipher+aes-256-cbc/base64
1259
+ * behaves like an Ably encrypter and decrypter
1260
+ * with #publish and #subscribe
1261
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1262
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1263
+ * item 34 with encrypted encoding cipher+aes-256-cbc/base64
1264
+ * behaves like an Ably encrypter and decrypter
1265
+ * with #publish and #subscribe
1266
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1267
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1268
+ * item 35 with encrypted encoding cipher+aes-256-cbc/base64
1269
+ * behaves like an Ably encrypter and decrypter
1270
+ * with #publish and #subscribe
1271
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1272
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1273
+ * item 36 with encrypted encoding cipher+aes-256-cbc/base64
1274
+ * behaves like an Ably encrypter and decrypter
1275
+ * with #publish and #subscribe
1276
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1277
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1278
+ * item 37 with encrypted encoding cipher+aes-256-cbc/base64
1279
+ * behaves like an Ably encrypter and decrypter
1280
+ * with #publish and #subscribe
1281
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1282
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1283
+ * item 38 with encrypted encoding cipher+aes-256-cbc/base64
1284
+ * behaves like an Ably encrypter and decrypter
1285
+ * with #publish and #subscribe
1286
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1287
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1288
+ * item 39 with encrypted encoding cipher+aes-256-cbc/base64
1289
+ * behaves like an Ably encrypter and decrypter
1290
+ * with #publish and #subscribe
1291
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1292
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1293
+ * item 40 with encrypted encoding cipher+aes-256-cbc/base64
1294
+ * behaves like an Ably encrypter and decrypter
1295
+ * with #publish and #subscribe
1296
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1297
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1298
+ * item 41 with encrypted encoding cipher+aes-256-cbc/base64
1299
+ * behaves like an Ably encrypter and decrypter
1300
+ * with #publish and #subscribe
1301
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1302
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1303
+ * item 42 with encrypted encoding cipher+aes-256-cbc/base64
1304
+ * behaves like an Ably encrypter and decrypter
1305
+ * with #publish and #subscribe
1306
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1307
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1308
+ * item 43 with encrypted encoding cipher+aes-256-cbc/base64
1309
+ * behaves like an Ably encrypter and decrypter
1310
+ * with #publish and #subscribe
1311
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1312
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1313
+ * item 44 with encrypted encoding cipher+aes-256-cbc/base64
1314
+ * behaves like an Ably encrypter and decrypter
1315
+ * with #publish and #subscribe
1316
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1317
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1318
+ * item 45 with encrypted encoding cipher+aes-256-cbc/base64
1319
+ * behaves like an Ably encrypter and decrypter
1320
+ * with #publish and #subscribe
1321
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1322
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1323
+ * item 46 with encrypted encoding cipher+aes-256-cbc/base64
1324
+ * behaves like an Ably encrypter and decrypter
1325
+ * with #publish and #subscribe
1326
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1327
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1328
+ * item 47 with encrypted encoding cipher+aes-256-cbc/base64
1329
+ * behaves like an Ably encrypter and decrypter
1330
+ * with #publish and #subscribe
1331
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1332
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1333
+ * item 48 with encrypted encoding cipher+aes-256-cbc/base64
1334
+ * behaves like an Ably encrypter and decrypter
1335
+ * with #publish and #subscribe
1336
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1337
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1338
+ * item 49 with encrypted encoding cipher+aes-256-cbc/base64
1339
+ * behaves like an Ably encrypter and decrypter
1340
+ * with #publish and #subscribe
1341
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1342
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1343
+ * item 50 with encrypted encoding cipher+aes-256-cbc/base64
1344
+ * behaves like an Ably encrypter and decrypter
1345
+ * with #publish and #subscribe
1346
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1347
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1348
+ * item 51 with encrypted encoding cipher+aes-256-cbc/base64
1349
+ * behaves like an Ably encrypter and decrypter
1350
+ * with #publish and #subscribe
1351
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1352
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1353
+ * item 52 with encrypted encoding cipher+aes-256-cbc/base64
1354
+ * behaves like an Ably encrypter and decrypter
1355
+ * with #publish and #subscribe
1356
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1357
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1358
+ * item 53 with encrypted encoding cipher+aes-256-cbc/base64
1359
+ * behaves like an Ably encrypter and decrypter
1360
+ * with #publish and #subscribe
1361
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1362
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1363
+ * item 54 with encrypted encoding cipher+aes-256-cbc/base64
1364
+ * behaves like an Ably encrypter and decrypter
1365
+ * with #publish and #subscribe
1366
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1367
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1368
+ * item 55 with encrypted encoding cipher+aes-256-cbc/base64
1369
+ * behaves like an Ably encrypter and decrypter
1370
+ * with #publish and #subscribe
1371
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1372
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1373
+ * item 56 with encrypted encoding cipher+aes-256-cbc/base64
1374
+ * behaves like an Ably encrypter and decrypter
1375
+ * with #publish and #subscribe
1376
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1377
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1378
+ * item 57 with encrypted encoding cipher+aes-256-cbc/base64
1379
+ * behaves like an Ably encrypter and decrypter
1380
+ * with #publish and #subscribe
1381
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1382
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1383
+ * item 58 with encrypted encoding cipher+aes-256-cbc/base64
1384
+ * behaves like an Ably encrypter and decrypter
1385
+ * with #publish and #subscribe
1386
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1387
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1388
+ * item 59 with encrypted encoding cipher+aes-256-cbc/base64
1389
+ * behaves like an Ably encrypter and decrypter
1390
+ * with #publish and #subscribe
1391
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1392
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1393
+ * item 60 with encrypted encoding cipher+aes-256-cbc/base64
1394
+ * behaves like an Ably encrypter and decrypter
1395
+ * with #publish and #subscribe
1396
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1397
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1398
+ * item 61 with encrypted encoding cipher+aes-256-cbc/base64
1399
+ * behaves like an Ably encrypter and decrypter
1400
+ * with #publish and #subscribe
1401
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1402
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1403
+ * item 62 with encrypted encoding cipher+aes-256-cbc/base64
1404
+ * behaves like an Ably encrypter and decrypter
1405
+ * with #publish and #subscribe
1406
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1407
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1408
+ * item 63 with encrypted encoding cipher+aes-256-cbc/base64
1409
+ * behaves like an Ably encrypter and decrypter
1410
+ * with #publish and #subscribe
1411
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1412
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1413
+ * item 64 with encrypted encoding cipher+aes-256-cbc/base64
1414
+ * behaves like an Ably encrypter and decrypter
1415
+ * with #publish and #subscribe
1416
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1417
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1418
+ * item 65 with encrypted encoding cipher+aes-256-cbc/base64
1419
+ * behaves like an Ably encrypter and decrypter
1420
+ * with #publish and #subscribe
1421
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1422
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1423
+ * item 66 with encrypted encoding cipher+aes-256-cbc/base64
1424
+ * behaves like an Ably encrypter and decrypter
1425
+ * with #publish and #subscribe
1426
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1427
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1428
+ * item 67 with encrypted encoding cipher+aes-256-cbc/base64
1429
+ * behaves like an Ably encrypter and decrypter
1430
+ * with #publish and #subscribe
1431
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1432
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1433
+ * item 68 with encrypted encoding cipher+aes-256-cbc/base64
1434
+ * behaves like an Ably encrypter and decrypter
1435
+ * with #publish and #subscribe
1436
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1437
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1438
+ * item 69 with encrypted encoding cipher+aes-256-cbc/base64
1439
+ * behaves like an Ably encrypter and decrypter
1440
+ * with #publish and #subscribe
1441
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1442
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1443
+ * item 70 with encrypted encoding cipher+aes-256-cbc/base64
1444
+ * behaves like an Ably encrypter and decrypter
1445
+ * with #publish and #subscribe
1446
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1447
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1448
+ * item 71 with encrypted encoding cipher+aes-256-cbc/base64
1449
+ * behaves like an Ably encrypter and decrypter
1450
+ * with #publish and #subscribe
1451
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1452
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1453
+ * item 72 with encrypted encoding cipher+aes-256-cbc/base64
1454
+ * behaves like an Ably encrypter and decrypter
1455
+ * with #publish and #subscribe
1456
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1457
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1458
+ * item 73 with encrypted encoding cipher+aes-256-cbc/base64
1459
+ * behaves like an Ably encrypter and decrypter
1460
+ * with #publish and #subscribe
1461
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L457)
1462
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477)
1037
1463
  * with multiple sends from one client to another
1038
- * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L475)
1039
- * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L492)
1464
+ * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L516)
1465
+ * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L533)
1040
1466
  * subscribing with a different transport protocol
1041
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L526)
1042
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L526)
1043
- * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L526)
1467
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L567)
1468
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L567)
1469
+ * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L567)
1044
1470
  * publishing on an unencrypted channel and subscribing on an encrypted channel with another client
1045
- * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L547)
1471
+ * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L588)
1046
1472
  * publishing on an encrypted channel and subscribing on an unencrypted channel with another client
1047
- * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L565)
1048
- * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L576)
1473
+ * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L608)
1474
+ * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L619)
1049
1475
  * publishing on an encrypted channel and subscribing with a different algorithm on another client
1050
- * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L596)
1051
- * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L605)
1476
+ * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L639)
1477
+ * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L650)
1052
1478
  * publishing on an encrypted channel and subscribing with a different key on another client
1053
- * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L625)
1054
- * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L636)
1479
+ * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L670)
1480
+ * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L681)
1055
1481
  * when message is published, the connection disconnects before the ACK is received, and the connection is resumed
1056
- * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L655)
1482
+ * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L700)
1057
1483
  * when message is published, the connection disconnects before the ACK is received
1058
1484
  * the connection is not resumed
1059
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L697)
1485
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L745)
1060
1486
  * the connection becomes suspended
1061
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L723)
1487
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L771)
1062
1488
  * the connection becomes failed
1063
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L750)
1489
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L798)
1064
1490
  * message encoding interoperability
1065
1491
  * over a JSON transport
1066
1492
  * when decoding string
1067
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1493
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839)
1068
1494
  * when encoding string
1069
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1495
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857)
1070
1496
  * when decoding string
1071
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1497
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839)
1072
1498
  * when encoding string
1073
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1499
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857)
1074
1500
  * when decoding jsonObject
1075
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1501
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839)
1076
1502
  * when encoding jsonObject
1077
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1503
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857)
1078
1504
  * when decoding jsonArray
1079
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1505
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839)
1080
1506
  * when encoding jsonArray
1081
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1507
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857)
1082
1508
  * when decoding binary
1083
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1509
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839)
1084
1510
  * when encoding binary
1085
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1511
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857)
1086
1512
  * over a MsgPack transport
1087
1513
  * when publishing a string using JSON protocol
1088
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1514
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891)
1089
1515
  * when retrieving a string using JSON protocol
1090
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1516
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919)
1091
1517
  * when publishing a string using JSON protocol
1092
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1518
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891)
1093
1519
  * when retrieving a string using JSON protocol
1094
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1520
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919)
1095
1521
  * when publishing a jsonObject using JSON protocol
1096
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1522
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891)
1097
1523
  * when retrieving a jsonObject using JSON protocol
1098
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1524
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919)
1099
1525
  * when publishing a jsonArray using JSON protocol
1100
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1526
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891)
1101
1527
  * when retrieving a jsonArray using JSON protocol
1102
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1528
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919)
1103
1529
  * when publishing a binary using JSON protocol
1104
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1530
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891)
1105
1531
  * when retrieving a binary using JSON protocol
1106
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1532
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919)
1107
1533
 
1108
1534
  ### Ably::Realtime::Presence history
1109
1535
  _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_
1110
1536
  * using JSON protocol
1111
1537
  * [provides up to the moment presence history](./spec/acceptance/realtime/presence_history_spec.rb#L21)
1112
- * [ensures REST presence history message IDs match ProtocolMessage wrapped message and connection IDs via Realtime](./spec/acceptance/realtime/presence_history_spec.rb#L42)
1538
+ * [ensures REST presence history message IDs match ProtocolMessage wrapped message and connection IDs via Realtime](./spec/acceptance/realtime/presence_history_spec.rb#L44)
1113
1539
 
1114
1540
  ### Ably::Realtime::Presence
1115
1541
  _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_
@@ -1118,40 +1544,40 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1118
1544
  * [maintains state as other clients enter and leave the channel (#RTP2e)](./spec/acceptance/realtime/presence_spec.rb#L479)
1119
1545
  * #sync_complete? and SYNC flags (#RTP1)
1120
1546
  * when attaching to a channel without any members present
1121
- * [sync_complete? is true, there is no presence flag, and the presence channel is considered synced immediately (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L708)
1547
+ * [sync_complete? is true, no members are received and the presence channel is synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L707)
1122
1548
  * when attaching to a channel with members present
1123
- * [sync_complete? is false, there is a presence flag, and the presence channel is subsequently synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L729)
1549
+ * [sync_complete? is false, there is a presence flag, and the presence channel is subsequently synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L736)
1124
1550
  * 101 existing (present) members on a channel (2 SYNC pages)
1125
1551
  * requiring at least 2 SYNC ProtocolMessages
1126
1552
  * when a client attaches to the presence channel
1127
- * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L781)
1553
+ * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L788)
1128
1554
  * and a member enters before the SYNC operation is complete
1129
- * [emits a :enter immediately and the member is :present once the sync is complete (#RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L797)
1555
+ * [emits a :enter immediately and the member is :present once the sync is complete (#RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L804)
1130
1556
  * and a member leaves before the SYNC operation is complete
1131
- * [emits :leave immediately as the member leaves and cleans up the ABSENT member after (#RTP2f, #RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L834)
1132
- * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L882)
1133
- * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get (#RTP2f)](./spec/acceptance/realtime/presence_spec.rb#L927)
1557
+ * [emits :leave immediately as the member leaves and cleans up the ABSENT member after (#RTP2f, #RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L841)
1558
+ * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L889)
1559
+ * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get (#RTP2f)](./spec/acceptance/realtime/presence_spec.rb#L934)
1134
1560
  * #get
1135
1561
  * by default
1136
- * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L977)
1562
+ * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L984)
1137
1563
  * with :wait_for_sync option set to false (#RTP11c1)
1138
- * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L998)
1564
+ * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L1005)
1139
1565
  * state
1140
1566
  * once opened
1141
- * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1025)
1567
+ * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1032)
1142
1568
  * #enter
1143
1569
  * data attribute
1144
1570
  * when provided as argument option to #enter
1145
- * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1050)
1571
+ * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1057)
1146
1572
  * message #connection_id
1147
- * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1074)
1573
+ * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1081)
1148
1574
  * without necessary capabilities to join presence
1149
- * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1093)
1575
+ * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1100)
1150
1576
  * it should behave like a public presence method
1151
- * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1152
- * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1153
- * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1154
- * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1577
+ * [presence enter : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1578
+ * [presence enter : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1579
+ * [presence enter : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1580
+ * [presence enter : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1155
1581
  * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130)
1156
1582
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293)
1157
1583
  * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300)
@@ -1187,16 +1613,16 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1187
1613
  * if connection fails before success
1188
1614
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1189
1615
  * #update
1190
- * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L1105)
1191
- * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1130)
1192
- * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1142)
1616
+ * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L1112)
1617
+ * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1137)
1618
+ * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1149)
1193
1619
  * when ENTERED
1194
- * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1115)
1620
+ * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1122)
1195
1621
  * it should behave like a public presence method
1196
- * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1197
- * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1198
- * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1199
- * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1622
+ * [presence update : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1623
+ * [presence update : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1624
+ * [presence update : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1625
+ * [presence update : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1200
1626
  * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130)
1201
1627
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293)
1202
1628
  * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300)
@@ -1232,16 +1658,16 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1232
1658
  * if connection fails before success
1233
1659
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1234
1660
  * #leave
1235
- * [succeeds and does not emit an event (#RTP10d)](./spec/acceptance/realtime/presence_spec.rb#L1236)
1661
+ * [succeeds and does not emit an event (#RTP10d)](./spec/acceptance/realtime/presence_spec.rb#L1244)
1236
1662
  * :data option
1237
1663
  * when set to a string
1238
- * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1163)
1664
+ * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1170)
1239
1665
  * when set to nil
1240
- * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1178)
1666
+ * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1185)
1241
1667
  * when not passed as an argument (i.e. nil)
1242
- * [emits the previous value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1193)
1668
+ * [emits the previous value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1200)
1243
1669
  * and sync is complete
1244
- * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1208)
1670
+ * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1215)
1245
1671
  * it should behave like a public presence method
1246
1672
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293)
1247
1673
  * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300)
@@ -1268,22 +1694,22 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1268
1694
  * if connection fails before success
1269
1695
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1270
1696
  * :left event
1271
- * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L1254)
1272
- * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1267)
1697
+ * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L1262)
1698
+ * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1275)
1273
1699
  * entering/updating/leaving presence state on behalf of another client_id
1274
1700
  * #enter_client
1275
1701
  * multiple times on the same channel with different client_ids
1276
- * [has no affect on the client's presence state and only enters on behalf of the provided client_id](./spec/acceptance/realtime/presence_spec.rb#L1292)
1277
- * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1306)
1702
+ * [has no affect on the client's presence state and only enters on behalf of the provided client_id](./spec/acceptance/realtime/presence_spec.rb#L1300)
1703
+ * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1314)
1278
1704
  * message #connection_id
1279
- * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1327)
1705
+ * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1335)
1280
1706
  * without necessary capabilities to enter on behalf of another client
1281
- * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1347)
1707
+ * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1355)
1282
1708
  * it should behave like a public presence method
1283
- * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1284
- * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1285
- * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1286
- * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1709
+ * [presence enter_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1710
+ * [presence enter_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1711
+ * [presence enter_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1712
+ * [presence enter_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1287
1713
  * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130)
1288
1714
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293)
1289
1715
  * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300)
@@ -1350,14 +1776,14 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1350
1776
  * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L470)
1351
1777
  * #update_client
1352
1778
  * multiple times on the same channel with different client_ids
1353
- * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L1361)
1354
- * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1387)
1355
- * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1401)
1779
+ * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L1369)
1780
+ * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1395)
1781
+ * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1409)
1356
1782
  * it should behave like a public presence method
1357
- * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1358
- * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1359
- * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1360
- * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1783
+ * [presence update_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1784
+ * [presence update_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1785
+ * [presence update_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1786
+ * [presence update_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1361
1787
  * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130)
1362
1788
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293)
1363
1789
  * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300)
@@ -1425,19 +1851,19 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1425
1851
  * #leave_client
1426
1852
  * leaves a channel
1427
1853
  * multiple times on the same channel with different client_ids
1428
- * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L1433)
1429
- * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1459)
1854
+ * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L1441)
1855
+ * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1467)
1430
1856
  * with a new value in :data option
1431
- * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1485)
1857
+ * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1493)
1432
1858
  * with a nil value in :data option
1433
- * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1500)
1859
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1508)
1434
1860
  * with no :data option
1435
- * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1515)
1861
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1523)
1436
1862
  * it should behave like a public presence method
1437
- * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1438
- * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1439
- * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1440
- * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1863
+ * [presence leave_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1864
+ * [presence leave_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
1865
+ * [presence leave_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97)
1866
+ * [presence leave_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114)
1441
1867
  * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130)
1442
1868
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293)
1443
1869
  * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300)
@@ -1503,106 +1929,100 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1503
1929
  * and an empty client_id
1504
1930
  * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L470)
1505
1931
  * #get
1506
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L1536)
1507
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1541)
1508
- * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1548)
1509
- * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1556)
1510
- * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1591)
1511
- * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1606)
1512
- * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1690)
1513
- * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1707)
1514
- * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1729)
1515
- * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1753)
1516
- * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1765)
1932
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L1544)
1933
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1549)
1934
+ * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1556)
1935
+ * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1564)
1936
+ * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1599)
1937
+ * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1616)
1938
+ * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1700)
1939
+ * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1717)
1940
+ * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1739)
1941
+ * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1763)
1942
+ * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1775)
1517
1943
  * when the channel is SUSPENDED
1518
1944
  * with wait_for_sync: true
1519
- * [results in an error with @code@ @91005@ and a @message@ stating that the presence state is out of sync (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1566)
1945
+ * [results in an error with @code@ @91005@ and a @message@ stating that the presence state is out of sync (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1574)
1520
1946
  * with wait_for_sync: false
1521
- * [returns the current PresenceMap and does not wait for the channel to change to the ATTACHED state (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1579)
1947
+ * [returns the current PresenceMap and does not wait for the channel to change to the ATTACHED state (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1587)
1522
1948
  * during a sync
1523
1949
  * when :wait_for_sync is true
1524
- * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1643)
1525
- * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1666)
1950
+ * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1653)
1951
+ * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1676)
1526
1952
  * when a member enters and then leaves
1527
- * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1778)
1953
+ * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1788)
1528
1954
  * when a member enters and the presence map is updated
1529
- * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1793)
1955
+ * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1803)
1530
1956
  * with lots of members on different clients
1531
- * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1814)
1957
+ * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1824)
1532
1958
  * #subscribe
1533
- * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1889)
1959
+ * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1901)
1534
1960
  * with no arguments
1535
- * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1850)
1961
+ * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1862)
1536
1962
  * with event name
1537
- * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1870)
1963
+ * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1882)
1538
1964
  * with a callback that raises an exception
1539
- * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1902)
1965
+ * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1914)
1540
1966
  * #unsubscribe
1541
1967
  * with no arguments
1542
- * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1923)
1968
+ * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1935)
1543
1969
  * with event name
1544
- * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1941)
1970
+ * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1953)
1545
1971
  * REST #get
1546
- * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1960)
1547
- * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1976)
1972
+ * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1972)
1973
+ * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1988)
1548
1974
  * client_id with ASCII_8BIT
1549
1975
  * in connection set up
1550
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1996)
1976
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L2008)
1551
1977
  * in channel options
1552
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L2009)
1978
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L2021)
1553
1979
  * encoding and decoding of presence message data
1554
- * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L2035)
1980
+ * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L2047)
1555
1981
  * #subscribe
1556
- * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L2054)
1557
- * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L2066)
1558
- * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L2080)
1982
+ * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L2066)
1983
+ * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L2078)
1984
+ * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L2092)
1559
1985
  * #get
1560
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2096)
1986
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2108)
1561
1987
  * REST #get
1562
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2110)
1988
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2122)
1563
1989
  * when cipher settings do not match publisher
1564
- * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2126)
1565
- * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2139)
1990
+ * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2138)
1991
+ * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2151)
1566
1992
  * leaving
1567
- * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2155)
1568
- * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2165)
1993
+ * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2169)
1994
+ * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2179)
1569
1995
  * connection failure mid-way through a large member sync
1570
- * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2184)
1996
+ * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2198)
1571
1997
  * server-initiated sync
1572
1998
  * with multiple SYNC pages
1573
- * [is initiated with a SYNC message and completed with a later SYNC message with no cursor value part of the channelSerial (#RTP18a, #RTP18b) ](./spec/acceptance/realtime/presence_spec.rb#L2222)
1999
+ * [is initiated with a SYNC message and completed with a later SYNC message with no cursor value part of the channelSerial (#RTP18a, #RTP18b) ](./spec/acceptance/realtime/presence_spec.rb#L2236)
1574
2000
  * with a single SYNC page
1575
- * [is initiated and completed with a single SYNC message (and no channelSerial) (#RTP18a, #RTP18c) ](./spec/acceptance/realtime/presence_spec.rb#L2273)
2001
+ * [is initiated and completed with a single SYNC message (and no channelSerial) (#RTP18a, #RTP18c) ](./spec/acceptance/realtime/presence_spec.rb#L2285)
1576
2002
  * when members exist in the PresenceMap before a SYNC completes
1577
- * [removes the members that are no longer present (#RTP19)](./spec/acceptance/realtime/presence_spec.rb#L2321)
2003
+ * [removes the members that are no longer present (#RTP19)](./spec/acceptance/realtime/presence_spec.rb#L2332)
1578
2004
  * when the client does not have presence subscribe privileges but is present on the channel
1579
- * [receives presence updates for all presence events generated by the current connection and the presence map is kept up to date (#RTP17a)](./spec/acceptance/realtime/presence_spec.rb#L2379)
2005
+ * [receives presence updates for all presence events generated by the current connection and the presence map is kept up to date (#RTP17a)](./spec/acceptance/realtime/presence_spec.rb#L2389)
1580
2006
  * local PresenceMap for presence members entered by this client
1581
- * [maintains a copy of the member map for any member that shares this connection's connection ID (#RTP17)](./spec/acceptance/realtime/presence_spec.rb#L2427)
2007
+ * [maintains a copy of the member map for any member that shares this connection's connection ID (#RTP17)](./spec/acceptance/realtime/presence_spec.rb#L2437)
1582
2008
  * #RTP17b
1583
- * [updates presence members on leave](./spec/acceptance/realtime/presence_spec.rb#L2455)
1584
- * [does no update presence members on fabricated leave](./spec/acceptance/realtime/presence_spec.rb#L2480)
2009
+ * [updates presence members on leave](./spec/acceptance/realtime/presence_spec.rb#L2465)
2010
+ * [does no update presence members on fabricated leave](./spec/acceptance/realtime/presence_spec.rb#L2490)
1585
2011
  * when a channel becomes attached again
1586
- * and the resume flag is true
1587
- * and the presence flag is false
1588
- * [does not send any presence events as the PresenceMap is in sync (#RTP5c1)](./spec/acceptance/realtime/presence_spec.rb#L2527)
1589
- * and the presence flag is true
1590
- * and following the SYNC all local MemberMap members are present in the PresenceMap
1591
- * [does nothing as MemberMap is in sync (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2557)
1592
- * and following the SYNC a local MemberMap member is not present in the PresenceMap
1593
- * [re-enters the missing members automatically (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2596)
1594
2012
  * and the resume flag is false
1595
2013
  * and the presence flag is false
1596
- * [immediately resends all local presence members (#RTP5c2, #RTP19a)](./spec/acceptance/realtime/presence_spec.rb#L2679)
2014
+ * [immediately resends all local presence members (#RTP5c2, #RTP19a)](./spec/acceptance/realtime/presence_spec.rb#L2539)
1597
2015
  * when re-entering a client automatically, if the re-enter fails for any reason
1598
- * [should emit an ErrorInfo with error code 91004 (#RTP5c3)](./spec/acceptance/realtime/presence_spec.rb#L2730)
1599
- * channel state side effects
2016
+ * [should emit an ErrorInfo with error code 91004 (#RTP5c3)](./spec/acceptance/realtime/presence_spec.rb#L2614)
2017
+ * channel state side effects (RTP5)
2018
+ * channel transitions to the ATTACHED state (RTP5b)
2019
+ * [all queued presence messages are sent](./spec/acceptance/realtime/presence_spec.rb#L2668)
1600
2020
  * channel transitions to the FAILED state
1601
- * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2787)
2021
+ * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2688)
1602
2022
  * channel transitions to the DETACHED state
1603
- * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2814)
2023
+ * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2715)
1604
2024
  * channel transitions to the SUSPENDED state
1605
- * [maintains the PresenceMap and only publishes presence event changes since the last attached state (#RTP5f)](./spec/acceptance/realtime/presence_spec.rb#L2850)
2025
+ * [maintains the PresenceMap and only publishes presence event changes since the last attached state (#RTP5f)](./spec/acceptance/realtime/presence_spec.rb#L2753)
1606
2026
 
1607
2027
  ### Ably::Realtime::Push::Admin
1608
2028
  _(see [spec/acceptance/realtime/push_admin_spec.rb](./spec/acceptance/realtime/push_admin_spec.rb))_
@@ -1663,14 +2083,6 @@ _(see [spec/acceptance/realtime/push_admin_spec.rb](./spec/acceptance/realtime/p
1663
2083
  * [removes match for Hash object by channel and client_id](./spec/acceptance/realtime/push_admin_spec.rb#L697)
1664
2084
  * [succeeds even if there is no match](./spec/acceptance/realtime/push_admin_spec.rb#L709)
1665
2085
 
1666
- ### Ably::Realtime::Push
1667
- _(see [spec/acceptance/realtime/push_spec.rb](./spec/acceptance/realtime/push_spec.rb))_
1668
- * using JSON protocol
1669
- * #activate
1670
- * [raises an unsupported exception](./spec/acceptance/realtime/push_spec.rb#L14)
1671
- * #deactivate
1672
- * [raises an unsupported exception](./spec/acceptance/realtime/push_spec.rb#L21)
1673
-
1674
2086
  ### Ably::Realtime::Client#stats
1675
2087
  _(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_
1676
2088
  * using JSON protocol
@@ -1858,39 +2270,42 @@ _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
1858
2270
  * when token expires
1859
2271
  * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1143)
1860
2272
  * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1153)
2273
+ * when token does not expire
2274
+ * for the next 2 hours
2275
+ * [should not request for the new token (#RSA4b1)](./spec/acceptance/rest/auth_spec.rb#L1177)
1861
2276
  * when :client_id is provided in a token
1862
- * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1177)
2277
+ * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1195)
1863
2278
  * #client_id_validated?
1864
2279
  * when using basic auth
1865
- * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1189)
2280
+ * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1207)
1866
2281
  * when using a token auth string for a token with a client_id
1867
- * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1197)
2282
+ * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1215)
1868
2283
  * when using a token
1869
2284
  * with a client_id
1870
- * [is true](./spec/acceptance/rest/auth_spec.rb#L1206)
2285
+ * [is true](./spec/acceptance/rest/auth_spec.rb#L1224)
1871
2286
  * with no client_id (anonymous)
1872
- * [is true](./spec/acceptance/rest/auth_spec.rb#L1214)
2287
+ * [is true](./spec/acceptance/rest/auth_spec.rb#L1232)
1873
2288
  * with a wildcard client_id (anonymous)
1874
- * [is false](./spec/acceptance/rest/auth_spec.rb#L1222)
2289
+ * [is false](./spec/acceptance/rest/auth_spec.rb#L1240)
1875
2290
  * when using a token request with a client_id
1876
- * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1231)
2291
+ * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1249)
1877
2292
  * after authentication
1878
- * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1238)
2293
+ * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1256)
1879
2294
  * when using a :key and basic auth
1880
- * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1246)
1881
- * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1250)
1882
- * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1254)
2295
+ * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1264)
2296
+ * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1268)
2297
+ * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1272)
1883
2298
  * deprecated #authorise
1884
- * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1263)
1885
- * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1268)
2299
+ * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1281)
2300
+ * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1286)
1886
2301
  * when using JWT
1887
- * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/rest/auth_spec.rb#L1280)
2302
+ * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/rest/auth_spec.rb#L1298)
1888
2303
  * when the JWT embeds an Ably token
1889
- * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1287)
2304
+ * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1305)
1890
2305
  * and the requested token is encrypted
1891
- * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1294)
2306
+ * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1312)
1892
2307
  * when the token requested is returned with application/jwt content type
1893
- * [authenticates correctly and pulls stats](./spec/acceptance/rest/auth_spec.rb#L1305)
2308
+ * [authenticates correctly and pulls stats](./spec/acceptance/rest/auth_spec.rb#L1323)
1894
2309
 
1895
2310
  ### Ably::Rest
1896
2311
  _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
@@ -1924,98 +2339,111 @@ _(see [spec/acceptance/rest/channel_spec.rb](./spec/acceptance/rest/channel_spec
1924
2339
  * using JSON protocol
1925
2340
  * #publish
1926
2341
  * with name and data arguments
1927
- * [publishes the message and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L21)
2342
+ * [publishes the message and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L23)
1928
2343
  * and additional attributes
1929
- * [publishes the message with the attributes and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L30)
2344
+ * [publishes the message with the attributes and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L32)
1930
2345
  * with a client_id configured in the ClientOptions
1931
- * [publishes the message without a client_id](./spec/acceptance/rest/channel_spec.rb#L41)
1932
- * [expects a client_id to be added by the realtime service](./spec/acceptance/rest/channel_spec.rb#L49)
2346
+ * [publishes the message without a client_id](./spec/acceptance/rest/channel_spec.rb#L43)
2347
+ * [expects a client_id to be added by the realtime service](./spec/acceptance/rest/channel_spec.rb#L51)
1933
2348
  * with an array of Hash objects with :name and :data attributes
1934
- * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L62)
2349
+ * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L64)
1935
2350
  * with an array of Message objects
1936
- * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L77)
2351
+ * when max_message_size and max_frame_size is not set
2352
+ * and messages size (130 bytes) is smaller than the max_message_size
2353
+ * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L89)
2354
+ * and messages size (177784 bytes) is bigger than the max_message_size
2355
+ * [should not publish and raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/acceptance/rest/channel_spec.rb#L105)
2356
+ * when max_message_size is 655 bytes
2357
+ * and messages size (130 bytes) is smaller than the max_message_size
2358
+ * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L127)
2359
+ * and messages size (177784 bytes) is bigger than the max_message_size
2360
+ * [should not publish and raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/acceptance/rest/channel_spec.rb#L143)
1937
2361
  * with a Message object
1938
- * [publishes the message](./spec/acceptance/rest/channel_spec.rb#L92)
2362
+ * [publishes the message](./spec/acceptance/rest/channel_spec.rb#L158)
1939
2363
  * with a Message object and query params
1940
- * [should fail to publish the message (RSL1l1)](./spec/acceptance/rest/channel_spec.rb#L104)
2364
+ * [should fail to publish the message (RSL1l1)](./spec/acceptance/rest/channel_spec.rb#L170)
1941
2365
  * with Messages and query params
1942
- * [should fail to publish the message (RSL1l1)](./spec/acceptance/rest/channel_spec.rb#L117)
2366
+ * [should fail to publish the message (RSL1l1)](./spec/acceptance/rest/channel_spec.rb#L183)
1943
2367
  * without adequate permissions on the channel
1944
- * [raises a permission error when publishing](./spec/acceptance/rest/channel_spec.rb#L127)
2368
+ * [raises a permission error when publishing](./spec/acceptance/rest/channel_spec.rb#L193)
1945
2369
  * null attributes
1946
2370
  * when name is null
1947
- * [publishes the message without a name attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L136)
2371
+ * [publishes the message without a name attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L202)
1948
2372
  * when data is null
1949
- * [publishes the message without a data attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L147)
2373
+ * [publishes the message without a data attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L213)
1950
2374
  * with neither name or data attributes
1951
- * [publishes the message without any attributes in the payload](./spec/acceptance/rest/channel_spec.rb#L158)
2375
+ * [publishes the message without any attributes in the payload](./spec/acceptance/rest/channel_spec.rb#L224)
1952
2376
  * identified clients
1953
2377
  * when authenticated with a wildcard client_id
1954
2378
  * with a valid client_id in the message
1955
- * [succeeds](./spec/acceptance/rest/channel_spec.rb#L175)
2379
+ * [succeeds](./spec/acceptance/rest/channel_spec.rb#L241)
1956
2380
  * with a wildcard client_id in the message
1957
- * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L184)
2381
+ * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L250)
1958
2382
  * with an empty client_id in the message
1959
- * [succeeds and publishes without a client_id](./spec/acceptance/rest/channel_spec.rb#L190)
2383
+ * [succeeds and publishes without a client_id](./spec/acceptance/rest/channel_spec.rb#L256)
1960
2384
  * when authenticated with a Token string with an implicit client_id
1961
2385
  * without having a confirmed identity
1962
2386
  * with a valid client_id in the message
1963
- * [succeeds](./spec/acceptance/rest/channel_spec.rb#L207)
2387
+ * [succeeds](./spec/acceptance/rest/channel_spec.rb#L273)
1964
2388
  * with an invalid client_id in the message
1965
- * [succeeds in the client library but then fails when published to Ably](./spec/acceptance/rest/channel_spec.rb#L216)
2389
+ * [succeeds in the client library but then fails when published to Ably](./spec/acceptance/rest/channel_spec.rb#L282)
1966
2390
  * with an empty client_id in the message
1967
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L222)
2391
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L288)
1968
2392
  * when authenticated with TokenDetails with a valid client_id
1969
2393
  * with a valid client_id in the message
1970
- * [succeeds](./spec/acceptance/rest/channel_spec.rb#L239)
2394
+ * [succeeds](./spec/acceptance/rest/channel_spec.rb#L305)
1971
2395
  * with a wildcard client_id in the message
1972
- * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L248)
2396
+ * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L314)
1973
2397
  * with an invalid client_id in the message
1974
- * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L254)
2398
+ * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L320)
1975
2399
  * with an empty client_id in the message
1976
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L260)
2400
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L326)
1977
2401
  * when anonymous and no client_id
1978
2402
  * with a client_id in the message
1979
- * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L276)
2403
+ * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L342)
1980
2404
  * with a wildcard client_id in the message
1981
- * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L282)
2405
+ * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L348)
1982
2406
  * with an empty client_id in the message
1983
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L288)
2407
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L354)
1984
2408
  * with a non ASCII channel name
1985
2409
  * stubbed
1986
- * [correctly encodes the channel name](./spec/acceptance/rest/channel_spec.rb#L310)
2410
+ * [correctly encodes the channel name](./spec/acceptance/rest/channel_spec.rb#L376)
1987
2411
  * with a frozen message event name
1988
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L320)
2412
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L386)
1989
2413
  * with a frozen payload
1990
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L342)
2414
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L408)
2415
+ * message size is exceeded (#TO3l8)
2416
+ * [should raise Ably::Exceptions::MaxMessageSizeExceeded exception](./spec/acceptance/rest/channel_spec.rb#L423)
1991
2417
  * #history
1992
- * [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L372)
1993
- * [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L376)
1994
- * [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L404)
2418
+ * [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L447)
2419
+ * [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L451)
2420
+ * [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L479)
1995
2421
  * message timestamps
1996
- * [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L389)
2422
+ * [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L464)
1997
2423
  * message IDs
1998
- * [is unique](./spec/acceptance/rest/channel_spec.rb#L397)
2424
+ * [is unique](./spec/acceptance/rest/channel_spec.rb#L472)
1999
2425
  * direction
2000
- * [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L431)
2001
- * [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L437)
2426
+ * [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L506)
2427
+ * [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L512)
2002
2428
  * limit
2003
- * [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L449)
2429
+ * [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L524)
2004
2430
  * #history option
2005
2431
  * :start
2006
2432
  * with milliseconds since epoch value
2007
- * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L489)
2433
+ * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L564)
2008
2434
  * with a Time object value
2009
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L499)
2435
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L574)
2010
2436
  * :end
2011
2437
  * with milliseconds since epoch value
2012
- * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L489)
2438
+ * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L564)
2013
2439
  * with a Time object value
2014
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L499)
2440
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L574)
2015
2441
  * when argument start is after end
2016
- * [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L509)
2442
+ * [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L584)
2017
2443
  * #presence
2018
- * [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L519)
2444
+ * [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L594)
2445
+ * #status
2446
+ * [should return channel details status (#RSL8, #RSL8a)](./spec/acceptance/rest/channel_spec.rb#L604)
2019
2447
 
2020
2448
  ### Ably::Rest::Channels
2021
2449
  _(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_spec.rb))_
@@ -2028,10 +2456,14 @@ _(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_sp
2028
2456
  * behaves like a channel
2029
2457
  * [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6)
2030
2458
  * [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11)
2459
+ * #set_options (#RTL16)
2460
+ * [updates channel's options](./spec/acceptance/rest/channels_spec.rb#L38)
2461
+ * when providing Ably::Models::ChannelOptions object
2462
+ * [updates channel's options](./spec/acceptance/rest/channels_spec.rb#L45)
2031
2463
  * accessing an existing channel object with different options
2032
- * [overrides the existing channel options and returns the channel object](./spec/acceptance/rest/channels_spec.rb#L39)
2464
+ * [overrides the existing channel options and returns the channel object (RSN3c)](./spec/acceptance/rest/channels_spec.rb#L55)
2033
2465
  * accessing an existing channel object without specifying any channel options
2034
- * [returns the existing channel without modifying the channel options](./spec/acceptance/rest/channels_spec.rb#L50)
2466
+ * [returns the existing channel without modifying the channel options](./spec/acceptance/rest/channels_spec.rb#L67)
2035
2467
  * using undocumented array accessor [] method on client#channels
2036
2468
  * behaves like a channel
2037
2469
  * [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6)
@@ -2174,52 +2606,55 @@ _(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.r
2174
2606
  * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L1073)
2175
2607
  * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L1077)
2176
2608
  * version headers
2177
- * with variant none
2178
- * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1111)
2179
- * with variant foo
2180
- * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1111)
2181
- * #request (#RSC19*)
2609
+ * with default agent
2610
+ * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1097)
2611
+ * with custom ably-ruby/1.1.1 ruby/3.1.1 agent
2612
+ * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1097)
2613
+ * #request (#RSC19*, #TO3l9)
2182
2614
  * get
2183
- * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L1126)
2615
+ * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L1119)
2184
2616
  * 404 request to invalid URL
2185
- * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L1133)
2617
+ * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L1126)
2186
2618
  * paged results
2187
- * [provides paging](./spec/acceptance/rest/client_spec.rb#L1145)
2619
+ * [provides paging](./spec/acceptance/rest/client_spec.rb#L1138)
2188
2620
  * post
2189
- * [supports post](./spec/acceptance/rest/client_spec.rb#L1170)
2621
+ * [supports post](./spec/acceptance/rest/client_spec.rb#L1163)
2622
+ * [raises an exception once body size in bytes exceeded](./spec/acceptance/rest/client_spec.rb#L1169)
2190
2623
  * delete
2191
- * [supports delete](./spec/acceptance/rest/client_spec.rb#L1183)
2624
+ * [supports delete](./spec/acceptance/rest/client_spec.rb#L1182)
2192
2625
  * patch
2193
- * [supports patch](./spec/acceptance/rest/client_spec.rb#L1199)
2626
+ * [supports patch](./spec/acceptance/rest/client_spec.rb#L1198)
2627
+ * [raises an exception once body size in bytes exceeded](./spec/acceptance/rest/client_spec.rb#L1204)
2194
2628
  * put
2195
- * [supports put](./spec/acceptance/rest/client_spec.rb#L1222)
2196
- * request_id generation
2629
+ * [supports put](./spec/acceptance/rest/client_spec.rb#L1227)
2630
+ * [raises an exception once body size in bytes exceeded](./spec/acceptance/rest/client_spec.rb#L1233)
2631
+ * request_id generation (#RSC7c)
2197
2632
  * Timeout error
2198
2633
  * with option add_request_ids: true and no fallback hosts
2199
- * [has an error with the same request_id of the request](./spec/acceptance/rest/client_spec.rb#L1245)
2634
+ * [has an error with the same request_id of the request](./spec/acceptance/rest/client_spec.rb#L1256)
2200
2635
  * with option add_request_ids: true and REST operations with a message body
2201
2636
  * with mocks to inspect the params
2202
2637
  * with a single publish
2203
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1267)
2638
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1278)
2204
2639
  * with an array publish
2205
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1274)
2640
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1285)
2206
2641
  * without mocks to ensure the requests are accepted
2207
2642
  * with a single publish
2208
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1283)
2643
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1294)
2209
2644
  * with an array publish
2210
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1290)
2645
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1301)
2211
2646
  * option add_request_ids: true and specified fallback hosts
2212
- * [request_id is the same across retries](./spec/acceptance/rest/client_spec.rb#L1315)
2647
+ * [request_id is the same across retries](./spec/acceptance/rest/client_spec.rb#L1326)
2213
2648
  * without request_id and no fallback hosts
2214
- * [does not include request_id in ConnectionTimeout error](./spec/acceptance/rest/client_spec.rb#L1327)
2649
+ * [does not include request_id in ConnectionTimeout error](./spec/acceptance/rest/client_spec.rb#L1338)
2215
2650
  * UnauthorizedRequest nonce error
2216
- * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/rest/client_spec.rb#L1340)
2651
+ * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/rest/client_spec.rb#L1351)
2217
2652
  * failed request logging
2218
- * [is absent when requests do not fail](./spec/acceptance/rest/client_spec.rb#L1357)
2653
+ * [is absent when requests do not fail](./spec/acceptance/rest/client_spec.rb#L1368)
2219
2654
  * with the first request failing
2220
- * [is present with success message when requests do not actually fail](./spec/acceptance/rest/client_spec.rb#L1372)
2655
+ * [is present with success message when requests do not actually fail](./spec/acceptance/rest/client_spec.rb#L1383)
2221
2656
  * with all requests failing
2222
- * [is present when all requests fail](./spec/acceptance/rest/client_spec.rb#L1389)
2657
+ * [is present when all requests fail](./spec/acceptance/rest/client_spec.rb#L1400)
2223
2658
 
2224
2659
  ### Ably::Models::MessageEncoders
2225
2660
  _(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_
@@ -2259,112 +2694,400 @@ _(see [spec/acceptance/rest/message_spec.rb](./spec/acceptance/rest/message_spec
2259
2694
  * using JSON protocol
2260
2695
  * publishing with an ASCII_8BIT message name
2261
2696
  * [is converted into UTF_8](./spec/acceptance/rest/message_spec.rb#L19)
2697
+ * a single Message object (#RSL1a)
2698
+ * [publishes the message](./spec/acceptance/rest/message_spec.rb#L32)
2699
+ * an array of Message objects (#RSL1a)
2700
+ * [publishes three messages](./spec/acceptance/rest/message_spec.rb#L47)
2701
+ * an array of hashes (#RSL1a)
2702
+ * [publishes three messages](./spec/acceptance/rest/message_spec.rb#L59)
2703
+ * a name with data payload (#RSL1a, #RSL1b)
2704
+ * [publishes the message](./spec/acceptance/rest/message_spec.rb#L69)
2262
2705
  * with supported data payload content type
2263
2706
  * JSON Object (Hash)
2264
- * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L31)
2707
+ * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L82)
2265
2708
  * JSON Array
2266
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L40)
2709
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L91)
2267
2710
  * String
2268
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L49)
2711
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L100)
2269
2712
  * Binary
2270
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L58)
2713
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L109)
2271
2714
  * with supported extra payload content type (#RSL1h, #RSL6a2)
2272
2715
  * JSON Object (Hash)
2273
- * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L71)
2716
+ * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L122)
2274
2717
  * JSON Array
2275
- * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/rest/message_spec.rb#L80)
2718
+ * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/rest/message_spec.rb#L131)
2276
2719
  * nil
2277
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L87)
2720
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L138)
2278
2721
  * idempotency (#RSL1k)
2279
- * [idempotent publishing is disabled by default with 1.1 (#TO3n)](./spec/acceptance/rest/message_spec.rb#L156)
2280
- * [idempotent publishing is enabled by default with 1.2 (#TO3n)](./spec/acceptance/rest/message_spec.rb#L161)
2722
+ * [idempotent publishing is set as per clientOptions](./spec/acceptance/rest/message_spec.rb#L207)
2723
+ * [idempotent publishing is enabled by default (#TO3n)](./spec/acceptance/rest/message_spec.rb#L217)
2281
2724
  * when ID is not included (#RSL1k2)
2282
2725
  * with Message object
2283
- * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L103)
2726
+ * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L154)
2284
2727
  * with #publish arguments only
2285
- * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L110)
2728
+ * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L161)
2286
2729
  * when ID is included (#RSL1k2, #RSL1k5)
2287
- * [the ID provided is used for the published messages](./spec/acceptance/rest/message_spec.rb#L135)
2288
- * [for multiple messages in one publish operation (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L140)
2289
- * [for multiple messages in one publish operation with IDs following the required format described in RSL1k1 (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L147)
2730
+ * [the ID provided is used for the published messages](./spec/acceptance/rest/message_spec.rb#L186)
2731
+ * [for multiple messages in one publish operation (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L191)
2732
+ * [for multiple messages in one publish operation with IDs following the required format described in RSL1k1 (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L198)
2290
2733
  * with Message object
2291
- * [three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L121)
2734
+ * [three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L172)
2292
2735
  * with #publish arguments only
2293
- * [three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L129)
2736
+ * [three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L180)
2294
2737
  * when idempotent publishing is enabled in the client library ClientOptions (#TO3n)
2295
- * [the ID is populated with a random ID and serial 0 from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L225)
2738
+ * [the ID is populated with a random ID and serial 0 from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L280)
2296
2739
  * when there is a network failure triggering an automatic retry (#RSL1k4)
2297
- * [for multiple messages in one publish operation](./spec/acceptance/rest/message_spec.rb#L218)
2740
+ * [for multiple messages in one publish operation](./spec/acceptance/rest/message_spec.rb#L273)
2298
2741
  * with Message object
2299
- * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L188)
2742
+ * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L243)
2300
2743
  * with #publish arguments only
2301
- * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L198)
2744
+ * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L253)
2302
2745
  * with explicitly provided message ID
2303
- * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L210)
2746
+ * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L265)
2304
2747
  * when publishing a batch of messages
2305
- * [the ID is populated with a single random ID and sequence of serials from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L233)
2748
+ * [the ID is populated with a single random ID and sequence of serials from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L288)
2306
2749
  * with unsupported data payload content type
2307
2750
  * Integer
2308
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L250)
2751
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L305)
2309
2752
  * Float
2310
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L258)
2753
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L313)
2311
2754
  * Boolean
2312
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L266)
2755
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L321)
2313
2756
  * False
2314
- * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L274)
2757
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L329)
2315
2758
  * encryption and encoding
2316
2759
  * with #publish and #history
2317
2760
  * with AES-128-CBC using crypto-data-128.json fixtures (#RTL7d)
2318
2761
  * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
2319
2762
  * behaves like an Ably encrypter and decrypter
2320
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2321
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2763
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2764
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2322
2765
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
2323
2766
  * behaves like an Ably encrypter and decrypter
2324
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2325
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2767
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2768
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2326
2769
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
2327
2770
  * behaves like an Ably encrypter and decrypter
2328
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2329
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2771
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2772
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2330
2773
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
2331
2774
  * behaves like an Ably encrypter and decrypter
2332
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2333
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2775
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2776
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2334
2777
  * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d)
2335
2778
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
2336
2779
  * behaves like an Ably encrypter and decrypter
2337
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2338
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2780
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2781
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2339
2782
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
2340
2783
  * behaves like an Ably encrypter and decrypter
2341
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2342
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2784
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2785
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2343
2786
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
2344
2787
  * behaves like an Ably encrypter and decrypter
2345
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2346
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2788
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2789
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2347
2790
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
2348
2791
  * behaves like an Ably encrypter and decrypter
2349
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L319)
2350
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L334)
2792
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2793
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2794
+ * item 4 with encrypted encoding cipher+aes-256-cbc/base64
2795
+ * behaves like an Ably encrypter and decrypter
2796
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2797
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2798
+ * item 5 with encrypted encoding cipher+aes-256-cbc/base64
2799
+ * behaves like an Ably encrypter and decrypter
2800
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2801
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2802
+ * item 6 with encrypted encoding cipher+aes-256-cbc/base64
2803
+ * behaves like an Ably encrypter and decrypter
2804
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2805
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2806
+ * item 7 with encrypted encoding cipher+aes-256-cbc/base64
2807
+ * behaves like an Ably encrypter and decrypter
2808
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2809
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2810
+ * item 8 with encrypted encoding cipher+aes-256-cbc/base64
2811
+ * behaves like an Ably encrypter and decrypter
2812
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2813
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2814
+ * item 9 with encrypted encoding cipher+aes-256-cbc/base64
2815
+ * behaves like an Ably encrypter and decrypter
2816
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2817
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2818
+ * item 10 with encrypted encoding cipher+aes-256-cbc/base64
2819
+ * behaves like an Ably encrypter and decrypter
2820
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2821
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2822
+ * item 11 with encrypted encoding cipher+aes-256-cbc/base64
2823
+ * behaves like an Ably encrypter and decrypter
2824
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2825
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2826
+ * item 12 with encrypted encoding cipher+aes-256-cbc/base64
2827
+ * behaves like an Ably encrypter and decrypter
2828
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2829
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2830
+ * item 13 with encrypted encoding cipher+aes-256-cbc/base64
2831
+ * behaves like an Ably encrypter and decrypter
2832
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2833
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2834
+ * item 14 with encrypted encoding cipher+aes-256-cbc/base64
2835
+ * behaves like an Ably encrypter and decrypter
2836
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2837
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2838
+ * item 15 with encrypted encoding cipher+aes-256-cbc/base64
2839
+ * behaves like an Ably encrypter and decrypter
2840
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2841
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2842
+ * item 16 with encrypted encoding cipher+aes-256-cbc/base64
2843
+ * behaves like an Ably encrypter and decrypter
2844
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2845
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2846
+ * item 17 with encrypted encoding cipher+aes-256-cbc/base64
2847
+ * behaves like an Ably encrypter and decrypter
2848
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2849
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2850
+ * item 18 with encrypted encoding cipher+aes-256-cbc/base64
2851
+ * behaves like an Ably encrypter and decrypter
2852
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2853
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2854
+ * item 19 with encrypted encoding cipher+aes-256-cbc/base64
2855
+ * behaves like an Ably encrypter and decrypter
2856
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2857
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2858
+ * item 20 with encrypted encoding cipher+aes-256-cbc/base64
2859
+ * behaves like an Ably encrypter and decrypter
2860
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2861
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2862
+ * item 21 with encrypted encoding cipher+aes-256-cbc/base64
2863
+ * behaves like an Ably encrypter and decrypter
2864
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2865
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2866
+ * item 22 with encrypted encoding cipher+aes-256-cbc/base64
2867
+ * behaves like an Ably encrypter and decrypter
2868
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2869
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2870
+ * item 23 with encrypted encoding cipher+aes-256-cbc/base64
2871
+ * behaves like an Ably encrypter and decrypter
2872
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2873
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2874
+ * item 24 with encrypted encoding cipher+aes-256-cbc/base64
2875
+ * behaves like an Ably encrypter and decrypter
2876
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2877
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2878
+ * item 25 with encrypted encoding cipher+aes-256-cbc/base64
2879
+ * behaves like an Ably encrypter and decrypter
2880
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2881
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2882
+ * item 26 with encrypted encoding cipher+aes-256-cbc/base64
2883
+ * behaves like an Ably encrypter and decrypter
2884
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2885
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2886
+ * item 27 with encrypted encoding cipher+aes-256-cbc/base64
2887
+ * behaves like an Ably encrypter and decrypter
2888
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2889
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2890
+ * item 28 with encrypted encoding cipher+aes-256-cbc/base64
2891
+ * behaves like an Ably encrypter and decrypter
2892
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2893
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2894
+ * item 29 with encrypted encoding cipher+aes-256-cbc/base64
2895
+ * behaves like an Ably encrypter and decrypter
2896
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2897
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2898
+ * item 30 with encrypted encoding cipher+aes-256-cbc/base64
2899
+ * behaves like an Ably encrypter and decrypter
2900
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2901
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2902
+ * item 31 with encrypted encoding cipher+aes-256-cbc/base64
2903
+ * behaves like an Ably encrypter and decrypter
2904
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2905
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2906
+ * item 32 with encrypted encoding cipher+aes-256-cbc/base64
2907
+ * behaves like an Ably encrypter and decrypter
2908
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2909
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2910
+ * item 33 with encrypted encoding cipher+aes-256-cbc/base64
2911
+ * behaves like an Ably encrypter and decrypter
2912
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2913
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2914
+ * item 34 with encrypted encoding cipher+aes-256-cbc/base64
2915
+ * behaves like an Ably encrypter and decrypter
2916
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2917
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2918
+ * item 35 with encrypted encoding cipher+aes-256-cbc/base64
2919
+ * behaves like an Ably encrypter and decrypter
2920
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2921
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2922
+ * item 36 with encrypted encoding cipher+aes-256-cbc/base64
2923
+ * behaves like an Ably encrypter and decrypter
2924
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2925
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2926
+ * item 37 with encrypted encoding cipher+aes-256-cbc/base64
2927
+ * behaves like an Ably encrypter and decrypter
2928
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2929
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2930
+ * item 38 with encrypted encoding cipher+aes-256-cbc/base64
2931
+ * behaves like an Ably encrypter and decrypter
2932
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2933
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2934
+ * item 39 with encrypted encoding cipher+aes-256-cbc/base64
2935
+ * behaves like an Ably encrypter and decrypter
2936
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2937
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2938
+ * item 40 with encrypted encoding cipher+aes-256-cbc/base64
2939
+ * behaves like an Ably encrypter and decrypter
2940
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2941
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2942
+ * item 41 with encrypted encoding cipher+aes-256-cbc/base64
2943
+ * behaves like an Ably encrypter and decrypter
2944
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2945
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2946
+ * item 42 with encrypted encoding cipher+aes-256-cbc/base64
2947
+ * behaves like an Ably encrypter and decrypter
2948
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2949
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2950
+ * item 43 with encrypted encoding cipher+aes-256-cbc/base64
2951
+ * behaves like an Ably encrypter and decrypter
2952
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2953
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2954
+ * item 44 with encrypted encoding cipher+aes-256-cbc/base64
2955
+ * behaves like an Ably encrypter and decrypter
2956
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2957
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2958
+ * item 45 with encrypted encoding cipher+aes-256-cbc/base64
2959
+ * behaves like an Ably encrypter and decrypter
2960
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2961
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2962
+ * item 46 with encrypted encoding cipher+aes-256-cbc/base64
2963
+ * behaves like an Ably encrypter and decrypter
2964
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2965
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2966
+ * item 47 with encrypted encoding cipher+aes-256-cbc/base64
2967
+ * behaves like an Ably encrypter and decrypter
2968
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2969
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2970
+ * item 48 with encrypted encoding cipher+aes-256-cbc/base64
2971
+ * behaves like an Ably encrypter and decrypter
2972
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2973
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2974
+ * item 49 with encrypted encoding cipher+aes-256-cbc/base64
2975
+ * behaves like an Ably encrypter and decrypter
2976
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2977
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2978
+ * item 50 with encrypted encoding cipher+aes-256-cbc/base64
2979
+ * behaves like an Ably encrypter and decrypter
2980
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2981
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2982
+ * item 51 with encrypted encoding cipher+aes-256-cbc/base64
2983
+ * behaves like an Ably encrypter and decrypter
2984
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2985
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2986
+ * item 52 with encrypted encoding cipher+aes-256-cbc/base64
2987
+ * behaves like an Ably encrypter and decrypter
2988
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2989
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2990
+ * item 53 with encrypted encoding cipher+aes-256-cbc/base64
2991
+ * behaves like an Ably encrypter and decrypter
2992
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2993
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2994
+ * item 54 with encrypted encoding cipher+aes-256-cbc/base64
2995
+ * behaves like an Ably encrypter and decrypter
2996
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
2997
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2998
+ * item 55 with encrypted encoding cipher+aes-256-cbc/base64
2999
+ * behaves like an Ably encrypter and decrypter
3000
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3001
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3002
+ * item 56 with encrypted encoding cipher+aes-256-cbc/base64
3003
+ * behaves like an Ably encrypter and decrypter
3004
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3005
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3006
+ * item 57 with encrypted encoding cipher+aes-256-cbc/base64
3007
+ * behaves like an Ably encrypter and decrypter
3008
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3009
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3010
+ * item 58 with encrypted encoding cipher+aes-256-cbc/base64
3011
+ * behaves like an Ably encrypter and decrypter
3012
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3013
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3014
+ * item 59 with encrypted encoding cipher+aes-256-cbc/base64
3015
+ * behaves like an Ably encrypter and decrypter
3016
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3017
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3018
+ * item 60 with encrypted encoding cipher+aes-256-cbc/base64
3019
+ * behaves like an Ably encrypter and decrypter
3020
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3021
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3022
+ * item 61 with encrypted encoding cipher+aes-256-cbc/base64
3023
+ * behaves like an Ably encrypter and decrypter
3024
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3025
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3026
+ * item 62 with encrypted encoding cipher+aes-256-cbc/base64
3027
+ * behaves like an Ably encrypter and decrypter
3028
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3029
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3030
+ * item 63 with encrypted encoding cipher+aes-256-cbc/base64
3031
+ * behaves like an Ably encrypter and decrypter
3032
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3033
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3034
+ * item 64 with encrypted encoding cipher+aes-256-cbc/base64
3035
+ * behaves like an Ably encrypter and decrypter
3036
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3037
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3038
+ * item 65 with encrypted encoding cipher+aes-256-cbc/base64
3039
+ * behaves like an Ably encrypter and decrypter
3040
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3041
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3042
+ * item 66 with encrypted encoding cipher+aes-256-cbc/base64
3043
+ * behaves like an Ably encrypter and decrypter
3044
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3045
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3046
+ * item 67 with encrypted encoding cipher+aes-256-cbc/base64
3047
+ * behaves like an Ably encrypter and decrypter
3048
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3049
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3050
+ * item 68 with encrypted encoding cipher+aes-256-cbc/base64
3051
+ * behaves like an Ably encrypter and decrypter
3052
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3053
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3054
+ * item 69 with encrypted encoding cipher+aes-256-cbc/base64
3055
+ * behaves like an Ably encrypter and decrypter
3056
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3057
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3058
+ * item 70 with encrypted encoding cipher+aes-256-cbc/base64
3059
+ * behaves like an Ably encrypter and decrypter
3060
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3061
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3062
+ * item 71 with encrypted encoding cipher+aes-256-cbc/base64
3063
+ * behaves like an Ably encrypter and decrypter
3064
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3065
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3066
+ * item 72 with encrypted encoding cipher+aes-256-cbc/base64
3067
+ * behaves like an Ably encrypter and decrypter
3068
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3069
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
3070
+ * item 73 with encrypted encoding cipher+aes-256-cbc/base64
3071
+ * behaves like an Ably encrypter and decrypter
3072
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L374)
3073
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389)
2351
3074
  * when publishing lots of messages
2352
- * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L367)
3075
+ * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L422)
2353
3076
  * when retrieving #history with a different protocol
2354
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L394)
2355
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L394)
2356
- * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L394)
3077
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L449)
3078
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L449)
3079
+ * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L449)
2357
3080
  * when publishing on an unencrypted channel and retrieving with #history on an encrypted channel
2358
- * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L410)
3081
+ * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L465)
2359
3082
  * when publishing on an encrypted channel and retrieving with #history on an unencrypted channel
2360
- * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L431)
2361
- * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L437)
3083
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L486)
3084
+ * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L492)
2362
3085
  * publishing on an encrypted channel and retrieving #history with a different algorithm on another client (#RTL7e)
2363
- * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L458)
2364
- * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L464)
3086
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L513)
3087
+ * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L519)
2365
3088
  * publishing on an encrypted channel and subscribing with a different key on another client
2366
- * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L485)
2367
- * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L491)
3089
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L540)
3090
+ * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L546)
2368
3091
 
2369
3092
  ### Ably::Rest::Presence
2370
3093
  _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_
@@ -2468,61 +3191,53 @@ _(see [spec/acceptance/rest/push_admin_spec.rb](./spec/acceptance/rest/push_admi
2468
3191
  * #save (#RSH1b3)
2469
3192
  * [saves the new DeviceDetails Hash object](./spec/acceptance/rest/push_admin_spec.rb#L327)
2470
3193
  * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L342)
2471
- * [does not allow some fields to be configured](./spec/acceptance/rest/push_admin_spec.rb#L396)
2472
- * [allows device_secret to be configured](./spec/acceptance/rest/push_admin_spec.rb#L409)
2473
- * [saves the new DeviceDetails object](./spec/acceptance/rest/push_admin_spec.rb#L418)
2474
- * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L427)
2475
- * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L440)
2476
- * with GCM target
3194
+ * [does not allow some fields to be configured](./spec/acceptance/rest/push_admin_spec.rb#L401)
3195
+ * [allows device_secret to be configured](./spec/acceptance/rest/push_admin_spec.rb#L414)
3196
+ * [saves the new DeviceDetails object](./spec/acceptance/rest/push_admin_spec.rb#L423)
3197
+ * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L432)
3198
+ * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L445)
3199
+ * with FCM target
2477
3200
  * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L356)
2478
3201
  * with web target
2479
- * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L377)
3202
+ * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L378)
2480
3203
  * #remove_where (#RSH1b5)
2481
- * [removes all matching device registrations by client_id](./spec/acceptance/rest/push_admin_spec.rb#L492)
2482
- * [removes device by device_id](./spec/acceptance/rest/push_admin_spec.rb#L497)
2483
- * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L502)
3204
+ * [removes all matching device registrations by client_id](./spec/acceptance/rest/push_admin_spec.rb#L497)
3205
+ * [removes device by device_id](./spec/acceptance/rest/push_admin_spec.rb#L502)
3206
+ * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L507)
2484
3207
  * #remove (#RSH1b4)
2485
- * [removes the provided device id string](./spec/acceptance/rest/push_admin_spec.rb#L555)
2486
- * [removes the provided DeviceDetails](./spec/acceptance/rest/push_admin_spec.rb#L560)
2487
- * [succeeds if the item does not exist](./spec/acceptance/rest/push_admin_spec.rb#L565)
3208
+ * [removes the provided device id string](./spec/acceptance/rest/push_admin_spec.rb#L560)
3209
+ * [removes the provided DeviceDetails](./spec/acceptance/rest/push_admin_spec.rb#L565)
3210
+ * [succeeds if the item does not exist](./spec/acceptance/rest/push_admin_spec.rb#L570)
2488
3211
  * #channel_subscriptions (#RSH1c)
2489
3212
  * #list (#RSH1c1)
2490
- * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/rest/push_admin_spec.rb#L633)
2491
- * [returns an empty PaginatedResult if params do not match](./spec/acceptance/rest/push_admin_spec.rb#L639)
2492
- * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L645)
2493
- * [provides filtering](./spec/acceptance/rest/push_admin_spec.rb#L657)
2494
- * [raises an exception if none of the required filters are provided](./spec/acceptance/rest/push_admin_spec.rb#L685)
3213
+ * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/rest/push_admin_spec.rb#L638)
3214
+ * [returns an empty PaginatedResult if params do not match](./spec/acceptance/rest/push_admin_spec.rb#L644)
3215
+ * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L650)
3216
+ * [provides filtering](./spec/acceptance/rest/push_admin_spec.rb#L662)
3217
+ * [raises an exception if none of the required filters are provided](./spec/acceptance/rest/push_admin_spec.rb#L690)
2495
3218
  * #list_channels (#RSH1c2)
2496
- * [returns a PaginatedResult object containing String objects](./spec/acceptance/rest/push_admin_spec.rb#L712)
2497
- * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L719)
2498
- * [returns an accurate number of channels after devices are deleted](./spec/acceptance/rest/push_admin_spec.rb#L734)
3219
+ * [returns a PaginatedResult object containing String objects](./spec/acceptance/rest/push_admin_spec.rb#L717)
3220
+ * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L724)
3221
+ * [returns an accurate number of channels after devices are deleted](./spec/acceptance/rest/push_admin_spec.rb#L739)
2499
3222
  * #save (#RSH1c3)
2500
- * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L759)
2501
- * [saves the new device_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L770)
2502
- * [saves the client_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L781)
2503
- * [saves the device_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L792)
2504
- * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L803)
2505
- * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L816)
3223
+ * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L764)
3224
+ * [saves the new device_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L775)
3225
+ * [saves the client_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L786)
3226
+ * [saves the device_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L797)
3227
+ * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L808)
3228
+ * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L821)
2506
3229
  * #remove_where (#RSH1c5)
2507
- * PENDING: *[removes matching channels](./spec/acceptance/rest/push_admin_spec.rb#L851)*
2508
- * [removes matching client_ids](./spec/acceptance/rest/push_admin_spec.rb#L859)
2509
- * [removes matching device_ids](./spec/acceptance/rest/push_admin_spec.rb#L865)
2510
- * [device_id and client_id filters in the same request are not suppoorted](./spec/acceptance/rest/push_admin_spec.rb#L871)
2511
- * [succeeds on no match](./spec/acceptance/rest/push_admin_spec.rb#L875)
3230
+ * PENDING: *[removes matching channels](./spec/acceptance/rest/push_admin_spec.rb#L856)*
3231
+ * [removes matching client_ids](./spec/acceptance/rest/push_admin_spec.rb#L864)
3232
+ * [removes matching device_ids](./spec/acceptance/rest/push_admin_spec.rb#L870)
3233
+ * [device_id and client_id filters in the same request are not suppoorted](./spec/acceptance/rest/push_admin_spec.rb#L876)
3234
+ * [succeeds on no match](./spec/acceptance/rest/push_admin_spec.rb#L880)
2512
3235
  * #remove (#RSH1c4)
2513
- * [removes match for Hash object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L905)
2514
- * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L910)
2515
- * [removes match for Hash object by channel and device_id](./spec/acceptance/rest/push_admin_spec.rb#L917)
2516
- * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L922)
2517
- * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L929)
2518
-
2519
- ### Ably::Rest::Push
2520
- _(see [spec/acceptance/rest/push_spec.rb](./spec/acceptance/rest/push_spec.rb))_
2521
- * using JSON protocol
2522
- * #activate
2523
- * [raises an unsupported exception](./spec/acceptance/rest/push_spec.rb#L14)
2524
- * #deactivate
2525
- * [raises an unsupported exception](./spec/acceptance/rest/push_spec.rb#L20)
3236
+ * [removes match for Hash object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L910)
3237
+ * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L915)
3238
+ * [removes match for Hash object by channel and device_id](./spec/acceptance/rest/push_admin_spec.rb#L922)
3239
+ * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L927)
3240
+ * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L934)
2526
3241
 
2527
3242
  ### Ably::Rest::Client#stats
2528
3243
  _(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_
@@ -2576,6 +3291,16 @@ _(see [spec/acceptance/rest/time_spec.rb](./spec/acceptance/rest/time_spec.rb))_
2576
3291
  * with reconfigured HTTP timeout
2577
3292
  * [should raise a timeout exception](./spec/acceptance/rest/time_spec.rb#L19)
2578
3293
 
3294
+ ### Ably::Models::ChannelOptions
3295
+ _(see [spec/lib/unit/models/channel_options_spec.rb](./spec/lib/unit/models/channel_options_spec.rb))_
3296
+ * #modes_to_flags
3297
+ * [converts modes to ProtocolMessage#flags correctly](./spec/lib/unit/models/channel_options_spec.rb#L17)
3298
+ * #set_modes_from_flags
3299
+ * [converts flags to ChannelOptions#modes correctly](./spec/lib/unit/models/channel_options_spec.rb#L30)
3300
+ * #set_params
3301
+ * [should be able to overwrite attributes](./spec/lib/unit/models/channel_options_spec.rb#L43)
3302
+ * [should be able to make params empty](./spec/lib/unit/models/channel_options_spec.rb#L48)
3303
+
2579
3304
  ### Ably::Auth
2580
3305
  _(see [spec/unit/auth_spec.rb](./spec/unit/auth_spec.rb))_
2581
3306
  * client_id option
@@ -2601,13 +3326,13 @@ _(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_
2601
3326
  * [uses the language provided Logger by default](./spec/unit/logger_spec.rb#L15)
2602
3327
  * with a custom Logger
2603
3328
  * with an invalid interface
2604
- * [raises an exception](./spec/unit/logger_spec.rb#L122)
3329
+ * [raises an exception](./spec/unit/logger_spec.rb#L118)
2605
3330
  * with a valid interface
2606
- * [is used](./spec/unit/logger_spec.rb#L133)
3331
+ * [is used](./spec/unit/logger_spec.rb#L129)
2607
3332
  * with blocks
2608
- * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L151)
3333
+ * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L143)
2609
3334
  * with an exception in the logger block
2610
- * [catches the error and continues](./spec/unit/logger_spec.rb#L166)
3335
+ * [catches the error and continues](./spec/unit/logger_spec.rb#L158)
2611
3336
 
2612
3337
  ### Ably::Models::AuthDetails
2613
3338
  _(see [spec/unit/models/auth_details_spec.rb](./spec/unit/models/auth_details_spec.rb))_
@@ -2627,6 +3352,35 @@ _(see [spec/unit/models/auth_details_spec.rb](./spec/unit/models/auth_details_sp
2627
3352
  * [is false when attributes are not the same](./spec/unit/models/auth_details_spec.rb#L22)
2628
3353
  * [is false when class type differs](./spec/unit/models/auth_details_spec.rb#L26)
2629
3354
 
3355
+ ### Ably::Models::ChannelDetails
3356
+ _(see [spec/unit/models/channel_details_spec.rb](./spec/unit/models/channel_details_spec.rb))_
3357
+ * #channel_id
3358
+ * [should return channel id](./spec/unit/models/channel_details_spec.rb#L8)
3359
+ * #name
3360
+ * [should return name](./spec/unit/models/channel_details_spec.rb#L14)
3361
+ * #status
3362
+ * [should return status](./spec/unit/models/channel_details_spec.rb#L20)
3363
+
3364
+ ### Ably::Models::ChannelMetrics
3365
+ _(see [spec/unit/models/channel_metrics_spec.rb](./spec/unit/models/channel_metrics_spec.rb))_
3366
+ * #connections
3367
+ * [should return integer](./spec/unit/models/channel_metrics_spec.rb#L8)
3368
+ * #presence_connections
3369
+ * [should return integer](./spec/unit/models/channel_metrics_spec.rb#L14)
3370
+ * #presence_members
3371
+ * [should return integer](./spec/unit/models/channel_metrics_spec.rb#L20)
3372
+ * #presence_subscribers
3373
+ * [should return integer](./spec/unit/models/channel_metrics_spec.rb#L26)
3374
+ * #publishers
3375
+ * [should return integer](./spec/unit/models/channel_metrics_spec.rb#L32)
3376
+ * #subscribers
3377
+ * [should return integer](./spec/unit/models/channel_metrics_spec.rb#L38)
3378
+
3379
+ ### Ably::Models::ChannelOccupancy
3380
+ _(see [spec/unit/models/channel_occupancy_spec.rb](./spec/unit/models/channel_occupancy_spec.rb))_
3381
+ * #metrics
3382
+ * [should return attributes](./spec/unit/models/channel_occupancy_spec.rb#L8)
3383
+
2630
3384
  ### Ably::Models::ChannelStateChange
2631
3385
  _(see [spec/unit/models/channel_state_change_spec.rb](./spec/unit/models/channel_state_change_spec.rb))_
2632
3386
  * #current (#TH1)
@@ -2647,6 +3401,16 @@ _(see [spec/unit/models/channel_state_change_spec.rb](./spec/unit/models/channel
2647
3401
  * invalid attributes
2648
3402
  * [raises an argument error](./spec/unit/models/channel_state_change_spec.rb#L60)
2649
3403
 
3404
+ ### Ably::Models::ChannelStatus
3405
+ _(see [spec/unit/models/channel_status_spec.rb](./spec/unit/models/channel_status_spec.rb))_
3406
+ * #is_active
3407
+ * when occupancy is active
3408
+ * [should return true](./spec/unit/models/channel_status_spec.rb#L11)
3409
+ * when occupancy is not active
3410
+ * [should return false](./spec/unit/models/channel_status_spec.rb#L19)
3411
+ * #occupancy
3412
+ * [should return occupancy object](./spec/unit/models/channel_status_spec.rb#L26)
3413
+
2650
3414
  ### Ably::Models::CipherParams
2651
3415
  _(see [spec/unit/models/cipher_params_spec.rb](./spec/unit/models/cipher_params_spec.rb))_
2652
3416
  * :key missing from constructor
@@ -2737,6 +3501,11 @@ _(see [spec/unit/models/connection_state_change_spec.rb](./spec/unit/models/conn
2737
3501
  * invalid attributes
2738
3502
  * [raises an argument error](./spec/unit/models/connection_state_change_spec.rb#L61)
2739
3503
 
3504
+ ### Ably::Models::DeltaExtras
3505
+ _(see [spec/unit/models/delta_extras_spec.rb](./spec/unit/models/delta_extras_spec.rb))_
3506
+ * [should have `from` attribute](./spec/unit/models/delta_extras_spec.rb#L7)
3507
+ * [should have `format` attribute](./spec/unit/models/delta_extras_spec.rb#L11)
3508
+
2740
3509
  ### Ably::Models::DeviceDetails
2741
3510
  _(see [spec/unit/models/device_details_spec.rb](./spec/unit/models/device_details_spec.rb))_
2742
3511
  * #id and #id=
@@ -2804,6 +3573,10 @@ _(see [spec/unit/models/error_info_spec.rb](./spec/unit/models/error_info_spec.r
2804
3573
  * [retrieves attribute :href](./spec/shared/model_behaviour.rb#L15)
2805
3574
  * #message
2806
3575
  * [retrieves attribute :message](./spec/shared/model_behaviour.rb#L15)
3576
+ * #request_id
3577
+ * [retrieves attribute :request_id](./spec/shared/model_behaviour.rb#L15)
3578
+ * #cause
3579
+ * [retrieves attribute :cause](./spec/shared/model_behaviour.rb#L15)
2807
3580
  * #==
2808
3581
  * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
2809
3582
  * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
@@ -2813,17 +3586,21 @@ _(see [spec/unit/models/error_info_spec.rb](./spec/unit/models/error_info_spec.r
2813
3586
  * [dups options](./spec/shared/model_behaviour.rb#L80)
2814
3587
  * #status #TI1, #TI2
2815
3588
  * [is an alias for #status_code](./spec/unit/models/error_info_spec.rb#L15)
3589
+ * #request_id #RSC7c
3590
+ * [should return request ID](./spec/unit/models/error_info_spec.rb#L24)
3591
+ * #cause #TI1
3592
+ * [should return cause attribute](./spec/unit/models/error_info_spec.rb#L32)
2816
3593
  * log entries container help link #TI5
2817
3594
  * without an error code
2818
- * [does not include the help URL](./spec/unit/models/error_info_spec.rb#L25)
3595
+ * [does not include the help URL](./spec/unit/models/error_info_spec.rb#L41)
2819
3596
  * with a specified error code
2820
- * [includes https://help.ably.io/error/[CODE] in the stringified object](./spec/unit/models/error_info_spec.rb#L33)
3597
+ * [includes https://help.ably.io/error/[CODE] in the stringified object](./spec/unit/models/error_info_spec.rb#L49)
2821
3598
  * with an error code and an href attribute
2822
- * [includes the specified href in the stringified object](./spec/unit/models/error_info_spec.rb#L41)
3599
+ * [includes the specified href in the stringified object](./spec/unit/models/error_info_spec.rb#L57)
2823
3600
  * with an error code and a message with the same error URL
2824
- * [includes the specified error URL only once in the stringified object](./spec/unit/models/error_info_spec.rb#L50)
3601
+ * [includes the specified error URL only once in the stringified object](./spec/unit/models/error_info_spec.rb#L66)
2825
3602
  * with an error code and a message with a different error URL
2826
- * [includes the specified error URL from the message and the error code URL in the stringified object](./spec/unit/models/error_info_spec.rb#L58)
3603
+ * [includes the specified error URL from the message and the error code URL in the stringified object](./spec/unit/models/error_info_spec.rb#L74)
2827
3604
 
2828
3605
  ### Ably::Models::HttpPaginatedResponse: #HP1 -> #HP8
2829
3606
  _(see [spec/unit/models/http_paginated_result_spec.rb](./spec/unit/models/http_paginated_result_spec.rb))_
@@ -3123,25 +3900,44 @@ _(see [spec/unit/models/message_spec.rb](./spec/unit/models/message_spec.rb))_
3123
3900
  * [raises an argument error](./spec/unit/models/message_spec.rb#L173)
3124
3901
  * as Nil
3125
3902
  * [is permitted](./spec/unit/models/message_spec.rb#L181)
3903
+ * #size
3904
+ * String (#TO3l8a)
3905
+ * [should return 33 bytes](./spec/unit/models/message_spec.rb#L223)
3906
+ * Object (#TO3l8b)
3907
+ * [should return 38 bytes](./spec/unit/models/message_spec.rb#L234)
3908
+ * Array (#TO3l8b)
3909
+ * [should return 24 bytes](./spec/unit/models/message_spec.rb#L245)
3910
+ * extras (#TO3l8d)
3911
+ * [should return 57 bytes](./spec/unit/models/message_spec.rb#L256)
3912
+ * nil (#TO3l8e)
3913
+ * [should return 19 bytes](./spec/unit/models/message_spec.rb#L267)
3914
+ * #protocol_message_index (#RTL21)
3915
+ * [should return correct protocol_message_index](./spec/unit/models/message_spec.rb#L280)
3126
3916
  * #from_encoded (#TM3)
3127
3917
  * with no encoding
3128
- * [returns a message object](./spec/unit/models/message_spec.rb#L437)
3918
+ * [returns a message object](./spec/unit/models/message_spec.rb#L510)
3129
3919
  * with a block
3130
- * [does not call the block](./spec/unit/models/message_spec.rb#L445)
3920
+ * [does not call the block](./spec/unit/models/message_spec.rb#L518)
3131
3921
  * with an encoding
3132
- * [returns a message object](./spec/unit/models/message_spec.rb#L462)
3922
+ * [returns a message object](./spec/unit/models/message_spec.rb#L535)
3133
3923
  * with a custom encoding
3134
- * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L477)
3924
+ * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L550)
3135
3925
  * with a Cipher encoding
3136
- * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L496)
3926
+ * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L569)
3137
3927
  * with invalid Cipher encoding
3138
3928
  * without a block
3139
- * [raises an exception](./spec/unit/models/message_spec.rb#L514)
3929
+ * [raises an exception](./spec/unit/models/message_spec.rb#L587)
3140
3930
  * with a block
3141
- * [calls the block with the exception](./spec/unit/models/message_spec.rb#L520)
3931
+ * [calls the block with the exception](./spec/unit/models/message_spec.rb#L593)
3142
3932
  * #from_encoded_array (#TM3)
3143
3933
  * with no encoding
3144
- * [returns an Array of message objects](./spec/unit/models/message_spec.rb#L539)
3934
+ * [returns an Array of message objects](./spec/unit/models/message_spec.rb#L612)
3935
+ * #delta_extras (TM2i)
3936
+ * when delta
3937
+ * [should return vcdiff format](./spec/unit/models/message_spec.rb#L630)
3938
+ * [should return 1234-1234-5678-9009 message id](./spec/unit/models/message_spec.rb#L634)
3939
+ * when no delta
3940
+ * [should return nil](./spec/unit/models/message_spec.rb#L642)
3145
3941
 
3146
3942
  ### Ably::Models::PaginatedResult
3147
3943
  _(see [spec/unit/models/paginated_result_spec.rb](./spec/unit/models/paginated_result_spec.rb))_
@@ -3256,36 +4052,47 @@ _(see [spec/unit/models/presence_message_spec.rb](./spec/unit/models/presence_me
3256
4052
  * [raises an argument error](./spec/unit/models/presence_message_spec.rb#L174)
3257
4053
  * as Nil
3258
4054
  * [is permitted](./spec/unit/models/presence_message_spec.rb#L182)
4055
+ * #size
4056
+ * String (#TO3l8a)
4057
+ * [should return 20 bytes](./spec/unit/models/presence_message_spec.rb#L230)
4058
+ * Object (#TO3l8b)
4059
+ * [should return 32 bytes](./spec/unit/models/presence_message_spec.rb#L239)
4060
+ * Array (#TO3l8b)
4061
+ * [should return 18 bytes](./spec/unit/models/presence_message_spec.rb#L248)
4062
+ * extras (#TO3l8d)
4063
+ * [should return 51 bytes](./spec/unit/models/presence_message_spec.rb#L257)
4064
+ * nil (#TO3l8e)
4065
+ * [should return 1 bytes](./spec/unit/models/presence_message_spec.rb#L266)
3259
4066
  * #from_encoded (#TP4)
3260
4067
  * with no encoding
3261
- * [returns a presence message object](./spec/unit/models/presence_message_spec.rb#L395)
4068
+ * [returns a presence message object](./spec/unit/models/presence_message_spec.rb#L444)
3262
4069
  * with a block
3263
- * [does not call the block](./spec/unit/models/presence_message_spec.rb#L403)
4070
+ * [does not call the block](./spec/unit/models/presence_message_spec.rb#L452)
3264
4071
  * with an encoding
3265
- * [returns a presence message object](./spec/unit/models/presence_message_spec.rb#L420)
4072
+ * [returns a presence message object](./spec/unit/models/presence_message_spec.rb#L469)
3266
4073
  * with a custom encoding
3267
- * [returns a presence message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/presence_message_spec.rb#L435)
4074
+ * [returns a presence message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/presence_message_spec.rb#L484)
3268
4075
  * with a Cipher encoding
3269
- * [returns a presence message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/presence_message_spec.rb#L454)
4076
+ * [returns a presence message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/presence_message_spec.rb#L503)
3270
4077
  * with invalid Cipher encoding
3271
4078
  * without a block
3272
- * [raises an exception](./spec/unit/models/presence_message_spec.rb#L471)
4079
+ * [raises an exception](./spec/unit/models/presence_message_spec.rb#L520)
3273
4080
  * with a block
3274
- * [calls the block with the exception](./spec/unit/models/presence_message_spec.rb#L477)
4081
+ * [calls the block with the exception](./spec/unit/models/presence_message_spec.rb#L526)
3275
4082
  * #from_encoded_array (#TP4)
3276
4083
  * with no encoding
3277
- * [returns an Array of presence message objects](./spec/unit/models/presence_message_spec.rb#L496)
4084
+ * [returns an Array of presence message objects](./spec/unit/models/presence_message_spec.rb#L545)
3278
4085
  * #shallow_clone
3279
4086
  * with inherited attributes from ProtocolMessage
3280
- * [creates a duplicate of the message without any ProtocolMessage dependency](./spec/unit/models/presence_message_spec.rb#L516)
4087
+ * [creates a duplicate of the message without any ProtocolMessage dependency](./spec/unit/models/presence_message_spec.rb#L565)
3281
4088
  * with embedded attributes for all fields
3282
- * [creates a duplicate of the message without any ProtocolMessage dependency](./spec/unit/models/presence_message_spec.rb#L530)
4089
+ * [creates a duplicate of the message without any ProtocolMessage dependency](./spec/unit/models/presence_message_spec.rb#L579)
3283
4090
  * with new attributes passed in to the method
3284
- * [creates a duplicate of the message without any ProtocolMessage dependency](./spec/unit/models/presence_message_spec.rb#L546)
4091
+ * [creates a duplicate of the message without any ProtocolMessage dependency](./spec/unit/models/presence_message_spec.rb#L595)
3285
4092
  * with an invalid ProtocolMessage (missing an ID)
3286
- * [allows an ID to be passed in to the shallow clone that takes precedence](./spec/unit/models/presence_message_spec.rb#L558)
4093
+ * [allows an ID to be passed in to the shallow clone that takes precedence](./spec/unit/models/presence_message_spec.rb#L607)
3287
4094
  * with mixing of cases
3288
- * [resolves case issues and can use camelCase or snake_case](./spec/unit/models/presence_message_spec.rb#L565)
4095
+ * [resolves case issues and can use camelCase or snake_case](./spec/unit/models/presence_message_spec.rb#L614)
3289
4096
 
3290
4097
  ### Ably::Models::ProtocolMessage
3291
4098
  _(see [spec/unit/models/protocol_message_spec.rb](./spec/unit/models/protocol_message_spec.rb))_
@@ -3323,67 +4130,64 @@ _(see [spec/unit/models/protocol_message_spec.rb](./spec/unit/models/protocol_me
3323
4130
  * [returns false](./spec/unit/models/protocol_message_spec.rb#L116)
3324
4131
  * with msg_serial
3325
4132
  * [returns true](./spec/unit/models/protocol_message_spec.rb#L124)
3326
- * #connection_serial
3327
- * [converts :connection_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L132)
3328
4133
  * #flags (#TR4i)
3329
4134
  * when nil
3330
- * [is zero](./spec/unit/models/protocol_message_spec.rb#L142)
4135
+ * [is zero](./spec/unit/models/protocol_message_spec.rb#L134)
3331
4136
  * when numeric
3332
- * [is an Integer](./spec/unit/models/protocol_message_spec.rb#L150)
4137
+ * [is an Integer](./spec/unit/models/protocol_message_spec.rb#L142)
3333
4138
  * when presence flag present
3334
- * [#has_presence_flag? is true](./spec/unit/models/protocol_message_spec.rb#L158)
3335
- * [#has_channel_resumed_flag? is false](./spec/unit/models/protocol_message_spec.rb#L162)
4139
+ * [#has_presence_flag? is true](./spec/unit/models/protocol_message_spec.rb#L150)
4140
+ * [#has_channel_resumed_flag? is false](./spec/unit/models/protocol_message_spec.rb#L154)
3336
4141
  * when channel resumed flag present
3337
- * [#has_channel_resumed_flag? is true](./spec/unit/models/protocol_message_spec.rb#L170)
3338
- * [#has_presence_flag? is false](./spec/unit/models/protocol_message_spec.rb#L174)
4142
+ * [#has_channel_resumed_flag? is true](./spec/unit/models/protocol_message_spec.rb#L162)
4143
+ * [#has_presence_flag? is false](./spec/unit/models/protocol_message_spec.rb#L166)
4144
+ * when attach resumed flag
4145
+ * flags is 34
4146
+ * [#has_attach_resume_flag? is true](./spec/unit/models/protocol_message_spec.rb#L175)
4147
+ * [#has_attach_presence_flag? is false](./spec/unit/models/protocol_message_spec.rb#L179)
4148
+ * flags is 0
4149
+ * [should raise an exception if flags is a float number](./spec/unit/models/protocol_message_spec.rb#L187)
3339
4150
  * when channel resumed and presence flags present
3340
- * [#has_channel_resumed_flag? is true](./spec/unit/models/protocol_message_spec.rb#L182)
3341
- * [#has_presence_flag? is true](./spec/unit/models/protocol_message_spec.rb#L186)
4151
+ * [#has_channel_resumed_flag? is true](./spec/unit/models/protocol_message_spec.rb#L196)
4152
+ * [#has_presence_flag? is true](./spec/unit/models/protocol_message_spec.rb#L200)
3342
4153
  * when has another future flag
3343
- * [#has_presence_flag? is false](./spec/unit/models/protocol_message_spec.rb#L194)
3344
- * [#has_backlog_flag? is true](./spec/unit/models/protocol_message_spec.rb#L198)
3345
- * #has_connection_serial?
3346
- * without connection_serial
3347
- * [returns false](./spec/unit/models/protocol_message_spec.rb#L208)
3348
- * with connection_serial
3349
- * [returns true](./spec/unit/models/protocol_message_spec.rb#L216)
3350
- * #serial
3351
- * with underlying msg_serial
3352
- * [converts :msg_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L225)
3353
- * with underlying connection_serial
3354
- * [converts :connection_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L233)
3355
- * with underlying connection_serial and msg_serial
3356
- * [prefers connection_serial and converts :connection_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L241)
3357
- * #has_serial?
3358
- * without msg_serial or connection_serial
3359
- * [returns false](./spec/unit/models/protocol_message_spec.rb#L252)
3360
- * with msg_serial
3361
- * [returns true](./spec/unit/models/protocol_message_spec.rb#L260)
3362
- * with connection_serial
3363
- * [returns true](./spec/unit/models/protocol_message_spec.rb#L268)
4154
+ * [#has_presence_flag? is false](./spec/unit/models/protocol_message_spec.rb#L208)
4155
+ * [#has_backlog_flag? is true](./spec/unit/models/protocol_message_spec.rb#L212)
4156
+ * #params (#RTL4k1)
4157
+ * when present
4158
+ * [is expected to eq {:foo=>:bar}](./spec/unit/models/protocol_message_spec.rb#L224)
4159
+ * when empty
4160
+ * [is expected to eq {}](./spec/unit/models/protocol_message_spec.rb#L230)
3364
4161
  * #error
3365
4162
  * with no error attribute
3366
- * [returns nil](./spec/unit/models/protocol_message_spec.rb#L278)
4163
+ * [returns nil](./spec/unit/models/protocol_message_spec.rb#L240)
3367
4164
  * with nil error
3368
- * [returns nil](./spec/unit/models/protocol_message_spec.rb#L286)
4165
+ * [returns nil](./spec/unit/models/protocol_message_spec.rb#L248)
3369
4166
  * with error
3370
- * [returns a valid ErrorInfo object](./spec/unit/models/protocol_message_spec.rb#L294)
4167
+ * [returns a valid ErrorInfo object](./spec/unit/models/protocol_message_spec.rb#L256)
3371
4168
  * #messages (#TR4k)
3372
- * [contains Message objects](./spec/unit/models/protocol_message_spec.rb#L304)
4169
+ * [contains Message objects](./spec/unit/models/protocol_message_spec.rb#L266)
4170
+ * #messages (#RTL21)
4171
+ * [contains Message objects in ascending order](./spec/unit/models/protocol_message_spec.rb#L284)
3373
4172
  * #presence (#TR4l)
3374
- * [contains PresenceMessage objects](./spec/unit/models/protocol_message_spec.rb#L314)
4173
+ * [contains PresenceMessage objects](./spec/unit/models/protocol_message_spec.rb#L296)
4174
+ * #message_size (#TO3l8)
4175
+ * on presence
4176
+ * [should return 13 bytes (sum in bytes: data and client_id)](./spec/unit/models/protocol_message_spec.rb#L309)
4177
+ * on message
4178
+ * [should return 76 bytes (sum in bytes: data, client_id, name, extras)](./spec/unit/models/protocol_message_spec.rb#L319)
3375
4179
  * #connection_details (#TR4o)
3376
4180
  * with a JSON value
3377
- * [contains a ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L327)
3378
- * [contains the attributes from the JSON connectionDetails](./spec/unit/models/protocol_message_spec.rb#L331)
4181
+ * [contains a ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L331)
4182
+ * [contains the attributes from the JSON connectionDetails](./spec/unit/models/protocol_message_spec.rb#L335)
3379
4183
  * without a JSON value
3380
- * [contains an empty ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L340)
4184
+ * [contains an empty ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L344)
3381
4185
  * #auth (#TR4p)
3382
4186
  * with a JSON value
3383
- * [contains a AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L354)
3384
- * [contains the attributes from the JSON auth details](./spec/unit/models/protocol_message_spec.rb#L358)
4187
+ * [contains a AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L358)
4188
+ * [contains the attributes from the JSON auth details](./spec/unit/models/protocol_message_spec.rb#L362)
3385
4189
  * without a JSON value
3386
- * [contains an empty AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L366)
4190
+ * [contains an empty AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L370)
3387
4191
 
3388
4192
  ### Ably::Models::PushChannelSubscription
3389
4193
  _(see [spec/unit/models/push_channel_subscription_spec.rb](./spec/unit/models/push_channel_subscription_spec.rb))_
@@ -3575,27 +4379,30 @@ _(see [spec/unit/models/token_details_spec.rb](./spec/unit/models/token_details_
3575
4379
  * [is in milliseconds](./spec/unit/models/token_details_spec.rb#L50)
3576
4380
  * #expired?
3577
4381
  * once grace period buffer has passed
3578
- * [is true](./spec/unit/models/token_details_spec.rb#L63)
4382
+ * [is true](./spec/unit/models/token_details_spec.rb#L64)
3579
4383
  * within grace period buffer
3580
- * [is false](./spec/unit/models/token_details_spec.rb#L71)
4384
+ * [is false](./spec/unit/models/token_details_spec.rb#L72)
3581
4385
  * when expires is not available (i.e. string tokens)
3582
- * [is always false](./spec/unit/models/token_details_spec.rb#L79)
4386
+ * [is always false](./spec/unit/models/token_details_spec.rb#L80)
4387
+ * with :from attribute
4388
+ * [is false](./spec/unit/models/token_details_spec.rb#L90)
4389
+ * [is true](./spec/unit/models/token_details_spec.rb#L95)
3583
4390
  * ==
3584
- * [is true when attributes are the same](./spec/unit/models/token_details_spec.rb#L89)
3585
- * [is false when attributes are not the same](./spec/unit/models/token_details_spec.rb#L94)
3586
- * [is false when class type differs](./spec/unit/models/token_details_spec.rb#L98)
4391
+ * [is true when attributes are the same](./spec/unit/models/token_details_spec.rb#L105)
4392
+ * [is false when attributes are not the same](./spec/unit/models/token_details_spec.rb#L110)
4393
+ * [is false when class type differs](./spec/unit/models/token_details_spec.rb#L114)
3587
4394
  * to_json
3588
4395
  * with all attributes and values
3589
- * [returns all attributes](./spec/unit/models/token_details_spec.rb#L130)
4396
+ * [returns all attributes](./spec/unit/models/token_details_spec.rb#L146)
3590
4397
  * with only a token string
3591
- * [returns populated attributes](./spec/unit/models/token_details_spec.rb#L143)
4398
+ * [returns populated attributes](./spec/unit/models/token_details_spec.rb#L159)
3592
4399
  * from_json (#TD7)
3593
4400
  * with Ruby idiomatic Hash object
3594
- * [returns a valid TokenDetails object](./spec/unit/models/token_details_spec.rb#L169)
4401
+ * [returns a valid TokenDetails object](./spec/unit/models/token_details_spec.rb#L185)
3595
4402
  * with JSON-like object
3596
- * [returns a valid TokenDetails object](./spec/unit/models/token_details_spec.rb#L192)
4403
+ * [returns a valid TokenDetails object](./spec/unit/models/token_details_spec.rb#L208)
3597
4404
  * with JSON string
3598
- * [returns a valid TokenDetails object](./spec/unit/models/token_details_spec.rb#L214)
4405
+ * [returns a valid TokenDetails object](./spec/unit/models/token_details_spec.rb#L230)
3599
4406
 
3600
4407
  ### Ably::Models::TokenRequest
3601
4408
  _(see [spec/unit/models/token_request_spec.rb](./spec/unit/models/token_request_spec.rb))_
@@ -3739,53 +4546,64 @@ _(see [spec/unit/realtime/channel_spec.rb](./spec/unit/realtime/channel_spec.rb)
3739
4546
  * [raises an argument error](./spec/unit/realtime/channel_spec.rb#L63)
3740
4547
  * #publish name argument
3741
4548
  * as UTF_8 string
3742
- * [is permitted](./spec/unit/realtime/channel_spec.rb#L81)
4549
+ * [is permitted](./spec/unit/realtime/channel_spec.rb#L82)
3743
4550
  * as SHIFT_JIS string
3744
- * [is permitted](./spec/unit/realtime/channel_spec.rb#L89)
4551
+ * [is permitted](./spec/unit/realtime/channel_spec.rb#L90)
3745
4552
  * as ASCII_8BIT string
3746
- * [is permitted](./spec/unit/realtime/channel_spec.rb#L97)
4553
+ * [is permitted](./spec/unit/realtime/channel_spec.rb#L98)
3747
4554
  * as Integer
3748
- * [raises an argument error](./spec/unit/realtime/channel_spec.rb#L105)
4555
+ * [raises an argument error](./spec/unit/realtime/channel_spec.rb#L106)
3749
4556
  * as Nil
3750
- * [is permitted](./spec/unit/realtime/channel_spec.rb#L113)
4557
+ * [is permitted](./spec/unit/realtime/channel_spec.rb#L114)
3751
4558
  * callbacks
3752
- * [are supported for valid STATE events](./spec/unit/realtime/channel_spec.rb#L120)
3753
- * [fail with unacceptable STATE event names](./spec/unit/realtime/channel_spec.rb#L126)
4559
+ * [are supported for valid STATE events](./spec/unit/realtime/channel_spec.rb#L121)
4560
+ * [fail with unacceptable STATE event names](./spec/unit/realtime/channel_spec.rb#L127)
3754
4561
  * subscriptions
3755
4562
  * #subscribe
3756
- * [without a block raises an invalid ArgumentError](./spec/unit/realtime/channel_spec.rb#L168)
3757
- * [with no event name specified subscribes the provided block to all events](./spec/unit/realtime/channel_spec.rb#L172)
3758
- * [with a single event name subscribes that block to matching events](./spec/unit/realtime/channel_spec.rb#L178)
3759
- * [with a multiple event name arguments subscribes that block to all of those event names](./spec/unit/realtime/channel_spec.rb#L185)
3760
- * [with a multiple duplicate event name arguments subscribes that block to all of those unique event names once](./spec/unit/realtime/channel_spec.rb#L197)
4563
+ * [without a block raises an invalid ArgumentError](./spec/unit/realtime/channel_spec.rb#L169)
4564
+ * [with no event name specified subscribes the provided block to all events](./spec/unit/realtime/channel_spec.rb#L173)
4565
+ * [with a single event name subscribes that block to matching events](./spec/unit/realtime/channel_spec.rb#L179)
4566
+ * [with a multiple event name arguments subscribes that block to all of those event names](./spec/unit/realtime/channel_spec.rb#L186)
4567
+ * [with a multiple duplicate event name arguments subscribes that block to all of those unique event names once](./spec/unit/realtime/channel_spec.rb#L198)
3761
4568
  * #unsubscribe
3762
- * [with no event name specified unsubscribes that block from all events](./spec/unit/realtime/channel_spec.rb#L214)
3763
- * [with a single event name argument unsubscribes the provided block with the matching event name](./spec/unit/realtime/channel_spec.rb#L220)
3764
- * [with multiple event name arguments unsubscribes each of those matching event names with the provided block](./spec/unit/realtime/channel_spec.rb#L226)
3765
- * [with a non-matching event name argument has no effect](./spec/unit/realtime/channel_spec.rb#L232)
3766
- * [with no block argument unsubscribes all blocks for the event name argument](./spec/unit/realtime/channel_spec.rb#L238)
4569
+ * [with no event name specified unsubscribes that block from all events](./spec/unit/realtime/channel_spec.rb#L215)
4570
+ * [with a single event name argument unsubscribes the provided block with the matching event name](./spec/unit/realtime/channel_spec.rb#L221)
4571
+ * [with multiple event name arguments unsubscribes each of those matching event names with the provided block](./spec/unit/realtime/channel_spec.rb#L227)
4572
+ * [with a non-matching event name argument has no effect](./spec/unit/realtime/channel_spec.rb#L233)
4573
+ * [with no block argument unsubscribes all blocks for the event name argument](./spec/unit/realtime/channel_spec.rb#L239)
3767
4574
 
3768
4575
  ### Ably::Realtime::Channels
3769
4576
  _(see [spec/unit/realtime/channels_spec.rb](./spec/unit/realtime/channels_spec.rb))_
3770
4577
  * creating channels
3771
- * [[] creates a channel](./spec/unit/realtime/channels_spec.rb#L43)
4578
+ * [[] creates a channel](./spec/unit/realtime/channels_spec.rb#L81)
3772
4579
  * #get
3773
- * [creates a channel if it does not exist](./spec/unit/realtime/channels_spec.rb#L14)
4580
+ * when channel doesn't exist
4581
+ * hash
4582
+ * [is expected to be a kind of Hash](./spec/unit/realtime/channels_spec.rb#L28)
4583
+ * [creates a channel (RTS3a)](./spec/unit/realtime/channels_spec.rb#L20)
4584
+ * ChannelOptions object
4585
+ * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/realtime/channels_spec.rb#L35)
4586
+ * [creates a channel (RTS3a)](./spec/unit/realtime/channels_spec.rb#L20)
3774
4587
  * when an existing channel exists
3775
- * [will reuse a channel object if it exists](./spec/unit/realtime/channels_spec.rb#L20)
3776
- * [will update the options on the channel if provided](./spec/unit/realtime/channels_spec.rb#L26)
3777
- * [will leave the options intact on the channel if not provided](./spec/unit/realtime/channels_spec.rb#L34)
4588
+ * [will update the options on the channel if provided (RSN3c)](./spec/unit/realtime/channels_spec.rb#L64)
4589
+ * [will leave the options intact on the channel if not provided](./spec/unit/realtime/channels_spec.rb#L72)
4590
+ * hash
4591
+ * [is expected to be a kind of Hash](./spec/unit/realtime/channels_spec.rb#L52)
4592
+ * [will reuse a channel object if it exists (RTS3a)](./spec/unit/realtime/channels_spec.rb#L43)
4593
+ * ChannelOptions object
4594
+ * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/realtime/channels_spec.rb#L59)
4595
+ * [will reuse a channel object if it exists (RTS3a)](./spec/unit/realtime/channels_spec.rb#L43)
3778
4596
  * #fetch
3779
- * [retrieves a channel if it exists](./spec/unit/realtime/channels_spec.rb#L50)
3780
- * [calls the block if channel is missing](./spec/unit/realtime/channels_spec.rb#L55)
4597
+ * [retrieves a channel if it exists](./spec/unit/realtime/channels_spec.rb#L88)
4598
+ * [calls the block if channel is missing](./spec/unit/realtime/channels_spec.rb#L93)
3781
4599
  * destroying channels
3782
- * [#release detaches and then releases the channel resources](./spec/unit/realtime/channels_spec.rb#L63)
4600
+ * [#release detaches and then releases the channel resources](./spec/unit/realtime/channels_spec.rb#L101)
3783
4601
  * is Enumerable
3784
- * [allows enumeration](./spec/unit/realtime/channels_spec.rb#L80)
3785
- * [provides #length](./spec/unit/realtime/channels_spec.rb#L96)
4602
+ * [allows enumeration](./spec/unit/realtime/channels_spec.rb#L118)
4603
+ * [provides #length](./spec/unit/realtime/channels_spec.rb#L134)
3786
4604
  * #each
3787
- * [returns an enumerator](./spec/unit/realtime/channels_spec.rb#L85)
3788
- * [yields each channel](./spec/unit/realtime/channels_spec.rb#L89)
4605
+ * [returns an enumerator](./spec/unit/realtime/channels_spec.rb#L123)
4606
+ * [yields each channel](./spec/unit/realtime/channels_spec.rb#L127)
3789
4607
 
3790
4608
  ### Ably::Realtime::Client
3791
4609
  _(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_
@@ -3935,6 +4753,13 @@ _(see [spec/unit/realtime/push_channel_spec.rb](./spec/unit/realtime/push_channe
3935
4753
  _(see [spec/unit/realtime/realtime_spec.rb](./spec/unit/realtime/realtime_spec.rb))_
3936
4754
  * [constructor returns an Ably::Realtime::Client](./spec/unit/realtime/realtime_spec.rb#L6)
3937
4755
 
4756
+ ### Ably::Realtime::RecoveryKeyContext
4757
+ _(see [spec/unit/realtime/recovery_key_context_spec.rb](./spec/unit/realtime/recovery_key_context_spec.rb))_
4758
+ * connection recovery key
4759
+ * [should encode recovery key - RTN16i, RTN16f, RTN16j](./spec/unit/realtime/recovery_key_context_spec.rb#L8)
4760
+ * [should decode recovery key - RTN16i, RTN16f, RTN16j](./spec/unit/realtime/recovery_key_context_spec.rb#L21)
4761
+ * [should return nil for invalid recovery key - RTN16i, RTN16f, RTN16j](./spec/unit/realtime/recovery_key_context_spec.rb#L29)
4762
+
3938
4763
  ### Ably::Models::ProtocolMessage
3939
4764
  _(see [spec/unit/realtime/safe_deferrable_spec.rb](./spec/unit/realtime/safe_deferrable_spec.rb))_
3940
4765
  * behaves like a safe Deferrable
@@ -3981,50 +4806,83 @@ _(see [spec/unit/realtime/safe_deferrable_spec.rb](./spec/unit/realtime/safe_def
3981
4806
  _(see [spec/unit/rest/channel_spec.rb](./spec/unit/rest/channel_spec.rb))_
3982
4807
  * #initializer
3983
4808
  * as UTF_8 string
3984
- * [is permitted](./spec/unit/rest/channel_spec.rb#L23)
3985
- * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L27)
4809
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L24)
4810
+ * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L28)
3986
4811
  * as frozen UTF_8 string
3987
- * [is permitted](./spec/unit/rest/channel_spec.rb#L36)
3988
- * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L40)
4812
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L37)
4813
+ * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L41)
3989
4814
  * as SHIFT_JIS string
3990
- * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L48)
3991
- * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L52)
4815
+ * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L49)
4816
+ * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L53)
3992
4817
  * as ASCII_8BIT string
3993
- * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L60)
3994
- * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L64)
4818
+ * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L61)
4819
+ * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L65)
3995
4820
  * as Integer
3996
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L72)
4821
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L73)
3997
4822
  * as Nil
3998
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L80)
4823
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L81)
3999
4824
  * #publish name argument
4000
4825
  * as UTF_8 string
4001
- * [is permitted](./spec/unit/rest/channel_spec.rb#L92)
4826
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L93)
4002
4827
  * as frozen UTF_8 string
4003
- * [is permitted](./spec/unit/rest/channel_spec.rb#L101)
4828
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L102)
4004
4829
  * as SHIFT_JIS string
4005
- * [is permitted](./spec/unit/rest/channel_spec.rb#L109)
4830
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L110)
4006
4831
  * as ASCII_8BIT string
4007
- * [is permitted](./spec/unit/rest/channel_spec.rb#L117)
4832
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L118)
4008
4833
  * as Integer
4009
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L125)
4834
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L126)
4835
+ * max message size exceeded
4836
+ * when max_message_size is nil
4837
+ * and a message size is 65537 bytes
4838
+ * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/rest/channel_spec.rb#L134)
4839
+ * when max_message_size is 65536 bytes
4840
+ * and a message size is 65537 bytes
4841
+ * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/rest/channel_spec.rb#L144)
4842
+ * and a message size is 10 bytes
4843
+ * [should send a message](./spec/unit/rest/channel_spec.rb#L150)
4844
+ * when max_message_size is 10 bytes
4845
+ * and a message size is 11 bytes
4846
+ * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/rest/channel_spec.rb#L160)
4847
+ * and a message size is 2 bytes
4848
+ * [should send a message](./spec/unit/rest/channel_spec.rb#L166)
4010
4849
 
4011
4850
  ### Ably::Rest::Channels
4012
4851
  _(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_
4013
- * creating channels
4014
- * [#get creates a channel](./spec/unit/rest/channels_spec.rb#L12)
4015
- * [#get will reuse the channel object](./spec/unit/rest/channels_spec.rb#L17)
4016
- * [[] creates a channel](./spec/unit/rest/channels_spec.rb#L23)
4852
+ * [[] creates a channel](./spec/unit/rest/channels_spec.rb#L91)
4853
+ * #get
4854
+ * when channel doesn't exist
4855
+ * hash
4856
+ * [is expected to be a kind of Hash](./spec/unit/rest/channels_spec.rb#L24)
4857
+ * [creates a channel (RSN3a)](./spec/unit/rest/channels_spec.rb#L16)
4858
+ * ChannelOptions object
4859
+ * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/rest/channels_spec.rb#L31)
4860
+ * [creates a channel (RSN3a)](./spec/unit/rest/channels_spec.rb#L16)
4861
+ * when an existing channel exists
4862
+ * hash
4863
+ * [is expected to be a kind of Hash](./spec/unit/rest/channels_spec.rb#L48)
4864
+ * [will reuse a channel object if it exists (RSN3a)](./spec/unit/rest/channels_spec.rb#L39)
4865
+ * ChannelOptions object
4866
+ * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/rest/channels_spec.rb#L55)
4867
+ * [will reuse a channel object if it exists (RSN3a)](./spec/unit/rest/channels_spec.rb#L39)
4868
+ * with new channel_options modes
4869
+ * hash
4870
+ * [is expected to be a kind of Hash](./spec/unit/rest/channels_spec.rb#L76)
4871
+ * [will update channel with provided options modes (RSN3c)](./spec/unit/rest/channels_spec.rb#L62)
4872
+ * ChannelOptions object
4873
+ * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/rest/channels_spec.rb#L83)
4874
+ * [will update channel with provided options modes (RSN3c)](./spec/unit/rest/channels_spec.rb#L62)
4017
4875
  * #fetch
4018
- * [retrieves a channel if it exists](./spec/unit/rest/channels_spec.rb#L30)
4019
- * [calls the block if channel is missing](./spec/unit/rest/channels_spec.rb#L35)
4876
+ * [retrieves a channel if it exists](./spec/unit/rest/channels_spec.rb#L97)
4877
+ * [calls the block if channel is missing](./spec/unit/rest/channels_spec.rb#L102)
4020
4878
  * destroying channels
4021
- * [#release releases the channel resoures](./spec/unit/rest/channels_spec.rb#L43)
4879
+ * [#release releases the channel resoures](./spec/unit/rest/channels_spec.rb#L110)
4022
4880
  * is Enumerable
4023
- * [allows enumeration](./spec/unit/rest/channels_spec.rb#L59)
4024
- * [provides #length](./spec/unit/rest/channels_spec.rb#L75)
4881
+ * [allows enumeration](./spec/unit/rest/channels_spec.rb#L126)
4882
+ * [provides #length](./spec/unit/rest/channels_spec.rb#L142)
4025
4883
  * #each
4026
- * [returns an enumerator](./spec/unit/rest/channels_spec.rb#L64)
4027
- * [yields each channel](./spec/unit/rest/channels_spec.rb#L68)
4884
+ * [returns an enumerator](./spec/unit/rest/channels_spec.rb#L131)
4885
+ * [yields each channel](./spec/unit/rest/channels_spec.rb#L135)
4028
4886
 
4029
4887
  ### Ably::Rest::Client
4030
4888
  _(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
@@ -4128,20 +4986,33 @@ _(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
4128
4986
  * [is set to 10 minutes](./spec/unit/rest/client_spec.rb#L27)
4129
4987
  * when provided
4130
4988
  * [configures a new timeout](./spec/unit/rest/client_spec.rb#L35)
4989
+ * use agent
4990
+ * set agent to non-default value
4991
+ * default agent
4992
+ * [should return default ably agent](./spec/unit/rest/client_spec.rb#L46)
4993
+ * custom agent
4994
+ * [should overwrite client.agent](./spec/unit/rest/client_spec.rb#L54)
4131
4995
  * :use_token_auth
4132
4996
  * set to false
4133
4997
  * with a key and :tls => false
4134
- * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/rest/client_spec.rb#L46)
4998
+ * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/rest/client_spec.rb#L66)
4135
4999
  * without a key
4136
- * [fails as a key is required if not using token auth](./spec/unit/rest/client_spec.rb#L54)
5000
+ * [fails as a key is required if not using token auth](./spec/unit/rest/client_spec.rb#L74)
4137
5001
  * set to true
4138
5002
  * without a key or token
4139
- * [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L64)
5003
+ * [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L84)
5004
+ * max_message_size
5005
+ * is not present
5006
+ * [should return default 65536 (#TO3l8)](./spec/unit/rest/client_spec.rb#L95)
5007
+ * is nil
5008
+ * [should return default 65536 (#TO3l8)](./spec/unit/rest/client_spec.rb#L103)
5009
+ * is customized 131072 bytes
5010
+ * [should return 131072](./spec/unit/rest/client_spec.rb#L112)
4140
5011
  * request_id generation
4141
- * [includes request_id in URL](./spec/unit/rest/client_spec.rb#L74)
5012
+ * [includes request_id in URL](./spec/unit/rest/client_spec.rb#L121)
4142
5013
  * push
4143
- * [#device is not supported and raises an exception](./spec/unit/rest/client_spec.rb#L82)
4144
- * [#push returns a Push object](./spec/unit/rest/client_spec.rb#L86)
5014
+ * [#device is not supported and raises an exception](./spec/unit/rest/client_spec.rb#L129)
5015
+ * [#push returns a Push object](./spec/unit/rest/client_spec.rb#L133)
4145
5016
 
4146
5017
  ### Ably::Rest::Channel::PushChannel
4147
5018
  _(see [spec/unit/rest/push_channel_spec.rb](./spec/unit/rest/push_channel_spec.rb))_
@@ -4175,11 +5046,9 @@ _(see [spec/unit/util/crypto_spec.rb](./spec/unit/util/crypto_spec.rb))_
4175
5046
  * [converts the key to binary](./spec/unit/util/crypto_spec.rb#L55)
4176
5047
  * with provided params
4177
5048
  * [overrides the defaults](./spec/unit/util/crypto_spec.rb#L67)
4178
- * encrypts & decrypt
4179
- * [#encrypt encrypts a string](./spec/unit/util/crypto_spec.rb#L79)
4180
- * [#decrypt decrypts a string](./spec/unit/util/crypto_spec.rb#L84)
4181
- * encrypting an empty string
4182
- * [raises an ArgumentError](./spec/unit/util/crypto_spec.rb#L93)
5049
+ * #encrypt & #decrypt
5050
+ * [encrypts and decrypts a non-empty string](./spec/unit/util/crypto_spec.rb#L79)
5051
+ * [encrypts and decrypts an empty string](./spec/unit/util/crypto_spec.rb#L88)
4183
5052
  * using shared client lib fixture data
4184
5053
  * with AES-128-CBC
4185
5054
  * behaves like an Ably encrypter and decrypter (#RTL7d)
@@ -4206,6 +5075,6 @@ _(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_
4206
5075
 
4207
5076
  ## Test summary
4208
5077
 
4209
- * Passing tests: 2109
4210
- * Pending tests: 5
4211
- * Failing tests: 1
5078
+ * Passing tests: 2491
5079
+ * Pending tests: 7
5080
+ * Failing tests: 2