ably 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adc7327c5853f3fe2fc8175a94877b4ffcbd22c24ce67cca48dfdce9464d3df1
4
- data.tar.gz: e1740c98a0a6b24a67c8e3fcb6066a93902f9e12b17562a40c31d83184e86c75
3
+ metadata.gz: 373c9adb90697b65eabdb90c26856ef0c030bd223a7b3b629cb34434f8e39426
4
+ data.tar.gz: 0717a1945af00c95590b2ef031a0100a3d34309f9d413da9be031de0c77eafd3
5
5
  SHA512:
6
- metadata.gz: 4bee4e577b3c8598219d8143d193b3af8772ff95c25cb55694817ff08792b30ef365921d1cb99964673b58166cd2b08fc7a7931303342874b5412d0c19c46c20
7
- data.tar.gz: 6aaea4c6281c4bc0d74b3262ed167698145dff798f1dcb735b7684792003117a7431944e4c2512cfcc6306b0fc98aea9f5d26d6132ad755afa1fca0a282a109c
6
+ metadata.gz: '07294fc5b261efa16f5ba461a1e45dc6f50e59581863e04274166e23fd8de7015c6d64df7dbeca0787ff6316155ec26325af7e759591bef8fcae416a52cb478d'
7
+ data.tar.gz: f44a7b62a10753b8fcb415539b0bb9a79fa5951b11380a9ee99a04a98ca59d67ba5969f0f2a3420cc5b02e021135f2dce59793f71cf013e6df6701a074df9b04
@@ -1,7 +1,24 @@
1
1
  # Change Log
2
2
 
3
- ## [v1.0.6](https://github.com/ably/ably-ruby/tree/v1.0.6)
3
+ ## [v1.0.7](https://github.com/ably/ably-ruby/tree/1.0.7)
4
4
 
5
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.0.6...1.0.7)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Add JWT test [\#136](https://github.com/ably/ably-ruby/issues/136)
10
+
11
+ **Fixed bugs:**
12
+
13
+ - Documentation for add\_request\_ids [\#152](https://github.com/ably/ably-ruby/issues/152)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Fix auth\_method-\>auth\_params [\#157](https://github.com/ably/ably-ruby/pull/157) ([SimonWoolf](https://github.com/SimonWoolf))
18
+ - Add request\_id attribute documentation [\#156](https://github.com/ably/ably-ruby/pull/156) ([funkyboy](https://github.com/funkyboy))
19
+ - Add JWT tests [\#137](https://github.com/ably/ably-ruby/pull/137) ([funkyboy](https://github.com/funkyboy))
20
+
21
+ ## [v1.0.6](https://github.com/ably/ably-ruby/tree/v1.0.6) (2018-05-01)
5
22
  [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.0.5...v1.0.6)
6
23
 
7
24
  **Fixed bugs:**
@@ -22,6 +39,7 @@
22
39
  - Do not encode strings in-place [\#147](https://github.com/ably/ably-ruby/pull/147) ([mattheworiordan](https://github.com/mattheworiordan))
23
40
  - Only resume if connection is fresh \(RTN15g\*\) [\#146](https://github.com/ably/ably-ruby/pull/146) ([mattheworiordan](https://github.com/mattheworiordan))
24
41
  - Fix channel history pagination test [\#143](https://github.com/ably/ably-ruby/pull/143) ([funkyboy](https://github.com/funkyboy))
42
+ - New release v1.0.5 [\#142](https://github.com/ably/ably-ruby/pull/142) ([funkyboy](https://github.com/funkyboy))
25
43
  - Fix presence history test [\#141](https://github.com/ably/ably-ruby/pull/141) ([funkyboy](https://github.com/funkyboy))
26
44
  - Do not encode strings in-place [\#140](https://github.com/ably/ably-ruby/pull/140) ([aschuster3](https://github.com/aschuster3))
27
45
 
data/README.md CHANGED
@@ -316,10 +316,11 @@ To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANG
316
316
  This library uses [semantic versioning](http://semver.org/). For each release, the following needs to be done:
317
317
 
318
318
  * Update the version number in [version.rb](./lib/ably/version.rb) and commit the change.
319
- * Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to automate the update of the [CHANGELOG](./CHANGELOG.md). Once the `CHANGELOG` update has completed, manually change the `Unreleased` heading and link with the current version number such as `v1.0.0`. Also ensure that the `Full Changelog` link points to the new version tag instead of the `HEAD`. Commit this change.
319
+ * Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to automate the update of the [CHANGELOG](./CHANGELOG.md). Once the `CHANGELOG` update has completed, manually change the `Unreleased` heading and link with the current version number such as `v1.0.0`. Also ensure that the `Full Changelog` link points to the new version tag instead of the `HEAD`. Ideally, run `rake doc:spec` to generate a new [spec file](./SPEC.md). Then commit these changes.
320
320
  * Add a tag and push to origin such as `git tag v1.0.0 && git push origin v1.0.0`
321
321
  * Visit [https://github.com/ably/ably-ruby/tags](https://github.com/ably/ably-ruby/tags) and `Add release notes` for the release including links to the changelog entry.
322
- * Run `rake release` to publish the gem to [Rubygems](http://www.rubydoc.info/gems/ably)
322
+ * Run `rake release` to publish the gem to [Rubygems](https://rubygems.org/gems/ably)
323
+ * Release the [REST-only library `ably-ruby-rest`](https://github.com/ably/ably-ruby-rest#release-process)
323
324
 
324
325
  ## License
325
326
 
data/SPEC.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ably Realtime & REST Client Library 0.9.0-pre.1 Specification
1
+ # Ably Realtime & REST Client Library 1.0.7 Specification
2
2
 
3
3
  ### Ably::Realtime::Auth
4
4
  _(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_spec.rb))_
@@ -141,8 +141,34 @@ _(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_sp
141
141
  * once connected
142
142
  * [is true as identification is completed following CONNECTED ProtocolMessage](./spec/acceptance/realtime/auth_spec.rb#L1007)
143
143
  * deprecated #authorise
144
- * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1045)
145
- * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1051)
144
+ * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1021)
145
+ * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1027)
146
+ * when using JWT
147
+ * when using auth_url
148
+ * when credentials are valid
149
+ * [client successfully fetches a channel and publishes a message](./spec/acceptance/realtime/auth_spec.rb#L1046)
150
+ * when credentials are wrong
151
+ * [disconnected includes and invalid signature message](./spec/acceptance/realtime/auth_spec.rb#L1059)
152
+ * when token is expired
153
+ * [receives a 40142 error from the server](./spec/acceptance/realtime/auth_spec.rb#L1072)
154
+ * when using auth_callback
155
+ * when credentials are valid
156
+ * [authentication succeeds and client can post a message](./spec/acceptance/realtime/auth_spec.rb#L1097)
157
+ * when credentials are invalid
158
+ * [authentication fails and reason for disconnection is invalid signature](./spec/acceptance/realtime/auth_spec.rb#L1112)
159
+ * when the client is initialized with ClientOptions and the token is a JWT token
160
+ * when credentials are valid
161
+ * [posts successfully to a channel](./spec/acceptance/realtime/auth_spec.rb#L1129)
162
+ * when credentials are invalid
163
+ * [fails with an invalid signature error](./spec/acceptance/realtime/auth_spec.rb#L1143)
164
+ * when JWT token expires
165
+ * [client disconnects, a new token is requested via auth_callback and the client gets reconnected](./spec/acceptance/realtime/auth_spec.rb#L1170)
166
+ * and an AUTH procol message is received
167
+ * [client reauths correctly without going through a disconnection](./spec/acceptance/realtime/auth_spec.rb#L1198)
168
+ * when the JWT token request includes a client_id
169
+ * [the client_id is the same that was specified in the auth_callback that generated the JWT token](./spec/acceptance/realtime/auth_spec.rb#L1226)
170
+ * when the JWT token request includes a subscribe-only capability
171
+ * [client fails to publish to a channel with subscribe-only capability and publishes successfully on a channel with permissions](./spec/acceptance/realtime/auth_spec.rb#L1244)
146
172
 
147
173
  ### Ably::Realtime::Channel#history
148
174
  _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_
@@ -154,18 +180,18 @@ _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realt
154
180
  * [retrieves realtime history on both channels](./spec/acceptance/realtime/channel_history_spec.rb#L46)
155
181
  * with lots of messages published with a single client and channel
156
182
  * as one ProtocolMessage
157
- * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L88)
158
- * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L97)
183
+ * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L94)
184
+ * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L103)
159
185
  * in multiple ProtocolMessages
160
- * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L108)
161
- * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L119)
186
+ * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L114)
187
+ * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L125)
162
188
  * and REST history
163
- * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L135)
189
+ * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L141)
164
190
  * with option until_attach: true
165
- * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L160)
166
- * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L209)
191
+ * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L166)
192
+ * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L215)
167
193
  * and two pages of messages
168
- * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L175)
194
+ * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L181)
169
195
 
170
196
  ### Ably::Realtime::Channel
171
197
  _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_
@@ -416,33 +442,33 @@ _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/chan
416
442
  * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L1877)
417
443
  * #resume (#RTL2f)
418
444
  * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L1890)
419
- * PENDING: *[is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1898)*
420
- * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1919)
445
+ * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1898)
446
+ * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1917)
421
447
  * when a resume fails
422
- * [is false when a resume fails to recover and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L1941)
448
+ * [is false when a resume fails to recover and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L1939)
423
449
  * moves to
424
450
  * suspended
425
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1960)
426
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1983)
451
+ * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958)
452
+ * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981)
427
453
  * detached
428
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1960)
429
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1983)
454
+ * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958)
455
+ * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981)
430
456
  * failed
431
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1960)
432
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1983)
457
+ * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958)
458
+ * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981)
433
459
  * when it receives a server-initiated DETACHED (#RTL13)
434
460
  * and channel is initialized (#RTL13)
435
- * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2017)
461
+ * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2015)
436
462
  * and channel is failed
437
- * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2038)
463
+ * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2036)
438
464
  * and channel is attached
439
- * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2054)
465
+ * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2052)
440
466
  * and channel is suspended
441
- * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2070)
467
+ * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2068)
442
468
  * and channel is attaching
443
- * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2092)
469
+ * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2090)
444
470
  * when it receives an ERROR ProtocolMessage
445
- * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2140)
471
+ * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2138)
446
472
 
447
473
  ### Ably::Realtime::Channels
448
474
  _(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/channels_spec.rb))_
@@ -578,71 +604,81 @@ _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/r
578
604
  * connection resume
579
605
  * when DISCONNECTED ProtocolMessage received from the server
580
606
  * [reconnects automatically and immediately](./spec/acceptance/realtime/connection_failures_spec.rb#L497)
607
+ * connection state freshness is monitored
608
+ * [resumes connections when disconnected within the connection_state_ttl period (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L518)
609
+ * when connection_state_ttl period has passed since being disconnected
610
+ * [clears the local connection state and uses a new connection when the connection_state_ttl period has passed (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L558)
611
+ * when connection_state_ttl period has passed since last activity on the connection
612
+ * [does not clear the local connection state when the connection_state_ttl period has passed since last activity, but the idle timeout has not passed (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L611)
613
+ * [clears the local connection state and uses a new connection when the connection_state_ttl + max_idle_interval period has passed since last activity (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L645)
614
+ * [still reattaches the channels automatically following a new connection being established (#RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L680)
581
615
  * and subsequently fails to reconnect
582
- * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L529)
616
+ * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L739)
583
617
  * when websocket transport is abruptly disconnected
584
- * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L572)
618
+ * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L782)
585
619
  * hosts used
586
- * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L588)
620
+ * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L798)
587
621
  * after successfully reconnecting and resuming
588
- * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L612)
589
- * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L627)
590
- * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L653)
591
- * [retains the client_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L714)
622
+ * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L822)
623
+ * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L837)
624
+ * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L863)
625
+ * [retains the client_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L924)
592
626
  * when messages were published whilst the client was disconnected
593
- * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L681)
627
+ * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L891)
594
628
  * when failing to resume
595
629
  * because the connection_key is not or no longer valid
596
- * [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L754)
597
- * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L769)
598
- * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L807)
599
- * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L843)
600
- * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L881)
601
- * [resets the client_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L896)
630
+ * [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L964)
631
+ * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L979)
632
+ * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1017)
633
+ * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1053)
634
+ * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L1091)
635
+ * [resets the client_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1106)
602
636
  * as the DISCONNECTED window to resume has passed
603
- * [starts a new connection automatically and does not try and resume](./spec/acceptance/realtime/connection_failures_spec.rb#L933)
637
+ * [starts a new connection automatically and does not try and resume](./spec/acceptance/realtime/connection_failures_spec.rb#L1143)
604
638
  * when an ERROR protocol message is received
605
639
  * whilst connecting
606
640
  * with a token error code in the range 40140 <= code < 40150 (#RTN14b)
607
- * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L960)
641
+ * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1174)
608
642
  * with an error code indicating an error other than a token failure (#RTN14g, #RTN15i)
609
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L976)
643
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1190)
610
644
  * with no error code indicating an error other than a token failure (#RTN14g, #RTN15i)
611
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L989)
645
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1203)
612
646
  * whilst connected
613
647
  * with a token error code in the range 40140 <= code < 40150 (#RTN14b)
614
- * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L960)
648
+ * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1174)
615
649
  * with an error code indicating an error other than a token failure (#RTN14g, #RTN15i)
616
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L976)
650
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1190)
617
651
  * with no error code indicating an error other than a token failure (#RTN14g, #RTN15i)
618
- * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L989)
652
+ * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1203)
619
653
  * whilst resuming
620
654
  * with a token error code in the region 40140 <= code < 40150 (RTN15c5)
621
- * [triggers a re-authentication and then resumes the connection](./spec/acceptance/realtime/connection_failures_spec.rb#L1033)
655
+ * [triggers a re-authentication and then resumes the connection](./spec/acceptance/realtime/connection_failures_spec.rb#L1247)
622
656
  * with any other error (#RTN15c4)
623
- * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1065)
657
+ * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1279)
624
658
  * fallback host feature
625
659
  * with custom realtime websocket host option
626
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1109)
660
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1323)
627
661
  * with custom realtime websocket port option
628
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1127)
662
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1341)
629
663
  * with non-production environment
630
- * [does not use a fallback host by default](./spec/acceptance/realtime/connection_failures_spec.rb#L1146)
664
+ * [does not use a fallback host by default](./spec/acceptance/realtime/connection_failures_spec.rb#L1360)
631
665
  * :fallback_hosts_use_default is true
632
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k7)](./spec/acceptance/realtime/connection_failures_spec.rb#L1164)
666
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k7)](./spec/acceptance/realtime/connection_failures_spec.rb#L1378)
667
+ * [does not use a fallback host if the connection connects on the default host and then later becomes disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L1396)
633
668
  * :fallback_hosts array is provided
634
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1189)
669
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1424)
635
670
  * with production environment
636
671
  * when the Internet is down
637
- * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1225)
672
+ * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1460)
638
673
  * when the Internet is up
639
674
  * and default options
640
- * [uses a fallback host + the original host once on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L1248)
641
- * [uses the primary host when suspended, and then every fallback host and the primary host again on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L1267)
675
+ * [uses a fallback host + the original host once on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L1483)
676
+ * [uses the primary host when suspended, and then every fallback host and the primary host again on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L1502)
677
+ * [uses the correct host name for the WebSocket requests to the fallback hosts](./spec/acceptance/realtime/connection_failures_spec.rb#L1525)
642
678
  * :fallback_hosts array is provided by an empty array
643
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1297)
679
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1555)
644
680
  * :fallback_hosts array is provided
645
- * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1317)
681
+ * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1575)
646
682
 
647
683
  ### Ably::Realtime::Connection
648
684
  _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_
@@ -672,186 +708,186 @@ _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/c
672
708
  * when connected with a valid non-expired token
673
709
  * that then expires following the connection being opened
674
710
  * the server
675
- * [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L213)
711
+ * [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L217)
676
712
  * connection state
677
- * PENDING: *[retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L273)*
713
+ * [retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L277)
678
714
  * and subsequent token is invalid
679
- * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L309)
715
+ * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L312)
680
716
  * for non-renewable tokens
681
717
  * that are expired
682
718
  * opening a new connection
683
- * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L339)
719
+ * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L342)
684
720
  * when connected
685
- * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L355)
721
+ * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L358)
686
722
  * with opaque token string that contain an implicit client_id
687
723
  * string
688
- * [sets the Client#client_id and Auth#client_id once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L375)
724
+ * [sets the Client#client_id and Auth#client_id once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L378)
689
725
  * that is incompatible with the current client client_id
690
- * [fails the connection](./spec/acceptance/realtime/connection_spec.rb#L387)
726
+ * [fails the connection](./spec/acceptance/realtime/connection_spec.rb#L390)
691
727
  * wildcard
692
- * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L401)
728
+ * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L404)
693
729
  * initialization state changes
694
730
  * with implicit #connect
695
- * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L433)
731
+ * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L436)
696
732
  * with explicit #connect
697
- * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L439)
733
+ * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L442)
698
734
  * #connect
699
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L447)
700
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L452)
701
- * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L459)
735
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L450)
736
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L455)
737
+ * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L462)
702
738
  * with invalid auth details
703
- * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L488)
739
+ * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L491)
704
740
  * when already connected
705
- * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L504)
741
+ * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L507)
706
742
  * connection#id
707
- * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L518)
743
+ * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L521)
708
744
  * connection#key
709
- * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L525)
745
+ * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L528)
710
746
  * once connected
711
747
  * connection#id
712
- * [is a string](./spec/acceptance/realtime/connection_spec.rb#L536)
713
- * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L543)
714
- * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L550)
748
+ * [is a string](./spec/acceptance/realtime/connection_spec.rb#L539)
749
+ * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L546)
750
+ * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L553)
715
751
  * connection#key
716
- * [is a string](./spec/acceptance/realtime/connection_spec.rb#L559)
717
- * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L566)
718
- * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L573)
752
+ * [is a string](./spec/acceptance/realtime/connection_spec.rb#L562)
753
+ * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L569)
754
+ * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L576)
719
755
  * following a previous connection being opened and closed
720
- * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L583)
756
+ * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L586)
721
757
  * when closing
722
- * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L600)
758
+ * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L603)
723
759
  * #serial connection serial
724
- * [is set to -1 when a new connection is opened](./spec/acceptance/realtime/connection_spec.rb#L617)
725
- * [is set to 0 when a message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#L640)
726
- * [is set to 1 when the second message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#L647)
760
+ * [is set to -1 when a new connection is opened](./spec/acceptance/realtime/connection_spec.rb#L620)
761
+ * [is set to 0 when a message is received back](./spec/acceptance/realtime/connection_spec.rb#L643)
762
+ * [is set to 1 when the second message is received](./spec/acceptance/realtime/connection_spec.rb#L651)
727
763
  * when a message is sent but the ACK has not yet been received
728
- * [the sent message msgSerial is 0 but the connection serial remains at -1](./spec/acceptance/realtime/connection_spec.rb#L625)
764
+ * [the sent message msgSerial is 0 but the connection serial remains at -1](./spec/acceptance/realtime/connection_spec.rb#L628)
729
765
  * #close
730
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L658)
731
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L665)
766
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L668)
767
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L675)
732
768
  * when already closed
733
- * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L676)
769
+ * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L686)
734
770
  * when connection state is
735
771
  * :initialized
736
- * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L703)
772
+ * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L713)
737
773
  * :connected
738
- * [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#L720)
774
+ * [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#L730)
739
775
  * with an unresponsive connection
740
- * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L747)
776
+ * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L757)
741
777
  * #ping
742
- * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L769)
743
- * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L779)
744
- * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L803)
778
+ * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L779)
779
+ * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L789)
780
+ * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L813)
745
781
  * with incompatible states
746
782
  * when not connected
747
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L816)
783
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L826)
748
784
  * when suspended
749
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L825)
785
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L835)
750
786
  * when failed
751
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L837)
787
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L847)
752
788
  * when closed
753
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L849)
789
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L859)
754
790
  * when it becomes closed
755
- * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L863)
791
+ * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L873)
756
792
  * with a success block that raises an exception
757
- * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L876)
793
+ * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L886)
758
794
  * when ping times out
759
- * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L890)
760
- * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L909)
795
+ * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L900)
796
+ * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L919)
761
797
  * Heartbeats (#RTN23)
762
798
  * heartbeat interval
763
799
  * when reduced artificially
764
- * [is the sum of the max_idle_interval and realtime_request_timeout (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L936)
765
- * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L946)
766
- * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L957)
800
+ * [is the sum of the max_idle_interval and realtime_request_timeout (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L946)
801
+ * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L956)
802
+ * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L967)
767
803
  * transport-level heartbeats are supported in the websocket transport
768
- * [provides the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L972)
769
- * PENDING: *[receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L981)*
804
+ * [provides the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L982)
805
+ * [receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L991)
770
806
  * with websocket heartbeats disabled (undocumented)
771
- * [does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1000)
772
- * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1009)
807
+ * PENDING: *[does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1007)*
808
+ * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1017)
773
809
  * #details
774
- * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1026)
775
- * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1033)
776
- * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1042)
810
+ * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1035)
811
+ * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1042)
812
+ * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1051)
777
813
  * with a different default connection_state_ttl
778
- * [updates the private Connection#connection_state_ttl when received from Ably in ConnectionDetails](./spec/acceptance/realtime/connection_spec.rb#L1063)
814
+ * [updates the private Connection#connection_state_ttl when received from Ably in ConnectionDetails](./spec/acceptance/realtime/connection_spec.rb#L1072)
779
815
  * recovery
780
816
  * #recovery_key
781
- * [is composed of connection key and serial that is kept up to date with each message ACK received](./spec/acceptance/realtime/connection_spec.rb#L1100)
782
- * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1123)
783
- * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1152)
817
+ * [is composed of connection key and serial that is kept up to date with each message ACK received](./spec/acceptance/realtime/connection_spec.rb#L1109)
818
+ * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1137)
819
+ * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1166)
784
820
  * opening a new connection using a recently disconnected connection's #recovery_key
785
- * connection#id and connection#key after recovery
786
- * [remains the same for id and party for key](./spec/acceptance/realtime/connection_spec.rb#L1164)
821
+ * connection#id after recovery
822
+ * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L1178)
787
823
  * when messages have been sent whilst the old connection is disconnected
788
824
  * the new connection
789
- * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L1206)
825
+ * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L1214)
790
826
  * with :recover option
791
827
  * with invalid syntax
792
- * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L1238)
828
+ * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L1246)
793
829
  * with invalid formatted value sent to server
794
- * [sets the #error_reason and moves the connection to FAILED](./spec/acceptance/realtime/connection_spec.rb#L1247)
830
+ * [sets the #error_reason and moves the connection to FAILED](./spec/acceptance/realtime/connection_spec.rb#L1255)
795
831
  * with expired (missing) value sent to server
796
- * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1262)
832
+ * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1270)
797
833
  * with many connections simultaneously
798
- * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1281)
834
+ * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1289)
799
835
  * when a state transition is unsupported
800
- * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1301)
836
+ * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1309)
801
837
  * protocol failure
802
838
  * receiving an invalid ProtocolMessage
803
- * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1317)
839
+ * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1325)
804
840
  * undocumented method
805
841
  * #internet_up?
806
- * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1335)
842
+ * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1343)
807
843
  * internet up URL protocol
808
844
  * when using TLS for the connection
809
- * [uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1346)
845
+ * [uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1354)
810
846
  * when using a non-secured connection
811
- * [uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1356)
847
+ * [uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L1364)
812
848
  * when the Internet is up
813
- * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1387)
814
- * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1394)
849
+ * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1395)
850
+ * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1402)
815
851
  * with a TLS connection
816
- * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1370)
852
+ * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1378)
817
853
  * with a non-TLS connection
818
- * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1380)
854
+ * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1388)
819
855
  * when the Internet is down
820
- * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1409)
821
- * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1416)
856
+ * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1417)
857
+ * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1424)
822
858
  * state change side effects
823
859
  * when connection enters the :disconnected state
824
- * [queues messages to be sent and all channels remain attached](./spec/acceptance/realtime/connection_spec.rb#L1430)
860
+ * [queues messages to be sent and all channels remain attached](./spec/acceptance/realtime/connection_spec.rb#L1438)
825
861
  * when connection enters the :suspended state
826
- * [moves the channels into the suspended state and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1463)
862
+ * [moves the channels into the suspended state and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1471)
827
863
  * when connection enters the :failed state
828
- * [sets all channels to failed and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1494)
864
+ * [sets all channels to failed and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1502)
829
865
  * connection state change
830
- * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1508)
831
- * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1523)
866
+ * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1516)
867
+ * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1531)
832
868
  * ConnectionStateChange object
833
- * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1531)
834
- * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1539)
835
- * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1547)
836
- * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1563)
869
+ * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1539)
870
+ * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1547)
871
+ * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1555)
872
+ * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1571)
837
873
  * on failure
838
- * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1576)
874
+ * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1584)
839
875
  * retry_in
840
- * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1591)
841
- * [is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1598)
842
- * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1608)
843
- * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1618)
876
+ * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1599)
877
+ * [is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1606)
878
+ * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1616)
879
+ * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1626)
844
880
  * whilst CONNECTED
845
881
  * when a CONNECTED message is received (#RTN24)
846
- * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1653)
847
- * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1668)
882
+ * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1661)
883
+ * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1676)
848
884
  * when a CONNECTED message with an error is received
849
- * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1703)
885
+ * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1711)
850
886
  * version params
851
- * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1724)
852
- * [sends the lib version param lib (#RTN2g)](./spec/acceptance/realtime/connection_spec.rb#L1733)
887
+ * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1732)
888
+ * [sends the lib version param lib (#RTN2g)](./spec/acceptance/realtime/connection_spec.rb#L1741)
853
889
  * with variant
854
- * [sends the lib version param lib with the variant (#RTN2g + #RSC7b)](./spec/acceptance/realtime/connection_spec.rb#L1753)
890
+ * [sends the lib version param lib with the variant (#RTN2g + #RSC7b)](./spec/acceptance/realtime/connection_spec.rb#L1761)
855
891
 
856
892
  ### Ably::Realtime::Channel Message
857
893
  _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/message_spec.rb))_
@@ -868,154 +904,154 @@ _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/mess
868
904
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L72)
869
905
  * with supported extra payload content type (#RTL6h, #RSL6a2)
870
906
  * JSON Object (Hash)
871
- * PENDING: *[is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L91)*
907
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L93)
872
908
  * JSON Array
873
- * PENDING: *[is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L100)*
909
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L102)
874
910
  * nil
875
- * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L107)
911
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L108)
876
912
  * with unsupported data payload content type
877
913
  * Integer
878
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L118)
914
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L119)
879
915
  * Float
880
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L127)
916
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L128)
881
917
  * Boolean
882
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L136)
918
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L137)
883
919
  * False
884
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L145)
920
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L146)
885
921
  * with ASCII_8BIT message name
886
- * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L154)
922
+ * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L155)
887
923
  * when the message publisher has a client_id
888
- * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L170)
924
+ * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L171)
889
925
  * #connection_id attribute
890
926
  * over realtime
891
- * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L183)
927
+ * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L184)
892
928
  * when retrieved over REST
893
- * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L195)
929
+ * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L196)
894
930
  * local echo when published
895
- * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L207)
931
+ * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L208)
896
932
  * with :echo_messages option set to false
897
- * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L227)
898
- * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L246)
899
- * [will echo messages with a valid connection_id to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L259)
933
+ * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L228)
934
+ * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L247)
935
+ * [will echo messages with a valid connection_id to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L260)
900
936
  * publishing lots of messages across two connections
901
- * [sends and receives the messages on both opened connections and calls the success callbacks for each message published](./spec/acceptance/realtime/message_spec.rb#L285)
937
+ * [sends and receives the messages on both opened connections and calls the success callbacks for each message published](./spec/acceptance/realtime/message_spec.rb#L286)
902
938
  * without suitable publishing permissions
903
- * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L330)
939
+ * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L331)
904
940
  * server incorrectly resends a message that was already received by the client library
905
- * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L349)
941
+ * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L350)
906
942
  * encoding and decoding encrypted messages
907
943
  * with AES-128-CBC using crypto-data-128.json fixtures (#RTL7d)
908
944
  * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
909
945
  * behaves like an Ably encrypter and decrypter
910
946
  * with #publish and #subscribe
911
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
912
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
947
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
948
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
913
949
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
914
950
  * behaves like an Ably encrypter and decrypter
915
951
  * with #publish and #subscribe
916
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
917
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
952
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
953
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
918
954
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
919
955
  * behaves like an Ably encrypter and decrypter
920
956
  * with #publish and #subscribe
921
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
922
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
957
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
958
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
923
959
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
924
960
  * behaves like an Ably encrypter and decrypter
925
961
  * with #publish and #subscribe
926
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
927
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
962
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
963
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
928
964
  * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d)
929
965
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
930
966
  * behaves like an Ably encrypter and decrypter
931
967
  * with #publish and #subscribe
932
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
933
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
968
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
969
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
934
970
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
935
971
  * behaves like an Ably encrypter and decrypter
936
972
  * with #publish and #subscribe
937
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
938
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
973
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
974
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
939
975
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
940
976
  * behaves like an Ably encrypter and decrypter
941
977
  * with #publish and #subscribe
942
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
943
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
978
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
979
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
944
980
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
945
981
  * behaves like an Ably encrypter and decrypter
946
982
  * with #publish and #subscribe
947
- * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414)
948
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432)
983
+ * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
984
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
949
985
  * with multiple sends from one client to another
950
- * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L471)
951
- * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L488)
986
+ * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L472)
987
+ * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L489)
952
988
  * subscribing with a different transport protocol
953
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L522)
954
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L522)
955
- * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L522)
989
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523)
990
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523)
991
+ * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523)
956
992
  * publishing on an unencrypted channel and subscribing on an encrypted channel with another client
957
- * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L543)
993
+ * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L544)
958
994
  * publishing on an encrypted channel and subscribing on an unencrypted channel with another client
959
- * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L561)
960
- * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L572)
995
+ * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L562)
996
+ * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L573)
961
997
  * publishing on an encrypted channel and subscribing with a different algorithm on another client
962
- * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L592)
963
- * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L601)
998
+ * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L593)
999
+ * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L602)
964
1000
  * publishing on an encrypted channel and subscribing with a different key on another client
965
- * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L621)
966
- * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L632)
1001
+ * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L622)
1002
+ * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L633)
967
1003
  * when message is published, the connection disconnects before the ACK is received, and the connection is resumed
968
- * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L651)
1004
+ * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L652)
969
1005
  * when message is published, the connection disconnects before the ACK is received
970
1006
  * the connection is not resumed
971
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L694)
1007
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L695)
972
1008
  * the connection becomes suspended
973
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L720)
1009
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L721)
974
1010
  * the connection becomes failed
975
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L747)
1011
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L748)
976
1012
  * message encoding interoperability
977
1013
  * over a JSON transport
978
1014
  * when decoding string
979
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788)
1015
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
980
1016
  * when encoding string
981
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806)
1017
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
982
1018
  * when decoding string
983
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788)
1019
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
984
1020
  * when encoding string
985
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806)
1021
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
986
1022
  * when decoding jsonObject
987
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788)
1023
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
988
1024
  * when encoding jsonObject
989
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806)
1025
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
990
1026
  * when decoding jsonArray
991
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788)
1027
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
992
1028
  * when encoding jsonArray
993
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806)
1029
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
994
1030
  * when decoding binary
995
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788)
1031
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
996
1032
  * when encoding binary
997
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806)
1033
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
998
1034
  * over a MsgPack transport
999
1035
  * when publishing a string using JSON protocol
1000
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840)
1036
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1001
1037
  * when retrieving a string using JSON protocol
1002
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868)
1038
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1003
1039
  * when publishing a string using JSON protocol
1004
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840)
1040
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1005
1041
  * when retrieving a string using JSON protocol
1006
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868)
1042
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1007
1043
  * when publishing a jsonObject using JSON protocol
1008
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840)
1044
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1009
1045
  * when retrieving a jsonObject using JSON protocol
1010
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868)
1046
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1011
1047
  * when publishing a jsonArray using JSON protocol
1012
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840)
1048
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1013
1049
  * when retrieving a jsonArray using JSON protocol
1014
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868)
1050
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1015
1051
  * when publishing a binary using JSON protocol
1016
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840)
1052
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1017
1053
  * when retrieving a binary using JSON protocol
1018
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868)
1054
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1019
1055
 
1020
1056
  ### Ably::Realtime::Presence history
1021
1057
  _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_
@@ -1024,9 +1060,9 @@ _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/real
1024
1060
  * [ensures REST presence history message IDs match ProtocolMessage wrapped message and connection IDs via Realtime](./spec/acceptance/realtime/presence_history_spec.rb#L42)
1025
1061
  * with option until_attach: true
1026
1062
  * [retrieves all presence messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L61)
1027
- * [fails with an exception unless state is attached](./spec/acceptance/realtime/presence_history_spec.rb#L97)
1063
+ * [fails with an exception unless state is attached](./spec/acceptance/realtime/presence_history_spec.rb#L106)
1028
1064
  * and two pages of messages
1029
- * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L78)
1065
+ * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L81)
1030
1066
 
1031
1067
  ### Ably::Realtime::Presence
1032
1068
  _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_
@@ -1035,35 +1071,35 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1035
1071
  * [maintains state as other clients enter and leave the channel (#RTP2e)](./spec/acceptance/realtime/presence_spec.rb#L479)
1036
1072
  * #sync_complete? and SYNC flags (#RTP1)
1037
1073
  * when attaching to a channel without any members present
1038
- * [sync_complete? is true, there is no presence flag, and the presence channel is considered synced immediately (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L701)
1074
+ * [sync_complete? is true, there is no presence flag, and the presence channel is considered synced immediately (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L708)
1039
1075
  * when attaching to a channel with members present
1040
- * [sync_complete? is false, there is a presence flag, and the presence channel is subsequently synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L722)
1076
+ * [sync_complete? is false, there is a presence flag, and the presence channel is subsequently synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L729)
1041
1077
  * 101 existing (present) members on a channel (2 SYNC pages)
1042
1078
  * requiring at least 2 SYNC ProtocolMessages
1043
1079
  * when a client attaches to the presence channel
1044
- * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L771)
1080
+ * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L781)
1045
1081
  * and a member enters before the SYNC operation is complete
1046
- * [emits a :enter immediately and the member is :present once the sync is complete (#RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L787)
1082
+ * [emits a :enter immediately and the member is :present once the sync is complete (#RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L797)
1047
1083
  * and a member leaves before the SYNC operation is complete
1048
- * [emits :leave immediately as the member leaves and cleans up the ABSENT member after (#RTP2f, #RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L824)
1049
- * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L872)
1050
- * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get (#RTP2f)](./spec/acceptance/realtime/presence_spec.rb#L917)
1084
+ * [emits :leave immediately as the member leaves and cleans up the ABSENT member after (#RTP2f, #RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L834)
1085
+ * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L882)
1086
+ * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get (#RTP2f)](./spec/acceptance/realtime/presence_spec.rb#L927)
1051
1087
  * #get
1052
1088
  * by default
1053
- * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L967)
1089
+ * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L977)
1054
1090
  * with :wait_for_sync option set to false (#RTP11c1)
1055
- * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L986)
1091
+ * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L998)
1056
1092
  * state
1057
1093
  * once opened
1058
- * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1012)
1094
+ * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1025)
1059
1095
  * #enter
1060
1096
  * data attribute
1061
1097
  * when provided as argument option to #enter
1062
- * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1037)
1098
+ * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1050)
1063
1099
  * message #connection_id
1064
- * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1061)
1100
+ * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1074)
1065
1101
  * without necessary capabilities to join presence
1066
- * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1080)
1102
+ * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1093)
1067
1103
  * it should behave like a public presence method
1068
1104
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1069
1105
  * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
@@ -1104,11 +1140,11 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1104
1140
  * if connection fails before success
1105
1141
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1106
1142
  * #update
1107
- * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L1092)
1108
- * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1117)
1109
- * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1127)
1143
+ * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L1105)
1144
+ * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1130)
1145
+ * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1140)
1110
1146
  * when ENTERED
1111
- * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1102)
1147
+ * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1115)
1112
1148
  * it should behave like a public presence method
1113
1149
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1114
1150
  * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
@@ -1149,16 +1185,16 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1149
1185
  * if connection fails before success
1150
1186
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1151
1187
  * #leave
1152
- * [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L1201)
1188
+ * [succeeds and does not emit an event (#RTP10d)](./spec/acceptance/realtime/presence_spec.rb#L1224)
1153
1189
  * :data option
1154
1190
  * when set to a string
1155
- * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1146)
1191
+ * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1159)
1156
1192
  * when set to nil
1157
- * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1159)
1193
+ * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1172)
1158
1194
  * when not passed as an argument (i.e. nil)
1159
- * [emits the previous value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1172)
1195
+ * [emits the previous value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1185)
1160
1196
  * and sync is complete
1161
- * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1185)
1197
+ * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1198)
1162
1198
  * it should behave like a public presence method
1163
1199
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293)
1164
1200
  * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300)
@@ -1185,17 +1221,17 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1185
1221
  * if connection fails before success
1186
1222
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1187
1223
  * :left event
1188
- * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L1210)
1189
- * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1221)
1224
+ * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L1240)
1225
+ * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1251)
1190
1226
  * entering/updating/leaving presence state on behalf of another client_id
1191
1227
  * #enter_client
1192
1228
  * multiple times on the same channel with different client_ids
1193
- * [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#L1244)
1194
- * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1258)
1229
+ * [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#L1274)
1230
+ * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1288)
1195
1231
  * message #connection_id
1196
- * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1277)
1232
+ * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1307)
1197
1233
  * without necessary capabilities to enter on behalf of another client
1198
- * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1297)
1234
+ * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1327)
1199
1235
  * it should behave like a public presence method
1200
1236
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1201
1237
  * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
@@ -1267,9 +1303,9 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1267
1303
  * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L470)
1268
1304
  * #update_client
1269
1305
  * multiple times on the same channel with different client_ids
1270
- * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L1311)
1271
- * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1335)
1272
- * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1347)
1306
+ * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L1341)
1307
+ * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1365)
1308
+ * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1377)
1273
1309
  * it should behave like a public presence method
1274
1310
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1275
1311
  * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
@@ -1342,14 +1378,14 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1342
1378
  * #leave_client
1343
1379
  * leaves a channel
1344
1380
  * multiple times on the same channel with different client_ids
1345
- * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L1377)
1346
- * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1401)
1381
+ * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L1407)
1382
+ * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1431)
1347
1383
  * with a new value in :data option
1348
- * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1425)
1384
+ * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1455)
1349
1385
  * with a nil value in :data option
1350
- * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1438)
1386
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1468)
1351
1387
  * with no :data option
1352
- * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1451)
1388
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1481)
1353
1389
  * it should behave like a public presence method
1354
1390
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63)
1355
1391
  * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81)
@@ -1420,103 +1456,103 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1420
1456
  * and an empty client_id
1421
1457
  * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L470)
1422
1458
  * #get
1423
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L1470)
1424
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1475)
1425
- * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1482)
1426
- * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1490)
1427
- * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1524)
1428
- * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1539)
1429
- * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1623)
1430
- * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1638)
1431
- * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1660)
1432
- * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1684)
1433
- * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1693)
1459
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L1500)
1460
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1505)
1461
+ * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1512)
1462
+ * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1520)
1463
+ * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1555)
1464
+ * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1570)
1465
+ * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1654)
1466
+ * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1671)
1467
+ * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1693)
1468
+ * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1717)
1469
+ * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1729)
1434
1470
  * when the channel is SUSPENDED
1435
1471
  * with wait_for_sync: true
1436
- * [returns the current PresenceMap and does not wait for the channel to change to the ATTACHED state (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1500)
1472
+ * [results in an error with @code@ @91005@ and a @message@ stating that the presence state is out of sync (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1530)
1437
1473
  * with wait_for_sync: false
1438
- * [returns the current PresenceMap and does not wait for the channel to change to the ATTACHED state (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1512)
1474
+ * [returns the current PresenceMap and does not wait for the channel to change to the ATTACHED state (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1543)
1439
1475
  * during a sync
1440
1476
  * when :wait_for_sync is true
1441
- * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1576)
1442
- * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1599)
1477
+ * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1607)
1478
+ * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1630)
1443
1479
  * when a member enters and then leaves
1444
- * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1703)
1480
+ * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1742)
1445
1481
  * when a member enters and the presence map is updated
1446
- * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1716)
1482
+ * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1757)
1447
1483
  * with lots of members on different clients
1448
- * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1734)
1484
+ * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1778)
1449
1485
  * #subscribe
1450
- * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1809)
1486
+ * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1853)
1451
1487
  * with no arguments
1452
- * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1770)
1488
+ * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1814)
1453
1489
  * with event name
1454
- * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1790)
1490
+ * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1834)
1455
1491
  * with a callback that raises an exception
1456
- * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1822)
1492
+ * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1866)
1457
1493
  * #unsubscribe
1458
1494
  * with no arguments
1459
- * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1843)
1495
+ * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1887)
1460
1496
  * with event name
1461
- * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1861)
1497
+ * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1905)
1462
1498
  * REST #get
1463
- * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1880)
1464
- * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1893)
1499
+ * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1924)
1500
+ * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1940)
1465
1501
  * client_id with ASCII_8BIT
1466
1502
  * in connection set up
1467
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1910)
1503
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1960)
1468
1504
  * in channel options
1469
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1923)
1505
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1973)
1470
1506
  * encoding and decoding of presence message data
1471
- * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L1949)
1507
+ * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L1999)
1472
1508
  * #subscribe
1473
- * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L1968)
1474
- * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L1980)
1475
- * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L1994)
1509
+ * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L2018)
1510
+ * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L2030)
1511
+ * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L2044)
1476
1512
  * #get
1477
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2010)
1513
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2060)
1478
1514
  * REST #get
1479
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2023)
1515
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2074)
1480
1516
  * when cipher settings do not match publisher
1481
- * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2038)
1482
- * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2051)
1517
+ * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2090)
1518
+ * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2103)
1483
1519
  * leaving
1484
- * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2067)
1485
- * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2077)
1520
+ * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2119)
1521
+ * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2129)
1486
1522
  * connection failure mid-way through a large member sync
1487
- * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2096)
1523
+ * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2148)
1488
1524
  * server-initiated sync
1489
1525
  * with multiple SYNC pages
1490
- * [is initiated with a SYNC message and completed with a later SYNC message with no cursor value part of the channelSerial (#RTP18a, #RTP18b) ](./spec/acceptance/realtime/presence_spec.rb#L2134)
1526
+ * [is initiated with a SYNC message and completed with a later SYNC message with no cursor value part of the channelSerial (#RTP18a, #RTP18b) ](./spec/acceptance/realtime/presence_spec.rb#L2186)
1491
1527
  * with a single SYNC page
1492
- * [is initiated and completed with a single SYNC message (and no channelSerial) (#RTP18a, #RTP18c) ](./spec/acceptance/realtime/presence_spec.rb#L2185)
1528
+ * [is initiated and completed with a single SYNC message (and no channelSerial) (#RTP18a, #RTP18c) ](./spec/acceptance/realtime/presence_spec.rb#L2237)
1493
1529
  * when members exist in the PresenceMap before a SYNC completes
1494
- * [removes the members that are no longer present (#RTP19)](./spec/acceptance/realtime/presence_spec.rb#L2233)
1530
+ * [removes the members that are no longer present (#RTP19)](./spec/acceptance/realtime/presence_spec.rb#L2285)
1495
1531
  * when the client does not have presence subscribe privileges but is present on the channel
1496
- * PENDING: *[receives presence updates for all presence events generated by the current connection and the presence map is kept up to date (#RTP17a)](./spec/acceptance/realtime/presence_spec.rb#L2291)*
1532
+ * PENDING: *[receives presence updates for all presence events generated by the current connection and the presence map is kept up to date (#RTP17a)](./spec/acceptance/realtime/presence_spec.rb#L2343)*
1497
1533
  * local PresenceMap for presence members entered by this client
1498
- * [maintains a copy of the member map for any member that shares this connection's connection ID (#RTP17)](./spec/acceptance/realtime/presence_spec.rb#L2328)
1534
+ * [maintains a copy of the member map for any member that shares this connection's connection ID (#RTP17)](./spec/acceptance/realtime/presence_spec.rb#L2393)
1499
1535
  * when a channel becomes attached again
1500
1536
  * and the resume flag is true
1501
1537
  * and the presence flag is false
1502
- * [does not send any presence events as the PresenceMap is in sync (#RTP5c1)](./spec/acceptance/realtime/presence_spec.rb#L2368)
1538
+ * [does not send any presence events as the PresenceMap is in sync (#RTP5c1)](./spec/acceptance/realtime/presence_spec.rb#L2439)
1503
1539
  * and the presence flag is true
1504
1540
  * and following the SYNC all local MemberMap members are present in the PresenceMap
1505
- * [does nothing as MemberMap is in sync (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2395)
1541
+ * [does nothing as MemberMap is in sync (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2469)
1506
1542
  * and following the SYNC a local MemberMap member is not present in the PresenceMap
1507
- * [re-enters the missing members automatically (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2431)
1543
+ * [re-enters the missing members automatically (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2508)
1508
1544
  * and the resume flag is false
1509
1545
  * and the presence flag is false
1510
- * [immediately resends all local presence members (#RTP5c2, #RTP19a)](./spec/acceptance/realtime/presence_spec.rb#L2511)
1546
+ * [immediately resends all local presence members (#RTP5c2, #RTP19a)](./spec/acceptance/realtime/presence_spec.rb#L2591)
1511
1547
  * when re-entering a client automatically, if the re-enter fails for any reason
1512
- * [should emit an ErrorInfo with error code 91004 (#RTP5c3)](./spec/acceptance/realtime/presence_spec.rb#L2559)
1548
+ * [should emit an ErrorInfo with error code 91004 (#RTP5c3)](./spec/acceptance/realtime/presence_spec.rb#L2642)
1513
1549
  * channel state side effects
1514
1550
  * channel transitions to the FAILED state
1515
- * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2616)
1551
+ * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2699)
1516
1552
  * channel transitions to the DETACHED state
1517
- * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2640)
1553
+ * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2726)
1518
1554
  * channel transitions to the SUSPENDED state
1519
- * [maintains the PresenceMap and only publishes presence event changes since the last attached state (#RTP5f)](./spec/acceptance/realtime/presence_spec.rb#L2673)
1555
+ * [maintains the PresenceMap and only publishes presence event changes since the last attached state (#RTP5f)](./spec/acceptance/realtime/presence_spec.rb#L2762)
1520
1556
 
1521
1557
  ### Ably::Realtime::Client#stats
1522
1558
  _(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_
@@ -1600,7 +1636,7 @@ _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
1600
1636
  * [sets Auth#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L451)
1601
1637
  * [sets Client#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L455)
1602
1638
  * that returns a TokenDetails JSON object
1603
- * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L489)
1639
+ * [calls the lambda when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L489)
1604
1640
  * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L494)
1605
1641
  * when authorized
1606
1642
  * [sets Auth#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L506)
@@ -1640,17 +1676,17 @@ _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
1640
1676
  * with previous authorisation
1641
1677
  * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L743)
1642
1678
  * [issues a new token every time #authorize is called](./spec/acceptance/rest/auth_spec.rb#L749)
1643
- * with a Proc for the :auth_callback option
1644
- * [calls the Proc](./spec/acceptance/rest/auth_spec.rb#L776)
1679
+ * with a lambda for the :auth_callback option
1680
+ * [calls the lambda](./spec/acceptance/rest/auth_spec.rb#L776)
1645
1681
  * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L780)
1646
1682
  * for every subsequent #request_token
1647
- * without a :auth_callback Proc
1683
+ * without a :auth_callback lambda
1648
1684
  * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L786)
1649
1685
  * with a provided block
1650
- * [does not call the originally provided Proc and calls the new #request_token :auth_callback Proc](./spec/acceptance/rest/auth_spec.rb#L793)
1686
+ * [does not call the originally provided lambda and calls the new #request_token :auth_callback lambda](./spec/acceptance/rest/auth_spec.rb#L793)
1651
1687
  * with an explicit token string that expires
1652
- * and a Proc for the :auth_callback option to provide a means to renew the token
1653
- * [calls the Proc once the token has expired and the new token is used](./spec/acceptance/rest/auth_spec.rb#L820)
1688
+ * and a lambda for the :auth_callback option to provide a means to renew the token
1689
+ * [calls the lambda once the token has expired and the new token is used](./spec/acceptance/rest/auth_spec.rb#L820)
1654
1690
  * with an explicit ClientOptions client_id
1655
1691
  * and an incompatible client_id in a TokenDetails object passed to the auth callback
1656
1692
  * [rejects a TokenDetails object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L838)
@@ -1662,82 +1698,90 @@ _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
1662
1698
  * [returns a TokenRequest object](./spec/acceptance/rest/auth_spec.rb#L869)
1663
1699
  * [returns a TokenRequest that can be passed to a client that can use it for authentication without an API key](./spec/acceptance/rest/auth_spec.rb#L873)
1664
1700
  * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L880)
1665
- * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L884)
1666
- * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L897)
1701
+ * [specifies no TTL (#RSA5)](./spec/acceptance/rest/auth_spec.rb#L884)
1702
+ * [specifies no capability (#RSA6)](./spec/acceptance/rest/auth_spec.rb#L898)
1667
1703
  * with a :ttl option below the Token expiry buffer that ensures tokens are renewed 15s before they expire as they are considered expired
1668
- * [uses the Token expiry buffer default + 10s to allow for a token request in flight](./spec/acceptance/rest/auth_spec.rb#L891)
1704
+ * [uses the Token expiry buffer default + 10s to allow for a token request in flight](./spec/acceptance/rest/auth_spec.rb#L892)
1669
1705
  * the nonce
1670
- * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L902)
1671
- * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L907)
1706
+ * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L903)
1707
+ * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L908)
1672
1708
  * with token param :ttl
1673
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L918)
1709
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919)
1674
1710
  * with token param :nonce
1675
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L918)
1711
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919)
1676
1712
  * with token param :client_id
1677
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L918)
1713
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919)
1678
1714
  * when specifying capability
1679
- * [overrides the default](./spec/acceptance/rest/auth_spec.rb#L929)
1680
- * [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L933)
1715
+ * [overrides the default](./spec/acceptance/rest/auth_spec.rb#L930)
1716
+ * [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L934)
1681
1717
  * with additional invalid attributes
1682
- * [are ignored](./spec/acceptance/rest/auth_spec.rb#L943)
1718
+ * [are ignored](./spec/acceptance/rest/auth_spec.rb#L944)
1683
1719
  * when required fields are missing
1684
- * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L954)
1685
- * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L958)
1720
+ * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L955)
1721
+ * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L959)
1686
1722
  * timestamp attribute
1687
- * [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L985)
1723
+ * [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L986)
1688
1724
  * with :query_time auth_option
1689
- * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L970)
1725
+ * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L971)
1690
1726
  * with :timestamp option
1691
- * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L980)
1727
+ * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L981)
1692
1728
  * signing
1693
- * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L1009)
1729
+ * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L1010)
1694
1730
  * lexicographic ordering of channels and operations
1695
- * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/rest/auth_spec.rb#L1036)
1696
- * [is valid when used for authentication](./spec/acceptance/rest/auth_spec.rb#L1042)
1731
+ * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/rest/auth_spec.rb#L1037)
1732
+ * [is valid when used for authentication](./spec/acceptance/rest/auth_spec.rb#L1043)
1697
1733
  * using token authentication
1698
1734
  * with :token option
1699
- * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L1069)
1700
- * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L1073)
1701
- * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L1081)
1702
- * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L1089)
1735
+ * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L1070)
1736
+ * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L1074)
1737
+ * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L1082)
1738
+ * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L1090)
1703
1739
  * and the token expires
1704
- * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/rest/auth_spec.rb#L1123)
1740
+ * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/rest/auth_spec.rb#L1124)
1705
1741
  * when implicit as a result of using :client_id
1706
1742
  * and requests to the Ably server are mocked
1707
- * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L1153)
1743
+ * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L1154)
1708
1744
  * a token is created
1709
- * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L1162)
1710
- * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L1166)
1711
- * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L1170)
1712
- * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1181)
1745
+ * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L1163)
1746
+ * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L1167)
1747
+ * [with capability and TTL defaults (#TK2a, #TK2b)](./spec/acceptance/rest/auth_spec.rb#L1171)
1748
+ * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1182)
1713
1749
  * when token expires
1714
- * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1210)
1715
- * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1220)
1750
+ * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1211)
1751
+ * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1221)
1716
1752
  * when :client_id is provided in a token
1717
- * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1244)
1753
+ * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1245)
1718
1754
  * #client_id_validated?
1719
1755
  * when using basic auth
1720
- * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1256)
1756
+ * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1257)
1721
1757
  * when using a token auth string for a token with a client_id
1722
- * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1264)
1758
+ * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1265)
1723
1759
  * when using a token
1724
1760
  * with a client_id
1725
- * [is true](./spec/acceptance/rest/auth_spec.rb#L1273)
1761
+ * [is true](./spec/acceptance/rest/auth_spec.rb#L1274)
1726
1762
  * with no client_id (anonymous)
1727
- * [is true](./spec/acceptance/rest/auth_spec.rb#L1281)
1763
+ * [is true](./spec/acceptance/rest/auth_spec.rb#L1282)
1728
1764
  * with a wildcard client_id (anonymous)
1729
- * [is false](./spec/acceptance/rest/auth_spec.rb#L1289)
1765
+ * [is false](./spec/acceptance/rest/auth_spec.rb#L1290)
1730
1766
  * when using a token request with a client_id
1731
- * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1298)
1767
+ * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1299)
1732
1768
  * after authentication
1733
- * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1305)
1769
+ * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1306)
1734
1770
  * when using a :key and basic auth
1735
- * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1313)
1736
- * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1317)
1737
- * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1321)
1771
+ * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1314)
1772
+ * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1318)
1773
+ * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1322)
1738
1774
  * deprecated #authorise
1739
- * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1357)
1740
- * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1362)
1775
+ * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1331)
1776
+ * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1336)
1777
+ * when using JWT
1778
+ * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/rest/auth_spec.rb#L1348)
1779
+ * when the JWT embeds an Ably token
1780
+ * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1355)
1781
+ * and the requested token is encrypted
1782
+ * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1362)
1783
+ * when the token requested is returned with application/jwt content type
1784
+ * [authenticates correctly and pulls stats](./spec/acceptance/rest/auth_spec.rb#L1373)
1741
1785
 
1742
1786
  ### Ably::Rest
1743
1787
  _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
@@ -1822,34 +1866,37 @@ _(see [spec/acceptance/rest/channel_spec.rb](./spec/acceptance/rest/channel_spec
1822
1866
  * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L244)
1823
1867
  * with an empty client_id in the message
1824
1868
  * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L250)
1869
+ * with a non ASCII channel name
1870
+ * stubbed
1871
+ * [correctly encodes the channel name](./spec/acceptance/rest/channel_spec.rb#L272)
1825
1872
  * #history
1826
- * [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L278)
1827
- * [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L282)
1828
- * [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L310)
1873
+ * [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L297)
1874
+ * [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L301)
1875
+ * [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L329)
1829
1876
  * message timestamps
1830
- * [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L295)
1877
+ * [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L314)
1831
1878
  * message IDs
1832
- * [is unique](./spec/acceptance/rest/channel_spec.rb#L303)
1879
+ * [is unique](./spec/acceptance/rest/channel_spec.rb#L322)
1833
1880
  * direction
1834
- * [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L331)
1835
- * [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L337)
1881
+ * [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L356)
1882
+ * [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L362)
1836
1883
  * limit
1837
- * [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L349)
1884
+ * [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L374)
1838
1885
  * #history option
1839
1886
  * :start
1840
1887
  * with milliseconds since epoch value
1841
- * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L389)
1888
+ * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L414)
1842
1889
  * with a Time object value
1843
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L399)
1890
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L424)
1844
1891
  * :end
1845
1892
  * with milliseconds since epoch value
1846
- * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L389)
1893
+ * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L414)
1847
1894
  * with a Time object value
1848
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L399)
1895
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L424)
1849
1896
  * when argument start is after end
1850
- * [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L409)
1897
+ * [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L434)
1851
1898
  * #presence
1852
- * [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L419)
1899
+ * [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L444)
1853
1900
 
1854
1901
  ### Ably::Rest::Channels
1855
1902
  _(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_spec.rb))_
@@ -1887,12 +1934,12 @@ _(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.r
1887
1934
  * [raises an ArgumentError](./spec/acceptance/rest/client_spec.rb#L57)
1888
1935
  * with an invalid wildcard "*" :client_id
1889
1936
  * [raises an exception](./spec/acceptance/rest/client_spec.rb#L63)
1890
- * with an :auth_callback Proc
1891
- * [calls the auth Proc to get a new token](./spec/acceptance/rest/client_spec.rb#L71)
1937
+ * with an :auth_callback lambda
1938
+ * [calls the auth lambda to get a new token](./spec/acceptance/rest/client_spec.rb#L71)
1892
1939
  * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L76)
1893
1940
  * with :default_token_params
1894
1941
  * [overides the default token params (#TO3j11)](./spec/acceptance/rest/client_spec.rb#L90)
1895
- * with an :auth_callback Proc (clientId provided in library options instead of as a token_request param)
1942
+ * with an :auth_callback lambda (clientId provided in library options instead of as a token_request param)
1896
1943
  * [correctly sets the clientId on the token](./spec/acceptance/rest/client_spec.rb#L100)
1897
1944
  * with an auth URL
1898
1945
  * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L110)
@@ -1917,17 +1964,17 @@ _(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.r
1917
1964
  * defaults
1918
1965
  * for default host
1919
1966
  * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L244)
1920
- * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L248)
1967
+ * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L248)
1921
1968
  * for the fallback hosts
1922
1969
  * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L254)
1923
- * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L258)
1970
+ * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L258)
1924
1971
  * with custom http_open_timeout and http_request_timeout options
1925
1972
  * for default host
1926
1973
  * [is configured to use custom open timeout](./spec/acceptance/rest/client_spec.rb#L270)
1927
1974
  * [is configured to use custom request timeout](./spec/acceptance/rest/client_spec.rb#L274)
1928
1975
  * for the fallback hosts
1929
1976
  * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L280)
1930
- * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L284)
1977
+ * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L284)
1931
1978
  * fallback hosts
1932
1979
  * configured
1933
1980
  * [should make connection attempts to A.ably-realtime.com, B.ably-realtime.com, C.ably-realtime.com, D.ably-realtime.com, E.ably-realtime.com (#RSC15a)](./spec/acceptance/rest/client_spec.rb#L298)
@@ -1936,7 +1983,7 @@ _(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.r
1936
1983
  * when environment is production
1937
1984
  * and connection times out
1938
1985
  * [tries fallback hosts 3 times (#RSC15b, #RSC15b)](./spec/acceptance/rest/client_spec.rb#L354)
1939
- * and the total request time exeeds 10 seconds
1986
+ * and the total request time exeeds 15 seconds
1940
1987
  * [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L369)
1941
1988
  * and connection fails
1942
1989
  * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L385)
@@ -1953,55 +2000,86 @@ _(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.r
1953
2000
  * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L530)
1954
2001
  * using a local web-server
1955
2002
  * and timing out the primary host
1956
- * with request timeout less than max_retry_duration
1957
- * [tries one of the fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L586)
1958
- * with request timeout less than max_retry_duration
1959
- * [tries one of the fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L608)
2003
+ * POST with request timeout less than max_retry_duration
2004
+ * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L594)
2005
+ * GET with request timeout less than max_retry_duration
2006
+ * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L617)
2007
+ * POST with request timeout more than max_retry_duration
2008
+ * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L640)
2009
+ * GET with request timeout more than max_retry_duration
2010
+ * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L662)
1960
2011
  * and failing the primary host
1961
- * [tries one of the fallback hosts](./spec/acceptance/rest/client_spec.rb#L652)
2012
+ * [tries one of the fallback hosts](./spec/acceptance/rest/client_spec.rb#L707)
1962
2013
  * when environment is not production and server returns a 50x error
1963
2014
  * with custom fallback hosts provided (#RSC15b, #TO3k6)
1964
- * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L702)
2015
+ * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L757)
1965
2016
  * with an empty array of fallback hosts provided (#RSC15b, #TO3k6)
1966
- * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L715)
2017
+ * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L770)
1967
2018
  * with fallback_hosts_use_default: true (#RSC15b, #TO3k7)
1968
- * [attempts the default fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L740)
2019
+ * [attempts the default fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L795)
1969
2020
  * with a custom host
1970
2021
  * that does not exist
1971
- * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L756)
2022
+ * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L811)
1972
2023
  * fallback hosts
1973
- * [are never used](./spec/acceptance/rest/client_spec.rb#L777)
2024
+ * [are never used](./spec/acceptance/rest/client_spec.rb#L832)
1974
2025
  * that times out
1975
- * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L792)
2026
+ * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L847)
1976
2027
  * fallback hosts
1977
- * [are never used](./spec/acceptance/rest/client_spec.rb#L805)
2028
+ * [are never used](./spec/acceptance/rest/client_spec.rb#L860)
1978
2029
  * HTTP configuration options
1979
- * [is frozen](./spec/acceptance/rest/client_spec.rb#L862)
2030
+ * [is frozen](./spec/acceptance/rest/client_spec.rb#L917)
1980
2031
  * defaults
1981
- * [#http_open_timeout is 4s](./spec/acceptance/rest/client_spec.rb#L817)
1982
- * [#http_request_timeout is 15s](./spec/acceptance/rest/client_spec.rb#L821)
1983
- * [#http_max_retry_count is 3](./spec/acceptance/rest/client_spec.rb#L825)
1984
- * [#http_max_retry_duration is 10s](./spec/acceptance/rest/client_spec.rb#L829)
2032
+ * [#http_open_timeout is 4s](./spec/acceptance/rest/client_spec.rb#L872)
2033
+ * [#http_request_timeout is 10s](./spec/acceptance/rest/client_spec.rb#L876)
2034
+ * [#http_max_retry_count is 3](./spec/acceptance/rest/client_spec.rb#L880)
2035
+ * [#http_max_retry_duration is 15s](./spec/acceptance/rest/client_spec.rb#L884)
1985
2036
  * configured
1986
- * [#http_open_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L845)
1987
- * [#http_request_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L849)
1988
- * [#http_max_retry_count uses provided value](./spec/acceptance/rest/client_spec.rb#L853)
1989
- * [#http_max_retry_duration uses provided value](./spec/acceptance/rest/client_spec.rb#L857)
2037
+ * [#http_open_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L900)
2038
+ * [#http_request_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L904)
2039
+ * [#http_max_retry_count uses provided value](./spec/acceptance/rest/client_spec.rb#L908)
2040
+ * [#http_max_retry_duration uses provided value](./spec/acceptance/rest/client_spec.rb#L912)
1990
2041
  * #auth
1991
- * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L873)
1992
- * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L877)
2042
+ * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L928)
2043
+ * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L932)
1993
2044
  * version headers
1994
2045
  * with variant none
1995
- * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L911)
2046
+ * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L966)
1996
2047
  * with variant foo
1997
- * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L911)
2048
+ * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L966)
1998
2049
  * #request (#RSC19*)
1999
2050
  * get
2000
- * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L924)
2051
+ * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L979)
2001
2052
  * 404 request to invalid URL
2002
- * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L931)
2053
+ * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L986)
2003
2054
  * paged results
2004
- * [provides paging](./spec/acceptance/rest/client_spec.rb#L943)
2055
+ * [provides paging](./spec/acceptance/rest/client_spec.rb#L998)
2056
+ * request_id generation
2057
+ * Timeout error
2058
+ * with option add_request_ids: true
2059
+ * [has an error with the same request_id of the request](./spec/acceptance/rest/client_spec.rb#L1033)
2060
+ * with option add_request_ids: true and REST operations with a message body
2061
+ * with mocks to inspect the params
2062
+ * with a single publish
2063
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1055)
2064
+ * with an array publish
2065
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1062)
2066
+ * without mocks to ensure the requests are accepted
2067
+ * with a single publish
2068
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1071)
2069
+ * with an array publish
2070
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1078)
2071
+ * option add_request_ids: true and specified fallback hosts
2072
+ * [request_id is the same across retries](./spec/acceptance/rest/client_spec.rb#L1103)
2073
+ * without request_id
2074
+ * [does not include request_id in ConnectionTimeout error](./spec/acceptance/rest/client_spec.rb#L1115)
2075
+ * UnauthorizedRequest nonce error
2076
+ * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/rest/client_spec.rb#L1128)
2077
+ * failed request logging
2078
+ * [is absent when requests do not fail](./spec/acceptance/rest/client_spec.rb#L1145)
2079
+ * with the first request failing
2080
+ * [is present with success message when requests do not actually fail](./spec/acceptance/rest/client_spec.rb#L1159)
2081
+ * with all requests failing
2082
+ * [is present when all requests fail](./spec/acceptance/rest/client_spec.rb#L1175)
2005
2083
 
2006
2084
  ### Ably::Models::MessageEncoders
2007
2085
  _(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_
@@ -2052,73 +2130,73 @@ _(see [spec/acceptance/rest/message_spec.rb](./spec/acceptance/rest/message_spec
2052
2130
  * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L57)
2053
2131
  * with supported extra payload content type (#RSL1h, #RSL6a2)
2054
2132
  * JSON Object (Hash)
2055
- * PENDING: *[is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L68)*
2133
+ * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L70)
2056
2134
  * JSON Array
2057
- * PENDING: *[is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L78)*
2135
+ * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/rest/message_spec.rb#L80)
2058
2136
  * nil
2059
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L86)
2137
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L87)
2060
2138
  * with unsupported data payload content type
2061
2139
  * Integer
2062
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L97)
2140
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L98)
2063
2141
  * Float
2064
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L105)
2142
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L106)
2065
2143
  * Boolean
2066
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L113)
2144
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L114)
2067
2145
  * False
2068
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L121)
2146
+ * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L122)
2069
2147
  * encryption and encoding
2070
2148
  * with #publish and #history
2071
2149
  * with AES-128-CBC using crypto-data-128.json fixtures (#RTL7d)
2072
2150
  * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
2073
2151
  * behaves like an Ably encrypter and decrypter
2074
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2075
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2152
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2153
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2076
2154
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
2077
2155
  * behaves like an Ably encrypter and decrypter
2078
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2079
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2156
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2157
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2080
2158
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
2081
2159
  * behaves like an Ably encrypter and decrypter
2082
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2083
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2160
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2161
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2084
2162
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
2085
2163
  * behaves like an Ably encrypter and decrypter
2086
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2087
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2164
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2165
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2088
2166
  * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d)
2089
2167
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
2090
2168
  * behaves like an Ably encrypter and decrypter
2091
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2092
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2169
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2170
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2093
2171
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
2094
2172
  * behaves like an Ably encrypter and decrypter
2095
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2096
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2173
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2174
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2097
2175
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
2098
2176
  * behaves like an Ably encrypter and decrypter
2099
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2100
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2177
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2178
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2101
2179
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
2102
2180
  * behaves like an Ably encrypter and decrypter
2103
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166)
2104
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181)
2181
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2182
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2105
2183
  * when publishing lots of messages
2106
- * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L214)
2184
+ * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L215)
2107
2185
  * when retrieving #history with a different protocol
2108
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L241)
2109
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L241)
2110
- * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L241)
2186
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242)
2187
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242)
2188
+ * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242)
2111
2189
  * when publishing on an unencrypted channel and retrieving with #history on an encrypted channel
2112
- * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L257)
2190
+ * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L258)
2113
2191
  * when publishing on an encrypted channel and retrieving with #history on an unencrypted channel
2114
- * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L278)
2115
- * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L284)
2192
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L279)
2193
+ * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L285)
2116
2194
  * publishing on an encrypted channel and retrieving #history with a different algorithm on another client (#RTL7e)
2117
- * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L305)
2118
- * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L311)
2195
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L306)
2196
+ * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L312)
2119
2197
  * publishing on an encrypted channel and subscribing with a different key on another client
2120
- * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L332)
2121
- * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L338)
2198
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L333)
2199
+ * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L339)
2122
2200
 
2123
2201
  ### Ably::Rest::Presence
2124
2202
  _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_
@@ -2135,54 +2213,57 @@ _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_sp
2135
2213
  * with :connection_id option
2136
2214
  * [returns a list members filtered by the provided connection ID](./spec/acceptance/rest/presence_spec.rb#L106)
2137
2215
  * [returns a list members filtered by the provided connection ID](./spec/acceptance/rest/presence_spec.rb#L110)
2216
+ * with a non ASCII channel name
2217
+ * stubbed
2218
+ * [correctly encodes the channel name](./spec/acceptance/rest/presence_spec.rb#L127)
2138
2219
  * #history
2139
- * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L119)
2220
+ * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L138)
2140
2221
  * default behaviour
2141
- * [uses backwards direction](./spec/acceptance/rest/presence_spec.rb#L134)
2222
+ * [uses backwards direction](./spec/acceptance/rest/presence_spec.rb#L153)
2142
2223
  * with options
2143
2224
  * direction: :forwards
2144
- * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L146)
2225
+ * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L165)
2145
2226
  * direction: :backwards
2146
- * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L161)
2227
+ * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L180)
2147
2228
  * #history
2148
2229
  * with options
2149
2230
  * limit options
2150
2231
  * default
2151
- * [is set to 100](./spec/acceptance/rest/presence_spec.rb#L206)
2232
+ * [is set to 100](./spec/acceptance/rest/presence_spec.rb#L225)
2152
2233
  * set to 1000
2153
- * [is passes the limit query param value 1000](./spec/acceptance/rest/presence_spec.rb#L219)
2234
+ * [is passes the limit query param value 1000](./spec/acceptance/rest/presence_spec.rb#L238)
2154
2235
  * with time range options
2155
2236
  * :start
2156
2237
  * with milliseconds since epoch value
2157
- * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L249)
2238
+ * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L268)
2158
2239
  * with Time object value
2159
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L259)
2240
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L278)
2160
2241
  * :end
2161
2242
  * with milliseconds since epoch value
2162
- * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L249)
2243
+ * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L268)
2163
2244
  * with Time object value
2164
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L259)
2245
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L278)
2165
2246
  * when argument start is after end
2166
- * [should raise an exception](./spec/acceptance/rest/presence_spec.rb#L270)
2247
+ * [should raise an exception](./spec/acceptance/rest/presence_spec.rb#L289)
2167
2248
  * decoding
2168
2249
  * with encoded fixture data
2169
2250
  * #history
2170
- * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L289)
2251
+ * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L308)
2171
2252
  * #get
2172
- * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L296)
2253
+ * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L315)
2173
2254
  * decoding permutations using mocked #history
2174
2255
  * valid decodeable content
2175
2256
  * #get
2176
- * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L349)
2257
+ * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L368)
2177
2258
  * #history
2178
- * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L366)
2259
+ * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L385)
2179
2260
  * invalid data
2180
2261
  * #get
2181
- * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L397)
2182
- * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L401)
2262
+ * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L416)
2263
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L420)
2183
2264
  * #history
2184
- * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L421)
2185
- * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L425)
2265
+ * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L440)
2266
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L444)
2186
2267
 
2187
2268
  ### Ably::Rest::Client#stats
2188
2269
  _(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_
@@ -2253,9 +2334,8 @@ _(see [spec/unit/auth_spec.rb](./spec/unit/auth_spec.rb))_
2253
2334
  * as Integer
2254
2335
  * [raises an argument error](./spec/unit/auth_spec.rb#L64)
2255
2336
  * defaults
2256
- * [should default TTL to 1 hour](./spec/unit/auth_spec.rb#L74)
2257
- * [should default capability to all](./spec/unit/auth_spec.rb#L78)
2258
- * [should have defaults for :ttl and :capability](./spec/unit/auth_spec.rb#L82)
2337
+ * [should have no default TTL](./spec/unit/auth_spec.rb#L71)
2338
+ * [should have no default capability](./spec/unit/auth_spec.rb#L75)
2259
2339
 
2260
2340
  ### Ably::Logger
2261
2341
  _(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_
@@ -2264,11 +2344,11 @@ _(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_
2264
2344
  * with an invalid interface
2265
2345
  * [raises an exception](./spec/unit/logger_spec.rb#L118)
2266
2346
  * with a valid interface
2267
- * [is used](./spec/unit/logger_spec.rb#L137)
2347
+ * [is used](./spec/unit/logger_spec.rb#L129)
2268
2348
  * with blocks
2269
- * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L152)
2349
+ * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L144)
2270
2350
  * with an exception in the logger block
2271
- * [catches the error and continues](./spec/unit/logger_spec.rb#L167)
2351
+ * [catches the error and continues](./spec/unit/logger_spec.rb#L159)
2272
2352
 
2273
2353
  ### Ably::Models::AuthDetails
2274
2354
  _(see [spec/unit/models/auth_details_spec.rb](./spec/unit/models/auth_details_spec.rb))_
@@ -3417,11 +3497,11 @@ _(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_
3417
3497
  * with log_level :none
3418
3498
  * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L257)
3419
3499
  * with custom logger and log_level
3420
- * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L275)
3421
- * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L279)
3500
+ * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L267)
3501
+ * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L271)
3422
3502
  * delegators
3423
- * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L293)
3424
- * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L298)
3503
+ * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L285)
3504
+ * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L290)
3425
3505
  * delegation to the REST Client
3426
3506
  * [passes on the options to the initializer](./spec/unit/realtime/client_spec.rb#L15)
3427
3507
  * for attribute
@@ -3507,25 +3587,30 @@ _(see [spec/unit/rest/channel_spec.rb](./spec/unit/rest/channel_spec.rb))_
3507
3587
  * as UTF_8 string
3508
3588
  * [is permitted](./spec/unit/rest/channel_spec.rb#L16)
3509
3589
  * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L20)
3590
+ * as frozen UTF_8 string
3591
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L29)
3592
+ * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L33)
3510
3593
  * as SHIFT_JIS string
3511
- * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L28)
3512
- * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L32)
3594
+ * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L41)
3595
+ * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L45)
3513
3596
  * as ASCII_8BIT string
3514
- * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L40)
3515
- * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L44)
3597
+ * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L53)
3598
+ * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L57)
3516
3599
  * as Integer
3517
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L52)
3600
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L65)
3518
3601
  * as Nil
3519
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L60)
3602
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L73)
3520
3603
  * #publish name argument
3521
3604
  * as UTF_8 string
3522
- * [is permitted](./spec/unit/rest/channel_spec.rb#L72)
3605
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L85)
3606
+ * as frozen UTF_8 string
3607
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L94)
3523
3608
  * as SHIFT_JIS string
3524
- * [is permitted](./spec/unit/rest/channel_spec.rb#L80)
3609
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L102)
3525
3610
  * as ASCII_8BIT string
3526
- * [is permitted](./spec/unit/rest/channel_spec.rb#L88)
3611
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L110)
3527
3612
  * as Integer
3528
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L96)
3613
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L118)
3529
3614
 
3530
3615
  ### Ably::Rest::Channels
3531
3616
  _(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_
@@ -3604,11 +3689,11 @@ _(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
3604
3689
  * with log_level :none
3605
3690
  * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L257)
3606
3691
  * with custom logger and log_level
3607
- * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L275)
3608
- * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L279)
3692
+ * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L267)
3693
+ * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L271)
3609
3694
  * delegators
3610
- * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L293)
3611
- * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L298)
3695
+ * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L285)
3696
+ * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L290)
3612
3697
  * initializer options
3613
3698
  * TLS
3614
3699
  * disabled
@@ -3622,6 +3707,8 @@ _(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
3622
3707
  * set to true
3623
3708
  * without a key or token
3624
3709
  * [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L46)
3710
+ * request_id generation
3711
+ * [includes request_id in URL](./spec/unit/rest/client_spec.rb#L56)
3625
3712
 
3626
3713
  ### Ably::Rest
3627
3714
  _(see [spec/unit/rest/rest_spec.rb](./spec/unit/rest/rest_spec.rb))_
@@ -3673,6 +3760,6 @@ _(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_
3673
3760
 
3674
3761
  ## Test summary
3675
3762
 
3676
- * Passing tests: 1806
3677
- * Pending tests: 12
3763
+ * Passing tests: 1852
3764
+ * Pending tests: 6
3678
3765
  * Failing tests: 0