ably 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/.travis.yml +2 -2
  2. data/Rakefile +2 -0
  3. data/SPEC.md +230 -194
  4. data/ably.gemspec +2 -0
  5. data/lib/ably/auth.rb +7 -5
  6. data/lib/ably/models/idiomatic_ruby_wrapper.rb +5 -7
  7. data/lib/ably/models/paginated_resource.rb +14 -21
  8. data/lib/ably/models/protocol_message.rb +1 -1
  9. data/lib/ably/modules/ably.rb +4 -0
  10. data/lib/ably/modules/async_wrapper.rb +2 -2
  11. data/lib/ably/modules/channels_collection.rb +31 -8
  12. data/lib/ably/modules/conversions.rb +10 -0
  13. data/lib/ably/modules/enum.rb +2 -3
  14. data/lib/ably/modules/state_emitter.rb +8 -8
  15. data/lib/ably/modules/state_machine.rb +7 -3
  16. data/lib/ably/realtime/channel.rb +6 -5
  17. data/lib/ably/realtime/channel/channel_manager.rb +11 -10
  18. data/lib/ably/realtime/channel/channel_state_machine.rb +10 -9
  19. data/lib/ably/realtime/channels.rb +3 -0
  20. data/lib/ably/realtime/client/incoming_message_dispatcher.rb +11 -1
  21. data/lib/ably/realtime/connection.rb +55 -16
  22. data/lib/ably/realtime/connection/connection_manager.rb +25 -8
  23. data/lib/ably/realtime/connection/connection_state_machine.rb +9 -9
  24. data/lib/ably/realtime/connection/websocket_transport.rb +2 -2
  25. data/lib/ably/realtime/presence.rb +16 -17
  26. data/lib/ably/util/crypto.rb +1 -1
  27. data/lib/ably/version.rb +1 -1
  28. data/spec/acceptance/realtime/channel_history_spec.rb +6 -5
  29. data/spec/acceptance/realtime/connection_failures_spec.rb +103 -27
  30. data/spec/acceptance/realtime/connection_spec.rb +81 -17
  31. data/spec/acceptance/realtime/presence_spec.rb +82 -30
  32. data/spec/acceptance/rest/auth_spec.rb +22 -19
  33. data/spec/acceptance/rest/client_spec.rb +4 -4
  34. data/spec/acceptance/rest/presence_spec.rb +12 -6
  35. data/spec/rspec_config.rb +9 -0
  36. data/spec/shared/model_behaviour.rb +1 -1
  37. data/spec/spec_helper.rb +4 -1
  38. data/spec/support/event_machine_helper.rb +26 -37
  39. data/spec/support/markdown_spec_formatter.rb +96 -68
  40. data/spec/support/rest_testapp_before_retry.rb +15 -0
  41. data/spec/support/test_app.rb +4 -0
  42. data/spec/unit/models/idiomatic_ruby_wrapper_spec.rb +20 -2
  43. data/spec/unit/models/message_spec.rb +1 -1
  44. data/spec/unit/models/paginated_resource_spec.rb +15 -1
  45. data/spec/unit/modules/enum_spec.rb +10 -0
  46. data/spec/unit/realtime/channels_spec.rb +30 -0
  47. data/spec/unit/rest/channels_spec.rb +30 -0
  48. metadata +101 -35
  49. checksums.yaml +0 -7
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
+ env: RSPEC_RETRY=true
1
2
  language: ruby
2
3
  rvm:
3
4
  - 1.9.3
4
5
  - 2.0.0
5
- - 2.1.1
6
- - rbx-2.4.1
6
+ - 2.2.0
7
7
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
1
3
  require 'bundler/gem_tasks'
2
4
  require 'json'
3
5
 
data/SPEC.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ably Client Library 0.7.0 Specification
1
+ # Ably Real-time & REST Client Library 0.7.1 Specification
2
2
 
3
3
  ### Ably::Realtime::Channel#history
4
4
  _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_
@@ -10,13 +10,13 @@ _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realt
10
10
  * [retrieves real-time history on both channels](./spec/acceptance/realtime/channel_history_spec.rb#L45)
11
11
  * with lots of messages published with a single client and channel
12
12
  * as one ProtocolMessage
13
- * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L86)
14
- * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L95)
13
+ * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L87)
14
+ * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L96)
15
15
  * in multiple ProtocolMessages
16
- * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L106)
17
- * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L117)
16
+ * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L107)
17
+ * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L118)
18
18
  * and REST history
19
- * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L133)
19
+ * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L134)
20
20
 
21
21
  ### Ably::Realtime::Channel
22
22
  _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_
@@ -169,14 +169,21 @@ _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/r
169
169
  * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L343)
170
170
  * when messages were published whilst the client was disconnected
171
171
  * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L363)
172
+ * when failing to resume because the connection_key is not or no longer valid
173
+ * [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L403)
174
+ * [detaches all channels](./spec/acceptance/realtime/connection_failures_spec.rb#L418)
175
+ * [emits an error on the channel and sets the error reason](./spec/acceptance/realtime/connection_failures_spec.rb#L436)
172
176
  * fallback host feature
173
177
  * with custom realtime websocket host option
174
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L419)
178
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L472)
175
179
  * with non-production environment
176
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L436)
180
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L489)
177
181
  * with production environment
178
- * [uses a fallback host on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L459)
179
- * [uses the primary host when suspended, and a fallback host on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L478)
182
+ * when the Internet is down
183
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L517)
184
+ * when the Internet is up
185
+ * [uses a fallback host on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L534)
186
+ * [uses the primary host when suspended, and a fallback host on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L553)
180
187
 
181
188
  ### Ably::Realtime::Connection
182
189
  _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_
@@ -202,73 +209,84 @@ _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/c
202
209
  * [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L117)
203
210
  * when connected with a valid non-expired token
204
211
  * that then expires following the connection being opened
205
- * PENDING: *[retains connection state](./spec/acceptance/realtime/connection_spec.rb#L162)*
206
- * PENDING: *[changes state to failed if a new token cannot be issued](./spec/acceptance/realtime/connection_spec.rb#L163)*
212
+ * PENDING: *[retains connection state](./spec/acceptance/realtime/connection_spec.rb#L164)*
213
+ * PENDING: *[changes state to failed if a new token cannot be issued](./spec/acceptance/realtime/connection_spec.rb#L165)*
207
214
  * the server
208
215
  * [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L141)
209
216
  * for non-renewable tokens
210
217
  * that are expired
211
218
  * opening a new connection
212
- * [transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L178)
219
+ * [transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L180)
213
220
  * when connected
214
- * PENDING: *[transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L191)*
221
+ * PENDING: *[transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L193)*
215
222
  * initialization state changes
216
223
  * with implicit #connect
217
- * [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L219)
224
+ * [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L221)
218
225
  * with explicit #connect
219
- * [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L225)
226
+ * [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L227)
220
227
  * #connect
221
- * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L233)
222
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L238)
228
+ * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L235)
229
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L240)
223
230
  * when already connected
224
- * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L247)
231
+ * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L249)
225
232
  * once connected
226
233
  * connection#id
227
- * [is a string](./spec/acceptance/realtime/connection_spec.rb#L264)
228
- * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L271)
229
- * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L278)
234
+ * [is a string](./spec/acceptance/realtime/connection_spec.rb#L266)
235
+ * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L273)
236
+ * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L280)
230
237
  * connection#key
231
- * [is a string](./spec/acceptance/realtime/connection_spec.rb#L287)
232
- * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L294)
233
- * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L301)
238
+ * [is a string](./spec/acceptance/realtime/connection_spec.rb#L289)
239
+ * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L296)
240
+ * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L303)
234
241
  * following a previous connection being opened and closed
235
- * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L311)
242
+ * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L313)
236
243
  * #close
237
- * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L329)
238
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L336)
244
+ * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L331)
245
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L338)
239
246
  * when already closed
240
- * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L347)
247
+ * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L349)
241
248
  * when connection state is
242
249
  * :initialized
243
- * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L375)
250
+ * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L377)
244
251
  * :connected
245
- * [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#L393)
252
+ * [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#L395)
246
253
  * with an unresponsive connection
247
- * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L423)
254
+ * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L425)
248
255
  * #ping
249
- * [echoes a heart beat](./spec/acceptance/realtime/connection_spec.rb#L446)
256
+ * [echoes a heart beat](./spec/acceptance/realtime/connection_spec.rb#L448)
250
257
  * when not connected
251
- * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L456)
258
+ * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L458)
252
259
  * recovery
253
260
  * #recovery_key
254
- * [is composed of connection id and serial that is kept up to date with each message sent](./spec/acceptance/realtime/connection_spec.rb#L489)
255
- * [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#L510)
256
- * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L534)
261
+ * [is composed of connection id and serial that is kept up to date with each message sent](./spec/acceptance/realtime/connection_spec.rb#L491)
262
+ * [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#L512)
263
+ * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L536)
257
264
  * opening a new connection using a recently disconnected connection's #recovery_key
258
265
  * connection#id and connection#key after recovery
259
- * [remain the same](./spec/acceptance/realtime/connection_spec.rb#L548)
266
+ * [remain the same](./spec/acceptance/realtime/connection_spec.rb#L550)
260
267
  * when messages have been sent whilst the old connection is disconnected
261
268
  * the new connection
262
- * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L573)
269
+ * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L575)
263
270
  * with :recover option
264
271
  * with invalid syntax
265
- * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L598)
266
- * with invalid value
267
- * PENDING: *[triggers an error on the connection object, sets the #error_reason and connects anyway](./spec/acceptance/realtime/connection_spec.rb#L607)*
272
+ * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L600)
273
+ * with invalid formatted value sent to server
274
+ * [triggers a fatal error on the connection object, sets the #error_reason and disconnects](./spec/acceptance/realtime/connection_spec.rb#L609)
275
+ * with expired (missing) value sent to server
276
+ * [triggers an error on the connection object, sets the #error_reason, yet will connect anyway](./spec/acceptance/realtime/connection_spec.rb#L623)
268
277
  * with many connections simultaneously
269
- * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L624)
278
+ * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L641)
270
279
  * when a state transition is unsupported
271
- * [emits a StateChangeError](./spec/acceptance/realtime/connection_spec.rb#L644)
280
+ * [emits a StateChangeError](./spec/acceptance/realtime/connection_spec.rb#L661)
281
+ * undocumented method
282
+ * #internet_up?
283
+ * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L676)
284
+ * when the Internet is up
285
+ * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L682)
286
+ * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L689)
287
+ * when the Internet is down
288
+ * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L701)
289
+ * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L708)
272
290
 
273
291
  ### Ably::Realtime::Channel Message
274
292
  _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/message_spec.rb))_
@@ -361,11 +379,11 @@ _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/real
361
379
  ### Ably::Realtime::Presence
362
380
  _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_
363
381
  * using JSON and MsgPack protocol
364
- * PENDING: *[ensure connection_id is unique and updated on ENTER](./spec/acceptance/realtime/presence_spec.rb#L943)*
365
- * PENDING: *[ensure connection_id for presence member matches the messages they publish on the channel](./spec/acceptance/realtime/presence_spec.rb#L944)*
366
- * PENDING: *[stop a call to get when the channel has not been entered](./spec/acceptance/realtime/presence_spec.rb#L945)*
367
- * PENDING: *[stop a call to get when the channel has been entered but the list is not up to date](./spec/acceptance/realtime/presence_spec.rb#L946)*
368
- * PENDING: *[presence will resume sync if connection is dropped mid-way](./spec/acceptance/realtime/presence_spec.rb#L947)*
382
+ * PENDING: *[ensure connection_id is unique and updated on ENTER](./spec/acceptance/realtime/presence_spec.rb#L995)*
383
+ * PENDING: *[ensure connection_id for presence member matches the messages they publish on the channel](./spec/acceptance/realtime/presence_spec.rb#L996)*
384
+ * PENDING: *[stop a call to get when the channel has not been entered](./spec/acceptance/realtime/presence_spec.rb#L997)*
385
+ * PENDING: *[stop a call to get when the channel has been entered but the list is not up to date](./spec/acceptance/realtime/presence_spec.rb#L998)*
386
+ * PENDING: *[presence will resume sync if connection is dropped mid-way](./spec/acceptance/realtime/presence_spec.rb#L999)*
369
387
  * when attached (but not present) on a presence channel with an anonymous client (no client ID)
370
388
  * [maintains state as other clients enter and leave the channel](./spec/acceptance/realtime/presence_spec.rb#L24)
371
389
  * #sync_complete?
@@ -396,90 +414,93 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
396
414
  * #update
397
415
  * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L224)
398
416
  * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L249)
399
- * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L259)
400
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L266)
417
+ * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L259)
418
+ * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L269)
419
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L276)
401
420
  * when ENTERED
402
421
  * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L234)
403
422
  * #leave
404
- * [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L321)
405
- * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L326)
406
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L333)
423
+ * [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L332)
424
+ * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L337)
425
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L344)
407
426
  * :data option
408
427
  * when set to a string
409
- * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L282)
428
+ * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L293)
410
429
  * when set to nil
411
- * FAILED: ~~[emits nil data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L295)~~
430
+ * [emits the previously defined value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L306)
412
431
  * when not passed as an argument
413
- * [emits the original data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L308)
432
+ * [emits the previously defined value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L319)
414
433
  * :left event
415
- * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L345)
416
- * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L356)
434
+ * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L356)
435
+ * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L367)
417
436
  * entering/updating/leaving presence state on behalf of another client_id
418
437
  * #enter_client
419
- * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L407)
420
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L412)
438
+ * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L418)
439
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L423)
421
440
  * multiple times on the same channel with different client_ids
422
- * [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#L377)
423
- * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L391)
441
+ * [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#L388)
442
+ * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L402)
424
443
  * #update_client
425
- * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L469)
426
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L474)
444
+ * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L492)
445
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L497)
427
446
  * multiple times on the same channel with different client_ids
428
- * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L422)
429
- * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L446)
447
+ * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L433)
448
+ * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L457)
449
+ * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L469)
430
450
  * #leave_client
431
- * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L572)
432
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L577)
451
+ * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L595)
452
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L600)
433
453
  * leaves a channel
434
454
  * multiple times on the same channel with different client_ids
435
- * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L485)
436
- * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L509)
455
+ * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L508)
456
+ * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L532)
437
457
  * with a new value in :data option
438
- * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L533)
458
+ * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L556)
439
459
  * with a nil value in :data option
440
- * FAILED: ~~[emits the leave event with a nil value](./spec/acceptance/realtime/presence_spec.rb#L546)~~
460
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L569)
441
461
  * with no :data option
442
- * [emits the leave event with the previous data value](./spec/acceptance/realtime/presence_spec.rb#L559)
462
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L582)
443
463
  * #get
444
- * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L587)
445
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L592)
446
- * [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#L599)
447
- * [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L614)
448
- * [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L629)
449
- * [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#L646)
450
- * [returns both members on both simultaneously connected clients](./spec/acceptance/realtime/presence_spec.rb#L668)
464
+ * [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L610)
465
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L615)
466
+ * [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#L622)
467
+ * [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L637)
468
+ * [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L659)
469
+ * [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#L683)
451
470
  * when a member enters and then leaves
452
- * [has no members](./spec/acceptance/realtime/presence_spec.rb#L656)
471
+ * [has no members](./spec/acceptance/realtime/presence_spec.rb#L693)
472
+ * with lots of members on different clients
473
+ * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L710)
453
474
  * #subscribe
454
475
  * with no arguments
455
- * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L694)
476
+ * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L746)
456
477
  * #unsubscribe
457
478
  * with no arguments
458
- * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L714)
479
+ * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L766)
459
480
  * REST #get
460
- * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L733)
461
- * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L746)
481
+ * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L785)
482
+ * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L798)
462
483
  * client_id with ASCII_8BIT
463
484
  * in connection set up
464
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L763)
485
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L815)
465
486
  * in channel options
466
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L776)
487
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L828)
467
488
  * encoding and decoding of presence message data
468
- * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L800)
489
+ * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L852)
469
490
  * #subscribe
470
- * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L819)
471
- * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L831)
472
- * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L845)
491
+ * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L871)
492
+ * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L883)
493
+ * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L897)
473
494
  * #get
474
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L861)
495
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L913)
475
496
  * REST #get
476
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L874)
497
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L926)
477
498
  * when cipher settings do not match publisher
478
- * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L889)
479
- * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L902)
499
+ * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L941)
500
+ * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L954)
480
501
  * leaving
481
- * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L919)
482
- * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L929)
502
+ * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L971)
503
+ * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L981)
483
504
 
484
505
  ### Ably::Realtime::Client#stats
485
506
  _(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_
@@ -498,106 +519,106 @@ _(see [spec/acceptance/realtime/time_spec.rb](./spec/acceptance/realtime/time_sp
498
519
  ### Ably::Auth
499
520
  _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
500
521
  * using JSON and MsgPack protocol
501
- * [has immutable options](./spec/acceptance/rest/auth_spec.rb#L52)
522
+ * [has immutable options](./spec/acceptance/rest/auth_spec.rb#L54)
502
523
  * #request_token
503
- * [returns the requested token](./spec/acceptance/rest/auth_spec.rb#L60)
504
- * option :client_id
505
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
506
- * option :capability
507
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
508
- * option :nonce
509
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
510
- * option :timestamp
511
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
512
- * option :ttl
513
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
524
+ * [returns the requested token](./spec/acceptance/rest/auth_spec.rb#L62)
525
+ * with option :client_id
526
+ * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L93)
527
+ * with option :capability
528
+ * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L93)
529
+ * with option :nonce
530
+ * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L93)
531
+ * with option :timestamp
532
+ * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L93)
533
+ * with option :ttl
534
+ * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L93)
514
535
  * with :key_id & :key_secret options
515
- * [key_id is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L120)
536
+ * [key_id is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L122)
516
537
  * with :query_time option
517
- * [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L128)
538
+ * [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L130)
518
539
  * without :query_time option
519
- * [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L137)
540
+ * [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#L139)
520
541
  * with :auth_url option
521
542
  * when response is valid
522
- * [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L184)
543
+ * [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L186)
523
544
  * with :query_params
524
- * [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L192)
545
+ * [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L194)
525
546
  * with :headers
526
- * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L200)
547
+ * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L202)
527
548
  * with POST
528
- * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L208)
549
+ * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L210)
529
550
  * when response is invalid
530
551
  * 500
531
- * [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L221)
552
+ * [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L223)
532
553
  * XML
533
- * [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L232)
554
+ * [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L234)
534
555
  * with token_request_block
535
- * [calls the block when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L250)
536
- * [uses the token request from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L255)
556
+ * [calls the block when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L252)
557
+ * [uses the token request from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L257)
537
558
  * before #authorise has been called
538
- * [has no current_token](./spec/acceptance/rest/auth_spec.rb#L262)
559
+ * [has no current_token](./spec/acceptance/rest/auth_spec.rb#L264)
539
560
  * #authorise
540
- * [updates the persisted auth options thare are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L309)
561
+ * [updates the persisted auth options thare are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L311)
541
562
  * when called for the first time since the client has been instantiated
542
- * [passes all options to #request_token](./spec/acceptance/rest/auth_spec.rb#L273)
543
- * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L278)
544
- * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L282)
563
+ * [passes all options to #request_token](./spec/acceptance/rest/auth_spec.rb#L275)
564
+ * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L280)
565
+ * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L284)
545
566
  * with previous authorisation
546
- * [does not request a token if current_token has not expired](./spec/acceptance/rest/auth_spec.rb#L293)
547
- * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L298)
548
- * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L304)
567
+ * [does not request a token if current_token has not expired](./spec/acceptance/rest/auth_spec.rb#L295)
568
+ * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L300)
569
+ * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L306)
549
570
  * with token_request_block
550
- * [calls the block](./spec/acceptance/rest/auth_spec.rb#L325)
551
- * [uses the token request returned from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L329)
571
+ * [calls the block](./spec/acceptance/rest/auth_spec.rb#L327)
572
+ * [uses the token request returned from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L331)
552
573
  * for every subsequent #request_token
553
574
  * without a provided block
554
- * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L335)
575
+ * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L337)
555
576
  * with a provided block
556
- * [does not call the originally provided block and calls the new #request_token block](./spec/acceptance/rest/auth_spec.rb#L342)
577
+ * [does not call the originally provided block and calls the new #request_token block](./spec/acceptance/rest/auth_spec.rb#L344)
557
578
  * #create_token_request
558
- * [uses the key ID from the client](./spec/acceptance/rest/auth_spec.rb#L358)
559
- * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L362)
560
- * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L366)
579
+ * [uses the key ID from the client](./spec/acceptance/rest/auth_spec.rb#L360)
580
+ * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L364)
581
+ * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L368)
561
582
  * the nonce
562
- * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L371)
563
- * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L376)
583
+ * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L373)
584
+ * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L378)
564
585
  * with option :ttl
565
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
586
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
566
587
  * with option :capability
567
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
588
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
568
589
  * with option :nonce
569
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
590
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
570
591
  * with option :timestamp
571
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
592
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
572
593
  * with option :client_id
573
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
594
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
574
595
  * with additional invalid attributes
575
- * [are ignored](./spec/acceptance/rest/auth_spec.rb#L395)
596
+ * [are ignored](./spec/acceptance/rest/auth_spec.rb#L397)
576
597
  * when required fields are missing
577
- * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L405)
578
- * [should raise an exception if key id is missing](./spec/acceptance/rest/auth_spec.rb#L409)
598
+ * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L408)
599
+ * [should raise an exception if key id is missing](./spec/acceptance/rest/auth_spec.rb#L412)
579
600
  * with :query_time option
580
- * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L418)
601
+ * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L421)
581
602
  * with :timestamp option
582
- * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L428)
603
+ * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L431)
583
604
  * signing
584
- * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L445)
605
+ * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L448)
585
606
  * using token authentication
586
607
  * with :token_id option
587
- * [authenticates successfully using the provided :token_id](./spec/acceptance/rest/auth_spec.rb#L468)
588
- * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L472)
589
- * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L480)
590
- * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L488)
608
+ * [authenticates successfully using the provided :token_id](./spec/acceptance/rest/auth_spec.rb#L471)
609
+ * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L475)
610
+ * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L483)
611
+ * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L491)
591
612
  * when implicit as a result of using :client id
592
613
  * and requests to the Ably server are mocked
593
- * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L518)
614
+ * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L521)
594
615
  * a token is created
595
- * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L527)
596
- * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L531)
597
- * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L535)
616
+ * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L530)
617
+ * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L534)
618
+ * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L538)
598
619
  * when using an :api_key and basic auth
599
- * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L550)
600
- * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L554)
620
+ * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L553)
621
+ * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L557)
601
622
 
602
623
  ### Ably::Rest
603
624
  _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
@@ -809,37 +830,37 @@ _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_sp
809
830
  * with :limit option
810
831
  * [returns a paged response limiting number of members per page](./spec/acceptance/rest/presence_spec.rb#L45)
811
832
  * #history
812
- * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L58)
833
+ * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L64)
813
834
  * with options
814
835
  * direction: :forwards
815
- * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L74)
836
+ * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L80)
816
837
  * direction: :backwards
817
- * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L89)
838
+ * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L95)
818
839
  * #history
819
840
  * with time range options
820
841
  * :start
821
842
  * with milliseconds since epoch value
822
- * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L134)
843
+ * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L140)
823
844
  * with Time object value
824
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L144)
845
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L150)
825
846
  * :end
826
847
  * with milliseconds since epoch value
827
- * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L134)
848
+ * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L140)
828
849
  * with Time object value
829
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L144)
850
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L150)
830
851
  * decoding
831
852
  * valid decodeable content
832
853
  * #get
833
- * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L202)
854
+ * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L208)
834
855
  * #history
835
- * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L219)
856
+ * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L225)
836
857
  * invalid data
837
858
  * #get
838
- * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L250)
839
- * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L254)
859
+ * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L256)
860
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L260)
840
861
  * #history
841
- * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L274)
842
- * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L278)
862
+ * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L280)
863
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L284)
843
864
 
844
865
  ### Ably::Rest::Client#stats
845
866
  _(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_
@@ -1135,29 +1156,32 @@ _(see [spec/unit/models/paginated_resource_spec.rb](./spec/unit/models/paginated
1135
1156
  * [supports alias methods for length](./spec/unit/models/paginated_resource_spec.rb#L34)
1136
1157
  * [is Enumerable](./spec/unit/models/paginated_resource_spec.rb#L39)
1137
1158
  * [is iterable](./spec/unit/models/paginated_resource_spec.rb#L43)
1138
- * [provides [] accessor method](./spec/unit/models/paginated_resource_spec.rb#L47)
1139
- * [#first gets the first item in page](./spec/unit/models/paginated_resource_spec.rb#L53)
1140
- * [#last gets the last item in page](./spec/unit/models/paginated_resource_spec.rb#L57)
1159
+ * [provides [] accessor method](./spec/unit/models/paginated_resource_spec.rb#L61)
1160
+ * [#first gets the first item in page](./spec/unit/models/paginated_resource_spec.rb#L67)
1161
+ * [#last gets the last item in page](./spec/unit/models/paginated_resource_spec.rb#L71)
1162
+ * #each
1163
+ * [returns an enumerator](./spec/unit/models/paginated_resource_spec.rb#L48)
1164
+ * [yields each item](./spec/unit/models/paginated_resource_spec.rb#L52)
1141
1165
  * with non paged http response
1142
- * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L161)
1143
- * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L165)
1144
- * [does not support pagination](./spec/unit/models/paginated_resource_spec.rb#L169)
1145
- * [raises an exception when accessing next page](./spec/unit/models/paginated_resource_spec.rb#L173)
1146
- * [raises an exception when accessing first page](./spec/unit/models/paginated_resource_spec.rb#L177)
1166
+ * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L175)
1167
+ * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L179)
1168
+ * [does not support pagination](./spec/unit/models/paginated_resource_spec.rb#L183)
1169
+ * [raises an exception when accessing next page](./spec/unit/models/paginated_resource_spec.rb#L187)
1170
+ * [raises an exception when accessing first page](./spec/unit/models/paginated_resource_spec.rb#L191)
1147
1171
  * with paged http response
1148
- * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L195)
1149
- * [is not the last page](./spec/unit/models/paginated_resource_spec.rb#L199)
1150
- * [supports pagination](./spec/unit/models/paginated_resource_spec.rb#L203)
1172
+ * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L209)
1173
+ * [is not the last page](./spec/unit/models/paginated_resource_spec.rb#L213)
1174
+ * [supports pagination](./spec/unit/models/paginated_resource_spec.rb#L217)
1151
1175
  * accessing next page
1152
- * [returns another PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L231)
1153
- * [retrieves the next page of results](./spec/unit/models/paginated_resource_spec.rb#L235)
1154
- * [is not the first page](./spec/unit/models/paginated_resource_spec.rb#L240)
1155
- * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L244)
1156
- * [raises an exception if trying to access the last page when it is the last page](./spec/unit/models/paginated_resource_spec.rb#L248)
1176
+ * [returns another PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L245)
1177
+ * [retrieves the next page of results](./spec/unit/models/paginated_resource_spec.rb#L249)
1178
+ * [is not the first page](./spec/unit/models/paginated_resource_spec.rb#L254)
1179
+ * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L258)
1180
+ * [raises an exception if trying to access the last page when it is the last page](./spec/unit/models/paginated_resource_spec.rb#L262)
1157
1181
  * and then first page
1158
- * [returns a PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L259)
1159
- * [retrieves the first page of results](./spec/unit/models/paginated_resource_spec.rb#L263)
1160
- * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L267)
1182
+ * [returns a PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L273)
1183
+ * [retrieves the first page of results](./spec/unit/models/paginated_resource_spec.rb#L277)
1184
+ * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L281)
1161
1185
 
1162
1186
  ### Ably::Models::PresenceMessage
1163
1187
  _(see [spec/unit/models/presence_message_spec.rb](./spec/unit/models/presence_message_spec.rb))_
@@ -1444,6 +1468,12 @@ _(see [spec/unit/realtime/channels_spec.rb](./spec/unit/realtime/channels_spec.r
1444
1468
  * [calls the block if channel is missing](./spec/unit/realtime/channels_spec.rb#L36)
1445
1469
  * destroying channels
1446
1470
  * [#release detatches and then releases the channel resoures](./spec/unit/realtime/channels_spec.rb#L44)
1471
+ * is Enumerable
1472
+ * [allows enumeration](./spec/unit/realtime/channels_spec.rb#L61)
1473
+ * [provides #length](./spec/unit/realtime/channels_spec.rb#L77)
1474
+ * #each
1475
+ * [returns an enumerator](./spec/unit/realtime/channels_spec.rb#L66)
1476
+ * [yields each channel](./spec/unit/realtime/channels_spec.rb#L70)
1447
1477
 
1448
1478
  ### Ably::Realtime::Client
1449
1479
  _(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_
@@ -1567,6 +1597,12 @@ _(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_
1567
1597
  * [calls the block if channel is missing](./spec/unit/rest/channels_spec.rb#L35)
1568
1598
  * destroying channels
1569
1599
  * [#release releases the channel resoures](./spec/unit/rest/channels_spec.rb#L43)
1600
+ * is Enumerable
1601
+ * [allows enumeration](./spec/unit/rest/channels_spec.rb#L59)
1602
+ * [provides #length](./spec/unit/rest/channels_spec.rb#L75)
1603
+ * #each
1604
+ * [returns an enumerator](./spec/unit/rest/channels_spec.rb#L64)
1605
+ * [yields each channel](./spec/unit/rest/channels_spec.rb#L68)
1570
1606
 
1571
1607
  ### Ably::Rest::Client
1572
1608
  _(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
@@ -1671,6 +1707,6 @@ _(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_
1671
1707
 
1672
1708
  ## Test summary
1673
1709
 
1674
- * Passing tests: 786
1675
- * Pending tests: 12
1676
- * Failing tests: 2
1710
+ * Passing tests: 811
1711
+ * Pending tests: 11
1712
+ * Failing tests: 0