ably 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -2
- data/Rakefile +2 -0
- data/SPEC.md +230 -194
- data/ably.gemspec +2 -0
- data/lib/ably/auth.rb +7 -5
- data/lib/ably/models/idiomatic_ruby_wrapper.rb +5 -7
- data/lib/ably/models/paginated_resource.rb +14 -21
- data/lib/ably/models/protocol_message.rb +1 -1
- data/lib/ably/modules/ably.rb +4 -0
- data/lib/ably/modules/async_wrapper.rb +2 -2
- data/lib/ably/modules/channels_collection.rb +31 -8
- data/lib/ably/modules/conversions.rb +10 -0
- data/lib/ably/modules/enum.rb +2 -3
- data/lib/ably/modules/state_emitter.rb +8 -8
- data/lib/ably/modules/state_machine.rb +7 -3
- data/lib/ably/realtime/channel.rb +6 -5
- data/lib/ably/realtime/channel/channel_manager.rb +11 -10
- data/lib/ably/realtime/channel/channel_state_machine.rb +10 -9
- data/lib/ably/realtime/channels.rb +3 -0
- data/lib/ably/realtime/client/incoming_message_dispatcher.rb +11 -1
- data/lib/ably/realtime/connection.rb +55 -16
- data/lib/ably/realtime/connection/connection_manager.rb +25 -8
- data/lib/ably/realtime/connection/connection_state_machine.rb +9 -9
- data/lib/ably/realtime/connection/websocket_transport.rb +2 -2
- data/lib/ably/realtime/presence.rb +16 -17
- data/lib/ably/util/crypto.rb +1 -1
- data/lib/ably/version.rb +1 -1
- data/spec/acceptance/realtime/channel_history_spec.rb +6 -5
- data/spec/acceptance/realtime/connection_failures_spec.rb +103 -27
- data/spec/acceptance/realtime/connection_spec.rb +81 -17
- data/spec/acceptance/realtime/presence_spec.rb +82 -30
- data/spec/acceptance/rest/auth_spec.rb +22 -19
- data/spec/acceptance/rest/client_spec.rb +4 -4
- data/spec/acceptance/rest/presence_spec.rb +12 -6
- data/spec/rspec_config.rb +9 -0
- data/spec/shared/model_behaviour.rb +1 -1
- data/spec/spec_helper.rb +4 -1
- data/spec/support/event_machine_helper.rb +26 -37
- data/spec/support/markdown_spec_formatter.rb +96 -68
- data/spec/support/rest_testapp_before_retry.rb +15 -0
- data/spec/support/test_app.rb +4 -0
- data/spec/unit/models/idiomatic_ruby_wrapper_spec.rb +20 -2
- data/spec/unit/models/message_spec.rb +1 -1
- data/spec/unit/models/paginated_resource_spec.rb +15 -1
- data/spec/unit/modules/enum_spec.rb +10 -0
- data/spec/unit/realtime/channels_spec.rb +30 -0
- data/spec/unit/rest/channels_spec.rb +30 -0
- metadata +101 -35
- checksums.yaml +0 -7
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
data/SPEC.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ably Client Library 0.7.
|
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#
|
14
|
-
* [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#
|
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#
|
17
|
-
* [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#
|
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#
|
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#
|
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#
|
180
|
+
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L489)
|
177
181
|
* with production environment
|
178
|
-
*
|
179
|
-
|
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#
|
206
|
-
* PENDING: *[changes state to failed if a new token cannot be issued](./spec/acceptance/realtime/connection_spec.rb#
|
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#
|
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#
|
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#
|
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#
|
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#
|
222
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#
|
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#
|
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#
|
228
|
-
* [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#
|
229
|
-
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#
|
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#
|
232
|
-
* [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#
|
233
|
-
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#
|
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#
|
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#
|
238
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
255
|
-
* [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#
|
256
|
-
* [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#
|
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#
|
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#
|
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#
|
266
|
-
* with invalid value
|
267
|
-
*
|
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#
|
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#
|
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#
|
365
|
-
* PENDING: *[ensure connection_id for presence member matches the messages they publish on the channel](./spec/acceptance/realtime/presence_spec.rb#
|
366
|
-
* PENDING: *[stop a call to get when the channel has not been entered](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
368
|
-
* PENDING: *[presence will resume sync if connection is dropped mid-way](./spec/acceptance/realtime/presence_spec.rb#
|
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
|
-
* [
|
400
|
-
* [
|
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#
|
405
|
-
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#
|
406
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
428
|
+
* [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L293)
|
410
429
|
* when set to nil
|
411
|
-
*
|
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
|
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#
|
416
|
-
* [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
420
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
423
|
-
* [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
426
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
429
|
-
* [
|
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#
|
432
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
436
|
-
* [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
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
|
-
*
|
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
|
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#
|
445
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#
|
446
|
-
* [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#
|
447
|
-
* [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#
|
448
|
-
* [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#
|
449
|
-
* [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
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#
|
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#
|
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#
|
461
|
-
* [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
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#
|
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#
|
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#
|
471
|
-
* [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#
|
472
|
-
* [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
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#
|
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#
|
479
|
-
* [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
482
|
-
* [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
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#
|
504
|
-
* option :client_id
|
505
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
506
|
-
* option :capability
|
507
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
508
|
-
* option :nonce
|
509
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
510
|
-
* option :timestamp
|
511
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
512
|
-
* option :ttl
|
513
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
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#
|
538
|
+
* [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L130)
|
518
539
|
* without :query_time option
|
519
|
-
* [
|
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#
|
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#
|
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#
|
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#
|
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#
|
552
|
+
* [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L223)
|
532
553
|
* XML
|
533
|
-
* [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
536
|
-
* [uses the token request from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
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#
|
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#
|
543
|
-
* [returns a valid token](./spec/acceptance/rest/auth_spec.rb#
|
544
|
-
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
547
|
-
* [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#
|
548
|
-
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
551
|
-
* [uses the token request returned from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
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#
|
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#
|
559
|
-
* [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#
|
560
|
-
* [uses the default capability](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
563
|
-
* [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
586
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
|
566
587
|
* with option :capability
|
567
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
588
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
|
568
589
|
* with option :nonce
|
569
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
590
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L389)
|
570
591
|
* with option :timestamp
|
571
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
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#
|
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#
|
578
|
-
* [should raise an exception if key id is missing](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
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#
|
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#
|
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#
|
588
|
-
* [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#
|
589
|
-
* [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#
|
590
|
-
* [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
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#
|
596
|
-
* [when a message is published](./spec/acceptance/rest/auth_spec.rb#
|
597
|
-
* [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
600
|
-
* [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
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#
|
839
|
-
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#
|
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#
|
842
|
-
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#
|
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#
|
1139
|
-
* [#first gets the first item in page](./spec/unit/models/paginated_resource_spec.rb#
|
1140
|
-
* [#last gets the last item in page](./spec/unit/models/paginated_resource_spec.rb#
|
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#
|
1143
|
-
* [is the last page](./spec/unit/models/paginated_resource_spec.rb#
|
1144
|
-
* [does not support pagination](./spec/unit/models/paginated_resource_spec.rb#
|
1145
|
-
* [raises an exception when accessing next page](./spec/unit/models/paginated_resource_spec.rb#
|
1146
|
-
* [raises an exception when accessing first page](./spec/unit/models/paginated_resource_spec.rb#
|
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#
|
1149
|
-
* [is not the last page](./spec/unit/models/paginated_resource_spec.rb#
|
1150
|
-
* [supports pagination](./spec/unit/models/paginated_resource_spec.rb#
|
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#
|
1153
|
-
* [retrieves the next page of results](./spec/unit/models/paginated_resource_spec.rb#
|
1154
|
-
* [is not the first page](./spec/unit/models/paginated_resource_spec.rb#
|
1155
|
-
* [is the last page](./spec/unit/models/paginated_resource_spec.rb#
|
1156
|
-
* [raises an exception if trying to access the last page when it is the last page](./spec/unit/models/paginated_resource_spec.rb#
|
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#
|
1159
|
-
* [retrieves the first page of results](./spec/unit/models/paginated_resource_spec.rb#
|
1160
|
-
* [is the first page](./spec/unit/models/paginated_resource_spec.rb#
|
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:
|
1675
|
-
* Pending tests:
|
1676
|
-
* Failing tests:
|
1710
|
+
* Passing tests: 811
|
1711
|
+
* Pending tests: 11
|
1712
|
+
* Failing tests: 0
|