SPEC.md in ably-1.0.6 vs SPEC.md in ably-1.0.7

- old
+ new

@@ -1,6 +1,6 @@ -# Ably Realtime & REST Client Library 0.9.0-pre.1 Specification +# Ably Realtime & REST Client Library 1.0.7 Specification ### Ably::Realtime::Auth _(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_spec.rb))_ * using JSON protocol * with basic auth @@ -139,12 +139,38 @@ * when using a token request with a client_id * [is not true as identification is not confirmed until authenticated](./spec/acceptance/realtime/auth_spec.rb#L1001) * once connected * [is true as identification is completed following CONNECTED ProtocolMessage](./spec/acceptance/realtime/auth_spec.rb#L1007) * deprecated #authorise - * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1045) - * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1051) + * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1021) + * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1027) + * when using JWT + * when using auth_url + * when credentials are valid + * [client successfully fetches a channel and publishes a message](./spec/acceptance/realtime/auth_spec.rb#L1046) + * when credentials are wrong + * [disconnected includes and invalid signature message](./spec/acceptance/realtime/auth_spec.rb#L1059) + * when token is expired + * [receives a 40142 error from the server](./spec/acceptance/realtime/auth_spec.rb#L1072) + * when using auth_callback + * when credentials are valid + * [authentication succeeds and client can post a message](./spec/acceptance/realtime/auth_spec.rb#L1097) + * when credentials are invalid + * [authentication fails and reason for disconnection is invalid signature](./spec/acceptance/realtime/auth_spec.rb#L1112) + * when the client is initialized with ClientOptions and the token is a JWT token + * when credentials are valid + * [posts successfully to a channel](./spec/acceptance/realtime/auth_spec.rb#L1129) + * when credentials are invalid + * [fails with an invalid signature error](./spec/acceptance/realtime/auth_spec.rb#L1143) + * when JWT token expires + * [client disconnects, a new token is requested via auth_callback and the client gets reconnected](./spec/acceptance/realtime/auth_spec.rb#L1170) + * and an AUTH procol message is received + * [client reauths correctly without going through a disconnection](./spec/acceptance/realtime/auth_spec.rb#L1198) + * when the JWT token request includes a client_id + * [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) + * when the JWT token request includes a subscribe-only capability + * [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) ### Ably::Realtime::Channel#history _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_ * using JSON protocol * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_history_spec.rb#L21) @@ -152,22 +178,22 @@ * [retrieves realtime history](./spec/acceptance/realtime/channel_history_spec.rb#L34) * with two clients publishing messages on the same channel * [retrieves realtime history on both channels](./spec/acceptance/realtime/channel_history_spec.rb#L46) * with lots of messages published with a single client and channel * as one ProtocolMessage - * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L88) - * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L97) + * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L94) + * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L103) * in multiple ProtocolMessages - * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L108) - * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L119) + * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L114) + * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L125) * and REST history - * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L135) + * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L141) * with option until_attach: true - * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L160) - * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L209) + * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L166) + * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L215) * and two pages of messages - * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L175) + * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L181) ### Ably::Realtime::Channel _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_ * using JSON protocol * initialization @@ -414,37 +440,37 @@ * [has an empty reason when there is no error](./spec/acceptance/realtime/channel_spec.rb#L1864) * on failure * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L1877) * #resume (#RTL2f) * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L1890) - * PENDING: *[is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1898)* - * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1919) + * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1898) + * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1917) * when a resume fails - * [is false when a resume fails to recover and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L1941) + * [is false when a resume fails to recover and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L1939) * moves to * suspended - * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1960) - * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1983) + * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958) + * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981) * detached - * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1960) - * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1983) + * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958) + * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981) * failed - * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1960) - * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1983) + * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958) + * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981) * when it receives a server-initiated DETACHED (#RTL13) * and channel is initialized (#RTL13) - * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2017) + * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2015) * and channel is failed - * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2038) + * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2036) * and channel is attached - * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2054) + * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2052) * and channel is suspended - * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2070) + * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2068) * and channel is attaching - * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2092) + * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2090) * when it receives an ERROR ProtocolMessage - * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2140) + * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2138) ### Ably::Realtime::Channels _(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/channels_spec.rb))_ * using JSON protocol * using shortcut method #channel on the client object @@ -576,75 +602,85 @@ * when retry intervals are stubbed to attempt reconnection quickly * [never calls the provided success block](./spec/acceptance/realtime/connection_failures_spec.rb#L466) * connection resume * when DISCONNECTED ProtocolMessage received from the server * [reconnects automatically and immediately](./spec/acceptance/realtime/connection_failures_spec.rb#L497) + * connection state freshness is monitored + * [resumes connections when disconnected within the connection_state_ttl period (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L518) + * when connection_state_ttl period has passed since being disconnected + * [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) + * when connection_state_ttl period has passed since last activity on the connection + * [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) + * [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) + * [still reattaches the channels automatically following a new connection being established (#RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L680) * and subsequently fails to reconnect - * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L529) + * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L739) * when websocket transport is abruptly disconnected - * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L572) + * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L782) * hosts used - * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L588) + * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L798) * after successfully reconnecting and resuming - * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L612) - * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L627) - * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L653) - * [retains the client_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L714) + * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L822) + * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L837) + * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L863) + * [retains the client_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L924) * when messages were published whilst the client was disconnected - * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L681) + * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L891) * when failing to resume * because the connection_key is not or no longer valid - * [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L754) - * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L769) - * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L807) - * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L843) - * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L881) - * [resets the client_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L896) + * [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L964) + * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L979) + * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1017) + * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1053) + * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L1091) + * [resets the client_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1106) * as the DISCONNECTED window to resume has passed - * [starts a new connection automatically and does not try and resume](./spec/acceptance/realtime/connection_failures_spec.rb#L933) + * [starts a new connection automatically and does not try and resume](./spec/acceptance/realtime/connection_failures_spec.rb#L1143) * when an ERROR protocol message is received * whilst connecting * with a token error code in the range 40140 <= code < 40150 (#RTN14b) - * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L960) + * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1174) * with an error code indicating an error other than a token failure (#RTN14g, #RTN15i) - * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L976) + * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1190) * with no error code indicating an error other than a token failure (#RTN14g, #RTN15i) - * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L989) + * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1203) * whilst connected * with a token error code in the range 40140 <= code < 40150 (#RTN14b) - * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L960) + * [triggers a re-authentication](./spec/acceptance/realtime/connection_failures_spec.rb#L1174) * with an error code indicating an error other than a token failure (#RTN14g, #RTN15i) - * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L976) + * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1190) * with no error code indicating an error other than a token failure (#RTN14g, #RTN15i) - * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L989) + * [causes the connection to fail](./spec/acceptance/realtime/connection_failures_spec.rb#L1203) * whilst resuming * with a token error code in the region 40140 <= code < 40150 (RTN15c5) - * [triggers a re-authentication and then resumes the connection](./spec/acceptance/realtime/connection_failures_spec.rb#L1033) + * [triggers a re-authentication and then resumes the connection](./spec/acceptance/realtime/connection_failures_spec.rb#L1247) * with any other error (#RTN15c4) - * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1065) + * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1279) * fallback host feature * with custom realtime websocket host option - * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1109) + * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1323) * with custom realtime websocket port option - * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1127) + * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1341) * with non-production environment - * [does not use a fallback host by default](./spec/acceptance/realtime/connection_failures_spec.rb#L1146) + * [does not use a fallback host by default](./spec/acceptance/realtime/connection_failures_spec.rb#L1360) * :fallback_hosts_use_default is true - * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k7)](./spec/acceptance/realtime/connection_failures_spec.rb#L1164) + * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k7)](./spec/acceptance/realtime/connection_failures_spec.rb#L1378) + * [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) * :fallback_hosts array is provided - * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1189) + * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1424) * with production environment * when the Internet is down - * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1225) + * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1460) * when the Internet is up * and default options - * [uses a fallback host + the original host once on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L1248) - * [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) + * [uses a fallback host + the original host once on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L1483) + * [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) + * [uses the correct host name for the WebSocket requests to the fallback hosts](./spec/acceptance/realtime/connection_failures_spec.rb#L1525) * :fallback_hosts array is provided by an empty array - * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1297) + * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1555) * :fallback_hosts array is provided - * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1317) + * [uses a fallback host on every subsequent disconnected attempt until suspended (#RTN17b, #TO3k6)](./spec/acceptance/realtime/connection_failures_spec.rb#L1575) ### Ably::Realtime::Connection _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_ * using JSON protocol * intialization @@ -670,190 +706,190 @@ * using implicit token auth * [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L186) * when connected with a valid non-expired token * that then expires following the connection being opened * the server - * [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L213) + * [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L217) * connection state - * PENDING: *[retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L273)* + * [retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L277) * and subsequent token is invalid - * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L309) + * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L312) * for non-renewable tokens * that are expired * opening a new connection - * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L339) + * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L342) * when connected - * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L355) + * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L358) * with opaque token string that contain an implicit client_id * string - * [sets the Client#client_id and Auth#client_id once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L375) + * [sets the Client#client_id and Auth#client_id once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L378) * that is incompatible with the current client client_id - * [fails the connection](./spec/acceptance/realtime/connection_spec.rb#L387) + * [fails the connection](./spec/acceptance/realtime/connection_spec.rb#L390) * wildcard - * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L401) + * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L404) * initialization state changes * with implicit #connect - * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L433) + * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L436) * with explicit #connect - * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L439) + * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L442) * #connect - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L447) - * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L452) - * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L459) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L450) + * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L455) + * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L462) * with invalid auth details - * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L488) + * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L491) * when already connected - * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L504) + * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L507) * connection#id - * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L518) + * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L521) * connection#key - * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L525) + * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L528) * once connected * connection#id - * [is a string](./spec/acceptance/realtime/connection_spec.rb#L536) - * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L543) - * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L550) + * [is a string](./spec/acceptance/realtime/connection_spec.rb#L539) + * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L546) + * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L553) * connection#key - * [is a string](./spec/acceptance/realtime/connection_spec.rb#L559) - * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L566) - * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L573) + * [is a string](./spec/acceptance/realtime/connection_spec.rb#L562) + * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L569) + * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L576) * following a previous connection being opened and closed - * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L583) + * [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L586) * when closing - * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L600) + * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L603) * #serial connection serial - * [is set to -1 when a new connection is opened](./spec/acceptance/realtime/connection_spec.rb#L617) - * [is set to 0 when a message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#L640) - * [is set to 1 when the second message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#L647) + * [is set to -1 when a new connection is opened](./spec/acceptance/realtime/connection_spec.rb#L620) + * [is set to 0 when a message is received back](./spec/acceptance/realtime/connection_spec.rb#L643) + * [is set to 1 when the second message is received](./spec/acceptance/realtime/connection_spec.rb#L651) * when a message is sent but the ACK has not yet been received - * [the sent message msgSerial is 0 but the connection serial remains at -1](./spec/acceptance/realtime/connection_spec.rb#L625) + * [the sent message msgSerial is 0 but the connection serial remains at -1](./spec/acceptance/realtime/connection_spec.rb#L628) * #close - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L658) - * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L665) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L668) + * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L675) * when already closed - * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L676) + * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L686) * when connection state is * :initialized - * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L703) + * [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L713) * :connected - * [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) + * [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) * with an unresponsive connection - * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L747) + * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L757) * #ping - * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L769) - * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L779) - * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L803) + * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L779) + * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L789) + * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L813) * with incompatible states * when not connected - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L816) + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L826) * when suspended - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L825) + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L835) * when failed - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L837) + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L847) * when closed - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L849) + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L859) * when it becomes closed - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L863) + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L873) * with a success block that raises an exception - * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L876) + * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L886) * when ping times out - * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L890) - * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L909) + * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L900) + * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L919) * Heartbeats (#RTN23) * heartbeat interval * when reduced artificially - * [is the sum of the max_idle_interval and realtime_request_timeout (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L936) - * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L946) - * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L957) + * [is the sum of the max_idle_interval and realtime_request_timeout (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L946) + * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L956) + * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L967) * transport-level heartbeats are supported in the websocket transport - * [provides the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L972) - * PENDING: *[receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L981)* + * [provides the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L982) + * [receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L991) * with websocket heartbeats disabled (undocumented) - * [does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1000) - * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1009) + * PENDING: *[does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1007)* + * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1017) * #details - * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1026) - * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1033) - * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1042) + * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1035) + * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1042) + * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1051) * with a different default connection_state_ttl - * [updates the private Connection#connection_state_ttl when received from Ably in ConnectionDetails](./spec/acceptance/realtime/connection_spec.rb#L1063) + * [updates the private Connection#connection_state_ttl when received from Ably in ConnectionDetails](./spec/acceptance/realtime/connection_spec.rb#L1072) * recovery * #recovery_key - * [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) - * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1123) - * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1152) + * [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) + * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1137) + * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1166) * opening a new connection using a recently disconnected connection's #recovery_key - * connection#id and connection#key after recovery - * [remains the same for id and party for key](./spec/acceptance/realtime/connection_spec.rb#L1164) + * connection#id after recovery + * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L1178) * when messages have been sent whilst the old connection is disconnected * the new connection - * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L1206) + * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L1214) * with :recover option * with invalid syntax - * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L1238) + * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L1246) * with invalid formatted value sent to server - * [sets the #error_reason and moves the connection to FAILED](./spec/acceptance/realtime/connection_spec.rb#L1247) + * [sets the #error_reason and moves the connection to FAILED](./spec/acceptance/realtime/connection_spec.rb#L1255) * with expired (missing) value sent to server - * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1262) + * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1270) * with many connections simultaneously - * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1281) + * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1289) * when a state transition is unsupported - * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1301) + * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1309) * protocol failure * receiving an invalid ProtocolMessage - * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1317) + * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1325) * undocumented method * #internet_up? - * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1335) + * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1343) * internet up URL protocol * when using TLS for the connection - * [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) + * [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) * when using a non-secured connection - * [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) + * [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) * when the Internet is up - * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1387) - * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1394) + * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1395) + * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1402) * with a TLS connection - * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1370) + * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1378) * with a non-TLS connection - * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1380) + * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1388) * when the Internet is down - * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1409) - * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1416) + * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1417) + * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1424) * state change side effects * when connection enters the :disconnected state - * [queues messages to be sent and all channels remain attached](./spec/acceptance/realtime/connection_spec.rb#L1430) + * [queues messages to be sent and all channels remain attached](./spec/acceptance/realtime/connection_spec.rb#L1438) * when connection enters the :suspended state - * [moves the channels into the suspended state and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1463) + * [moves the channels into the suspended state and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1471) * when connection enters the :failed state - * [sets all channels to failed and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1494) + * [sets all channels to failed and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L1502) * connection state change - * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1508) - * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1523) + * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1516) + * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1531) * ConnectionStateChange object - * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1531) - * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1539) - * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1547) - * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1563) + * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1539) + * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1547) + * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1555) + * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1571) * on failure - * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1576) + * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1584) * retry_in - * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1591) - * [is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1598) - * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1608) - * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1618) + * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1599) + * [is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1606) + * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1616) + * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1626) * whilst CONNECTED * when a CONNECTED message is received (#RTN24) - * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1653) - * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1668) + * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1661) + * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1676) * when a CONNECTED message with an error is received - * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1703) + * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1711) * version params - * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1724) - * [sends the lib version param lib (#RTN2g)](./spec/acceptance/realtime/connection_spec.rb#L1733) + * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1732) + * [sends the lib version param lib (#RTN2g)](./spec/acceptance/realtime/connection_spec.rb#L1741) * with variant - * [sends the lib version param lib with the variant (#RTN2g + #RSC7b)](./spec/acceptance/realtime/connection_spec.rb#L1753) + * [sends the lib version param lib with the variant (#RTN2g + #RSC7b)](./spec/acceptance/realtime/connection_spec.rb#L1761) ### Ably::Realtime::Channel Message _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/message_spec.rb))_ * using JSON protocol * [sends a String data payload](./spec/acceptance/realtime/message_spec.rb#L25) @@ -866,206 +902,206 @@ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L64) * Binary * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L72) * with supported extra payload content type (#RTL6h, #RSL6a2) * JSON Object (Hash) - * PENDING: *[is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L91)* + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L93) * JSON Array - * PENDING: *[is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L100)* + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L102) * nil - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L107) + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L108) * with unsupported data payload content type * Integer - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L118) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L119) * Float - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L127) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L128) * Boolean - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L136) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L137) * False - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L145) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L146) * with ASCII_8BIT message name - * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L154) + * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L155) * when the message publisher has a client_id - * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L170) + * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L171) * #connection_id attribute * over realtime - * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L183) + * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L184) * when retrieved over REST - * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L195) + * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L196) * local echo when published - * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L207) + * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L208) * with :echo_messages option set to false - * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L227) - * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L246) - * [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) + * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L228) + * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L247) + * [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) * publishing lots of messages across two connections - * [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) + * [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) * without suitable publishing permissions - * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L330) + * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L331) * server incorrectly resends a message that was already received by the client library - * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L349) + * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L350) * encoding and decoding encrypted messages * with AES-128-CBC using crypto-data-128.json fixtures (#RTL7d) * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * item 1 with encrypted encoding cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d) * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * item 1 with encrypted encoding cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter * with #publish and #subscribe - * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L414) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L432) + * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433) * with multiple sends from one client to another - * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L471) - * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L488) + * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L472) + * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L489) * subscribing with a different transport protocol - * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L522) - * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L522) - * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L522) + * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523) + * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523) + * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523) * publishing on an unencrypted channel and subscribing on an encrypted channel with another client - * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L543) + * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L544) * publishing on an encrypted channel and subscribing on an unencrypted channel with another client - * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L561) - * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L572) + * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L562) + * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L573) * publishing on an encrypted channel and subscribing with a different algorithm on another client - * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L592) - * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L601) + * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L593) + * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L602) * publishing on an encrypted channel and subscribing with a different key on another client - * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L621) - * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L632) + * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L622) + * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L633) * when message is published, the connection disconnects before the ACK is received, and the connection is resumed - * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L651) + * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L652) * when message is published, the connection disconnects before the ACK is received * the connection is not resumed - * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L694) + * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L695) * the connection becomes suspended - * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L720) + * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L721) * the connection becomes failed - * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L747) + * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L748) * message encoding interoperability * over a JSON transport * when decoding string - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789) * when encoding string - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807) * when decoding string - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789) * when encoding string - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807) * when decoding jsonObject - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789) * when encoding jsonObject - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807) * when decoding jsonArray - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789) * when encoding jsonArray - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807) * when decoding binary - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L788) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789) * when encoding binary - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L806) + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807) * over a MsgPack transport * when publishing a string using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840) + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841) * when retrieving a string using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868) + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869) * when publishing a string using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840) + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841) * when retrieving a string using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868) + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869) * when publishing a jsonObject using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840) + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841) * when retrieving a jsonObject using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868) + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869) * when publishing a jsonArray using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840) + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841) * when retrieving a jsonArray using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868) + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869) * when publishing a binary using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L840) + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841) * when retrieving a binary using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L868) + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869) ### Ably::Realtime::Presence history _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_ * using JSON protocol * [provides up to the moment presence history](./spec/acceptance/realtime/presence_history_spec.rb#L21) * [ensures REST presence history message IDs match ProtocolMessage wrapped message and connection IDs via Realtime](./spec/acceptance/realtime/presence_history_spec.rb#L42) * with option until_attach: true * [retrieves all presence messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L61) - * [fails with an exception unless state is attached](./spec/acceptance/realtime/presence_history_spec.rb#L97) + * [fails with an exception unless state is attached](./spec/acceptance/realtime/presence_history_spec.rb#L106) * and two pages of messages - * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L78) + * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L81) ### Ably::Realtime::Presence _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_ * using JSON protocol * when attached (but not present) on a presence channel with an anonymous client (no client ID) * [maintains state as other clients enter and leave the channel (#RTP2e)](./spec/acceptance/realtime/presence_spec.rb#L479) * #sync_complete? and SYNC flags (#RTP1) * when attaching to a channel without any members present - * [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) + * [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) * when attaching to a channel with members present - * [sync_complete? is false, there is a presence flag, and the presence channel is subsequently synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L722) + * [sync_complete? is false, there is a presence flag, and the presence channel is subsequently synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L729) * 101 existing (present) members on a channel (2 SYNC pages) * requiring at least 2 SYNC ProtocolMessages * when a client attaches to the presence channel - * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L771) + * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L781) * and a member enters before the SYNC operation is complete - * [emits a :enter immediately and the member is :present once the sync is complete (#RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L787) + * [emits a :enter immediately and the member is :present once the sync is complete (#RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L797) * and a member leaves before the SYNC operation is complete - * [emits :leave immediately as the member leaves and cleans up the ABSENT member after (#RTP2f, #RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L824) - * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L872) - * [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) + * [emits :leave immediately as the member leaves and cleans up the ABSENT member after (#RTP2f, #RTP2g)](./spec/acceptance/realtime/presence_spec.rb#L834) + * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L882) + * [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) * #get * by default - * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L967) + * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L977) * with :wait_for_sync option set to false (#RTP11c1) - * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L986) + * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L998) * state * once opened - * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1012) + * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1025) * #enter * data attribute * when provided as argument option to #enter - * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1037) + * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1050) * message #connection_id - * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1061) + * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1074) * without necessary capabilities to join presence - * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1080) + * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1093) * it should behave like a public presence method * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) @@ -1102,15 +1138,15 @@ * False * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286) * if connection fails before success * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331) * #update - * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L1092) - * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1117) - * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1127) + * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L1105) + * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1130) + * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1140) * when ENTERED - * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1102) + * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1115) * it should behave like a public presence method * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) @@ -1147,20 +1183,20 @@ * False * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286) * if connection fails before success * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331) * #leave - * [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L1201) + * [succeeds and does not emit an event (#RTP10d)](./spec/acceptance/realtime/presence_spec.rb#L1224) * :data option * when set to a string - * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1146) + * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1159) * when set to nil - * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1159) + * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1172) * when not passed as an argument (i.e. nil) - * [emits the previous value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1172) + * [emits the previous value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1185) * and sync is complete - * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1185) + * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1198) * it should behave like a public presence method * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L293) * [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L300) * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L308) * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L318) @@ -1183,21 +1219,21 @@ * False * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286) * if connection fails before success * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331) * :left event - * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L1210) - * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1221) + * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L1240) + * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1251) * entering/updating/leaving presence state on behalf of another client_id * #enter_client * multiple times on the same channel with different client_ids - * [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) - * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1258) + * [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) + * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1288) * message #connection_id - * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1277) + * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1307) * without necessary capabilities to enter on behalf of another client - * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1297) + * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1327) * it should behave like a public presence method * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) @@ -1265,13 +1301,13 @@ * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L463) * and an empty client_id * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L470) * #update_client * multiple times on the same channel with different client_ids - * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L1311) - * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1335) - * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1347) + * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L1341) + * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1365) + * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1377) * it should behave like a public presence method * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) @@ -1340,18 +1376,18 @@ * and an empty client_id * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L470) * #leave_client * leaves a channel * multiple times on the same channel with different client_ids - * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L1377) - * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1401) + * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L1407) + * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1431) * with a new value in :data option - * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1425) + * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1455) * with a nil value in :data option - * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1438) + * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1468) * with no :data option - * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1451) + * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1481) * it should behave like a public presence method * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) * [raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) * [raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) @@ -1418,107 +1454,107 @@ * and a wildcard client_id * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L463) * and an empty client_id * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L470) * #get - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L1470) - * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1475) - * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1482) - * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1490) - * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1524) - * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1539) - * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1623) - * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1638) - * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1660) - * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1684) - * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1693) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L1500) + * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1505) + * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1512) + * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1520) + * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1555) + * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1570) + * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1654) + * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1671) + * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1693) + * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1717) + * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1729) * when the channel is SUSPENDED * with wait_for_sync: true - * [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) + * [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) * with wait_for_sync: false - * [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) + * [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) * during a sync * when :wait_for_sync is true - * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1576) - * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1599) + * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1607) + * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1630) * when a member enters and then leaves - * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1703) + * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1742) * when a member enters and the presence map is updated - * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1716) + * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1757) * with lots of members on different clients - * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1734) + * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1778) * #subscribe - * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1809) + * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1853) * with no arguments - * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1770) + * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1814) * with event name - * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1790) + * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1834) * with a callback that raises an exception - * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1822) + * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1866) * #unsubscribe * with no arguments - * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1843) + * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1887) * with event name - * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1861) + * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1905) * REST #get - * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1880) - * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1893) + * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1924) + * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1940) * client_id with ASCII_8BIT * in connection set up - * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1910) + * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1960) * in channel options - * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1923) + * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1973) * encoding and decoding of presence message data - * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L1949) + * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L1999) * #subscribe - * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L1968) - * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L1980) - * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L1994) + * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L2018) + * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L2030) + * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L2044) * #get - * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2010) + * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2060) * REST #get - * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2023) + * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2074) * when cipher settings do not match publisher - * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2038) - * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2051) + * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2090) + * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2103) * leaving - * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2067) - * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2077) + * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2119) + * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2129) * connection failure mid-way through a large member sync - * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2096) + * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2148) * server-initiated sync * with multiple SYNC pages - * [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) + * [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) * with a single SYNC page - * [is initiated and completed with a single SYNC message (and no channelSerial) (#RTP18a, #RTP18c) ](./spec/acceptance/realtime/presence_spec.rb#L2185) + * [is initiated and completed with a single SYNC message (and no channelSerial) (#RTP18a, #RTP18c) ](./spec/acceptance/realtime/presence_spec.rb#L2237) * when members exist in the PresenceMap before a SYNC completes - * [removes the members that are no longer present (#RTP19)](./spec/acceptance/realtime/presence_spec.rb#L2233) + * [removes the members that are no longer present (#RTP19)](./spec/acceptance/realtime/presence_spec.rb#L2285) * when the client does not have presence subscribe privileges but is present on the channel - * 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)* + * 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)* * local PresenceMap for presence members entered by this client - * [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) + * [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) * when a channel becomes attached again * and the resume flag is true * and the presence flag is false - * [does not send any presence events as the PresenceMap is in sync (#RTP5c1)](./spec/acceptance/realtime/presence_spec.rb#L2368) + * [does not send any presence events as the PresenceMap is in sync (#RTP5c1)](./spec/acceptance/realtime/presence_spec.rb#L2439) * and the presence flag is true * and following the SYNC all local MemberMap members are present in the PresenceMap - * [does nothing as MemberMap is in sync (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2395) + * [does nothing as MemberMap is in sync (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2469) * and following the SYNC a local MemberMap member is not present in the PresenceMap - * [re-enters the missing members automatically (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2431) + * [re-enters the missing members automatically (#RTP5c2)](./spec/acceptance/realtime/presence_spec.rb#L2508) * and the resume flag is false * and the presence flag is false - * [immediately resends all local presence members (#RTP5c2, #RTP19a)](./spec/acceptance/realtime/presence_spec.rb#L2511) + * [immediately resends all local presence members (#RTP5c2, #RTP19a)](./spec/acceptance/realtime/presence_spec.rb#L2591) * when re-entering a client automatically, if the re-enter fails for any reason - * [should emit an ErrorInfo with error code 91004 (#RTP5c3)](./spec/acceptance/realtime/presence_spec.rb#L2559) + * [should emit an ErrorInfo with error code 91004 (#RTP5c3)](./spec/acceptance/realtime/presence_spec.rb#L2642) * channel state side effects * channel transitions to the FAILED state - * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2616) + * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2699) * channel transitions to the DETACHED state - * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2640) + * [clears the PresenceMap and local member map copy and does not emit any presence events (#RTP5a)](./spec/acceptance/realtime/presence_spec.rb#L2726) * channel transitions to the SUSPENDED state - * [maintains the PresenceMap and only publishes presence event changes since the last attached state (#RTP5f)](./spec/acceptance/realtime/presence_spec.rb#L2673) + * [maintains the PresenceMap and only publishes presence event changes since the last attached state (#RTP5f)](./spec/acceptance/realtime/presence_spec.rb#L2762) ### Ably::Realtime::Client#stats _(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_ * using JSON protocol * fetching stats @@ -1598,11 +1634,11 @@ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L444) * when authorized * [sets Auth#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L451) * [sets Client#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L455) * that returns a TokenDetails JSON object - * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L489) + * [calls the lambda when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L489) * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L494) * when authorized * [sets Auth#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L506) * [sets Client#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L510) * that returns a TokenDetails object @@ -1638,21 +1674,21 @@ * [uses AuthOptions#query_time for this request and will not query_time for subsequent requests (#RSA10g)](./spec/acceptance/rest/auth_spec.rb#L724) * [uses AuthOptions#query_time for this request and will query_time again if provided subsequently](./spec/acceptance/rest/auth_spec.rb#L730) * with previous authorisation * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L743) * [issues a new token every time #authorize is called](./spec/acceptance/rest/auth_spec.rb#L749) - * with a Proc for the :auth_callback option - * [calls the Proc](./spec/acceptance/rest/auth_spec.rb#L776) + * with a lambda for the :auth_callback option + * [calls the lambda](./spec/acceptance/rest/auth_spec.rb#L776) * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L780) * for every subsequent #request_token - * without a :auth_callback Proc + * without a :auth_callback lambda * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L786) * with a provided block - * [does not call the originally provided Proc and calls the new #request_token :auth_callback Proc](./spec/acceptance/rest/auth_spec.rb#L793) + * [does not call the originally provided lambda and calls the new #request_token :auth_callback lambda](./spec/acceptance/rest/auth_spec.rb#L793) * with an explicit token string that expires - * and a Proc for the :auth_callback option to provide a means to renew the token - * [calls the Proc once the token has expired and the new token is used](./spec/acceptance/rest/auth_spec.rb#L820) + * and a lambda for the :auth_callback option to provide a means to renew the token + * [calls the lambda once the token has expired and the new token is used](./spec/acceptance/rest/auth_spec.rb#L820) * with an explicit ClientOptions client_id * and an incompatible client_id in a TokenDetails object passed to the auth callback * [rejects a TokenDetails object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L838) * and an incompatible client_id in a TokenRequest object passed to the auth callback and raises an exception * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L846) @@ -1660,86 +1696,94 @@ * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L854) * #create_token_request * [returns a TokenRequest object](./spec/acceptance/rest/auth_spec.rb#L869) * [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) * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L880) - * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L884) - * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L897) + * [specifies no TTL (#RSA5)](./spec/acceptance/rest/auth_spec.rb#L884) + * [specifies no capability (#RSA6)](./spec/acceptance/rest/auth_spec.rb#L898) * with a :ttl option below the Token expiry buffer that ensures tokens are renewed 15s before they expire as they are considered expired - * [uses the Token expiry buffer default + 10s to allow for a token request in flight](./spec/acceptance/rest/auth_spec.rb#L891) + * [uses the Token expiry buffer default + 10s to allow for a token request in flight](./spec/acceptance/rest/auth_spec.rb#L892) * the nonce - * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L902) - * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L907) + * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L903) + * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L908) * with token param :ttl - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L918) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919) * with token param :nonce - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L918) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919) * with token param :client_id - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L918) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919) * when specifying capability - * [overrides the default](./spec/acceptance/rest/auth_spec.rb#L929) - * [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L933) + * [overrides the default](./spec/acceptance/rest/auth_spec.rb#L930) + * [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L934) * with additional invalid attributes - * [are ignored](./spec/acceptance/rest/auth_spec.rb#L943) + * [are ignored](./spec/acceptance/rest/auth_spec.rb#L944) * when required fields are missing - * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L954) - * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L958) + * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L955) + * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L959) * timestamp attribute - * [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L985) + * [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L986) * with :query_time auth_option - * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L970) + * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L971) * with :timestamp option - * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L980) + * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L981) * signing - * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L1009) + * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L1010) * lexicographic ordering of channels and operations - * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/rest/auth_spec.rb#L1036) - * [is valid when used for authentication](./spec/acceptance/rest/auth_spec.rb#L1042) + * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/rest/auth_spec.rb#L1037) + * [is valid when used for authentication](./spec/acceptance/rest/auth_spec.rb#L1043) * using token authentication * with :token option - * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L1069) - * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L1073) - * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L1081) - * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L1089) + * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L1070) + * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L1074) + * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L1082) + * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L1090) * and the token expires - * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/rest/auth_spec.rb#L1123) + * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/rest/auth_spec.rb#L1124) * when implicit as a result of using :client_id * and requests to the Ably server are mocked - * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L1153) + * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L1154) * a token is created - * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L1162) - * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L1166) - * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L1170) - * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1181) + * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L1163) + * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L1167) + * [with capability and TTL defaults (#TK2a, #TK2b)](./spec/acceptance/rest/auth_spec.rb#L1171) + * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1182) * when token expires - * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1210) - * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1220) + * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1211) + * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1221) * when :client_id is provided in a token - * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1244) + * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1245) * #client_id_validated? * when using basic auth - * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1256) + * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1257) * when using a token auth string for a token with a client_id - * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1264) + * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1265) * when using a token * with a client_id - * [is true](./spec/acceptance/rest/auth_spec.rb#L1273) + * [is true](./spec/acceptance/rest/auth_spec.rb#L1274) * with no client_id (anonymous) - * [is true](./spec/acceptance/rest/auth_spec.rb#L1281) + * [is true](./spec/acceptance/rest/auth_spec.rb#L1282) * with a wildcard client_id (anonymous) - * [is false](./spec/acceptance/rest/auth_spec.rb#L1289) + * [is false](./spec/acceptance/rest/auth_spec.rb#L1290) * when using a token request with a client_id - * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1298) + * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1299) * after authentication - * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1305) + * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1306) * when using a :key and basic auth - * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1313) - * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1317) - * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1321) + * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1314) + * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1318) + * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1322) * deprecated #authorise - * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1357) - * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1362) + * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1331) + * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1336) + * when using JWT + * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/rest/auth_spec.rb#L1348) + * when the JWT embeds an Ably token + * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1355) + * and the requested token is encrypted + * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1362) + * when the token requested is returned with application/jwt content type + * [authenticates correctly and pulls stats](./spec/acceptance/rest/auth_spec.rb#L1373) ### Ably::Rest _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_ * transport protocol * when protocol is not defined it defaults to :msgpack @@ -1820,38 +1864,41 @@ * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L238) * with a wildcard client_id in the message * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L244) * with an empty client_id in the message * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L250) + * with a non ASCII channel name + * stubbed + * [correctly encodes the channel name](./spec/acceptance/rest/channel_spec.rb#L272) * #history - * [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L278) - * [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L282) - * [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L310) + * [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L297) + * [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L301) + * [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L329) * message timestamps - * [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L295) + * [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L314) * message IDs - * [is unique](./spec/acceptance/rest/channel_spec.rb#L303) + * [is unique](./spec/acceptance/rest/channel_spec.rb#L322) * direction - * [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L331) - * [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L337) + * [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L356) + * [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L362) * limit - * [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L349) + * [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L374) * #history option * :start * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L389) + * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L414) * with a Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L399) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L424) * :end * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L389) + * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L414) * with a Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L399) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L424) * when argument start is after end - * [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L409) + * [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L434) * #presence - * [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L419) + * [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L444) ### Ably::Rest::Channels _(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_spec.rb))_ * using JSON protocol * using shortcut method #channel on the client object @@ -1885,16 +1932,16 @@ * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L49) * with a non string :client_id * [raises an ArgumentError](./spec/acceptance/rest/client_spec.rb#L57) * with an invalid wildcard "*" :client_id * [raises an exception](./spec/acceptance/rest/client_spec.rb#L63) - * with an :auth_callback Proc - * [calls the auth Proc to get a new token](./spec/acceptance/rest/client_spec.rb#L71) + * with an :auth_callback lambda + * [calls the auth lambda to get a new token](./spec/acceptance/rest/client_spec.rb#L71) * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L76) * with :default_token_params * [overides the default token params (#TO3j11)](./spec/acceptance/rest/client_spec.rb#L90) - * with an :auth_callback Proc (clientId provided in library options instead of as a token_request param) + * with an :auth_callback lambda (clientId provided in library options instead of as a token_request param) * [correctly sets the clientId on the token](./spec/acceptance/rest/client_spec.rb#L100) * with an auth URL * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L110) * before any REST request * [sends an HTTP request to the provided auth URL to get a new token](./spec/acceptance/rest/client_spec.rb#L121) @@ -1915,30 +1962,30 @@ * [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L227) * connection transport * defaults * for default host * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L244) - * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L248) + * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L248) * for the fallback hosts * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L254) - * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L258) + * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L258) * with custom http_open_timeout and http_request_timeout options * for default host * [is configured to use custom open timeout](./spec/acceptance/rest/client_spec.rb#L270) * [is configured to use custom request timeout](./spec/acceptance/rest/client_spec.rb#L274) * for the fallback hosts * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L280) - * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L284) + * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L284) * fallback hosts * configured * [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) * when environment is NOT production (#RSC15b) * [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L315) * when environment is production * and connection times out * [tries fallback hosts 3 times (#RSC15b, #RSC15b)](./spec/acceptance/rest/client_spec.rb#L354) - * and the total request time exeeds 10 seconds + * and the total request time exeeds 15 seconds * [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L369) * and connection fails * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L385) * and first request to primary endpoint fails * [tries a fallback host, and for the next request tries the primary endpoint again (#RSC15e)](./spec/acceptance/rest/client_spec.rb#L419) @@ -1951,59 +1998,90 @@ * [attempts the fallback hosts as this is an authentication failure (#RSC15b, #RSC15a, #TO3k6)](./spec/acceptance/rest/client_spec.rb#L517) * with an empty array of fallback hosts provided (#RSC15b, #RSC15a, #TO3k6) * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L530) * using a local web-server * and timing out the primary host - * with request timeout less than max_retry_duration - * [tries one of the fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L586) - * with request timeout less than max_retry_duration - * [tries one of the fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L608) + * POST with request timeout less than max_retry_duration + * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L594) + * GET with request timeout less than max_retry_duration + * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L617) + * POST with request timeout more than max_retry_duration + * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L640) + * GET with request timeout more than max_retry_duration + * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L662) * and failing the primary host - * [tries one of the fallback hosts](./spec/acceptance/rest/client_spec.rb#L652) + * [tries one of the fallback hosts](./spec/acceptance/rest/client_spec.rb#L707) * when environment is not production and server returns a 50x error * with custom fallback hosts provided (#RSC15b, #TO3k6) - * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L702) + * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L757) * with an empty array of fallback hosts provided (#RSC15b, #TO3k6) - * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L715) + * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L770) * with fallback_hosts_use_default: true (#RSC15b, #TO3k7) - * [attempts the default fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L740) + * [attempts the default fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L795) * with a custom host * that does not exist - * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L756) + * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L811) * fallback hosts - * [are never used](./spec/acceptance/rest/client_spec.rb#L777) + * [are never used](./spec/acceptance/rest/client_spec.rb#L832) * that times out - * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L792) + * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L847) * fallback hosts - * [are never used](./spec/acceptance/rest/client_spec.rb#L805) + * [are never used](./spec/acceptance/rest/client_spec.rb#L860) * HTTP configuration options - * [is frozen](./spec/acceptance/rest/client_spec.rb#L862) + * [is frozen](./spec/acceptance/rest/client_spec.rb#L917) * defaults - * [#http_open_timeout is 4s](./spec/acceptance/rest/client_spec.rb#L817) - * [#http_request_timeout is 15s](./spec/acceptance/rest/client_spec.rb#L821) - * [#http_max_retry_count is 3](./spec/acceptance/rest/client_spec.rb#L825) - * [#http_max_retry_duration is 10s](./spec/acceptance/rest/client_spec.rb#L829) + * [#http_open_timeout is 4s](./spec/acceptance/rest/client_spec.rb#L872) + * [#http_request_timeout is 10s](./spec/acceptance/rest/client_spec.rb#L876) + * [#http_max_retry_count is 3](./spec/acceptance/rest/client_spec.rb#L880) + * [#http_max_retry_duration is 15s](./spec/acceptance/rest/client_spec.rb#L884) * configured - * [#http_open_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L845) - * [#http_request_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L849) - * [#http_max_retry_count uses provided value](./spec/acceptance/rest/client_spec.rb#L853) - * [#http_max_retry_duration uses provided value](./spec/acceptance/rest/client_spec.rb#L857) + * [#http_open_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L900) + * [#http_request_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L904) + * [#http_max_retry_count uses provided value](./spec/acceptance/rest/client_spec.rb#L908) + * [#http_max_retry_duration uses provided value](./spec/acceptance/rest/client_spec.rb#L912) * #auth - * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L873) - * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L877) + * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L928) + * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L932) * version headers * with variant none - * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L911) + * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L966) * with variant foo - * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L911) + * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L966) * #request (#RSC19*) * get - * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L924) + * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L979) * 404 request to invalid URL - * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L931) + * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L986) * paged results - * [provides paging](./spec/acceptance/rest/client_spec.rb#L943) + * [provides paging](./spec/acceptance/rest/client_spec.rb#L998) + * request_id generation + * Timeout error + * with option add_request_ids: true + * [has an error with the same request_id of the request](./spec/acceptance/rest/client_spec.rb#L1033) + * with option add_request_ids: true and REST operations with a message body + * with mocks to inspect the params + * with a single publish + * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1055) + * with an array publish + * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1062) + * without mocks to ensure the requests are accepted + * with a single publish + * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1071) + * with an array publish + * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1078) + * option add_request_ids: true and specified fallback hosts + * [request_id is the same across retries](./spec/acceptance/rest/client_spec.rb#L1103) + * without request_id + * [does not include request_id in ConnectionTimeout error](./spec/acceptance/rest/client_spec.rb#L1115) + * UnauthorizedRequest nonce error + * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/rest/client_spec.rb#L1128) + * failed request logging + * [is absent when requests do not fail](./spec/acceptance/rest/client_spec.rb#L1145) + * with the first request failing + * [is present with success message when requests do not actually fail](./spec/acceptance/rest/client_spec.rb#L1159) + * with all requests failing + * [is present when all requests fail](./spec/acceptance/rest/client_spec.rb#L1175) ### Ably::Models::MessageEncoders _(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_ * with binary transport protocol * without encryption @@ -2050,77 +2128,77 @@ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L48) * Binary * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L57) * with supported extra payload content type (#RSL1h, #RSL6a2) * JSON Object (Hash) - * PENDING: *[is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L68)* + * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L70) * JSON Array - * PENDING: *[is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L78)* + * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/rest/message_spec.rb#L80) * nil - * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L86) + * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L87) * with unsupported data payload content type * Integer - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L97) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L98) * Float - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L105) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L106) * Boolean - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L113) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L114) * False - * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L121) + * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L122) * encryption and encoding * with #publish and #history * with AES-128-CBC using crypto-data-128.json fixtures (#RTL7d) * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * item 1 with encrypted encoding cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d) * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * item 1 with encrypted encoding cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64 * behaves like an Ably encrypter and decrypter - * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L166) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L181) + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182) * when publishing lots of messages - * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L214) + * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L215) * when retrieving #history with a different protocol - * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L241) - * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L241) - * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L241) + * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242) + * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242) + * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242) * when publishing on an unencrypted channel and retrieving with #history on an encrypted channel - * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L257) + * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L258) * when publishing on an encrypted channel and retrieving with #history on an unencrypted channel - * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L278) - * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L284) + * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L279) + * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L285) * publishing on an encrypted channel and retrieving #history with a different algorithm on another client (#RTL7e) - * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L305) - * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L311) + * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L306) + * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L312) * publishing on an encrypted channel and subscribing with a different key on another client - * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L332) - * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L338) + * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L333) + * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L339) ### Ably::Rest::Presence _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_ * using JSON protocol * tested against presence fixture data set up in test app @@ -2133,58 +2211,61 @@ * with :client_id option * [returns a list members filtered by the provided client ID](./spec/acceptance/rest/presence_spec.rb#L95) * with :connection_id option * [returns a list members filtered by the provided connection ID](./spec/acceptance/rest/presence_spec.rb#L106) * [returns a list members filtered by the provided connection ID](./spec/acceptance/rest/presence_spec.rb#L110) + * with a non ASCII channel name + * stubbed + * [correctly encodes the channel name](./spec/acceptance/rest/presence_spec.rb#L127) * #history - * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L119) + * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L138) * default behaviour - * [uses backwards direction](./spec/acceptance/rest/presence_spec.rb#L134) + * [uses backwards direction](./spec/acceptance/rest/presence_spec.rb#L153) * with options * direction: :forwards - * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L146) + * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L165) * direction: :backwards - * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L161) + * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L180) * #history * with options * limit options * default - * [is set to 100](./spec/acceptance/rest/presence_spec.rb#L206) + * [is set to 100](./spec/acceptance/rest/presence_spec.rb#L225) * set to 1000 - * [is passes the limit query param value 1000](./spec/acceptance/rest/presence_spec.rb#L219) + * [is passes the limit query param value 1000](./spec/acceptance/rest/presence_spec.rb#L238) * with time range options * :start * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L249) + * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L268) * with Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L259) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L278) * :end * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L249) + * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L268) * with Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L259) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L278) * when argument start is after end - * [should raise an exception](./spec/acceptance/rest/presence_spec.rb#L270) + * [should raise an exception](./spec/acceptance/rest/presence_spec.rb#L289) * decoding * with encoded fixture data * #history - * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L289) + * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L308) * #get - * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L296) + * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L315) * decoding permutations using mocked #history * valid decodeable content * #get - * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L349) + * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L368) * #history - * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L366) + * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L385) * invalid data * #get - * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L397) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L401) + * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L416) + * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L420) * #history - * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L421) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L425) + * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L440) + * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L444) ### Ably::Rest::Client#stats _(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_ * using JSON protocol * fetching application stats @@ -2251,26 +2332,25 @@ * [gets converted to UTF-8](./spec/unit/auth_spec.rb#L52) * [is compatible with original encoding](./spec/unit/auth_spec.rb#L56) * as Integer * [raises an argument error](./spec/unit/auth_spec.rb#L64) * defaults - * [should default TTL to 1 hour](./spec/unit/auth_spec.rb#L74) - * [should default capability to all](./spec/unit/auth_spec.rb#L78) - * [should have defaults for :ttl and :capability](./spec/unit/auth_spec.rb#L82) + * [should have no default TTL](./spec/unit/auth_spec.rb#L71) + * [should have no default capability](./spec/unit/auth_spec.rb#L75) ### Ably::Logger _(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_ * [uses the language provided Logger by default](./spec/unit/logger_spec.rb#L15) * with a custom Logger * with an invalid interface * [raises an exception](./spec/unit/logger_spec.rb#L118) * with a valid interface - * [is used](./spec/unit/logger_spec.rb#L137) + * [is used](./spec/unit/logger_spec.rb#L129) * with blocks - * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L152) + * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L144) * with an exception in the logger block - * [catches the error and continues](./spec/unit/logger_spec.rb#L167) + * [catches the error and continues](./spec/unit/logger_spec.rb#L159) ### Ably::Models::AuthDetails _(see [spec/unit/models/auth_details_spec.rb](./spec/unit/models/auth_details_spec.rb))_ * behaves like a model * attributes @@ -3415,15 +3495,15 @@ * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L245) * [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L249) * with log_level :none * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L257) * with custom logger and log_level - * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L275) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L279) + * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L267) + * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L271) * delegators - * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L293) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L298) + * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L285) + * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L290) * delegation to the REST Client * [passes on the options to the initializer](./spec/unit/realtime/client_spec.rb#L15) * for attribute * [#environment](./spec/unit/realtime/client_spec.rb#L23) * [#use_tls?](./spec/unit/realtime/client_spec.rb#L23) @@ -3505,29 +3585,34 @@ _(see [spec/unit/rest/channel_spec.rb](./spec/unit/rest/channel_spec.rb))_ * #initializer * as UTF_8 string * [is permitted](./spec/unit/rest/channel_spec.rb#L16) * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L20) + * as frozen UTF_8 string + * [is permitted](./spec/unit/rest/channel_spec.rb#L29) + * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L33) * as SHIFT_JIS string - * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L28) - * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L32) + * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L41) + * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L45) * as ASCII_8BIT string - * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L40) - * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L44) + * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L53) + * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L57) * as Integer - * [raises an argument error](./spec/unit/rest/channel_spec.rb#L52) + * [raises an argument error](./spec/unit/rest/channel_spec.rb#L65) * as Nil - * [raises an argument error](./spec/unit/rest/channel_spec.rb#L60) + * [raises an argument error](./spec/unit/rest/channel_spec.rb#L73) * #publish name argument * as UTF_8 string - * [is permitted](./spec/unit/rest/channel_spec.rb#L72) + * [is permitted](./spec/unit/rest/channel_spec.rb#L85) + * as frozen UTF_8 string + * [is permitted](./spec/unit/rest/channel_spec.rb#L94) * as SHIFT_JIS string - * [is permitted](./spec/unit/rest/channel_spec.rb#L80) + * [is permitted](./spec/unit/rest/channel_spec.rb#L102) * as ASCII_8BIT string - * [is permitted](./spec/unit/rest/channel_spec.rb#L88) + * [is permitted](./spec/unit/rest/channel_spec.rb#L110) * as Integer - * [raises an argument error](./spec/unit/rest/channel_spec.rb#L96) + * [raises an argument error](./spec/unit/rest/channel_spec.rb#L118) ### Ably::Rest::Channels _(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_ * creating channels * [#get creates a channel](./spec/unit/rest/channels_spec.rb#L12) @@ -3602,15 +3687,15 @@ * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L245) * [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L249) * with log_level :none * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L257) * with custom logger and log_level - * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L275) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L279) + * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L267) + * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L271) * delegators - * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L293) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L298) + * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L285) + * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L290) * initializer options * TLS * disabled * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection (#RSA1)](./spec/unit/rest/client_spec.rb#L17) * :use_token_auth @@ -3620,10 +3705,12 @@ * without a key * [fails as a key is required if not using token auth](./spec/unit/rest/client_spec.rb#L36) * set to true * without a key or token * [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L46) + * request_id generation + * [includes request_id in URL](./spec/unit/rest/client_spec.rb#L56) ### Ably::Rest _(see [spec/unit/rest/rest_spec.rb](./spec/unit/rest/rest_spec.rb))_ * [constructor returns an Ably::Rest::Client](./spec/unit/rest/rest_spec.rb#L7) @@ -3671,8 +3758,8 @@ ------- ## Test summary - * Passing tests: 1806 - * Pending tests: 12 + * Passing tests: 1852 + * Pending tests: 6 * Failing tests: 0