diff --git a/CHANGELOG.md b/CHANGELOG.md index 0032beef..70de4fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Change Log +## [v2.0.0](https://github.com/ably/ably-pubsub-ruby/tree/v2.0.0) + +[Full Changelog](https://github.com/ably/ably-pubsub-ruby/compare/v1.2.8...v2.0.0) + +This is a major release. The `ably` gem is replaced by two gems released together at the same version: `ably-pubsub-server`, which applications depend on, and `ably-pubsub-core`. See the [migration guide](./UPDATING.md) for details on upgrading from 1.x. + +**Breaking changes:** + +* Split the SDK into the `ably-pubsub-core` and `ably-pubsub-server` gems; clients are created with `Ably::PubSub::Server.create_http_client` and `Ably::PubSub::Server.create_realtime_client` (#458) +* Move client namespaces under `Ably::PubSub`: `Ably::Rest` becomes `Ably::PubSub::Http` and `Ably::Realtime` becomes `Ably::PubSub::Realtime` (#458) +* Replace the `environment`, `rest_host`, `realtime_host` and `fallback_hosts_use_default` options with the `endpoint` client option; traffic moves to `main.realtime.ably.net` (#458) +* Raise when releasing a realtime channel that isn't detached (RTS4c-e) (#458, #460) +* Upgrade to Ably protocol version 5 (#450) +* `publish` now returns an `Ably::Models::PublishResult` with message serials (RSL1n) (#450) +* Rewrite the `Stats` model to match spec v2.1+ (TS12) (#450) + +**Implemented enhancements:** + +* Add `update_message`, `delete_message` and `append_message` for HTTP and Realtime channels (RSL15/RTL32) (#450) + +**Fixed bugs:** + +* Fix REST presence query params to use the correct camelCase format (`clientId`, `connectionId`) (#458) + +**Other changes:** + +* Rename the repository and SDK agent identifier to `ably-pubsub-ruby` (#457, #458) +* Add a lockstep release workflow publishing both gems via RubyGems trusted publishing (#455, #458) +* Harden GitHub Actions workflows (#451) +* Improve the README (#446, #447) + ## [v1.2.8](https://github.com/ably/ably-ruby/tree/v1.2.8) [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.2.7...v1.2.8) diff --git a/SPEC.md b/SPEC.md index 71c8b89b..797672bc 100644 --- a/SPEC.md +++ b/SPEC.md @@ -1,3295 +1,3296 @@ -# Ably Realtime & REST Client Library 1.2.8 Specification +# Ably Realtime & REST Client Library 2.0.0 Specification -### Ably::Realtime::Auth -_(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_spec.rb))_ +### Ably::Auth +_(see [spec/acceptance/http/auth_spec.rb](./spec/acceptance/http/auth_spec.rb))_ * using JSON protocol - * with basic auth - * #authentication_security_requirements_met? - * [returns true](./spec/acceptance/realtime/auth_spec.rb#L28) - * #key - * [contains the API key](./spec/acceptance/realtime/auth_spec.rb#L35) - * #key_name - * [contains the API key name](./spec/acceptance/realtime/auth_spec.rb#L42) - * #key_secret - * [contains the API key secret](./spec/acceptance/realtime/auth_spec.rb#L49) - * #using_basic_auth? - * [is true when using Basic Auth](./spec/acceptance/realtime/auth_spec.rb#L56) - * #using_token_auth? - * [is false when using Basic Auth](./spec/acceptance/realtime/auth_spec.rb#L63) - * with token auth - * #client_id - * [contains the ClientOptions client ID](./spec/acceptance/realtime/auth_spec.rb#L75) - * #current_token_details - * [contains the current token after auth](./spec/acceptance/realtime/auth_spec.rb#L82) - * #token_renewable? - * [is true when an API key exists](./spec/acceptance/realtime/auth_spec.rb#L92) - * #options (auth_options) - * [contains the configured auth options](./spec/acceptance/realtime/auth_spec.rb#L104) - * #token_params - * [contains the configured auth options](./spec/acceptance/realtime/auth_spec.rb#L115) - * #using_basic_auth? - * [is false when using Token Auth](./spec/acceptance/realtime/auth_spec.rb#L124) - * #using_token_auth? - * [is true when using Token Auth](./spec/acceptance/realtime/auth_spec.rb#L133) - * methods - * #create_token_request - * [returns a token request asynchronously](./spec/acceptance/realtime/auth_spec.rb#L147) - * #create_token_request_async - * [returns a token request synchronously](./spec/acceptance/realtime/auth_spec.rb#L157) - * #request_token - * [returns a token asynchronously](./spec/acceptance/realtime/auth_spec.rb#L167) - * #request_token_async - * [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L178) - * #authorize - * with token auth - * [returns a token asynchronously](./spec/acceptance/realtime/auth_spec.rb#L192) - * with auth_callback blocking - * with a slow auth callback response - * [asynchronously authenticates](./spec/acceptance/realtime/auth_spec.rb#L215) - * when implicitly called, 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 fails with an exception](./spec/acceptance/realtime/auth_spec.rb#L239) - * and an incompatible client_id in a TokenRequest object passed to the auth callback and fails with an exception - * [rejects a TokenRequests object with an incompatible client_id and fails with an exception](./spec/acceptance/realtime/auth_spec.rb#L255) - * when explicitly called, 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 fails with an exception](./spec/acceptance/realtime/auth_spec.rb#L287) - * when already authenticated with a valid token - * [ensures message delivery continuity whilst upgrading (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L700) - * when INITIALIZED - * [obtains a token and connects to Ably (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L328) - * when CONNECTING - * [aborts the current connection process, obtains a token, and connects to Ably again (#RTC8b)](./spec/acceptance/realtime/auth_spec.rb#L350) - * when FAILED - * [obtains a token and connects to Ably (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L369) - * when CLOSED - * [obtains a token and connects to Ably (#RTC8c, #RTC8b1, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L386) - * when in the CONNECTED state - * with a valid token in the AUTH ProtocolMessage sent - * PENDING: *[obtains a new token (that upgrades from anonymous to identified) and upgrades the connection after receiving an updated CONNECTED ProtocolMessage (#RTC8a, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L409)* - * [obtains a new token (as anonymous user before & after) and upgrades the connection after receiving an updated CONNECTED ProtocolMessage (#RTC8a, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L445) - * when DISCONNECTED - * PENDING: *[obtains a token, upgrades from anonymous to identified, and connects to Ably immediately (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L481)* - * [obtains a similar anonymous token and connects to Ably immediately (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L517) - * when SUSPENDED - * [obtains a token and connects to Ably immediately (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L561) - * when client is identified - * [transitions the connection state to FAILED if the client_id changes (#RSA15c, #RTC8a2)](./spec/acceptance/realtime/auth_spec.rb#L596) - * when auth fails - * [transitions the connection state to the FAILED state (#RSA15c, #RTC8a2, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L612) - * when the authCallback fails - * [calls the error callback of authorize and leaves the connection intact (#RSA4c3)](./spec/acceptance/realtime/auth_spec.rb#L638) - * when upgrading capabilities - * [is allowed (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L657) - * when downgrading capabilities (#RTC8a1) - * [is allowed and channels are detached](./spec/acceptance/realtime/auth_spec.rb#L683) - * #authorize_async - * [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L734) - * server initiated AUTH ProtocolMessage - * when received - * [should immediately start a new authentication process (#RTN22)](./spec/acceptance/realtime/auth_spec.rb#L755) - * when not received - * [should expect the connection to be disconnected by the server but should resume automatically (#RTN22a)](./spec/acceptance/realtime/auth_spec.rb#L778) - * #auth_params - * [returns the auth params asynchronously](./spec/acceptance/realtime/auth_spec.rb#L804) - * #auth_params_sync - * [returns the auth params synchronously](./spec/acceptance/realtime/auth_spec.rb#L813) - * #auth_header - * [returns an auth header asynchronously](./spec/acceptance/realtime/auth_spec.rb#L820) - * #auth_header_sync - * [returns an auth header synchronously](./spec/acceptance/realtime/auth_spec.rb#L829) + * [has immutable options](./spec/acceptance/http/auth_spec.rb#L48) + * #request_token + * [creates a TokenRequest automatically and sends it to Ably to obtain a token](./spec/acceptance/http/auth_spec.rb#L63) + * [returns a valid TokenDetails object in the expected format with valid issued and expires attributes](./spec/acceptance/http/auth_spec.rb#L72) + * with token_param :client_id + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/http/auth_spec.rb#L105) + * with token_param :capability + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/http/auth_spec.rb#L105) + * with token_param :nonce + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/http/auth_spec.rb#L105) + * with token_param :timestamp + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/http/auth_spec.rb#L105) + * with token_param :ttl + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/http/auth_spec.rb#L105) + * with :key option + * [key_name is used in request and signing uses key_secret](./spec/acceptance/http/auth_spec.rb#L135) + * with :key_name & :key_secret options + * [key_name is used in request and signing uses key_secret](./spec/acceptance/http/auth_spec.rb#L165) + * with :query_time option + * [queries the server for the time (#RSA10k)](./spec/acceptance/http/auth_spec.rb#L173) + * without :query_time option + * [does not query the server for the time](./spec/acceptance/http/auth_spec.rb#L182) + * with :auth_url option merging + * with existing configured auth options + * using unspecified :auth_method + * [requests a token using a GET request with provided headers, and merges client_id into auth_params](./spec/acceptance/http/auth_spec.rb#L222) + * with provided token_params + * [merges provided token_params with existing auth_params and client_id](./spec/acceptance/http/auth_spec.rb#L230) + * with provided auth option auth_params and auth_headers + * [replaces any preconfigured auth_params](./spec/acceptance/http/auth_spec.rb#L238) + * using :get :auth_method and query params in the URL + * [requests a token using a GET request with provided headers, and merges client_id into auth_params and existing URL querystring into new URL querystring](./spec/acceptance/http/auth_spec.rb#L249) + * using :post :auth_method + * [requests a token using a POST request with provided headers, and merges client_id into auth_params as form-encoded post data](./spec/acceptance/http/auth_spec.rb#L259) + * with :auth_url option + * when response from :auth_url is a valid token request + * [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/http/auth_spec.rb#L309) + * [returns a valid token generated from the token request](./spec/acceptance/http/auth_spec.rb#L314) + * with :query_params + * [requests a token from :auth_url with the :query_params](./spec/acceptance/http/auth_spec.rb#L321) + * with :headers + * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/http/auth_spec.rb#L329) + * with POST + * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/http/auth_spec.rb#L337) + * when response from :auth_url is a token details object + * [returns TokenDetails created from the token JSON](./spec/acceptance/http/auth_spec.rb#L362) + * when response from :auth_url is text/plain content type and a token string + * [returns TokenDetails created from the token JSON](./spec/acceptance/http/auth_spec.rb#L380) + * when response is invalid + * 500 + * [raises ServerError](./spec/acceptance/http/auth_spec.rb#L394) + * XML + * [raises InvalidResponseBody](./spec/acceptance/http/auth_spec.rb#L405) + * with a Proc for the :auth_callback option + * that returns a TokenRequest + * [calls the Proc with token_params when authenticating to obtain the request token](./spec/acceptance/http/auth_spec.rb#L428) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/http/auth_spec.rb#L432) + * when authorized + * [sets Auth#client_id to the new token's client_id](./spec/acceptance/http/auth_spec.rb#L439) + * [sets Client#client_id to the new token's client_id](./spec/acceptance/http/auth_spec.rb#L443) + * that returns a TokenDetails JSON object + * [calls the lambda when authenticating to obtain the request token](./spec/acceptance/http/auth_spec.rb#L477) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/http/auth_spec.rb#L482) + * when authorized + * [sets Auth#client_id to the new token's client_id](./spec/acceptance/http/auth_spec.rb#L494) + * [sets Client#client_id to the new token's client_id](./spec/acceptance/http/auth_spec.rb#L498) + * that returns a TokenDetails object + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/http/auth_spec.rb#L513) + * that returns a Token string + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/http/auth_spec.rb#L529) + * with auth_option :client_id + * [returns a token with the client_id](./spec/acceptance/http/auth_spec.rb#L559) + * with token_param :client_id + * [returns a token with the client_id](./spec/acceptance/http/auth_spec.rb#L568) + * before #authorize has been called + * [has no current_token_details](./spec/acceptance/http/auth_spec.rb#L575) + * #authorize (#RSA10, #RSA10j) + * [updates the persisted token params that are then used for subsequent authorize requests](./spec/acceptance/http/auth_spec.rb#L742) + * [updates the persisted auth options that are then used for subsequent authorize requests](./spec/acceptance/http/auth_spec.rb#L748) + * when called for the first time since the client has been instantiated + * [passes all auth_options and token_params to #request_token](./spec/acceptance/http/auth_spec.rb#L589) + * [returns a valid token](./spec/acceptance/http/auth_spec.rb#L594) + * [issues a new token every time (#RSA10a)](./spec/acceptance/http/auth_spec.rb#L598) + * query_time: true with authorize + * [only queries the server time once and then works out the offset, query_time option is never persisted (#RSA10k)](./spec/acceptance/http/auth_spec.rb#L612) + * query_time: true ClientOption when instanced + * [only queries the server time once and then works out the offset, query_time option is never persisted (#RSA10k)](./spec/acceptance/http/auth_spec.rb#L632) + * TokenParams argument + * [has no effect on the defaults when null and TokenParam defaults remain the same](./spec/acceptance/http/auth_spec.rb#L649) + * [updates defaults when present and all previous configured TokenParams are discarded (#RSA10g)](./spec/acceptance/http/auth_spec.rb#L656) + * [updates Auth#token_params attribute with an immutable hash](./spec/acceptance/http/auth_spec.rb#L664) + * [uses TokenParams#timestamp for this request but obtains a new timestamp for subsequence requests (#RSA10g)](./spec/acceptance/http/auth_spec.rb#L669) + * AuthOptions argument + * [has no effect on the defaults when null and AuthOptions defaults remain the same](./spec/acceptance/http/auth_spec.rb#L694) + * [updates defaults when present and all previous configured AuthOptions are discarded (#RSA10g)](./spec/acceptance/http/auth_spec.rb#L700) + * [updates Auth#options attribute with an immutable hash](./spec/acceptance/http/auth_spec.rb#L707) + * [uses AuthOptions#query_time for this request and will not query_time for subsequent requests (#RSA10g)](./spec/acceptance/http/auth_spec.rb#L712) + * [uses AuthOptions#query_time for this request and will query_time again if provided subsequently](./spec/acceptance/http/auth_spec.rb#L718) + * with previous authorisation + * [requests a new token if token is expired](./spec/acceptance/http/auth_spec.rb#L731) + * [issues a new token every time #authorize is called](./spec/acceptance/http/auth_spec.rb#L737) + * with a lambda for the :auth_callback option + * [calls the lambda](./spec/acceptance/http/auth_spec.rb#L765) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/http/auth_spec.rb#L769) + * for every subsequent #request_token + * without a :auth_callback lambda + * [calls the originally provided block](./spec/acceptance/http/auth_spec.rb#L775) + * with a provided block + * [does not call the originally provided lambda and calls the new #request_token :auth_callback lambda](./spec/acceptance/http/auth_spec.rb#L782) + * with an explicit token string that expires + * 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/http/auth_spec.rb#L809) + * 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/http/auth_spec.rb#L827) + * 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/http/auth_spec.rb#L835) + * and a token string without any retrievable client_id + * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/http/auth_spec.rb#L843) + * #create_token_request + * [returns a TokenRequest object](./spec/acceptance/http/auth_spec.rb#L858) + * [returns a TokenRequest that can be passed to a client that can use it for authentication without an API key](./spec/acceptance/http/auth_spec.rb#L862) + * [uses the key name from the client](./spec/acceptance/http/auth_spec.rb#L869) + * [specifies no TTL (#RSA5)](./spec/acceptance/http/auth_spec.rb#L873) + * [specifies no capability (#RSA6)](./spec/acceptance/http/auth_spec.rb#L887) + * 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/http/auth_spec.rb#L881) + * the nonce + * [is unique for every request](./spec/acceptance/http/auth_spec.rb#L892) + * [is at least 16 characters](./spec/acceptance/http/auth_spec.rb#L897) + * with token param :ttl + * [overrides default](./spec/acceptance/http/auth_spec.rb#L908) + * with token param :nonce + * [overrides default](./spec/acceptance/http/auth_spec.rb#L908) + * with token param :client_id + * [overrides default](./spec/acceptance/http/auth_spec.rb#L908) + * when specifying capability + * [overrides the default](./spec/acceptance/http/auth_spec.rb#L919) + * [uses these capabilities when Ably issues an actual token](./spec/acceptance/http/auth_spec.rb#L923) + * with additional invalid attributes + * [are ignored](./spec/acceptance/http/auth_spec.rb#L933) + * when required fields are missing + * [should raise an exception if key secret is missing](./spec/acceptance/http/auth_spec.rb#L944) + * [should raise an exception if key name is missing](./spec/acceptance/http/auth_spec.rb#L948) + * timestamp attribute + * [is a Time object in Ruby and is set to the local time](./spec/acceptance/http/auth_spec.rb#L975) + * with :query_time auth_option + * [queries the server for the timestamp](./spec/acceptance/http/auth_spec.rb#L960) + * with :timestamp option + * [uses the provided timestamp in the token request](./spec/acceptance/http/auth_spec.rb#L970) + * signing + * [generates a valid HMAC](./spec/acceptance/http/auth_spec.rb#L999) + * lexicographic ordering of channels and operations + * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/http/auth_spec.rb#L1026) + * [is valid when used for authentication](./spec/acceptance/http/auth_spec.rb#L1032) + * using token authentication + * with :token option + * [authenticates successfully using the provided :token](./spec/acceptance/http/auth_spec.rb#L1059) + * [disallows publishing on unspecified capability channels](./spec/acceptance/http/auth_spec.rb#L1063) + * [fails if timestamp is invalid](./spec/acceptance/http/auth_spec.rb#L1071) + * [cannot be renewed automatically](./spec/acceptance/http/auth_spec.rb#L1079) + * and the token expires + * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/http/auth_spec.rb#L1113) + * when token expires + * [automatically renews the token (#RSA4b)](./spec/acceptance/http/auth_spec.rb#L1143) + * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/http/auth_spec.rb#L1153) + * when token does not expire + * for the next 2 hours + * [should not request for the new token (#RSA4b1)](./spec/acceptance/http/auth_spec.rb#L1177) + * when :client_id is provided in a token + * [#client_id contains the client_id](./spec/acceptance/http/auth_spec.rb#L1195) * #client_id_validated? * when using basic auth - * before connected - * [is false as basic auth users do not have an identity](./spec/acceptance/realtime/auth_spec.rb#L842) - * once connected - * [is true](./spec/acceptance/realtime/auth_spec.rb#L849) - * [contains a validated wildcard client_id](./spec/acceptance/realtime/auth_spec.rb#L856) - * when using a token string - * with a valid client_id - * before connected - * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L870) - * [#client_id is nil](./spec/acceptance/realtime/auth_spec.rb#L875) - * once connected - * [is true](./spec/acceptance/realtime/auth_spec.rb#L882) - * [#client_id is populated](./spec/acceptance/realtime/auth_spec.rb#L889) - * with no client_id (anonymous) - * before connected - * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L902) - * once connected - * [is true](./spec/acceptance/realtime/auth_spec.rb#L909) - * with a wildcard client_id (anonymous) - * before connected - * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L922) - * once connected - * [is true](./spec/acceptance/realtime/auth_spec.rb#L929) + * [is false as basic auth users do not have an identity](./spec/acceptance/http/auth_spec.rb#L1207) + * 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/http/auth_spec.rb#L1215) * when using a token * with a client_id - * [is true](./spec/acceptance/realtime/auth_spec.rb#L943) - * once connected - * [is true](./spec/acceptance/realtime/auth_spec.rb#L949) + * [is true](./spec/acceptance/http/auth_spec.rb#L1224) * with no client_id (anonymous) - * [is true](./spec/acceptance/realtime/auth_spec.rb#L961) - * once connected - * [is true](./spec/acceptance/realtime/auth_spec.rb#L967) + * [is true](./spec/acceptance/http/auth_spec.rb#L1232) * with a wildcard client_id (anonymous) - * [is true](./spec/acceptance/realtime/auth_spec.rb#L979) - * once connected - * [is true](./spec/acceptance/realtime/auth_spec.rb#L985) + * [is false](./spec/acceptance/http/auth_spec.rb#L1240) * 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#L998) - * once connected - * [is true as identification is completed following CONNECTED ProtocolMessage](./spec/acceptance/realtime/auth_spec.rb#L1004) + * [is not true as identification is not confirmed until authenticated](./spec/acceptance/http/auth_spec.rb#L1249) + * after authentication + * [is true as identification is completed during implicit authentication](./spec/acceptance/http/auth_spec.rb#L1256) + * when using a :key and basic auth + * [#using_token_auth? is false](./spec/acceptance/http/auth_spec.rb#L1264) + * [#key attribute contains the key string](./spec/acceptance/http/auth_spec.rb#L1268) + * [#using_basic_auth? is true](./spec/acceptance/http/auth_spec.rb#L1272) * deprecated #authorise - * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1018) - * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1024) + * [logs a deprecation warning (#RSA10l)](./spec/acceptance/http/auth_spec.rb#L1281) + * [returns a valid token (#RSA10l)](./spec/acceptance/http/auth_spec.rb#L1286) * 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#L1043) - * when credentials are wrong - * [disconnected includes and invalid signature message](./spec/acceptance/realtime/auth_spec.rb#L1056) - * when token is expired - * [receives a 40142 error from the server](./spec/acceptance/realtime/auth_spec.rb#L1068) - * when using auth_callback - * when credentials are valid - * [authentication succeeds and client can post a message](./spec/acceptance/realtime/auth_spec.rb#L1093) - * when credentials are invalid - * [authentication fails and reason for disconnection is invalid signature](./spec/acceptance/realtime/auth_spec.rb#L1108) - * 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#L1124) - * when credentials are invalid - * [fails with an invalid signature error](./spec/acceptance/realtime/auth_spec.rb#L1139) - * 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#L1165) - * and an AUTH procol message is received - * [client reauths correctly without going through a disconnection](./spec/acceptance/realtime/auth_spec.rb#L1193) - * 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#L1221) - * 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#L1239) + * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/http/auth_spec.rb#L1298) + * when the JWT embeds an Ably token + * [authenticates correctly using the embedded token](./spec/acceptance/http/auth_spec.rb#L1305) + * and the requested token is encrypted + * [authenticates correctly using the embedded token](./spec/acceptance/http/auth_spec.rb#L1312) + * when the token requested is returned with application/jwt content type + * [authenticates correctly and pulls stats](./spec/acceptance/http/auth_spec.rb#L1323) -### Ably::Realtime::Channel#history -_(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_ +### Ably::PubSub::Http +_(see [spec/acceptance/http/base_spec.rb](./spec/acceptance/http/base_spec.rb))_ + * transport protocol + * when protocol is not defined it defaults to :msgpack + * [uses MsgPack](./spec/acceptance/http/base_spec.rb#L27) + * when option {protocol: :json} is used + * [uses JSON](./spec/acceptance/http/base_spec.rb#L43) + * when option {use_binary_protocol: false} is used + * [uses JSON](./spec/acceptance/http/base_spec.rb#L43) + * when option {protocol: :msgpack} is used + * [uses MsgPack](./spec/acceptance/http/base_spec.rb#L60) + * when option {use_binary_protocol: true} is used + * [uses MsgPack](./spec/acceptance/http/base_spec.rb#L60) * using JSON protocol - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_history_spec.rb#L21) - * with a single client publishing and receiving - * [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#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#L114) - * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L127) - * and REST history - * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L145) - * with option until_attach: true - * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L172) - * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L242) - * when channel receives update event after an attachment - * [updates attach_serial](./spec/acceptance/realtime/channel_history_spec.rb#L197) - * and two pages of messages - * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L208) + * failed requests + * due to invalid Auth + * [should raise an UnauthorizedRequest exception with a valid error message and code](./spec/acceptance/http/base_spec.rb#L75) + * server error with JSON error response body + * [should raise a ServerError exception](./spec/acceptance/http/base_spec.rb#L95) + * 500 server error without a valid JSON response body + * [should raise a ServerError exception](./spec/acceptance/http/base_spec.rb#L108) + * token authentication failures + * when auth#token_renewable? + * [should automatically reissue a token](./spec/acceptance/http/base_spec.rb#L146) + * when NOT auth#token_renewable? + * [should raise an TokenExpired exception](./spec/acceptance/http/base_spec.rb#L161) -### Ably::Realtime::Channel -_(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_ +### Ably::PubSub::Http::Channel +_(see [spec/acceptance/http/channel_spec.rb](./spec/acceptance/http/channel_spec.rb))_ * using JSON protocol - * initialization - * with :auto_connect option set to false on connection - * [remains initialized when accessing a channel](./spec/acceptance/realtime/channel_spec.rb#L29) - * [opens a connection implicitly on #attach](./spec/acceptance/realtime/channel_spec.rb#L37) - * #attach - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L240) - * [calls the SafeDeferrable callback on success (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L245) - * when initialized - * [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L48) - * [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L58) - * [attaches to a channel](./spec/acceptance/realtime/channel_spec.rb#L71) - * [attaches to a channel and calls the provided block (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L79) - * [sets attach_serial property after the attachment (#RTL15a)](./spec/acceptance/realtime/channel_spec.rb#L86) - * [sends an ATTACH and waits for an ATTACHED (#RTL4c)](./spec/acceptance/realtime/channel_spec.rb#L96) - * [implicitly attaches the channel (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L208) - * context when channel options contain modes - * [sends an ATTACH with options as flags (#RTL4l)](./spec/acceptance/realtime/channel_spec.rb#L125) - * when channel is reattaching - * [sends ATTACH_RESUME flag along with other modes (RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L139) - * context when channel options contain params - * [sends an ATTACH with params (#RTL4k)](./spec/acceptance/realtime/channel_spec.rb#L167) - * when received attached - * [decodes flags and sets it as modes on channel options (#RTL4m)](./spec/acceptance/realtime/channel_spec.rb#L182) - * [set params as channel options params (#RTL4k1)](./spec/acceptance/realtime/channel_spec.rb#L193) - * when the implicit channel attach fails - * [registers the listener anyway (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L225) - * when an ATTACHED acknowledge is not received on the current connection - * [sends another ATTACH each time the connection becomes connected](./spec/acceptance/realtime/channel_spec.rb#L256) - * when state is :attached - * [does nothing (#RTL4a)](./spec/acceptance/realtime/channel_spec.rb#L294) - * when state is :failed - * [reattaches and sets the errorReason to nil (#RTL4g)](./spec/acceptance/realtime/channel_spec.rb#L314) - * when state is :detaching - * [does the attach operation after the completion of the pending request (#RTL4h)](./spec/acceptance/realtime/channel_spec.rb#L329) - * with many connections and many channels on each simultaneously - * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L359) - * failure as a result of insufficient key permissions - * [emits failed event (#RTL4e)](./spec/acceptance/realtime/channel_spec.rb#L390) - * [calls the errback of the returned Deferrable (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L399) - * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L407) - * and subsequent authorisation with suitable permissions - * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L416) - * with connection state - * [is initialized (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L460) - * [is connecting (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L468) - * [is disconnected (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L477) - * clean attach (RTL4j) - * when channel wasn't previously attached - * [doesn't send ATTACH_RESUME](./spec/acceptance/realtime/channel_spec.rb#L492) - * when channel was explicitly detached - * [doesn't send ATTACH_RESUME](./spec/acceptance/realtime/channel_spec.rb#L507) - * #detach - * when state is :attached - * [it detaches from a channel (#RTL5d)](./spec/acceptance/realtime/channel_spec.rb#L533) - * [detaches from a channel and calls the provided block (#RTL5d, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L546) - * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L559) - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L573) - * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L583) - * and DETACHED message is not received within realtime request timeout - * [fails the deferrable and returns to the previous state (#RTL5f, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L600) - * when state is :failed - * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L620) - * when state is :attaching - * [waits for the attach to complete and then moves to detached](./spec/acceptance/realtime/channel_spec.rb#L633) - * when state is :detaching - * [ignores subsequent #detach calls but calls the callback if provided (#RTL5i)](./spec/acceptance/realtime/channel_spec.rb#L650) - * when state is :suspended - * [moves the channel state immediately to DETACHED state (#RTL5j)](./spec/acceptance/realtime/channel_spec.rb#L669) - * when state is :initialized - * [does nothing as there is no channel to detach (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L692) - * [returns a valid deferrable](./spec/acceptance/realtime/channel_spec.rb#L700) - * when state is :detached - * [does nothing as the channel is detached (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L710) - * when connection state is - * closing - * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L730) - * failed and channel is failed - * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L750) - * failed and channel is detached - * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L772) - * initialized - * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L792) - * connecting - * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L809) - * disconnected - * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L830) - * automatic channel recovery - * when an ATTACH request times out - * [moves to the SUSPENDED state (#RTL4f)](./spec/acceptance/realtime/channel_spec.rb#L857) - * if a subsequent ATTACHED is received on an ATTACHED channel - * [ignores the additional ATTACHED if resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L871) - * [emits an UPDATE only when resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L885) - * [emits an UPDATE when resumed is true and includes the reason error from the ProtocolMessage (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L901) * #publish - * when channel is attached (#RTL6c1) - * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L926) - * #(RTL17) - * when channel is initialized - * [sends messages only on attach](./spec/acceptance/realtime/channel_spec.rb#L939) - * when channel is attaching - * [sends messages only on attach](./spec/acceptance/realtime/channel_spec.rb#L954) - * when channel is detaching - * [stops sending message](./spec/acceptance/realtime/channel_spec.rb#L977) - * when channel is detached - * [stops sending message](./spec/acceptance/realtime/channel_spec.rb#L1005) - * when channel is failed - * [errors when trying to send a message](./spec/acceptance/realtime/channel_spec.rb#L1031) - * when channel is not attached in state Initializing (#RTL6c1) - * [publishes messages immediately and does not implicitly attach (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1049) - * when channel is Attaching (#RTL6c1) - * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1066) - * when channel is Detaching (#RTL6c1) - * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1091) - * when channel is Detached (#RTL6c1) - * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1121) - * with :queue_messages client option set to false (#RTL6c4) - * and connection state connected (#RTL6c4) - * [publishes the message](./spec/acceptance/realtime/channel_spec.rb#L1154) - * and connection state initialized (#RTL6c4) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1163) - * and connection state connecting (#RTL6c4) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1173) - * and connection state disconnected (#RTL6c4) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) - * and connection state suspended (#RTL6c4) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) - * and connection state closing (#RTL6c4) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) - * and connection state closed (#RTL6c4) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) - * and the channel state is failed (#RTL6c4) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1209) * with name and data arguments - * [publishes the message and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L1227) + * [publishes the message and returns a PublishResult](./spec/acceptance/http/channel_spec.rb#L23) * and additional attributes - * [publishes the message with the attributes and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L1240) - * and additional invalid attributes - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1253) + * [publishes the message with the attributes and returns a PublishResult](./spec/acceptance/http/channel_spec.rb#L32) + * with a client_id configured in the ClientOptions + * [publishes the message without a client_id](./spec/acceptance/http/channel_spec.rb#L43) + * [expects a client_id to be added by the realtime service](./spec/acceptance/http/channel_spec.rb#L51) * with an array of Hash objects with :name and :data attributes - * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L1267) + * [publishes an array of messages in one HTTP request](./spec/acceptance/http/channel_spec.rb#L64) * with an array of Message objects - * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L1295) - * nil attributes - * when name is nil - * [publishes the message without a name attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1319) - * when data is nil - * [publishes the message without a data attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1343) - * with neither name or data attributes - * [publishes the message without any attributes in the payload](./spec/acceptance/realtime/channel_spec.rb#L1367) - * with two invalid message out of 12 - * before client_id is known (validated) - * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1391) - * when client_id is known (validated) - * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1411) - * only invalid messages - * before client_id is known (validated) - * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1430) - * when client_id is known (validated) - * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1449) - * with many many messages and many connections simultaneously - * [publishes all messages, all success callbacks are called, and a history request confirms all messages were published](./spec/acceptance/realtime/channel_spec.rb#L1463) - * with more than allowed messages in a single publish - * [rejects the publish](./spec/acceptance/realtime/channel_spec.rb#L1486) + * when max_message_size and max_frame_size is not set + * and messages size (130 bytes) is smaller than the max_message_size + * [publishes an array of messages in one HTTP request](./spec/acceptance/http/channel_spec.rb#L89) + * and messages size (177784 bytes) is bigger than the max_message_size + * [should not publish and raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/acceptance/http/channel_spec.rb#L105) + * when max_message_size is 655 bytes + * and messages size (130 bytes) is smaller than the max_message_size + * [publishes an array of messages in one HTTP request](./spec/acceptance/http/channel_spec.rb#L127) + * and messages size (177784 bytes) is bigger than the max_message_size + * [should not publish and raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/acceptance/http/channel_spec.rb#L143) + * with a Message object + * [publishes the message](./spec/acceptance/http/channel_spec.rb#L158) + * with a Message object and query params + * [should fail to publish the message (RSL1l1)](./spec/acceptance/http/channel_spec.rb#L170) + * with Messages and query params + * [should fail to publish the message (RSL1l1)](./spec/acceptance/http/channel_spec.rb#L183) + * without adequate permissions on the channel + * [raises a permission error when publishing](./spec/acceptance/http/channel_spec.rb#L193) + * null attributes + * when name is null + * [publishes the message without a name attribute in the payload](./spec/acceptance/http/channel_spec.rb#L202) + * when data is null + * [publishes the message without a data attribute in the payload](./spec/acceptance/http/channel_spec.rb#L213) + * with neither name or data attributes + * [publishes the message without any attributes in the payload](./spec/acceptance/http/channel_spec.rb#L224) * identified clients * when authenticated with a wildcard client_id * with a valid client_id in the message - * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1506) + * [succeeds](./spec/acceptance/http/channel_spec.rb#L241) * with a wildcard client_id in the message - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1520) - * with a non-String client_id in the message - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1527) + * [throws an exception](./spec/acceptance/http/channel_spec.rb#L250) * with an empty client_id in the message - * [succeeds and publishes without a client_id](./spec/acceptance/realtime/channel_spec.rb#L1534) + * [succeeds and publishes without a client_id](./spec/acceptance/http/channel_spec.rb#L256) * when authenticated with a Token string with an implicit client_id - * before the client is CONNECTED and the client's identity has been obtained - * with a valid client_id in the message - * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1556) - * with an invalid client_id in the message - * [succeeds in the client library ( while connecting ) but then fails when delivered to Ably](./spec/acceptance/realtime/channel_spec.rb#L1571) - * with an empty client_id in the message - * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1585) - * after the client is CONNECTED and the client's identity is known + * without having a confirmed identity * with a valid client_id in the message - * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1601) + * [succeeds](./spec/acceptance/http/channel_spec.rb#L273) * with an invalid client_id in the message - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1615) + * [succeeds in the client library but then fails when published to Ably](./spec/acceptance/http/channel_spec.rb#L282) * with an empty client_id in the message - * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1624) - * when authenticated with a valid client_id - * with a valid client_id - * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1646) + * [succeeds and publishes with an implicit client_id](./spec/acceptance/http/channel_spec.rb#L288) + * when authenticated with TokenDetails with a valid client_id + * with a valid client_id in the message + * [succeeds](./spec/acceptance/http/channel_spec.rb#L305) * with a wildcard client_id in the message - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1660) + * [throws an exception](./spec/acceptance/http/channel_spec.rb#L314) * with an invalid client_id in the message - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1667) + * [throws an exception](./spec/acceptance/http/channel_spec.rb#L320) * with an empty client_id in the message - * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1674) + * [succeeds and publishes with an implicit client_id](./spec/acceptance/http/channel_spec.rb#L326) * when anonymous and no client_id * with a client_id in the message - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1695) + * [throws an exception](./spec/acceptance/http/channel_spec.rb#L342) * with a wildcard client_id in the message - * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1702) + * [throws an exception](./spec/acceptance/http/channel_spec.rb#L348) * with an empty client_id in the message - * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1709) - * message size exceeded (#TO3l8) - * and max_message_size is default (65536 bytes) - * [should allow to send a message (32 bytes)](./spec/acceptance/realtime/channel_spec.rb#L1732) - * [should not allow to send a message (700000 bytes)](./spec/acceptance/realtime/channel_spec.rb#L1742) - * and max_message_size is customized (11 bytes) - * and the message size is 30 bytes - * [should not allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1763) - * and max_message_size is nil - * and the message size is 30 bytes - * [should allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1785) - * and the message size is 65537 bytes - * [should not allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1804) - * #subscribe - * with an event argument - * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1824) - * before attach - * [receives messages as soon as attached](./spec/acceptance/realtime/channel_spec.rb#L1834) - * with no event argument - * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L1848) - * with a callback that raises an exception - * [logs the error and continues](./spec/acceptance/realtime/channel_spec.rb#L1860) - * many times with different event names - * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L1881) - * #unsubscribe - * with an event argument - * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1906) - * with no event argument - * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1921) - * when connection state changes to - * :failed - * an :attaching channel - * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1946) - * an :attached channel - * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1963) - * [updates the channel error_reason (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1977) - * a :detached channel - * [remains in the :detached state (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1993) - * a :failed channel - * [remains in the :failed state and ignores the failure error (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L2016) - * a channel ATTACH request - * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2038) - * :closed - * an :attached channel - * [transitions state to :detached (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2054) - * an :attaching channel (#RTL3b) - * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L2067) - * a :detached channel - * [remains in the :detached state (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2084) - * a :failed channel - * [remains in the :failed state and retains the error_reason (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2107) - * a channel ATTACH request when connection CLOSED - * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2129) - * a channel ATTACH request when connection CLOSING - * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2143) - * :suspended - * an :attaching channel - * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2159) - * an :attached channel - * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2173) - * reattaching (#RTN15c3) - * [transitions state automatically to :attaching once the connection is re-established ](./spec/acceptance/realtime/channel_spec.rb#L2186) - * [sends ATTACH_RESUME flag when reattaching (RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2201) - * a :detached channel - * [remains in the :detached state (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2223) - * a :failed channel - * [remains in the :failed state and retains the error_reason (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2246) - * a channel ATTACH request when connection SUSPENDED (#RTL4b) - * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L2270) - * :connected - * a :suspended channel - * [is automatically reattached (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L2286) - * when re-attach attempt fails - * [returns to a suspended state (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L2305) - * :disconnected - * with an initialized channel - * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2334) - * with an attaching channel - * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2347) - * with an attached channel - * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2362) - * with a detached channel - * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2378) - * with a failed channel - * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2402) + * [succeeds and publishes with an implicit client_id](./spec/acceptance/http/channel_spec.rb#L354) + * with a non ASCII channel name + * stubbed + * [correctly encodes the channel name](./spec/acceptance/http/channel_spec.rb#L376) + * with a frozen message event name + * [succeeds and publishes with an implicit client_id](./spec/acceptance/http/channel_spec.rb#L386) + * with a frozen payload + * [succeeds and publishes with an implicit client_id](./spec/acceptance/http/channel_spec.rb#L408) + * message size is exceeded (#TO3l8) + * [should raise Ably::Exceptions::MaxMessageSizeExceeded exception](./spec/acceptance/http/channel_spec.rb#L423) + * #history + * [returns a PaginatedResult model](./spec/acceptance/http/channel_spec.rb#L447) + * [returns the current message history for the channel](./spec/acceptance/http/channel_spec.rb#L451) + * [returns paged history using the PaginatedResult model](./spec/acceptance/http/channel_spec.rb#L479) + * message timestamps + * [are after the messages were published](./spec/acceptance/http/channel_spec.rb#L464) + * message IDs + * [is unique](./spec/acceptance/http/channel_spec.rb#L472) + * direction + * [returns paged history backwards by default](./spec/acceptance/http/channel_spec.rb#L506) + * [returns history forward if specified in the options](./spec/acceptance/http/channel_spec.rb#L512) + * limit + * [defaults to 100](./spec/acceptance/http/channel_spec.rb#L524) + * #history option + * :start + * with milliseconds since epoch value + * [uses this value in the history request](./spec/acceptance/http/channel_spec.rb#L564) + * with a Time object value + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/http/channel_spec.rb#L574) + * :end + * with milliseconds since epoch value + * [uses this value in the history request](./spec/acceptance/http/channel_spec.rb#L564) + * with a Time object value + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/http/channel_spec.rb#L574) + * when argument start is after end + * [should raise an exception](./spec/acceptance/http/channel_spec.rb#L584) * #presence - * [returns a Ably::Realtime::Presence object](./spec/acceptance/realtime/channel_spec.rb#L2417) - * #set_options (#RTL16a) - * when channel is attaching - * behaves like an update that sends ATTACH message - * [sends an ATTACH message on options change](./spec/acceptance/realtime/channel_spec.rb#L2434) - * when channel is attached - * behaves like an update that sends ATTACH message - * [sends an ATTACH message on options change](./spec/acceptance/realtime/channel_spec.rb#L2434) - * when channel is initialized - * [doesn't send ATTACH message](./spec/acceptance/realtime/channel_spec.rb#L2467) - * channel state change - * [emits a ChannelStateChange object](./spec/acceptance/realtime/channel_spec.rb#L2483) - * ChannelStateChange object - * [has current state](./spec/acceptance/realtime/channel_spec.rb#L2492) - * [has a previous state](./spec/acceptance/realtime/channel_spec.rb#L2501) - * [has the event that generated the state change (#TA5)](./spec/acceptance/realtime/channel_spec.rb#L2510) - * [has an empty reason when there is no error](./spec/acceptance/realtime/channel_spec.rb#L2528) - * on failure - * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L2543) - * #resume (#RTL2f) - * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L2558) - * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2566) - * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2585) - * when a connection resume fails - * [is false when channel_serial goes nil (RTP5a1) and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2607) - * [is true when channel_serial is intact and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2625) - * moves to - * suspended - * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2652) - * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2675) - * failed - * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2652) - * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2675) - * when it receives a server-initiated DETACHED (#RTL13) - * and channel is initialized (#RTL13) - * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2710) - * and channel is failed - * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2731) - * and channel is attached - * [reattaches immediately (#RTL13a) with ATTACH_RESUME flag(RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2747) - * and channel is suspended - * [reattaches immediately (#RTL13a) with ATTACH_RESUME flag(RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2776) - * when connection is no longer connected - * [will not attempt to reattach (#RTL13c)](./spec/acceptance/realtime/channel_spec.rb#L2808) - * 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#L2834) - * 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#L2883) + * [returns a REST Presence object](./spec/acceptance/http/channel_spec.rb#L594) + * #status + * [should return channel details status (#RSL8, #RSL8a)](./spec/acceptance/http/channel_spec.rb#L604) -### Ably::Realtime::Channels -_(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/channels_spec.rb))_ +### Ably::PubSub::Http::Channels +_(see [spec/acceptance/http/channels_spec.rb](./spec/acceptance/http/channels_spec.rb))_ * using JSON protocol - * when channel supposed to trigger reattachment per RTL16a (#RTS3c1) - * [will raise an error](./spec/acceptance/realtime/channels_spec.rb#L34) - * params keys are the same but values are different - * [will raise an error](./spec/acceptance/realtime/channels_spec.rb#L50) * using shortcut method #channel on the client object * behaves like a channel - * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6) - * [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L12) + * [returns a channel object](./spec/acceptance/http/channels_spec.rb#L6) + * [returns channel object and passes the provided options](./spec/acceptance/http/channels_spec.rb#L11) * using #get method on client#channels * behaves like a channel - * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6) - * [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L12) + * [returns a channel object](./spec/acceptance/http/channels_spec.rb#L6) + * [returns channel object and passes the provided options](./spec/acceptance/http/channels_spec.rb#L11) + * #set_options (#RTL16) + * [updates channel's options](./spec/acceptance/http/channels_spec.rb#L38) + * when providing Ably::Models::ChannelOptions object + * [updates channel's options](./spec/acceptance/http/channels_spec.rb#L45) * accessing an existing channel object with different options - * [overrides the existing channel options and returns the channel object](./spec/acceptance/realtime/channels_spec.rb#L82) - * [shows deprecation warning](./spec/acceptance/realtime/channels_spec.rb#L90) + * [overrides the existing channel options and returns the channel object (RSN3c)](./spec/acceptance/http/channels_spec.rb#L55) * accessing an existing channel object without specifying any channel options - * [returns the existing channel without modifying the channel options](./spec/acceptance/realtime/channels_spec.rb#L105) + * [returns the existing channel without modifying the channel options](./spec/acceptance/http/channels_spec.rb#L67) * using undocumented array accessor [] method on client#channels * behaves like a channel - * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6) - * [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L12) + * [returns a channel object](./spec/acceptance/http/channels_spec.rb#L6) + * [returns channel object and passes the provided options](./spec/acceptance/http/channels_spec.rb#L11) + * using a frozen channel name + * behaves like a channel + * [returns a channel object](./spec/acceptance/http/channels_spec.rb#L6) + * [returns channel object and passes the provided options](./spec/acceptance/http/channels_spec.rb#L11) -### Ably::Realtime::Client -_(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/client_spec.rb))_ +### Ably::PubSub::Http::Client +_(see [spec/acceptance/http/client_spec.rb](./spec/acceptance/http/client_spec.rb))_ * using JSON protocol - * initialization - * basic auth - * [is enabled by default with a provided :key option](./spec/acceptance/realtime/client_spec.rb#L19) - * with an invalid API key - * [logs an entry with a help href url matching the code #TI5](./spec/acceptance/realtime/client_spec.rb#L32) - * :tls option - * set to false to force a plain-text connection - * [fails to connect because a private key cannot be sent over a non-secure connection](./spec/acceptance/realtime/client_spec.rb#L48) - * token auth - * with TLS enabled - * and a pre-generated Token provided with the :token option - * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L69) - * with valid :key and :use_token_auth option set to true - * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L82) - * with TLS disabled - * and a pre-generated Token provided with the :token option - * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L69) - * with valid :key and :use_token_auth option set to true - * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L82) - * with a Proc for the :auth_callback option - * [calls the Proc](./spec/acceptance/realtime/client_spec.rb#L104) - * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L111) - * when the returned token has a client_id - * [sets Auth#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L119) - * [sets Client#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L127) - * with a wildcard client_id token - * and an explicit client_id in ClientOptions - * [allows uses the explicit client_id in the connection](./spec/acceptance/realtime/client_spec.rb#L145) - * and client_id omitted in ClientOptions - * [uses the token provided clientId in the connection](./spec/acceptance/realtime/client_spec.rb#L161) - * with an invalid wildcard "*" :client_id - * [raises an exception](./spec/acceptance/realtime/client_spec.rb#L177) - * realtime connection settings - * defaults - * [disconnected_retry_timeout is 15s](./spec/acceptance/realtime/client_spec.rb#L186) - * [suspended_retry_timeout is 30s](./spec/acceptance/realtime/client_spec.rb#L191) - * overriden in ClientOptions - * [disconnected_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L200) - * [suspended_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L205) - * #connection - * [provides access to the Connection object](./spec/acceptance/realtime/client_spec.rb#L214) - * #channels - * [provides access to the Channels collection object](./spec/acceptance/realtime/client_spec.rb#L221) + * #initialize + * with only an API key + * [uses basic authentication](./spec/acceptance/http/client_spec.rb#L25) + * with an invalid API key + * [logs an entry with a help href url matching the code #TI5](./spec/acceptance/http/client_spec.rb#L33) + * with an explicit string :token + * [uses token authentication](./spec/acceptance/http/client_spec.rb#L46) + * with :use_token_auth set to true + * [uses token authentication](./spec/acceptance/http/client_spec.rb#L54) + * with a non string :client_id + * [raises an ArgumentError](./spec/acceptance/http/client_spec.rb#L62) + * with an invalid wildcard "*" :client_id + * [raises an exception](./spec/acceptance/http/client_spec.rb#L68) + * with an :auth_callback lambda + * [calls the auth lambda to get a new token](./spec/acceptance/http/client_spec.rb#L76) + * [uses token authentication](./spec/acceptance/http/client_spec.rb#L81) + * with :default_token_params + * [overides the default token params (#TO3j11)](./spec/acceptance/http/client_spec.rb#L95) + * 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/http/client_spec.rb#L105) + * with an auth URL + * [uses token authentication](./spec/acceptance/http/client_spec.rb#L115) + * before any REST request + * [sends an HTTP request to the provided auth URL to get a new token](./spec/acceptance/http/client_spec.rb#L126) + * auth headers + * with basic auth + * [sends the API key in authentication part of the secure URL (the Authorization: Basic header is not used with the Faraday HTTP library by default)](./spec/acceptance/http/client_spec.rb#L147) + * with token auth + * without specifying protocol + * [sends the token string over HTTPS in the Authorization Bearer header with Base64 encoding](./spec/acceptance/http/client_spec.rb#L166) + * when setting constructor ClientOption :tls to false + * [sends the token string over HTTP in the Authorization Bearer header with Base64 encoding](./spec/acceptance/http/client_spec.rb#L176) + * using tokens + * when expired + * [creates a new token automatically when the old token expires](./spec/acceptance/http/client_spec.rb#L209) + * with a different client_id in the subsequent token + * [fails to authenticate and raises an exception](./spec/acceptance/http/client_spec.rb#L222) + * when token has not expired + * [reuses the existing token for every request](./spec/acceptance/http/client_spec.rb#L233) + * connection transport + * defaults + * for default host + * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/http/client_spec.rb#L250) + * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/http/client_spec.rb#L254) + * for the fallback hosts + * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/http/client_spec.rb#L260) + * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/http/client_spec.rb#L264) + * with custom http_open_timeout and http_request_timeout options + * for default host + * [is configured to use custom open timeout](./spec/acceptance/http/client_spec.rb#L276) + * [is configured to use custom request timeout](./spec/acceptance/http/client_spec.rb#L280) + * for the fallback hosts + * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/http/client_spec.rb#L286) + * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/http/client_spec.rb#L290) + * fallback hosts + * configured + * [should make connection attempts to main.a.fallback.ably-realtime.com ... main.e.fallback.ably-realtime.com (#RSC15a, #REC2c1)](./spec/acceptance/http/client_spec.rb#L304) + * when endpoint is a nonprod routing policy (#RSC15b) + * and custom fallback hosts are empty + * [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/http/client_spec.rb#L322) + * and no custom fallback hosts are provided + * [should make connection attempts to sandbox.a.fallback.ably-realtime-nonprod.com ... sandbox.e.fallback.ably-realtime-nonprod.com (#RSC15a, #REC2c3)](./spec/acceptance/http/client_spec.rb#L330) + * when endpoint is the default production routing policy + * and connection times out + * [tries fallback hosts 3 times (#RSC15b, #RSC15b)](./spec/acceptance/http/client_spec.rb#L371) + * and the total request time exeeds 15 seconds + * [makes no further attempts to any fallback hosts](./spec/acceptance/http/client_spec.rb#L386) + * and connection fails + * [tries fallback hosts 3 times](./spec/acceptance/http/client_spec.rb#L402) + * and first request to primary endpoint fails + * [tries a fallback host, and for the next request tries the primary endpoint again (#RSC15e)](./spec/acceptance/http/client_spec.rb#L437) + * and basic authentication fails + * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/http/client_spec.rb#L464) + * and server returns a 50x error + * [attempts the fallback hosts as this is an authentication failure (#RSC15d)](./spec/acceptance/http/client_spec.rb#L486) + * when endpoint is the default production routing policy and server returns a 50x error + * with custom fallback hosts provided + * [attempts the fallback hosts as this is an authentication failure (#RSC15b, #RSC15a, #TO3k6)](./spec/acceptance/http/client_spec.rb#L535) + * 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/http/client_spec.rb#L548) + * using a local web-server + * and timing out the primary host + * POST with request timeout less than max_retry_duration + * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/http/client_spec.rb#L612) + * GET with request timeout less than max_retry_duration + * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/http/client_spec.rb#L635) + * POST with request timeout more than max_retry_duration + * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/http/client_spec.rb#L658) + * GET with request timeout more than max_retry_duration + * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/http/client_spec.rb#L680) + * and failing the primary host + * [tries one of the fallback hosts](./spec/acceptance/http/client_spec.rb#L725) + * to fail the primary host, allow a fallback to succeed, then later trigger a fallback to the primary host (#RSC15f) + * [succeeds and remembers fallback host preferences across requests](./spec/acceptance/http/client_spec.rb#L781) + * with custom :fallback_retry_timeout + * [stops using the preferred fallback after this time](./spec/acceptance/http/client_spec.rb#L818) + * when endpoint is a custom routing policy and server returns a 50x error + * with no fallback hosts provided (#REC2c4) + * [uses the default fallback hosts for that routing policy as this is not an authentication failure](./spec/acceptance/http/client_spec.rb#L872) + * with custom fallback hosts provided (#RSC15b, #TO3k6) + * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/http/client_spec.rb#L900) + * with an empty array of fallback hosts provided (#RSC15b, #TO3k6) + * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/http/client_spec.rb#L913) + * with a hostname endpoint + * that does not exist + * [fails immediately and raises a Faraday Error](./spec/acceptance/http/client_spec.rb#L927) + * fallback hosts + * [are never used (#REC2c2, #RSC15m)](./spec/acceptance/http/client_spec.rb#L948) + * that times out + * [fails immediately and raises a Faraday Error](./spec/acceptance/http/client_spec.rb#L963) + * fallback hosts + * [are never used (#REC2c2, #RSC15m)](./spec/acceptance/http/client_spec.rb#L976) + * HTTP configuration options + * [is frozen](./spec/acceptance/http/client_spec.rb#L1033) + * defaults + * [#http_open_timeout is 4s](./spec/acceptance/http/client_spec.rb#L988) + * [#http_request_timeout is 10s](./spec/acceptance/http/client_spec.rb#L992) + * [#http_max_retry_count is 3](./spec/acceptance/http/client_spec.rb#L996) + * [#http_max_retry_duration is 15s](./spec/acceptance/http/client_spec.rb#L1000) + * configured + * [#http_open_timeout uses provided value](./spec/acceptance/http/client_spec.rb#L1016) + * [#http_request_timeout uses provided value](./spec/acceptance/http/client_spec.rb#L1020) + * [#http_max_retry_count uses provided value](./spec/acceptance/http/client_spec.rb#L1024) + * [#http_max_retry_duration uses provided value](./spec/acceptance/http/client_spec.rb#L1028) * #auth - * [provides access to the Realtime::Auth object](./spec/acceptance/realtime/client_spec.rb#L228) - * #request (#RSC19*) + * [is provides access to the Auth object](./spec/acceptance/http/client_spec.rb#L1044) + * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/http/client_spec.rb#L1048) + * version headers + * with default agent + * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/http/client_spec.rb#L1068) + * with custom ably-ruby/1.1.1 ruby/3.1.1 agent + * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/http/client_spec.rb#L1068) + * #request (#RSC19*, #TO3l9) * get - * [returns an HttpPaginatedResponse object](./spec/acceptance/realtime/client_spec.rb#L240) + * [returns an HttpPaginatedResponse object](./spec/acceptance/http/client_spec.rb#L1090) * 404 request to invalid URL - * [returns an object with 404 status code and error message](./spec/acceptance/realtime/client_spec.rb#L249) + * [returns an object with 404 status code and error message](./spec/acceptance/http/client_spec.rb#L1097) * paged results - * [provides paging](./spec/acceptance/realtime/client_spec.rb#L263) + * [provides paging](./spec/acceptance/http/client_spec.rb#L1109) * post - * [supports post](./spec/acceptance/realtime/client_spec.rb#L294) + * [supports post](./spec/acceptance/http/client_spec.rb#L1134) + * [raises an exception once body size in bytes exceeded](./spec/acceptance/http/client_spec.rb#L1140) * delete - * [supports delete](./spec/acceptance/realtime/client_spec.rb#L308) + * [supports delete](./spec/acceptance/http/client_spec.rb#L1153) * patch - * [supports patch](./spec/acceptance/realtime/client_spec.rb#L325) + * [supports patch](./spec/acceptance/http/client_spec.rb#L1169) + * [raises an exception once body size in bytes exceeded](./spec/acceptance/http/client_spec.rb#L1175) * put - * [supports put](./spec/acceptance/realtime/client_spec.rb#L349) - * #publish (#TBC) - * [publishing a message implicity connects and publishes the message successfully on the provided channel](./spec/acceptance/realtime/client_spec.rb#L367) - * [publishing does not result in a channel being created](./spec/acceptance/realtime/client_spec.rb#L379) - * [publishing supports an array of Message objects](./spec/acceptance/realtime/client_spec.rb#L407) - * [publishing supports an array of Hash objects](./spec/acceptance/realtime/client_spec.rb#L419) - * [publishing on a closed connection fails](./spec/acceptance/realtime/client_spec.rb#L431) - * with extras - * [publishing supports extras](./spec/acceptance/realtime/client_spec.rb#L395) - * queue_messages ClientOption - * when true - * [will queue messages whilst connecting and publish once connected](./spec/acceptance/realtime/client_spec.rb#L447) - * when false - * [will reject messages on an initializing connection](./spec/acceptance/realtime/client_spec.rb#L464) - * with more than allowed messages in a single publish - * [rejects the publish](./spec/acceptance/realtime/client_spec.rb#L481) + * [supports put](./spec/acceptance/http/client_spec.rb#L1198) + * [raises an exception once body size in bytes exceeded](./spec/acceptance/http/client_spec.rb#L1204) + * request_id generation (#RSC7c) + * Timeout error + * with option add_request_ids: true and no fallback hosts + * [has an error with the same request_id of the request](./spec/acceptance/http/client_spec.rb#L1227) + * 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/http/client_spec.rb#L1249) + * with an array publish + * [succeeds and sends the request_id as a param](./spec/acceptance/http/client_spec.rb#L1256) + * without mocks to ensure the requests are accepted + * with a single publish + * [succeeds and sends the request_id as a param](./spec/acceptance/http/client_spec.rb#L1265) + * with an array publish + * [succeeds and sends the request_id as a param](./spec/acceptance/http/client_spec.rb#L1272) + * option add_request_ids: true and default fallback hosts + * [request_id is the same across retries](./spec/acceptance/http/client_spec.rb#L1297) + * without request_id and no fallback hosts + * [does not include request_id in ConnectionTimeout error](./spec/acceptance/http/client_spec.rb#L1309) + * UnauthorizedRequest nonce error + * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/http/client_spec.rb#L1322) + * failed request logging + * [is absent when requests do not fail](./spec/acceptance/http/client_spec.rb#L1339) + * with the first request failing + * [is present with success message when requests do not actually fail](./spec/acceptance/http/client_spec.rb#L1354) + * with all requests failing + * [is present when all requests fail](./spec/acceptance/http/client_spec.rb#L1371) -### Ably::Realtime::Connection failures -_(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/realtime/connection_failures_spec.rb))_ - * using JSON protocol - * authentication failure - * when API key is invalid - * with invalid app part of the key - * [enters the failed state and returns an invalid credentials error](./spec/acceptance/realtime/connection_failures_spec.rb#L29) - * with invalid key name part of the key - * [enters the failed state and returns an authorization error](./spec/acceptance/realtime/connection_failures_spec.rb#L44) - * with auth_url - * opening a new connection - * request fails due to network failure - * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L62) - * request fails due to invalid content - * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L92) - * request fails due to slow response and subsequent timeout - * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L127) - * request fails once due to slow response but succeeds the second time - * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L175) - * existing CONNECTED connection - * authorize request failure leaves connection in existing condition - * [the connection remains in the CONNECTED state and authorize fails (#RSA4c, #RSA4c1, #RSA4c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L196) - * with auth_callback - * opening a new connection - * when callback fails due to an exception - * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L224) - * existing CONNECTED connection - * when callback fails due to the request taking longer than realtime_request_timeout - * [the authorization request fails as configured in the realtime_request_timeout (#RSA4c, #RSA4c1, #RSA4c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L255) - * automatic connection retry - * with invalid WebSocket host - * when disconnected - * [enters the suspended state after multiple attempts to connect](./spec/acceptance/realtime/connection_failures_spec.rb#L320) - * for the first time - * [reattempts connection immediately and then waits disconnected_retry_timeout for a subsequent attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L341) - * #close - * [transitions connection state to :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L358) - * when connection state is :suspended - * [stays in the suspended state after any number of reconnection attempts](./spec/acceptance/realtime/connection_failures_spec.rb#L377) - * for the first time - * [waits suspended_retry_timeout before attempting to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L400) - * #close - * [transitions connection state to :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L422) - * when connection state is :failed - * #close - * [will not transition state to :close and fails with an InvalidStateChange exception](./spec/acceptance/realtime/connection_failures_spec.rb#L441) - * #error_reason - * [contains the error when state is disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L462) - * [contains the error when state is suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L462) - * [contains the error when state is failed](./spec/acceptance/realtime/connection_failures_spec.rb#L462) - * [is reset to nil when :connected](./spec/acceptance/realtime/connection_failures_spec.rb#L476) - * [is reset to nil when :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L487) - * #connect - * connection opening times out - * [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L518) - * when retry intervals are stubbed to attempt reconnection quickly - * [never calls the provided success block](./spec/acceptance/realtime/connection_failures_spec.rb#L542) - * connection resume - * when DISCONNECTED ProtocolMessage received from the server - * [reconnects automatically and immediately (#RTN15a)](./spec/acceptance/realtime/connection_failures_spec.rb#L573) - * when protocolMessage contains token error - * library does not have a means to renew the token (#RTN15h1) - * [moves connection state to failed](./spec/acceptance/realtime/connection_failures_spec.rb#L601) - * library have a means to renew the token (#RTN15h2) - * [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L625) - * connection state freshness is monitored - * [resumes connections when disconnected within the connection_state_ttl period (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L649) - * 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#L689) - * 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#L742) - * [clears the local connection state and uses a new connection when the connection_state_ttl + max_idle_interval period has passed since last activity (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L774) - * [still reattaches the channels automatically following a new connection being established (#RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L807) - * and subsequently fails to reconnect - * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L863) - * when websocket transport is abruptly disconnected - * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L906) - * hosts used - * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L922) - * after successfully reconnecting and resuming - * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L946) - * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L961) - * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L987) - * [retains the client_msg_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1038) - * when messages were published whilst the client was disconnected - * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L1005) - * 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#L1078) - * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1093) - * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1131) - * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1167) - * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L1205) - * [continues to use the client_msg_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1220) - * 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#L1257) - * 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#L1288) - * 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#L1304) - * 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#L1317) - * 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#L1288) - * 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#L1304) - * 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#L1317) - * 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#L1361) - * with any other error (#RTN15c4) - * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1395) - * fallback host feature - * with custom realtime websocket host option - * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1439) - * with custom realtime websocket port option - * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1457) - * with non-production environment - * :fallback_hosts_use_default is unset - * [uses fallback hosts by default](./spec/acceptance/realtime/connection_failures_spec.rb#L1481) - * :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#L1499) - * [does not use a fallback host if the connection connects on the default host and then later becomes disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L1517) - * :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#L1545) - * with production environment - * when the Internet is down - * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1581) - * 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#L1604) - * [uses the primary host when suspended, and then every fallback host and the primary host again on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L1623) - * [uses the correct host name for the WebSocket requests to the fallback hosts](./spec/acceptance/realtime/connection_failures_spec.rb#L1646) - * :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#L1676) - * :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#L1696) +### Ably::Models::MessageEncoders +_(see [spec/acceptance/http/encoders_spec.rb](./spec/acceptance/http/encoders_spec.rb))_ + * with binary transport protocol + * without encryption + * with UTF-8 data + * [does not apply any encoding](./spec/acceptance/http/encoders_spec.rb#L41) + * with binary data + * [does not apply any encoding](./spec/acceptance/http/encoders_spec.rb#L52) + * with JSON data + * [stringifies the JSON and sets the encoding attribute to "json"](./spec/acceptance/http/encoders_spec.rb#L63) + * with encryption + * with UTF-8 data + * [applies utf-8 and cipher encoding and sets the encoding attribute to "utf-8/cipher+aes-128-cbc"](./spec/acceptance/http/encoders_spec.rb#L78) + * with binary data + * [applies cipher encoding and sets the encoding attribute to "cipher+aes-128-cbc"](./spec/acceptance/http/encoders_spec.rb#L89) + * with JSON data + * [applies json, utf-8 and cipher encoding and sets the encoding attribute to "json/utf-8/cipher+aes-128-cbc"](./spec/acceptance/http/encoders_spec.rb#L100) + * with text transport protocol + * without encryption + * with UTF-8 data + * [does not apply any encoding](./spec/acceptance/http/encoders_spec.rb#L117) + * with binary data + * [applies a base64 encoding and sets the encoding attribute to "base64"](./spec/acceptance/http/encoders_spec.rb#L128) + * with JSON data + * [stringifies the JSON and sets the encoding attribute to "json"](./spec/acceptance/http/encoders_spec.rb#L139) + * with encryption + * with UTF-8 data + * [applies utf-8, cipher and base64 encodings and sets the encoding attribute to "utf-8/cipher+aes-128-cbc/base64"](./spec/acceptance/http/encoders_spec.rb#L154) + * with binary data + * [applies cipher and base64 encoding and sets the encoding attribute to "cipher+aes-128-cbc/base64"](./spec/acceptance/http/encoders_spec.rb#L165) + * with JSON data + * [applies json, utf-8, cipher and base64 encoding and sets the encoding attribute to "json/utf-8/cipher+aes-128-cbc/base64"](./spec/acceptance/http/encoders_spec.rb#L176) -### Ably::Realtime::Connection -_(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_ +### Ably::PubSub::Http::Channel messages +_(see [spec/acceptance/http/message_spec.rb](./spec/acceptance/http/message_spec.rb))_ * using JSON protocol - * intialization - * [connects automatically](./spec/acceptance/realtime/connection_spec.rb#L23) - * current_host - * [is available immediately after the client is instanced](./spec/acceptance/realtime/connection_spec.rb#L31) - * with :auto_connect option set to false - * [does not connect automatically](./spec/acceptance/realtime/connection_spec.rb#L42) - * [connects when method #connect is called](./spec/acceptance/realtime/connection_spec.rb#L50) - * with token auth - * for renewable tokens - * that are valid for the duration of the test - * with valid pre authorized token expiring in the future - * [uses the existing token created by Auth](./spec/acceptance/realtime/connection_spec.rb#L72) - * that expire - * opening a new connection - * with almost expired tokens - * [renews token every time after it expires](./spec/acceptance/realtime/connection_spec.rb#L107) - * with immediately expired token and no fallback hosts - * [renews the token on connect, and makes one immediate subsequent attempt to obtain a new token (#RSA4b)](./spec/acceptance/realtime/connection_spec.rb#L137) - * when disconnected_retry_timeout is 0.5 seconds - * [renews the token on connect, and continues to attempt renew based on the retry schedule](./spec/acceptance/realtime/connection_spec.rb#L152) - * using implicit token auth - * [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L182) - * 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) - * connection state - * [retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L273) - * and subsequent token is invalid - * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L308) - * for non-renewable tokens - * that are expired - * opening a new connection - * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L338) - * when connected - * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L354) - * 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#L374) - * that is incompatible with the current client client_id - * [fails the connection](./spec/acceptance/realtime/connection_spec.rb#L386) - * wildcard - * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L400) - * initialization state changes - * with implicit #connect - * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L432) - * with explicit #connect - * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L438) - * #connect with no fallbacks - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L448) - * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L453) - * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L460) - * when can't connect to host - * [logs error on failed connection attempt](./spec/acceptance/realtime/connection_spec.rb#L489) - * when explicitly reconnecting disconnected/suspended connection in retry (#RTN11c) - * when suspended - * [reconnects immediately](./spec/acceptance/realtime/connection_spec.rb#L529) - * when disconnected - * [reconnects immediately](./spec/acceptance/realtime/connection_spec.rb#L563) - * when reconnecting a failed connection - * [transitions all channels state to initialized and cleares error_reason](./spec/acceptance/realtime/connection_spec.rb#L593) - * with invalid auth details - * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L621) - * when already connected - * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L637) - * connection#id - * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L651) - * connection#key - * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L658) - * once connected - * connection#id - * [is a string](./spec/acceptance/realtime/connection_spec.rb#L669) - * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L676) - * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L683) - * connection#key - * [is a string](./spec/acceptance/realtime/connection_spec.rb#L692) - * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L699) - * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L706) - * 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#L716) - * when closing - * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L733) - * #msgSerial - * when messages are queued for publish before a connection is established - * [the msgSerial is always incrementing (and not reset when the new connection is established) ensuring messages are never de-duped by the realtime service](./spec/acceptance/realtime/connection_spec.rb#L757) - * #close - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L789) - * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L796) - * when already closed - * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L807) - * 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#L834) - * :connecting RTN12f - * :connected does not arrive when trying to close - * [moves to closed](./spec/acceptance/realtime/connection_spec.rb#L852) - * :connected arrive when trying to close - * [moves to connected and then to closed](./spec/acceptance/realtime/connection_spec.rb#L879) - * :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#L900) - * with an unresponsive connection - * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L927) - * :suspended RTN12d - * [immediatly closes connection](./spec/acceptance/realtime/connection_spec.rb#L956) - * :disconnected RTN12d - * [immediatly closes connection](./spec/acceptance/realtime/connection_spec.rb#L991) - * #ping - * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L1024) - * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L1034) - * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L1058) - * with incompatible states - * when not connected - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1071) - * when suspended - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1080) - * when failed - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1092) - * when closed - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1104) - * when it becomes closed - * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1118) - * with a success block that raises an exception - * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L1131) - * when ping times out - * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L1145) - * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L1164) - * 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#L1190) - * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L1200) - * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L1211) - * 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#L1226) - * [receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1235) - * with websocket heartbeats disabled (undocumented) - * [does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1251) - * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1260) - * #details - * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1278) - * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1285) - * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1294) - * 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#L1315) - * recovery - * #recovery_key - * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1352) - * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1382) - * opening a new connection using a recently disconnected connection's #recovery_key - * connection#id after recovery - * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L1394) - * 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#L1416) - * when messages have been published - * the new connection - * [uses the correct msgSerial from the old connection](./spec/acceptance/realtime/connection_spec.rb#L1445) - * when messages are published before the new connection is recovered - * the new connection - * [uses the correct msgSerial from the old connection for the queued messages](./spec/acceptance/realtime/connection_spec.rb#L1475) - * with :recover option - * with invalid syntax - * [logs recovery decode error as a warning and connects successfully](./spec/acceptance/realtime/connection_spec.rb#L1522) - * with invalid connection key - * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1537) - * with many connections simultaneously - * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1556) - * when a state transition is unsupported - * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1576) - * protocol failure - * receiving an invalid ProtocolMessage - * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1592) - * undocumented method - * #internet_up? - * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1610) - * 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#L1621) - * 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#L1631) - * when the Internet is up - * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1662) - * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1669) - * with a TLS connection - * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1645) - * with a non-TLS connection - * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1655) - * when the Internet is down - * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1684) - * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1691) - * 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#L1705) - * 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#L1738) - * 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#L1769) - * connection state change - * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1783) - * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1798) - * ConnectionStateChange object - * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1806) - * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1814) - * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1822) - * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1838) - * on failure - * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1851) - * retry_in - * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1866) - * [is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1873) - * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1883) - * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1893) - * whilst CONNECTED - * when a CONNECTED message is received (#RTN24) - * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1927) - * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1942) - * when a CONNECTED message with an error is received - * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1975) - * version params - * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1996) - * [sends the lib version param agent (#RCS7d)](./spec/acceptance/realtime/connection_spec.rb#L2005) - * transport_params (#RTC1f) - * [pases transport_params to query](./spec/acceptance/realtime/connection_spec.rb#L2018) - * when changing default param - * [overrides default param (#RTC1f1)](./spec/acceptance/realtime/connection_spec.rb#L2031) - -### 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) + * publishing with an ASCII_8BIT message name + * [is converted into UTF_8](./spec/acceptance/http/message_spec.rb#L19) + * a single Message object (#RSL1a) + * [publishes the message](./spec/acceptance/http/message_spec.rb#L32) + * an array of Message objects (#RSL1a) + * [publishes three messages](./spec/acceptance/http/message_spec.rb#L47) + * an array of hashes (#RSL1a) + * [publishes three messages](./spec/acceptance/http/message_spec.rb#L59) + * a name with data payload (#RSL1a, #RSL1b) + * [publishes the message](./spec/acceptance/http/message_spec.rb#L69) * with supported data payload content type * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L48) + * [is encoded and decoded to the same hash](./spec/acceptance/http/message_spec.rb#L82) * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L56) + * [is encoded and decoded to the same Array](./spec/acceptance/http/message_spec.rb#L91) * String - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L64) + * [is encoded and decoded to the same Array](./spec/acceptance/http/message_spec.rb#L100) * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L72) - * a single Message object (#RSL1a) - * [publishes the message](./spec/acceptance/realtime/message_spec.rb#L83) - * an array of Message objects (#RSL1a) - * [publishes three messages](./spec/acceptance/realtime/message_spec.rb#L100) - * an array of hashes (#RSL1a) - * [publishes three messages](./spec/acceptance/realtime/message_spec.rb#L123) - * a name with data payload (#RSL1a, #RSL1b) - * [publishes a message](./spec/acceptance/realtime/message_spec.rb#L144) - * with supported extra payload content type (#RTL6h, #RSL6a2) + * [is encoded and decoded to the same Array](./spec/acceptance/http/message_spec.rb#L109) + * with supported extra payload content type (#RSL1h, #RSL6a2) * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L170) + * [is encoded and decoded to the same hash](./spec/acceptance/http/message_spec.rb#L122) * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L178) + * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/http/message_spec.rb#L131) * nil - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L184) + * [is encoded and decoded to the same Array](./spec/acceptance/http/message_spec.rb#L138) + * idempotency (#RSL1k) + * [idempotent publishing is set as per clientOptions](./spec/acceptance/http/message_spec.rb#L207) + * [idempotent publishing is enabled by default (#TO3n)](./spec/acceptance/http/message_spec.rb#L217) + * when ID is not included (#RSL1k2) + * with Message object + * [publishes the same message three times](./spec/acceptance/http/message_spec.rb#L154) + * with #publish arguments only + * [publishes the same message three times](./spec/acceptance/http/message_spec.rb#L161) + * when ID is included (#RSL1k2, #RSL1k5) + * [the ID provided is used for the published messages](./spec/acceptance/http/message_spec.rb#L186) + * [for multiple messages in one publish operation (#RSL1k3)](./spec/acceptance/http/message_spec.rb#L191) + * [for multiple messages in one publish operation with IDs following the required format described in RSL1k1 (#RSL1k3)](./spec/acceptance/http/message_spec.rb#L198) + * with Message object + * [three REST publishes result in only one message being published](./spec/acceptance/http/message_spec.rb#L172) + * with #publish arguments only + * [three REST publishes result in only one message being published](./spec/acceptance/http/message_spec.rb#L180) + * when idempotent publishing is enabled in the client library ClientOptions (#TO3n) + * [the ID is populated with a random ID and serial 0 from this lib (#RSL1k1)](./spec/acceptance/http/message_spec.rb#L280) + * when there is a network failure triggering an automatic retry (#RSL1k4) + * [for multiple messages in one publish operation](./spec/acceptance/http/message_spec.rb#L273) + * with Message object + * [two REST publish retries result in only one message being published](./spec/acceptance/http/message_spec.rb#L243) + * with #publish arguments only + * [two REST publish retries result in only one message being published](./spec/acceptance/http/message_spec.rb#L253) + * with explicitly provided message ID + * [two REST publish retries result in only one message being published](./spec/acceptance/http/message_spec.rb#L265) + * when publishing a batch of messages + * [the ID is populated with a single random ID and sequence of serials from this lib (#RSL1k1)](./spec/acceptance/http/message_spec.rb#L288) * with unsupported data payload content type * Integer - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L195) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/http/message_spec.rb#L305) * Float - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L204) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/http/message_spec.rb#L313) * Boolean - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L213) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/http/message_spec.rb#L321) * False - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L222) - * with ASCII_8BIT message name - * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L231) - * when the message publisher has a client_id - * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L247) - * #connection_id attribute - * over realtime - * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L260) - * when retrieved over REST - * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L272) - * local echo when published - * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L284) - * 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#L304) - * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L322) - * [will echo messages with a valid connection_id to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L335) - * 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#L361) - * without suitable publishing permissions - * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L406) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 4 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 5 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 6 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 7 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 8 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 9 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 10 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 11 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 12 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 13 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 14 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 15 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 16 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 17 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 18 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 19 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 20 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 21 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 22 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 23 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 24 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 25 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 26 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 27 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 28 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 29 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 30 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 31 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 32 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 33 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 34 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 35 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 36 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 37 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 38 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 39 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 40 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 41 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 42 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 43 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 44 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 45 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 46 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 47 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 48 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 49 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 50 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 51 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 52 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 53 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 54 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 55 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 56 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 57 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 58 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 59 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 60 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 61 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 62 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 63 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 64 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 65 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 66 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 67 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 68 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 69 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 70 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 71 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 72 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * item 73 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#L457) - * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L477) - * with multiple sends from one client to another - * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L516) - * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L533) - * subscribing with a different transport protocol - * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L567) - * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L567) - * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L567) - * 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#L588) - * 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#L608) - * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L619) - * 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#L639) - * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L650) - * 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#L670) - * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L681) - * 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#L700) - * 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#L745) - * the connection becomes suspended - * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L771) - * the connection becomes failed - * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L798) - * 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#L839) - * when encoding string - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857) - * when decoding string - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839) - * when encoding string - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857) - * when decoding jsonObject - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839) - * when encoding jsonObject - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857) - * when decoding jsonArray - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839) - * when encoding jsonArray - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857) - * when decoding binary - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L839) - * when encoding binary - * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L857) - * 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#L891) - * when retrieving a string using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919) - * when publishing a string using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891) - * when retrieving a string using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919) - * when publishing a jsonObject using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891) - * when retrieving a jsonObject using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919) - * when publishing a jsonArray using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891) - * when retrieving a jsonArray using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919) - * when publishing a binary using JSON protocol - * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L891) - * when retrieving a binary using JSON protocol - * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L919) - -### 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#L44) - -### 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, no members are received and the presence channel is synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L707) - * 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#L736) - * 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#L788) - * 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#L804) - * 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#L841) - * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L889) - * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get (#RTP2f)](./spec/acceptance/realtime/presence_spec.rb#L934) - * #get - * by default - * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L984) - * with :wait_for_sync option set to false (#RTP11c1) - * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L1005) - * state - * once opened - * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1032) - * #enter - * data attribute - * when provided as argument option to #enter - * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1057) - * message #connection_id - * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1081) - * without necessary capabilities to join presence - * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1100) - * it should behave like a public presence method - * [presence enter : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) - * [presence enter : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) - * [presence enter : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) - * [presence enter : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) - * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) - * [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) - * when :queue_messages client option is false - * and connection state initialized - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) - * and connection state connecting - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) - * and connection state disconnected - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) - * and connection state connected - * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) - * with supported data payload content type - * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) - * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) - * String - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) - * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) - * with unsupported data payload content type - * Integer - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) - * Float - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) - * Boolean - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) - * False - * [raises an UnsupportedDataType 40013 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#L1112) - * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1137) - * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1149) - * when ENTERED - * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1122) - * it should behave like a public presence method - * [presence update : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) - * [presence update : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) - * [presence update : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) - * [presence update : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) - * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) - * [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) - * when :queue_messages client option is false - * and connection state initialized - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) - * and connection state connecting - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) - * and connection state disconnected - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) - * and connection state connected - * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) - * with supported data payload content type - * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) - * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) - * String - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) - * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) - * with unsupported data payload content type - * Integer - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) - * Float - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) - * Boolean - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) - * False - * [raises an UnsupportedDataType 40013 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 - * [succeeds and does not emit an event (#RTP10d)](./spec/acceptance/realtime/presence_spec.rb#L1244) - * :data option - * when set to a string - * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1170) - * when set to nil - * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1185) - * 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#L1200) - * and sync is complete - * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1215) - * 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) - * with supported data payload content type - * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) - * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) - * String - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) - * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) - * with unsupported data payload content type - * Integer - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) - * Float - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) - * Boolean - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) - * False - * [raises an UnsupportedDataType 40013 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#L1262) - * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1275) - * 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#L1300) - * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1314) - * message #connection_id - * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1335) - * without necessary capabilities to enter on behalf of another client - * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1355) - * it should behave like a public presence method - * [presence enter_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) - * [presence enter_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) - * [presence enter_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) - * [presence enter_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) - * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) - * [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) - * when :queue_messages client option is false - * and connection state initialized - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) - * and connection state connecting - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) - * and connection state disconnected - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) - * and connection state connected - * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) - * with supported data payload content type - * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) - * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) - * String - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) - * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) - * with unsupported data payload content type - * Integer - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) - * Float - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) - * Boolean - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) - * False - * [raises an UnsupportedDataType 40013 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) - * it should behave like a presence on behalf of another client method - * :enter_client when authenticated with a wildcard client_id - * and a valid client_id - * [succeeds](./spec/acceptance/realtime/presence_spec.rb#L362) - * and a wildcard client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L372) - * and an empty client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L379) - * and a client_id that is not a string type - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L386) - * :enter_client when authenticated with a valid client_id - * and another invalid client_id - * before authentication - * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L402) - * after authentication - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L411) - * and a wildcard client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L421) - * and an empty client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L428) - * :enter_client when anonymous and no client_id - * and another invalid client_id - * before authentication - * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L444) - * after authentication - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L453) - * 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) - * #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#L1369) - * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1395) - * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1409) - * it should behave like a public presence method - * [presence update_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) - * [presence update_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) - * [presence update_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) - * [presence update_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) - * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) - * [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) - * when :queue_messages client option is false - * and connection state initialized - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) - * and connection state connecting - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) - * and connection state disconnected - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) - * and connection state connected - * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) - * with supported data payload content type - * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) - * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) - * String - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) - * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) - * with unsupported data payload content type - * Integer - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) - * Float - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) - * Boolean - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) - * False - * [raises an UnsupportedDataType 40013 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) - * it should behave like a presence on behalf of another client method - * :update_client when authenticated with a wildcard client_id - * and a valid client_id - * [succeeds](./spec/acceptance/realtime/presence_spec.rb#L362) - * and a wildcard client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L372) - * and an empty client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L379) - * and a client_id that is not a string type - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L386) - * :update_client when authenticated with a valid client_id - * and another invalid client_id - * before authentication - * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L402) - * after authentication - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L411) - * and a wildcard client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L421) - * and an empty client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L428) - * :update_client when anonymous and no client_id - * and another invalid client_id - * before authentication - * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L444) - * after authentication - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L453) - * 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) - * #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#L1441) - * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1467) - * with a new value in :data option - * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1493) - * with a nil value in :data option - * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1508) - * with no :data option - * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1523) - * it should behave like a public presence method - * [presence leave_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) - * [presence leave_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) - * [presence leave_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) - * [presence leave_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) - * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) - * [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) - * when :queue_messages client option is false - * and connection state initialized - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) - * and connection state connecting - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) - * and connection state disconnected - * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) - * and connection state connected - * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) - * with supported data payload content type - * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) - * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) - * String - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) - * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) - * with unsupported data payload content type - * Integer - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) - * Float - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) - * Boolean - * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) - * False - * [raises an UnsupportedDataType 40013 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) - * it should behave like a presence on behalf of another client method - * :leave_client when authenticated with a wildcard client_id - * and a valid client_id - * [succeeds](./spec/acceptance/realtime/presence_spec.rb#L362) - * and a wildcard client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L372) - * and an empty client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L379) - * and a client_id that is not a string type - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L386) - * :leave_client when authenticated with a valid client_id - * and another invalid client_id - * before authentication - * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L402) - * after authentication - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L411) - * and a wildcard client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L421) - * and an empty client_id - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L428) - * :leave_client when anonymous and no client_id - * and another invalid client_id - * before authentication - * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L444) - * after authentication - * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L453) - * 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#L1544) - * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1549) - * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1556) - * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1564) - * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1599) - * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1616) - * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1700) - * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1717) - * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1739) - * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1763) - * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1775) - * when the channel is SUSPENDED - * with wait_for_sync: true - * [results in an error with @code@ @91005@ and a @message@ stating that the presence state is out of sync (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1574) - * 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#L1587) - * during a sync - * when :wait_for_sync is true - * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1653) - * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1676) - * when a member enters and then leaves - * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1788) - * when a member enters and the presence map is updated - * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1803) - * with lots of members on different clients - * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1824) - * #subscribe - * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1901) - * with no arguments - * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1862) - * with event name - * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1882) - * with a callback that raises an exception - * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1914) - * #unsubscribe - * with no arguments - * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1935) - * with event name - * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1953) - * REST #get - * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1972) - * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1988) - * client_id with ASCII_8BIT - * in connection set up - * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L2008) - * in channel options - * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L2021) - * encoding and decoding of presence message data - * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L2047) - * #subscribe - * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L2066) - * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L2078) - * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L2092) - * #get - * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2108) - * REST #get - * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2122) - * when cipher settings do not match publisher - * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2138) - * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2151) - * leaving - * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2169) - * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2179) - * connection failure mid-way through a large member sync - * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2198) - * 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#L2236) - * 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#L2285) - * 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#L2332) - * when the client does not have presence subscribe privileges but is present on the channel - * [receives presence updates for all presence events generated by the current connection and the presence map is kept up to date (#RTP17a)](./spec/acceptance/realtime/presence_spec.rb#L2389) - * 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#L2437) - * #RTP17b - * [updates presence members on leave](./spec/acceptance/realtime/presence_spec.rb#L2465) - * [does no update presence members on fabricated leave](./spec/acceptance/realtime/presence_spec.rb#L2490) - * when a channel becomes attached again - * 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#L2539) - * 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#L2614) - * channel state side effects (RTP5) - * channel transitions to the ATTACHED state (RTP5b) - * [all queued presence messages are sent](./spec/acceptance/realtime/presence_spec.rb#L2668) - * 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#L2688) - * 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#L2715) - * 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#L2753) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/http/message_spec.rb#L329) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * 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/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 4 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 5 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 6 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 7 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 8 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 9 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 10 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 11 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 12 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 13 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 14 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 15 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 16 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 17 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 18 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 19 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 20 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 21 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 22 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 23 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 24 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 25 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 26 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 27 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 28 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 29 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 30 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 31 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 32 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 33 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 34 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 35 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 36 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 37 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 38 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 39 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 40 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 41 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 42 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 43 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 44 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 45 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 46 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 47 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 48 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 49 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 50 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 51 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 52 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 53 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 54 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 55 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 56 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 57 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 58 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 59 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 60 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 61 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 62 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 63 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 64 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 65 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 66 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 67 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 68 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 69 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 70 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 71 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 72 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * item 73 with encrypted encoding cipher+aes-256-cbc/base64 + * behaves like an Ably encrypter and decrypter + * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/http/message_spec.rb#L374) + * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/http/message_spec.rb#L389) + * when publishing lots of messages + * [encrypts on #publish and decrypts on #history](./spec/acceptance/http/message_spec.rb#L422) + * when retrieving #history with a different protocol + * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/http/message_spec.rb#L449) + * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/http/message_spec.rb#L449) + * [delivers a Hash payload to the receiver](./spec/acceptance/http/message_spec.rb#L449) + * when publishing on an unencrypted channel and retrieving with #history on an encrypted channel + * [does not attempt to decrypt the message](./spec/acceptance/http/message_spec.rb#L465) + * 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/http/message_spec.rb#L486) + * [logs a Cipher exception (#RTL7e)](./spec/acceptance/http/message_spec.rb#L492) + * 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/http/message_spec.rb#L513) + * [logs a Cipher exception (#RTL7e)](./spec/acceptance/http/message_spec.rb#L519) + * 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/http/message_spec.rb#L540) + * [logs a Cipher exception](./spec/acceptance/http/message_spec.rb#L546) -### Ably::Realtime::Push::Admin -_(see [spec/acceptance/realtime/push_admin_spec.rb](./spec/acceptance/realtime/push_admin_spec.rb))_ +### Ably::PubSub::Http::Presence +_(see [spec/acceptance/http/presence_spec.rb](./spec/acceptance/http/presence_spec.rb))_ * using JSON protocol - * #publish - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/push_admin_spec.rb#L35) - * [accepts valid push data and recipient](./spec/acceptance/realtime/push_admin_spec.rb#L125) - * invalid arguments - * [raises an exception with a nil recipient](./spec/acceptance/realtime/push_admin_spec.rb#L44) - * [raises an exception with a empty recipient](./spec/acceptance/realtime/push_admin_spec.rb#L49) - * [raises an exception with a nil recipient](./spec/acceptance/realtime/push_admin_spec.rb#L54) - * [raises an exception with a empty recipient](./spec/acceptance/realtime/push_admin_spec.rb#L59) - * invalid recipient - * [raises an error after receiving a 40x realtime response](./spec/acceptance/realtime/push_admin_spec.rb#L68) - * invalid push data - * [raises an error after receiving a 40x realtime response](./spec/acceptance/realtime/push_admin_spec.rb#L79) + * tested against presence fixture data set up in test app + * #get + * [returns current members on the channel with their action set to :present](./spec/acceptance/http/presence_spec.rb#L41) + * with :limit option + * [returns a paged response limiting number of members per page](./spec/acceptance/http/presence_spec.rb#L57) + * default :limit + * [defaults to a limit of 100](./spec/acceptance/http/presence_spec.rb#L86) + * filter query params + * [sends :client_id as clientId](./spec/acceptance/http/presence_spec.rb#L105) + * [sends :connection_id as connectionId](./spec/acceptance/http/presence_spec.rb#L111) + * with :client_id option + * [returns a list members filtered by the provided client ID](./spec/acceptance/http/presence_spec.rb#L122) + * with :connection_id option + * [returns a list members filtered by the provided connection ID](./spec/acceptance/http/presence_spec.rb#L133) + * [returns a list members filtered by the provided connection ID](./spec/acceptance/http/presence_spec.rb#L137) + * with a non ASCII channel name + * stubbed + * [correctly encodes the channel name](./spec/acceptance/http/presence_spec.rb#L154) + * #history + * [returns recent presence activity](./spec/acceptance/http/presence_spec.rb#L165) + * default behaviour + * [uses backwards direction](./spec/acceptance/http/presence_spec.rb#L180) + * with options + * direction: :forwards + * [returns recent presence activity forwards with most recent history last](./spec/acceptance/http/presence_spec.rb#L192) + * direction: :backwards + * [returns recent presence activity backwards with most recent history first](./spec/acceptance/http/presence_spec.rb#L207) + * #history + * with options + * limit options + * default + * [is set to 100](./spec/acceptance/http/presence_spec.rb#L252) + * set to 1000 + * [is passes the limit query param value 1000](./spec/acceptance/http/presence_spec.rb#L265) + * with time range options + * :start + * with milliseconds since epoch value + * [uses this value in the history request](./spec/acceptance/http/presence_spec.rb#L295) + * with Time object value + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/http/presence_spec.rb#L305) + * :end + * with milliseconds since epoch value + * [uses this value in the history request](./spec/acceptance/http/presence_spec.rb#L295) + * with Time object value + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/http/presence_spec.rb#L305) + * when argument start is after end + * [should raise an exception](./spec/acceptance/http/presence_spec.rb#L316) + * decoding + * with encoded fixture data + * #history + * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/http/presence_spec.rb#L335) + * #get + * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/http/presence_spec.rb#L342) + * decoding permutations using mocked #history + * valid decodeable content + * #get + * [automaticaly decodes presence messages](./spec/acceptance/http/presence_spec.rb#L395) + * #history + * [automaticaly decodes presence messages](./spec/acceptance/http/presence_spec.rb#L412) + * invalid data + * #get + * [returns the messages still encoded](./spec/acceptance/http/presence_spec.rb#L443) + * [logs a cipher error](./spec/acceptance/http/presence_spec.rb#L447) + * #history + * [returns the messages still encoded](./spec/acceptance/http/presence_spec.rb#L467) + * [logs a cipher error](./spec/acceptance/http/presence_spec.rb#L471) + +### Ably::PubSub::Http::Push::Admin +_(see [spec/acceptance/http/push_admin_spec.rb](./spec/acceptance/http/push_admin_spec.rb))_ + * using JSON protocol + * #publish + * [accepts valid push data and recipient (#RSH1a)](./spec/acceptance/http/push_admin_spec.rb#L111) + * without publish permissions + * [raises a permissions issue exception](./spec/acceptance/http/push_admin_spec.rb#L40) + * invalid arguments (#RHS1a) + * [raises an exception with a nil recipient](./spec/acceptance/http/push_admin_spec.rb#L46) + * [raises an exception with a empty recipient](./spec/acceptance/http/push_admin_spec.rb#L50) + * [raises an exception with a nil recipient](./spec/acceptance/http/push_admin_spec.rb#L54) + * [raises an exception with a empty recipient](./spec/acceptance/http/push_admin_spec.rb#L58) + * invalid recipient (#RSH1a) + * [raises an error after receiving a 40x realtime response](./spec/acceptance/http/push_admin_spec.rb#L64) + * invalid push data (#RSH1a) + * [raises an error after receiving a 40x realtime response](./spec/acceptance/http/push_admin_spec.rb#L70) * recipient variable case - * [is converted to snakeCase](./spec/acceptance/realtime/push_admin_spec.rb#L117) + * [is converted to snakeCase](./spec/acceptance/http/push_admin_spec.rb#L105) * using test environment channel recipient (#RSH1a) - * [triggers a push notification](./spec/acceptance/realtime/push_admin_spec.rb#L155) - * #device_registrations + * [triggers a push notification](./spec/acceptance/http/push_admin_spec.rb#L136) + * #device_registrations (#RSH1b) * without permissions - * [raises a permissions not authorized exception](./spec/acceptance/realtime/push_admin_spec.rb#L183) - * #list - * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/realtime/push_admin_spec.rb#L233) - * [supports paging](./spec/acceptance/realtime/push_admin_spec.rb#L241) - * [raises an exception if params are invalid](./spec/acceptance/realtime/push_admin_spec.rb#L257) - * #get - * [returns a DeviceDetails object if a device ID string is provided](./spec/acceptance/realtime/push_admin_spec.rb#L296) - * with a failed request - * [raises a ResourceMissing exception if device ID does not exist](./spec/acceptance/realtime/push_admin_spec.rb#L313) - * #save - * [saves the new DeviceDetails Hash object](./spec/acceptance/realtime/push_admin_spec.rb#L362) - * with a failed request - * [fails if data is invalid](./spec/acceptance/realtime/push_admin_spec.rb#L380) - * #remove_where - * [removes all matching device registrations by client_id](./spec/acceptance/realtime/push_admin_spec.rb#L418) - * #remove - * [removes the provided device id string](./spec/acceptance/realtime/push_admin_spec.rb#L457) - * #channel_subscriptions - * #list - * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/realtime/push_admin_spec.rb#L533) - * [supports paging](./spec/acceptance/realtime/push_admin_spec.rb#L541) - * [raises an exception if none of the required filters are provided](./spec/acceptance/realtime/push_admin_spec.rb#L557) - * #list_channels - * [returns a PaginatedResult object containing String objects](./spec/acceptance/realtime/push_admin_spec.rb#L584) - * #save - * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/realtime/push_admin_spec.rb#L599) - * [raises an exception for invalid params](./spec/acceptance/realtime/push_admin_spec.rb#L610) - * failed requests - * [fails for invalid requests](./spec/acceptance/realtime/push_admin_spec.rb#L623) - * #remove_where - * [removes matching client_ids](./spec/acceptance/realtime/push_admin_spec.rb#L650) - * [succeeds on no match](./spec/acceptance/realtime/push_admin_spec.rb#L677) - * failed requests - * [device_id and client_id filters in the same request are not supported](./spec/acceptance/realtime/push_admin_spec.rb#L669) - * #remove - * [removes match for Hash object by channel and client_id](./spec/acceptance/realtime/push_admin_spec.rb#L697) - * [succeeds even if there is no match](./spec/acceptance/realtime/push_admin_spec.rb#L709) + * [raises a permissions not authorized exception](./spec/acceptance/http/push_admin_spec.rb#L156) + * #list (#RSH1b2) + * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/http/push_admin_spec.rb#L197) + * [returns an empty PaginatedResult if not params match](./spec/acceptance/http/push_admin_spec.rb#L203) + * [supports paging](./spec/acceptance/http/push_admin_spec.rb#L209) + * [provides filtering](./spec/acceptance/http/push_admin_spec.rb#L221) + * #get (#RSH1b1) + * [returns a DeviceDetails object if a device ID string is provided](./spec/acceptance/http/push_admin_spec.rb#L266) + * [returns a DeviceDetails object if a DeviceDetails object is provided](./spec/acceptance/http/push_admin_spec.rb#L274) + * [raises a ResourceMissing exception if device ID does not exist](./spec/acceptance/http/push_admin_spec.rb#L282) + * #save (#RSH1b3) + * [saves the new DeviceDetails Hash object](./spec/acceptance/http/push_admin_spec.rb#L327) + * [saves the associated DevicePushDetails](./spec/acceptance/http/push_admin_spec.rb#L342) + * [does not allow some fields to be configured](./spec/acceptance/http/push_admin_spec.rb#L401) + * [allows device_secret to be configured](./spec/acceptance/http/push_admin_spec.rb#L414) + * [saves the new DeviceDetails object](./spec/acceptance/http/push_admin_spec.rb#L423) + * [allows arbitrary number of subsequent saves](./spec/acceptance/http/push_admin_spec.rb#L432) + * [fails if data is invalid](./spec/acceptance/http/push_admin_spec.rb#L445) + * with FCM target + * [saves the associated DevicePushDetails](./spec/acceptance/http/push_admin_spec.rb#L356) + * with web target + * [saves the associated DevicePushDetails](./spec/acceptance/http/push_admin_spec.rb#L378) + * #remove_where (#RSH1b5) + * [removes all matching device registrations by client_id](./spec/acceptance/http/push_admin_spec.rb#L497) + * [removes device by device_id](./spec/acceptance/http/push_admin_spec.rb#L502) + * [succeeds even if there is no match](./spec/acceptance/http/push_admin_spec.rb#L507) + * #remove (#RSH1b4) + * [removes the provided device id string](./spec/acceptance/http/push_admin_spec.rb#L560) + * [removes the provided DeviceDetails](./spec/acceptance/http/push_admin_spec.rb#L565) + * [succeeds if the item does not exist](./spec/acceptance/http/push_admin_spec.rb#L570) + * #channel_subscriptions (#RSH1c) + * #list (#RSH1c1) + * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/http/push_admin_spec.rb#L638) + * [returns an empty PaginatedResult if params do not match](./spec/acceptance/http/push_admin_spec.rb#L644) + * [supports paging](./spec/acceptance/http/push_admin_spec.rb#L650) + * [provides filtering](./spec/acceptance/http/push_admin_spec.rb#L662) + * [raises an exception if none of the required filters are provided](./spec/acceptance/http/push_admin_spec.rb#L690) + * #list_channels (#RSH1c2) + * [returns a PaginatedResult object containing String objects](./spec/acceptance/http/push_admin_spec.rb#L717) + * [supports paging](./spec/acceptance/http/push_admin_spec.rb#L724) + * [returns an accurate number of channels after devices are deleted](./spec/acceptance/http/push_admin_spec.rb#L739) + * #save (#RSH1c3) + * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/http/push_admin_spec.rb#L764) + * [saves the new device_id PushChannelSubscription Hash object](./spec/acceptance/http/push_admin_spec.rb#L775) + * [saves the client_id PushChannelSubscription object](./spec/acceptance/http/push_admin_spec.rb#L786) + * [saves the device_id PushChannelSubscription object](./spec/acceptance/http/push_admin_spec.rb#L797) + * [allows arbitrary number of subsequent saves](./spec/acceptance/http/push_admin_spec.rb#L808) + * [fails if data is invalid](./spec/acceptance/http/push_admin_spec.rb#L821) + * #remove_where (#RSH1c5) + * PENDING: *[removes matching channels](./spec/acceptance/http/push_admin_spec.rb#L856)* + * [removes matching client_ids](./spec/acceptance/http/push_admin_spec.rb#L864) + * [removes matching device_ids](./spec/acceptance/http/push_admin_spec.rb#L870) + * [device_id and client_id filters in the same request are not suppoorted](./spec/acceptance/http/push_admin_spec.rb#L876) + * [succeeds on no match](./spec/acceptance/http/push_admin_spec.rb#L880) + * #remove (#RSH1c4) + * [removes match for Hash object by channel and client_id](./spec/acceptance/http/push_admin_spec.rb#L910) + * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/http/push_admin_spec.rb#L915) + * [removes match for Hash object by channel and device_id](./spec/acceptance/http/push_admin_spec.rb#L922) + * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/http/push_admin_spec.rb#L927) + * [succeeds even if there is no match](./spec/acceptance/http/push_admin_spec.rb#L934) -### Ably::Realtime::Client#stats -_(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_ +### Ably::PubSub::Http::Client#stats +_(see [spec/acceptance/http/stats_spec.rb](./spec/acceptance/http/stats_spec.rb))_ * using JSON protocol - * fetching stats - * [returns a PaginatedResult](./spec/acceptance/realtime/stats_spec.rb#L10) - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/stats_spec.rb#L29) - * with options - * [passes the option arguments to the REST stat method](./spec/acceptance/realtime/stats_spec.rb#L20) + * fetching application stats + * [returns a PaginatedResult object](./spec/acceptance/http/stats_spec.rb#L54) + * by minute + * with no options + * [returns the unit from the JSON response](./spec/acceptance/http/stats_spec.rb#L66) + * with :from set to last interval and :limit set to 1 + * [retrieves only one stat](./spec/acceptance/http/stats_spec.rb#L75) + * [returns entries as a flat hash (#TS12r)](./spec/acceptance/http/stats_spec.rb#L79) + * [returns zero or nil for any missing entries](./spec/acceptance/http/stats_spec.rb#L83) + * [returns all aggregated message data](./spec/acceptance/http/stats_spec.rb#L88) + * [returns inbound realtime all data](./spec/acceptance/http/stats_spec.rb#L93) + * [returns inbound realtime message data](./spec/acceptance/http/stats_spec.rb#L98) + * [returns outbound realtime all data](./spec/acceptance/http/stats_spec.rb#L103) + * [returns persisted presence all data](./spec/acceptance/http/stats_spec.rb#L108) + * [returns connections all data](./spec/acceptance/http/stats_spec.rb#L113) + * [returns channels data](./spec/acceptance/http/stats_spec.rb#L118) + * [returns api_requests data](./spec/acceptance/http/stats_spec.rb#L123) + * [returns token_requests data](./spec/acceptance/http/stats_spec.rb#L128) + * [returns stat objects with #unit equal to minute](./spec/acceptance/http/stats_spec.rb#L133) + * [returns stat objects with #interval_id matching :start](./spec/acceptance/http/stats_spec.rb#L137) + * [returns stat objects with #interval_time matching :start Time](./spec/acceptance/http/stats_spec.rb#L141) + * with :start set to first interval, :limit set to 1 and direction :forwards + * [returns the first interval stats as stats are provided forwards from :start](./spec/acceptance/http/stats_spec.rb#L151) + * [returns 3 pages of stats](./spec/acceptance/http/stats_spec.rb#L155) + * with :end set to last interval, :limit set to 1 and direction :backwards + * [returns the 3rd interval stats first as stats are provided backwards from :end](./spec/acceptance/http/stats_spec.rb#L167) + * [returns 3 pages of stats](./spec/acceptance/http/stats_spec.rb#L171) + * with :end set to last interval and :limit set to 3 to ensure only last years stats are included + * the REST API + * [defaults to direction :backwards](./spec/acceptance/http/stats_spec.rb#L183) + * with :end set to previous year interval + * the REST API + * [defaults to 100 items for pagination](./spec/acceptance/http/stats_spec.rb#L195) + * by hour + * [should aggregate the stats for that period](./spec/acceptance/http/stats_spec.rb#L219) + * by day + * [should aggregate the stats for that period](./spec/acceptance/http/stats_spec.rb#L219) + * by month + * [should aggregate the stats for that period](./spec/acceptance/http/stats_spec.rb#L219) + * when argument start is after end + * [should raise an exception](./spec/acceptance/http/stats_spec.rb#L231) -### Ably::Realtime::Client#time -_(see [spec/acceptance/realtime/time_spec.rb](./spec/acceptance/realtime/time_spec.rb))_ +### Ably::PubSub::Http::Client#time +_(see [spec/acceptance/http/time_spec.rb](./spec/acceptance/http/time_spec.rb))_ * using JSON protocol * fetching the service time - * [should return the service time as a Time object](./spec/acceptance/realtime/time_spec.rb#L10) - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/time_spec.rb#L19) + * [should return the service time as a Time object](./spec/acceptance/http/time_spec.rb#L10) * with reconfigured HTTP timeout - * [should raise a timeout exception](./spec/acceptance/realtime/time_spec.rb#L31) + * [should raise a timeout exception](./spec/acceptance/http/time_spec.rb#L19) -### Ably::Auth -_(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_ +### Ably::PubSub::Realtime::Auth +_(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_spec.rb))_ * using JSON protocol - * [has immutable options](./spec/acceptance/rest/auth_spec.rb#L48) - * #request_token - * [creates a TokenRequest automatically and sends it to Ably to obtain a token](./spec/acceptance/rest/auth_spec.rb#L63) - * [returns a valid TokenDetails object in the expected format with valid issued and expires attributes](./spec/acceptance/rest/auth_spec.rb#L72) - * with token_param :client_id - * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L105) - * with token_param :capability - * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L105) - * with token_param :nonce - * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L105) - * with token_param :timestamp - * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L105) - * with token_param :ttl - * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L105) - * with :key option - * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L135) - * with :key_name & :key_secret options - * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L165) - * with :query_time option - * [queries the server for the time (#RSA10k)](./spec/acceptance/rest/auth_spec.rb#L173) - * without :query_time option - * [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#L182) - * with :auth_url option merging - * with existing configured auth options - * using unspecified :auth_method - * [requests a token using a GET request with provided headers, and merges client_id into auth_params](./spec/acceptance/rest/auth_spec.rb#L222) - * with provided token_params - * [merges provided token_params with existing auth_params and client_id](./spec/acceptance/rest/auth_spec.rb#L230) - * with provided auth option auth_params and auth_headers - * [replaces any preconfigured auth_params](./spec/acceptance/rest/auth_spec.rb#L238) - * using :get :auth_method and query params in the URL - * [requests a token using a GET request with provided headers, and merges client_id into auth_params and existing URL querystring into new URL querystring](./spec/acceptance/rest/auth_spec.rb#L249) - * using :post :auth_method - * [requests a token using a POST request with provided headers, and merges client_id into auth_params as form-encoded post data](./spec/acceptance/rest/auth_spec.rb#L259) - * with :auth_url option - * when response from :auth_url is a valid token request - * [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L309) - * [returns a valid token generated from the token request](./spec/acceptance/rest/auth_spec.rb#L314) - * with :query_params - * [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L321) - * with :headers - * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L329) - * with POST - * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L337) - * when response from :auth_url is a token details object - * [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L362) - * when response from :auth_url is text/plain content type and a token string - * [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L380) - * when response is invalid - * 500 - * [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L394) - * XML - * [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L405) - * with a Proc for the :auth_callback option - * that returns a TokenRequest - * [calls the Proc with token_params when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L428) - * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L432) - * when authorized - * [sets Auth#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L439) - * [sets Client#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L443) - * that returns a TokenDetails JSON object - * [calls the lambda when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L477) - * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L482) - * when authorized - * [sets Auth#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L494) - * [sets Client#client_id to the new token's client_id](./spec/acceptance/rest/auth_spec.rb#L498) - * that returns a TokenDetails object - * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L513) - * that returns a Token string - * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L529) - * with auth_option :client_id - * [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L559) - * with token_param :client_id - * [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L568) - * before #authorize has been called - * [has no current_token_details](./spec/acceptance/rest/auth_spec.rb#L575) - * #authorize (#RSA10, #RSA10j) - * [updates the persisted token params that are then used for subsequent authorize requests](./spec/acceptance/rest/auth_spec.rb#L742) - * [updates the persisted auth options that are then used for subsequent authorize requests](./spec/acceptance/rest/auth_spec.rb#L748) - * when called for the first time since the client has been instantiated - * [passes all auth_options and token_params to #request_token](./spec/acceptance/rest/auth_spec.rb#L589) - * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L594) - * [issues a new token every time (#RSA10a)](./spec/acceptance/rest/auth_spec.rb#L598) - * query_time: true with authorize - * [only queries the server time once and then works out the offset, query_time option is never persisted (#RSA10k)](./spec/acceptance/rest/auth_spec.rb#L612) - * query_time: true ClientOption when instanced - * [only queries the server time once and then works out the offset, query_time option is never persisted (#RSA10k)](./spec/acceptance/rest/auth_spec.rb#L632) - * TokenParams argument - * [has no effect on the defaults when null and TokenParam defaults remain the same](./spec/acceptance/rest/auth_spec.rb#L649) - * [updates defaults when present and all previous configured TokenParams are discarded (#RSA10g)](./spec/acceptance/rest/auth_spec.rb#L656) - * [updates Auth#token_params attribute with an immutable hash](./spec/acceptance/rest/auth_spec.rb#L664) - * [uses TokenParams#timestamp for this request but obtains a new timestamp for subsequence requests (#RSA10g)](./spec/acceptance/rest/auth_spec.rb#L669) - * AuthOptions argument - * [has no effect on the defaults when null and AuthOptions defaults remain the same](./spec/acceptance/rest/auth_spec.rb#L694) - * [updates defaults when present and all previous configured AuthOptions are discarded (#RSA10g)](./spec/acceptance/rest/auth_spec.rb#L700) - * [updates Auth#options attribute with an immutable hash](./spec/acceptance/rest/auth_spec.rb#L707) - * [uses AuthOptions#query_time for this request and will not query_time for subsequent requests (#RSA10g)](./spec/acceptance/rest/auth_spec.rb#L712) - * [uses AuthOptions#query_time for this request and will query_time again if provided subsequently](./spec/acceptance/rest/auth_spec.rb#L718) - * with previous authorisation - * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L731) - * [issues a new token every time #authorize is called](./spec/acceptance/rest/auth_spec.rb#L737) - * with a lambda for the :auth_callback option - * [calls the lambda](./spec/acceptance/rest/auth_spec.rb#L765) - * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L769) - * for every subsequent #request_token - * without a :auth_callback lambda - * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L775) - * with a provided block - * [does not call the originally provided lambda and calls the new #request_token :auth_callback lambda](./spec/acceptance/rest/auth_spec.rb#L782) - * with an explicit token string that expires - * 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#L809) - * 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#L827) - * 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#L835) - * and a token string without any retrievable client_id - * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L843) - * #create_token_request - * [returns a TokenRequest object](./spec/acceptance/rest/auth_spec.rb#L858) - * [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#L862) - * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L869) - * [specifies no TTL (#RSA5)](./spec/acceptance/rest/auth_spec.rb#L873) - * [specifies no capability (#RSA6)](./spec/acceptance/rest/auth_spec.rb#L887) - * 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#L881) - * the nonce - * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L892) - * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L897) - * with token param :ttl - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L908) - * with token param :nonce - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L908) - * with token param :client_id - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L908) - * when specifying capability - * [overrides the default](./spec/acceptance/rest/auth_spec.rb#L919) - * [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L923) - * with additional invalid attributes - * [are ignored](./spec/acceptance/rest/auth_spec.rb#L933) - * when required fields are missing - * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L944) - * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L948) - * timestamp attribute - * [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L975) - * with :query_time auth_option - * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L960) - * with :timestamp option - * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L970) - * signing - * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L999) - * lexicographic ordering of channels and operations - * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/rest/auth_spec.rb#L1026) - * [is valid when used for authentication](./spec/acceptance/rest/auth_spec.rb#L1032) - * using token authentication - * with :token option - * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L1059) - * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L1063) - * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L1071) - * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L1079) - * and the token expires - * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/rest/auth_spec.rb#L1113) - * when token expires - * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1143) - * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1153) - * when token does not expire - * for the next 2 hours - * [should not request for the new token (#RSA4b1)](./spec/acceptance/rest/auth_spec.rb#L1177) - * when :client_id is provided in a token - * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1195) + * with basic auth + * #authentication_security_requirements_met? + * [returns true](./spec/acceptance/realtime/auth_spec.rb#L28) + * #key + * [contains the API key](./spec/acceptance/realtime/auth_spec.rb#L35) + * #key_name + * [contains the API key name](./spec/acceptance/realtime/auth_spec.rb#L42) + * #key_secret + * [contains the API key secret](./spec/acceptance/realtime/auth_spec.rb#L49) + * #using_basic_auth? + * [is true when using Basic Auth](./spec/acceptance/realtime/auth_spec.rb#L56) + * #using_token_auth? + * [is false when using Basic Auth](./spec/acceptance/realtime/auth_spec.rb#L63) + * with token auth + * #client_id + * [contains the ClientOptions client ID](./spec/acceptance/realtime/auth_spec.rb#L75) + * #current_token_details + * [contains the current token after auth](./spec/acceptance/realtime/auth_spec.rb#L82) + * #token_renewable? + * [is true when an API key exists](./spec/acceptance/realtime/auth_spec.rb#L92) + * #options (auth_options) + * [contains the configured auth options](./spec/acceptance/realtime/auth_spec.rb#L104) + * #token_params + * [contains the configured auth options](./spec/acceptance/realtime/auth_spec.rb#L115) + * #using_basic_auth? + * [is false when using Token Auth](./spec/acceptance/realtime/auth_spec.rb#L124) + * #using_token_auth? + * [is true when using Token Auth](./spec/acceptance/realtime/auth_spec.rb#L133) + * methods + * #create_token_request + * [returns a token request asynchronously](./spec/acceptance/realtime/auth_spec.rb#L147) + * #create_token_request_async + * [returns a token request synchronously](./spec/acceptance/realtime/auth_spec.rb#L157) + * #request_token + * [returns a token asynchronously](./spec/acceptance/realtime/auth_spec.rb#L167) + * #request_token_async + * [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L178) + * #authorize + * with token auth + * [returns a token asynchronously](./spec/acceptance/realtime/auth_spec.rb#L192) + * with auth_callback blocking + * with a slow auth callback response + * [asynchronously authenticates](./spec/acceptance/realtime/auth_spec.rb#L215) + * when implicitly called, 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 fails with an exception](./spec/acceptance/realtime/auth_spec.rb#L239) + * and an incompatible client_id in a TokenRequest object passed to the auth callback and fails with an exception + * [rejects a TokenRequests object with an incompatible client_id and fails with an exception](./spec/acceptance/realtime/auth_spec.rb#L255) + * when explicitly called, 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 fails with an exception](./spec/acceptance/realtime/auth_spec.rb#L287) + * when already authenticated with a valid token + * [ensures message delivery continuity whilst upgrading (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L700) + * when INITIALIZED + * [obtains a token and connects to Ably (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L328) + * when CONNECTING + * [aborts the current connection process, obtains a token, and connects to Ably again (#RTC8b)](./spec/acceptance/realtime/auth_spec.rb#L350) + * when FAILED + * [obtains a token and connects to Ably (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L369) + * when CLOSED + * [obtains a token and connects to Ably (#RTC8c, #RTC8b1, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L386) + * when in the CONNECTED state + * with a valid token in the AUTH ProtocolMessage sent + * PENDING: *[obtains a new token (that upgrades from anonymous to identified) and upgrades the connection after receiving an updated CONNECTED ProtocolMessage (#RTC8a, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L409)* + * [obtains a new token (as anonymous user before & after) and upgrades the connection after receiving an updated CONNECTED ProtocolMessage (#RTC8a, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L445) + * when DISCONNECTED + * PENDING: *[obtains a token, upgrades from anonymous to identified, and connects to Ably immediately (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L481)* + * [obtains a similar anonymous token and connects to Ably immediately (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L517) + * when SUSPENDED + * [obtains a token and connects to Ably immediately (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L561) + * when client is identified + * [transitions the connection state to FAILED if the client_id changes (#RSA15c, #RTC8a2)](./spec/acceptance/realtime/auth_spec.rb#L596) + * when auth fails + * [transitions the connection state to the FAILED state (#RSA15c, #RTC8a2, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L612) + * when the authCallback fails + * [calls the error callback of authorize and leaves the connection intact (#RSA4c3)](./spec/acceptance/realtime/auth_spec.rb#L638) + * when upgrading capabilities + * [is allowed (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L657) + * when downgrading capabilities (#RTC8a1) + * [is allowed and channels are detached](./spec/acceptance/realtime/auth_spec.rb#L683) + * #authorize_async + * [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L734) + * server initiated AUTH ProtocolMessage + * when received + * [should immediately start a new authentication process (#RTN22)](./spec/acceptance/realtime/auth_spec.rb#L755) + * when not received + * [should expect the connection to be disconnected by the server but should resume automatically (#RTN22a)](./spec/acceptance/realtime/auth_spec.rb#L778) + * #auth_params + * [returns the auth params asynchronously](./spec/acceptance/realtime/auth_spec.rb#L804) + * #auth_params_sync + * [returns the auth params synchronously](./spec/acceptance/realtime/auth_spec.rb#L813) + * #auth_header + * [returns an auth header asynchronously](./spec/acceptance/realtime/auth_spec.rb#L820) + * #auth_header_sync + * [returns an auth header synchronously](./spec/acceptance/realtime/auth_spec.rb#L829) * #client_id_validated? * when using basic auth - * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1207) - * 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#L1215) + * before connected + * [is false as basic auth users do not have an identity](./spec/acceptance/realtime/auth_spec.rb#L842) + * once connected + * [is true](./spec/acceptance/realtime/auth_spec.rb#L849) + * [contains a validated wildcard client_id](./spec/acceptance/realtime/auth_spec.rb#L856) + * when using a token string + * with a valid client_id + * before connected + * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L870) + * [#client_id is nil](./spec/acceptance/realtime/auth_spec.rb#L875) + * once connected + * [is true](./spec/acceptance/realtime/auth_spec.rb#L882) + * [#client_id is populated](./spec/acceptance/realtime/auth_spec.rb#L889) + * with no client_id (anonymous) + * before connected + * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L902) + * once connected + * [is true](./spec/acceptance/realtime/auth_spec.rb#L909) + * with a wildcard client_id (anonymous) + * before connected + * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L922) + * once connected + * [is true](./spec/acceptance/realtime/auth_spec.rb#L929) * when using a token * with a client_id - * [is true](./spec/acceptance/rest/auth_spec.rb#L1224) + * [is true](./spec/acceptance/realtime/auth_spec.rb#L943) + * once connected + * [is true](./spec/acceptance/realtime/auth_spec.rb#L949) * with no client_id (anonymous) - * [is true](./spec/acceptance/rest/auth_spec.rb#L1232) + * [is true](./spec/acceptance/realtime/auth_spec.rb#L961) + * once connected + * [is true](./spec/acceptance/realtime/auth_spec.rb#L967) * with a wildcard client_id (anonymous) - * [is false](./spec/acceptance/rest/auth_spec.rb#L1240) + * [is true](./spec/acceptance/realtime/auth_spec.rb#L979) + * once connected + * [is true](./spec/acceptance/realtime/auth_spec.rb#L985) * 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#L1249) - * after authentication - * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1256) - * when using a :key and basic auth - * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1264) - * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1268) - * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1272) + * [is not true as identification is not confirmed until authenticated](./spec/acceptance/realtime/auth_spec.rb#L998) + * once connected + * [is true as identification is completed following CONNECTED ProtocolMessage](./spec/acceptance/realtime/auth_spec.rb#L1004) * deprecated #authorise - * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1281) - * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1286) + * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1018) + * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1024) * when using JWT - * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/rest/auth_spec.rb#L1298) - * when the JWT embeds an Ably token - * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1305) - * and the requested token is encrypted - * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1312) - * when the token requested is returned with application/jwt content type - * [authenticates correctly and pulls stats](./spec/acceptance/rest/auth_spec.rb#L1323) + * when using auth_url + * when credentials are valid + * [client successfully fetches a channel and publishes a message](./spec/acceptance/realtime/auth_spec.rb#L1043) + * when credentials are wrong + * [disconnected includes and invalid signature message](./spec/acceptance/realtime/auth_spec.rb#L1056) + * when token is expired + * [receives a 40142 error from the server](./spec/acceptance/realtime/auth_spec.rb#L1068) + * when using auth_callback + * when credentials are valid + * [authentication succeeds and client can post a message](./spec/acceptance/realtime/auth_spec.rb#L1093) + * when credentials are invalid + * [authentication fails and reason for disconnection is invalid signature](./spec/acceptance/realtime/auth_spec.rb#L1108) + * 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#L1124) + * when credentials are invalid + * [fails with an invalid signature error](./spec/acceptance/realtime/auth_spec.rb#L1139) + * 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#L1165) + * and an AUTH procol message is received + * [client reauths correctly without going through a disconnection](./spec/acceptance/realtime/auth_spec.rb#L1193) + * 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#L1221) + * 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#L1239) -### 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 - * [uses MsgPack](./spec/acceptance/rest/base_spec.rb#L27) - * when option {:protocol=>:json} is used - * [uses JSON](./spec/acceptance/rest/base_spec.rb#L43) - * when option {:use_binary_protocol=>false} is used - * [uses JSON](./spec/acceptance/rest/base_spec.rb#L43) - * when option {:protocol=>:msgpack} is used - * [uses MsgPack](./spec/acceptance/rest/base_spec.rb#L60) - * when option {:use_binary_protocol=>true} is used - * [uses MsgPack](./spec/acceptance/rest/base_spec.rb#L60) +### Ably::PubSub::Realtime::Channel#history +_(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_ * using JSON protocol - * failed requests - * due to invalid Auth - * [should raise an UnauthorizedRequest exception with a valid error message and code](./spec/acceptance/rest/base_spec.rb#L75) - * server error with JSON error response body - * [should raise a ServerError exception](./spec/acceptance/rest/base_spec.rb#L95) - * 500 server error without a valid JSON response body - * [should raise a ServerError exception](./spec/acceptance/rest/base_spec.rb#L108) - * token authentication failures - * when auth#token_renewable? - * [should automatically reissue a token](./spec/acceptance/rest/base_spec.rb#L146) - * when NOT auth#token_renewable? - * [should raise an TokenExpired exception](./spec/acceptance/rest/base_spec.rb#L161) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_history_spec.rb#L21) + * with a single client publishing and receiving + * [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#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#L114) + * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L127) + * and REST history + * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L145) + * with option until_attach: true + * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L172) + * [fails the deferrable unless the state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L242) + * when channel receives update event after an attachment + * [updates attach_serial](./spec/acceptance/realtime/channel_history_spec.rb#L197) + * and two pages of messages + * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L208) -### Ably::Rest::Channel -_(see [spec/acceptance/rest/channel_spec.rb](./spec/acceptance/rest/channel_spec.rb))_ +### Ably::PubSub::Realtime::Channel +_(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_ * using JSON protocol + * initialization + * with :auto_connect option set to false on connection + * [remains initialized when accessing a channel](./spec/acceptance/realtime/channel_spec.rb#L29) + * [opens a connection implicitly on #attach](./spec/acceptance/realtime/channel_spec.rb#L37) + * #attach + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L240) + * [calls the SafeDeferrable callback on success (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L245) + * when initialized + * [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L48) + * [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L58) + * [attaches to a channel](./spec/acceptance/realtime/channel_spec.rb#L71) + * [attaches to a channel and calls the provided block (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L79) + * [sets attach_serial property after the attachment (#RTL15a)](./spec/acceptance/realtime/channel_spec.rb#L86) + * [sends an ATTACH and waits for an ATTACHED (#RTL4c)](./spec/acceptance/realtime/channel_spec.rb#L96) + * [implicitly attaches the channel (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L208) + * context when channel options contain modes + * [sends an ATTACH with options as flags (#RTL4l)](./spec/acceptance/realtime/channel_spec.rb#L125) + * when channel is reattaching + * [sends ATTACH_RESUME flag along with other modes (RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L139) + * context when channel options contain params + * [sends an ATTACH with params (#RTL4k)](./spec/acceptance/realtime/channel_spec.rb#L167) + * when received attached + * [decodes flags and sets it as modes on channel options (#RTL4m)](./spec/acceptance/realtime/channel_spec.rb#L182) + * FAILED: ~~[set params as channel options params (#RTL4k1)](./spec/acceptance/realtime/channel_spec.rb#L193)~~ + * when the implicit channel attach fails + * [registers the listener anyway (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L225) + * when an ATTACHED acknowledge is not received on the current connection + * [sends another ATTACH each time the connection becomes connected](./spec/acceptance/realtime/channel_spec.rb#L256) + * when state is :attached + * [does nothing (#RTL4a)](./spec/acceptance/realtime/channel_spec.rb#L294) + * when state is :failed + * [reattaches and sets the errorReason to nil (#RTL4g)](./spec/acceptance/realtime/channel_spec.rb#L314) + * when state is :detaching + * [does the attach operation after the completion of the pending request (#RTL4h)](./spec/acceptance/realtime/channel_spec.rb#L329) + * with many connections and many channels on each simultaneously + * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L359) + * failure as a result of insufficient key permissions + * [emits failed event (#RTL4e)](./spec/acceptance/realtime/channel_spec.rb#L390) + * [calls the errback of the returned Deferrable (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L399) + * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L407) + * and subsequent authorisation with suitable permissions + * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L416) + * with connection state + * [is initialized (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L460) + * [is connecting (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L468) + * [is disconnected (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L477) + * clean attach (RTL4j) + * when channel wasn't previously attached + * [doesn't send ATTACH_RESUME](./spec/acceptance/realtime/channel_spec.rb#L492) + * when channel was explicitly detached + * [doesn't send ATTACH_RESUME](./spec/acceptance/realtime/channel_spec.rb#L507) + * #detach + * when state is :attached + * [it detaches from a channel (#RTL5d)](./spec/acceptance/realtime/channel_spec.rb#L533) + * [detaches from a channel and calls the provided block (#RTL5d, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L546) + * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L559) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L573) + * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L583) + * and DETACHED message is not received within realtime request timeout + * [fails the deferrable and returns to the previous state (#RTL5f, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L600) + * when state is :failed + * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L620) + * when state is :attaching + * [waits for the attach to complete and then moves to detached](./spec/acceptance/realtime/channel_spec.rb#L633) + * when state is :detaching + * [ignores subsequent #detach calls but calls the callback if provided (#RTL5i)](./spec/acceptance/realtime/channel_spec.rb#L650) + * when state is :suspended + * [moves the channel state immediately to DETACHED state (#RTL5j)](./spec/acceptance/realtime/channel_spec.rb#L669) + * when state is :initialized + * [does nothing as there is no channel to detach (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L692) + * [returns a valid deferrable](./spec/acceptance/realtime/channel_spec.rb#L700) + * when state is :detached + * [does nothing as the channel is detached (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L710) + * when connection state is + * closing + * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L730) + * failed and channel is failed + * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L750) + * failed and channel is detached + * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L772) + * initialized + * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L792) + * connecting + * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L809) + * disconnected + * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L830) + * automatic channel recovery + * when an ATTACH request times out + * [moves to the SUSPENDED state (#RTL4f)](./spec/acceptance/realtime/channel_spec.rb#L857) + * if a subsequent ATTACHED is received on an ATTACHED channel + * [ignores the additional ATTACHED if resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L871) + * [emits an UPDATE only when resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L885) + * [emits an UPDATE when resumed is true and includes the reason error from the ProtocolMessage (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L901) * #publish + * when channel is attached (#RTL6c1) + * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L926) + * #(RTL17) + * when channel is initialized + * [sends messages only on attach](./spec/acceptance/realtime/channel_spec.rb#L939) + * when channel is attaching + * [sends messages only on attach](./spec/acceptance/realtime/channel_spec.rb#L954) + * when channel is detaching + * [stops sending message](./spec/acceptance/realtime/channel_spec.rb#L977) + * when channel is detached + * [stops sending message](./spec/acceptance/realtime/channel_spec.rb#L1005) + * when channel is failed + * [errors when trying to send a message](./spec/acceptance/realtime/channel_spec.rb#L1031) + * when channel is not attached in state Initializing (#RTL6c1) + * [publishes messages immediately and does not implicitly attach (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1049) + * when channel is Attaching (#RTL6c1) + * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1066) + * when channel is Detaching (#RTL6c1) + * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1091) + * when channel is Detached (#RTL6c1) + * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L1121) + * with :queue_messages client option set to false (#RTL6c4) + * and connection state connected (#RTL6c4) + * [publishes the message](./spec/acceptance/realtime/channel_spec.rb#L1154) + * and connection state initialized (#RTL6c4) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1163) + * and connection state connecting (#RTL6c4) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1173) + * and connection state disconnected (#RTL6c4) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) + * and connection state suspended (#RTL6c4) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) + * and connection state closing (#RTL6c4) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) + * and connection state closed (#RTL6c4) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1188) + * and the channel state is failed (#RTL6c4) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1209) * with name and data arguments - * [publishes the message and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L23) + * [publishes the message and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L1227) * and additional attributes - * [publishes the message with the attributes and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L32) - * with a client_id configured in the ClientOptions - * [publishes the message without a client_id](./spec/acceptance/rest/channel_spec.rb#L43) - * [expects a client_id to be added by the realtime service](./spec/acceptance/rest/channel_spec.rb#L51) - * with an array of Hash objects with :name and :data attributes - * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L64) - * with an array of Message objects - * when max_message_size and max_frame_size is not set - * and messages size (130 bytes) is smaller than the max_message_size - * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L89) - * and messages size (177784 bytes) is bigger than the max_message_size - * [should not publish and raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/acceptance/rest/channel_spec.rb#L105) - * when max_message_size is 655 bytes - * and messages size (130 bytes) is smaller than the max_message_size - * [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L127) - * and messages size (177784 bytes) is bigger than the max_message_size - * [should not publish and raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/acceptance/rest/channel_spec.rb#L143) - * with a Message object - * [publishes the message](./spec/acceptance/rest/channel_spec.rb#L158) - * with a Message object and query params - * [should fail to publish the message (RSL1l1)](./spec/acceptance/rest/channel_spec.rb#L170) - * with Messages and query params - * [should fail to publish the message (RSL1l1)](./spec/acceptance/rest/channel_spec.rb#L183) - * without adequate permissions on the channel - * [raises a permission error when publishing](./spec/acceptance/rest/channel_spec.rb#L193) - * null attributes - * when name is null - * [publishes the message without a name attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L202) - * when data is null - * [publishes the message without a data attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L213) - * with neither name or data attributes - * [publishes the message without any attributes in the payload](./spec/acceptance/rest/channel_spec.rb#L224) + * [publishes the message with the attributes and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L1240) + * and additional invalid attributes + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1253) + * with an array of Hash objects with :name and :data attributes + * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L1267) + * with an array of Message objects + * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L1295) + * nil attributes + * when name is nil + * [publishes the message without a name attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1319) + * when data is nil + * [publishes the message without a data attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1343) + * with neither name or data attributes + * [publishes the message without any attributes in the payload](./spec/acceptance/realtime/channel_spec.rb#L1367) + * with two invalid message out of 12 + * before client_id is known (validated) + * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1391) + * when client_id is known (validated) + * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1411) + * only invalid messages + * before client_id is known (validated) + * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1430) + * when client_id is known (validated) + * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1449) + * with many many messages and many connections simultaneously + * [publishes all messages, all success callbacks are called, and a history request confirms all messages were published](./spec/acceptance/realtime/channel_spec.rb#L1463) + * with more than allowed messages in a single publish + * [rejects the publish](./spec/acceptance/realtime/channel_spec.rb#L1486) * identified clients * when authenticated with a wildcard client_id * with a valid client_id in the message - * [succeeds](./spec/acceptance/rest/channel_spec.rb#L241) + * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1506) * with a wildcard client_id in the message - * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L250) + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1520) + * with a non-String client_id in the message + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1527) * with an empty client_id in the message - * [succeeds and publishes without a client_id](./spec/acceptance/rest/channel_spec.rb#L256) + * [succeeds and publishes without a client_id](./spec/acceptance/realtime/channel_spec.rb#L1534) * when authenticated with a Token string with an implicit client_id - * without having a confirmed identity + * before the client is CONNECTED and the client's identity has been obtained * with a valid client_id in the message - * [succeeds](./spec/acceptance/rest/channel_spec.rb#L273) + * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1556) * with an invalid client_id in the message - * [succeeds in the client library but then fails when published to Ably](./spec/acceptance/rest/channel_spec.rb#L282) + * [succeeds in the client library ( while connecting ) but then fails when delivered to Ably](./spec/acceptance/realtime/channel_spec.rb#L1571) * with an empty client_id in the message - * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L288) - * when authenticated with TokenDetails with a valid client_id - * with a valid client_id in the message - * [succeeds](./spec/acceptance/rest/channel_spec.rb#L305) + * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1585) + * after the client is CONNECTED and the client's identity is known + * with a valid client_id in the message + * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1601) + * with an invalid client_id in the message + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1615) + * with an empty client_id in the message + * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1624) + * when authenticated with a valid client_id + * with a valid client_id + * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1646) * with a wildcard client_id in the message - * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L314) + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1660) * with an invalid client_id in the message - * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L320) + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1667) * with an empty client_id in the message - * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L326) + * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1674) * when anonymous and no client_id * with a client_id in the message - * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L342) + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1695) * with a wildcard client_id in the message - * [throws an exception](./spec/acceptance/rest/channel_spec.rb#L348) + * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1702) * with an empty client_id in the message - * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L354) - * with a non ASCII channel name - * stubbed - * [correctly encodes the channel name](./spec/acceptance/rest/channel_spec.rb#L376) - * with a frozen message event name - * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L386) - * with a frozen payload - * [succeeds and publishes with an implicit client_id](./spec/acceptance/rest/channel_spec.rb#L408) - * message size is exceeded (#TO3l8) - * [should raise Ably::Exceptions::MaxMessageSizeExceeded exception](./spec/acceptance/rest/channel_spec.rb#L423) - * #history - * [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L447) - * [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L451) - * [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L479) - * message timestamps - * [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L464) - * message IDs - * [is unique](./spec/acceptance/rest/channel_spec.rb#L472) - * direction - * [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L506) - * [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L512) - * limit - * [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L524) - * #history option - * :start - * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L564) - * with a Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L574) - * :end - * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L564) - * with a Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L574) - * when argument start is after end - * [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L584) + * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1709) + * message size exceeded (#TO3l8) + * and max_message_size is default (65536 bytes) + * [should allow to send a message (32 bytes)](./spec/acceptance/realtime/channel_spec.rb#L1732) + * [should not allow to send a message (700000 bytes)](./spec/acceptance/realtime/channel_spec.rb#L1742) + * and max_message_size is customized (11 bytes) + * and the message size is 30 bytes + * [should not allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1763) + * and max_message_size is nil + * and the message size is 30 bytes + * [should allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1785) + * and the message size is 65537 bytes + * [should not allow to send a message](./spec/acceptance/realtime/channel_spec.rb#L1804) + * #subscribe + * with an event argument + * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1824) + * before attach + * [receives messages as soon as attached](./spec/acceptance/realtime/channel_spec.rb#L1834) + * with no event argument + * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L1848) + * with a callback that raises an exception + * [logs the error and continues](./spec/acceptance/realtime/channel_spec.rb#L1860) + * many times with different event names + * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L1881) + * #unsubscribe + * with an event argument + * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1906) + * with no event argument + * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1921) + * when connection state changes to + * :failed + * an :attaching channel + * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1946) + * an :attached channel + * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1963) + * [updates the channel error_reason (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1977) + * a :detached channel + * [remains in the :detached state (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1993) + * a :failed channel + * [remains in the :failed state and ignores the failure error (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L2016) + * a channel ATTACH request + * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2038) + * :closed + * an :attached channel + * [transitions state to :detached (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2054) + * an :attaching channel (#RTL3b) + * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L2067) + * a :detached channel + * [remains in the :detached state (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2084) + * a :failed channel + * [remains in the :failed state and retains the error_reason (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L2107) + * a channel ATTACH request when connection CLOSED + * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2129) + * a channel ATTACH request when connection CLOSING + * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L2143) + * :suspended + * an :attaching channel + * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2159) + * an :attached channel + * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2173) + * reattaching (#RTN15c3) + * [transitions state automatically to :attaching once the connection is re-established ](./spec/acceptance/realtime/channel_spec.rb#L2186) + * [sends ATTACH_RESUME flag when reattaching (RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2201) + * a :detached channel + * [remains in the :detached state (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2223) + * a :failed channel + * [remains in the :failed state and retains the error_reason (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L2246) + * a channel ATTACH request when connection SUSPENDED (#RTL4b) + * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L2270) + * :connected + * a :suspended channel + * [is automatically reattached (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L2286) + * when re-attach attempt fails + * [returns to a suspended state (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L2305) + * :disconnected + * with an initialized channel + * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2334) + * with an attaching channel + * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2347) + * with an attached channel + * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2362) + * with a detached channel + * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2378) + * with a failed channel + * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L2402) * #presence - * [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L594) - * #status - * [should return channel details status (#RSL8, #RSL8a)](./spec/acceptance/rest/channel_spec.rb#L604) - -### 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 - * behaves like a channel - * [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6) - * [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11) - * using #get method on client#channels - * behaves like a channel - * [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6) - * [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11) - * #set_options (#RTL16) - * [updates channel's options](./spec/acceptance/rest/channels_spec.rb#L38) - * when providing Ably::Models::ChannelOptions object - * [updates channel's options](./spec/acceptance/rest/channels_spec.rb#L45) - * accessing an existing channel object with different options - * [overrides the existing channel options and returns the channel object (RSN3c)](./spec/acceptance/rest/channels_spec.rb#L55) - * accessing an existing channel object without specifying any channel options - * [returns the existing channel without modifying the channel options](./spec/acceptance/rest/channels_spec.rb#L67) - * using undocumented array accessor [] method on client#channels - * behaves like a channel - * [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6) - * [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11) - * using a frozen channel name - * behaves like a channel - * [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6) - * [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11) - -### Ably::Rest::Client -_(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.rb))_ - * using JSON protocol - * #initialize - * with only an API key - * [uses basic authentication](./spec/acceptance/rest/client_spec.rb#L25) - * with an invalid API key - * [logs an entry with a help href url matching the code #TI5](./spec/acceptance/rest/client_spec.rb#L33) - * with an explicit string :token - * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L46) - * with :use_token_auth set to true - * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L54) - * with a non string :client_id - * [raises an ArgumentError](./spec/acceptance/rest/client_spec.rb#L62) - * with an invalid wildcard "*" :client_id - * [raises an exception](./spec/acceptance/rest/client_spec.rb#L68) - * with an :auth_callback lambda - * [calls the auth lambda to get a new token](./spec/acceptance/rest/client_spec.rb#L76) - * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L81) - * with :default_token_params - * [overides the default token params (#TO3j11)](./spec/acceptance/rest/client_spec.rb#L95) - * 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#L105) - * with an auth URL - * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L115) - * before any REST request - * [sends an HTTP request to the provided auth URL to get a new token](./spec/acceptance/rest/client_spec.rb#L126) - * auth headers - * with basic auth - * [sends the API key in authentication part of the secure URL (the Authorization: Basic header is not used with the Faraday HTTP library by default)](./spec/acceptance/rest/client_spec.rb#L147) - * with token auth - * without specifying protocol - * [sends the token string over HTTPS in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L166) - * when setting constructor ClientOption :tls to false - * [sends the token string over HTTP in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L176) - * using tokens - * when expired - * [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#L209) - * with a different client_id in the subsequent token - * [fails to authenticate and raises an exception](./spec/acceptance/rest/client_spec.rb#L222) - * when token has not expired - * [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L233) - * connection transport - * defaults - * for default host - * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L250) - * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L254) - * for the fallback hosts - * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L260) - * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L264) - * 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#L276) - * [is configured to use custom request timeout](./spec/acceptance/rest/client_spec.rb#L280) - * for the fallback hosts - * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L286) - * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L290) - * 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#L304) - * when environment is NOT production (#RSC15b) - * and custom fallback hosts are empty - * [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L322) - * and no custom fallback hosts are provided - * [should make connection attempts to sandbox-a-fallback.ably-realtime.com, sandbox-b-fallback.ably-realtime.com, sandbox-c-fallback.ably-realtime.com, sandbox-d-fallback.ably-realtime.com, sandbox-e-fallback.ably-realtime.com (#RSC15a)](./spec/acceptance/rest/client_spec.rb#L330) - * when environment is production - * and connection times out - * [tries fallback hosts 3 times (#RSC15b, #RSC15b)](./spec/acceptance/rest/client_spec.rb#L374) - * and the total request time exeeds 15 seconds - * [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L389) - * and connection fails - * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L405) - * 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#L439) - * and basic authentication fails - * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L466) - * and server returns a 50x error - * [attempts the fallback hosts as this is an authentication failure (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L488) - * when environment is production and server returns a 50x error - * with custom fallback hosts provided - * [attempts the fallback hosts as this is an authentication failure (#RSC15b, #RSC15a, #TO3k6)](./spec/acceptance/rest/client_spec.rb#L537) - * 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#L550) - * using a local web-server - * and timing out the primary host - * POST with request timeout less than max_retry_duration - * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L614) - * GET with request timeout less than max_retry_duration - * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L637) - * POST with request timeout more than max_retry_duration - * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L660) - * GET with request timeout more than max_retry_duration - * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L682) - * and failing the primary host - * [tries one of the fallback hosts](./spec/acceptance/rest/client_spec.rb#L727) - * to fail the primary host, allow a fallback to succeed, then later trigger a fallback to the primary host (#RSC15f) - * [succeeds and remembers fallback host preferences across requests](./spec/acceptance/rest/client_spec.rb#L783) - * with custom :fallback_retry_timeout - * [stops using the preferred fallback after this time](./spec/acceptance/rest/client_spec.rb#L820) - * when environment is not production and server returns a 50x error - * with no fallback hosts provided (#TBC, see https://github.com/ably/wiki/issues/361) - * [uses the default fallback hosts for that environment as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L874) - * with custom fallback hosts provided (#RSC15b, #TO3k6) - * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L902) - * 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#L915) - * 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#L940) - * with a custom host - * that does not exist - * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L956) - * fallback hosts - * [are never used](./spec/acceptance/rest/client_spec.rb#L977) - * that times out - * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L992) - * fallback hosts - * [are never used](./spec/acceptance/rest/client_spec.rb#L1005) - * HTTP configuration options - * [is frozen](./spec/acceptance/rest/client_spec.rb#L1062) - * defaults - * [#http_open_timeout is 4s](./spec/acceptance/rest/client_spec.rb#L1017) - * [#http_request_timeout is 10s](./spec/acceptance/rest/client_spec.rb#L1021) - * [#http_max_retry_count is 3](./spec/acceptance/rest/client_spec.rb#L1025) - * [#http_max_retry_duration is 15s](./spec/acceptance/rest/client_spec.rb#L1029) - * configured - * [#http_open_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L1045) - * [#http_request_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L1049) - * [#http_max_retry_count uses provided value](./spec/acceptance/rest/client_spec.rb#L1053) - * [#http_max_retry_duration uses provided value](./spec/acceptance/rest/client_spec.rb#L1057) + * [returns a Ably::PubSub::Realtime::Presence object](./spec/acceptance/realtime/channel_spec.rb#L2417) + * #set_options (#RTL16a) + * when channel is attaching + * behaves like an update that sends ATTACH message + * [sends an ATTACH message on options change](./spec/acceptance/realtime/channel_spec.rb#L2434) + * when channel is attached + * behaves like an update that sends ATTACH message + * [sends an ATTACH message on options change](./spec/acceptance/realtime/channel_spec.rb#L2434) + * when channel is initialized + * [doesn't send ATTACH message](./spec/acceptance/realtime/channel_spec.rb#L2467) + * channel state change + * [emits a ChannelStateChange object](./spec/acceptance/realtime/channel_spec.rb#L2483) + * ChannelStateChange object + * [has current state](./spec/acceptance/realtime/channel_spec.rb#L2492) + * [has a previous state](./spec/acceptance/realtime/channel_spec.rb#L2501) + * [has the event that generated the state change (#TA5)](./spec/acceptance/realtime/channel_spec.rb#L2510) + * [has an empty reason when there is no error](./spec/acceptance/realtime/channel_spec.rb#L2528) + * on failure + * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L2543) + * #resume (#RTL2f) + * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L2558) + * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2566) + * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2585) + * when a connection resume fails + * [is false when channel_serial goes nil (RTP5a1) and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2607) + * [is true when channel_serial is intact and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2625) + * moves to + * suspended + * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2652) + * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2675) + * failed + * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2652) + * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2675) + * when it receives a server-initiated DETACHED (#RTL13) + * and channel is initialized (#RTL13) + * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2710) + * and channel is failed + * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2731) + * and channel is attached + * [reattaches immediately (#RTL13a) with ATTACH_RESUME flag(RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2747) + * and channel is suspended + * [reattaches immediately (#RTL13a) with ATTACH_RESUME flag(RTL4j)](./spec/acceptance/realtime/channel_spec.rb#L2776) + * when connection is no longer connected + * [will not attempt to reattach (#RTL13c)](./spec/acceptance/realtime/channel_spec.rb#L2808) + * 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#L2834) + * 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#L2883) + +### Ably::PubSub::Realtime::Channels +_(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/channels_spec.rb))_ + * using JSON protocol + * when channel supposed to trigger reattachment per RTL16a (#RTS3c1) + * [will raise an error](./spec/acceptance/realtime/channels_spec.rb#L34) + * params keys are the same but values are different + * [will raise an error](./spec/acceptance/realtime/channels_spec.rb#L50) + * using shortcut method #channel on the client object + * behaves like a channel + * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6) + * [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L12) + * using #get method on client#channels + * behaves like a channel + * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6) + * [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L12) + * accessing an existing channel object with different options + * [overrides the existing channel options and returns the channel object](./spec/acceptance/realtime/channels_spec.rb#L82) + * [shows deprecation warning](./spec/acceptance/realtime/channels_spec.rb#L90) + * accessing an existing channel object without specifying any channel options + * [returns the existing channel without modifying the channel options](./spec/acceptance/realtime/channels_spec.rb#L105) + * using undocumented array accessor [] method on client#channels + * behaves like a channel + * [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6) + * [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L12) + +### Ably::PubSub::Realtime::Client +_(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/client_spec.rb))_ + * using JSON protocol + * initialization + * basic auth + * [is enabled by default with a provided :key option](./spec/acceptance/realtime/client_spec.rb#L19) + * with an invalid API key + * [logs an entry with a help href url matching the code #TI5](./spec/acceptance/realtime/client_spec.rb#L32) + * :tls option + * set to false to force a plain-text connection + * [fails to connect because a private key cannot be sent over a non-secure connection](./spec/acceptance/realtime/client_spec.rb#L48) + * token auth + * with TLS enabled + * and a pre-generated Token provided with the :token option + * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L69) + * with valid :key and :use_token_auth option set to true + * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L82) + * with TLS disabled + * and a pre-generated Token provided with the :token option + * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L69) + * with valid :key and :use_token_auth option set to true + * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L82) + * with a Proc for the :auth_callback option + * [calls the Proc](./spec/acceptance/realtime/client_spec.rb#L104) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L111) + * when the returned token has a client_id + * [sets Auth#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L119) + * [sets Client#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L127) + * with a wildcard client_id token + * and an explicit client_id in ClientOptions + * [allows uses the explicit client_id in the connection](./spec/acceptance/realtime/client_spec.rb#L145) + * and client_id omitted in ClientOptions + * [uses the token provided clientId in the connection](./spec/acceptance/realtime/client_spec.rb#L161) + * with an invalid wildcard "*" :client_id + * [raises an exception](./spec/acceptance/realtime/client_spec.rb#L177) + * realtime connection settings + * defaults + * [disconnected_retry_timeout is 15s](./spec/acceptance/realtime/client_spec.rb#L186) + * [suspended_retry_timeout is 30s](./spec/acceptance/realtime/client_spec.rb#L191) + * overriden in ClientOptions + * [disconnected_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L200) + * [suspended_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L205) + * #connection + * [provides access to the Connection object](./spec/acceptance/realtime/client_spec.rb#L214) + * #channels + * [provides access to the Channels collection object](./spec/acceptance/realtime/client_spec.rb#L221) * #auth - * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L1073) - * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L1077) - * version headers - * with default agent - * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1097) - * with custom ably-ruby/1.1.1 ruby/3.1.1 agent - * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1097) - * #request (#RSC19*, #TO3l9) + * [provides access to the Realtime::Auth object](./spec/acceptance/realtime/client_spec.rb#L228) + * #request (#RSC19*) * get - * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L1119) + * [returns an HttpPaginatedResponse object](./spec/acceptance/realtime/client_spec.rb#L240) * 404 request to invalid URL - * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L1126) + * [returns an object with 404 status code and error message](./spec/acceptance/realtime/client_spec.rb#L249) * paged results - * [provides paging](./spec/acceptance/rest/client_spec.rb#L1138) + * [provides paging](./spec/acceptance/realtime/client_spec.rb#L263) * post - * [supports post](./spec/acceptance/rest/client_spec.rb#L1163) - * [raises an exception once body size in bytes exceeded](./spec/acceptance/rest/client_spec.rb#L1169) + * [supports post](./spec/acceptance/realtime/client_spec.rb#L294) * delete - * [supports delete](./spec/acceptance/rest/client_spec.rb#L1182) + * [supports delete](./spec/acceptance/realtime/client_spec.rb#L308) * patch - * [supports patch](./spec/acceptance/rest/client_spec.rb#L1198) - * [raises an exception once body size in bytes exceeded](./spec/acceptance/rest/client_spec.rb#L1204) + * [supports patch](./spec/acceptance/realtime/client_spec.rb#L325) * put - * [supports put](./spec/acceptance/rest/client_spec.rb#L1227) - * [raises an exception once body size in bytes exceeded](./spec/acceptance/rest/client_spec.rb#L1233) - * request_id generation (#RSC7c) - * Timeout error - * with option add_request_ids: true and no fallback hosts - * [has an error with the same request_id of the request](./spec/acceptance/rest/client_spec.rb#L1256) - * 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#L1278) - * with an array publish - * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1285) - * 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#L1294) - * with an array publish - * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1301) - * option add_request_ids: true and specified fallback hosts - * [request_id is the same across retries](./spec/acceptance/rest/client_spec.rb#L1326) - * without request_id and no fallback hosts - * [does not include request_id in ConnectionTimeout error](./spec/acceptance/rest/client_spec.rb#L1338) - * UnauthorizedRequest nonce error - * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/rest/client_spec.rb#L1351) - * failed request logging - * [is absent when requests do not fail](./spec/acceptance/rest/client_spec.rb#L1368) - * with the first request failing - * [is present with success message when requests do not actually fail](./spec/acceptance/rest/client_spec.rb#L1383) - * with all requests failing - * [is present when all requests fail](./spec/acceptance/rest/client_spec.rb#L1400) + * [supports put](./spec/acceptance/realtime/client_spec.rb#L349) + * #publish (#TBC) + * [publishing a message implicity connects and publishes the message successfully on the provided channel](./spec/acceptance/realtime/client_spec.rb#L367) + * [publishing does not result in a channel being created](./spec/acceptance/realtime/client_spec.rb#L379) + * [publishing supports an array of Message objects](./spec/acceptance/realtime/client_spec.rb#L407) + * [publishing supports an array of Hash objects](./spec/acceptance/realtime/client_spec.rb#L419) + * [publishing on a closed connection fails](./spec/acceptance/realtime/client_spec.rb#L431) + * with extras + * [publishing supports extras](./spec/acceptance/realtime/client_spec.rb#L395) + * queue_messages ClientOption + * when true + * [will queue messages whilst connecting and publish once connected](./spec/acceptance/realtime/client_spec.rb#L447) + * when false + * [will reject messages on an initializing connection](./spec/acceptance/realtime/client_spec.rb#L464) + * with more than allowed messages in a single publish + * [rejects the publish](./spec/acceptance/realtime/client_spec.rb#L481) -### Ably::Models::MessageEncoders -_(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_ - * with binary transport protocol - * without encryption - * with UTF-8 data - * [does not apply any encoding](./spec/acceptance/rest/encoders_spec.rb#L41) - * with binary data - * [does not apply any encoding](./spec/acceptance/rest/encoders_spec.rb#L52) - * with JSON data - * [stringifies the JSON and sets the encoding attribute to "json"](./spec/acceptance/rest/encoders_spec.rb#L63) - * with encryption - * with UTF-8 data - * [applies utf-8 and cipher encoding and sets the encoding attribute to "utf-8/cipher+aes-128-cbc"](./spec/acceptance/rest/encoders_spec.rb#L78) - * with binary data - * [applies cipher encoding and sets the encoding attribute to "cipher+aes-128-cbc"](./spec/acceptance/rest/encoders_spec.rb#L89) - * with JSON data - * [applies json, utf-8 and cipher encoding and sets the encoding attribute to "json/utf-8/cipher+aes-128-cbc"](./spec/acceptance/rest/encoders_spec.rb#L100) - * with text transport protocol - * without encryption - * with UTF-8 data - * [does not apply any encoding](./spec/acceptance/rest/encoders_spec.rb#L117) - * with binary data - * [applies a base64 encoding and sets the encoding attribute to "base64"](./spec/acceptance/rest/encoders_spec.rb#L128) - * with JSON data - * [stringifies the JSON and sets the encoding attribute to "json"](./spec/acceptance/rest/encoders_spec.rb#L139) - * with encryption - * with UTF-8 data - * [applies utf-8, cipher and base64 encodings and sets the encoding attribute to "utf-8/cipher+aes-128-cbc/base64"](./spec/acceptance/rest/encoders_spec.rb#L154) - * with binary data - * [applies cipher and base64 encoding and sets the encoding attribute to "cipher+aes-128-cbc/base64"](./spec/acceptance/rest/encoders_spec.rb#L165) - * with JSON data - * [applies json, utf-8, cipher and base64 encoding and sets the encoding attribute to "json/utf-8/cipher+aes-128-cbc/base64"](./spec/acceptance/rest/encoders_spec.rb#L176) +### Ably::PubSub::Realtime::Connection failures +_(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/realtime/connection_failures_spec.rb))_ + * using JSON protocol + * authentication failure + * when API key is invalid + * with invalid app part of the key + * [enters the failed state and returns an invalid credentials error](./spec/acceptance/realtime/connection_failures_spec.rb#L29) + * with invalid key name part of the key + * [enters the failed state and returns an authorization error](./spec/acceptance/realtime/connection_failures_spec.rb#L44) + * with auth_url + * opening a new connection + * request fails due to network failure + * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L62) + * request fails due to invalid content + * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L92) + * request fails due to slow response and subsequent timeout + * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L127) + * request fails once due to slow response but succeeds the second time + * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L175) + * existing CONNECTED connection + * authorize request failure leaves connection in existing condition + * [the connection remains in the CONNECTED state and authorize fails (#RSA4c, #RSA4c1, #RSA4c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L196) + * with auth_callback + * opening a new connection + * when callback fails due to an exception + * [the connection moves to the disconnected state and tries again, returning again to the disconnected state (#RSA4c, #RSA4c1, #RSA4c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L224) + * existing CONNECTED connection + * when callback fails due to the request taking longer than realtime_request_timeout + * [the authorization request fails as configured in the realtime_request_timeout (#RSA4c, #RSA4c1, #RSA4c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L255) + * automatic connection retry + * with invalid WebSocket host + * when disconnected + * [enters the suspended state after multiple attempts to connect](./spec/acceptance/realtime/connection_failures_spec.rb#L320) + * for the first time + * [reattempts connection immediately and then waits disconnected_retry_timeout for a subsequent attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L341) + * #close + * [transitions connection state to :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L358) + * when connection state is :suspended + * [stays in the suspended state after any number of reconnection attempts](./spec/acceptance/realtime/connection_failures_spec.rb#L377) + * for the first time + * [waits suspended_retry_timeout before attempting to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L400) + * #close + * [transitions connection state to :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L422) + * when connection state is :failed + * #close + * [will not transition state to :close and fails with an InvalidStateChange exception](./spec/acceptance/realtime/connection_failures_spec.rb#L441) + * #error_reason + * [contains the error when state is disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L462) + * [contains the error when state is suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L462) + * [contains the error when state is failed](./spec/acceptance/realtime/connection_failures_spec.rb#L462) + * [is reset to nil when :connected](./spec/acceptance/realtime/connection_failures_spec.rb#L476) + * [is reset to nil when :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L487) + * #connect + * connection opening times out + * [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L518) + * when retry intervals are stubbed to attempt reconnection quickly + * [never calls the provided success block](./spec/acceptance/realtime/connection_failures_spec.rb#L542) + * connection resume + * when DISCONNECTED ProtocolMessage received from the server + * [reconnects automatically and immediately (#RTN15a)](./spec/acceptance/realtime/connection_failures_spec.rb#L573) + * when protocolMessage contains token error + * library does not have a means to renew the token (#RTN15h1) + * [moves connection state to failed](./spec/acceptance/realtime/connection_failures_spec.rb#L601) + * library have a means to renew the token (#RTN15h2) + * [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L625) + * connection state freshness is monitored + * [resumes connections when disconnected within the connection_state_ttl period (#RTN15g)](./spec/acceptance/realtime/connection_failures_spec.rb#L649) + * 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#L689) + * 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#L742) + * [clears the local connection state and uses a new connection when the connection_state_ttl + max_idle_interval period has passed since last activity (#RTN15g1, #RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L774) + * [still reattaches the channels automatically following a new connection being established (#RTN15g2)](./spec/acceptance/realtime/connection_failures_spec.rb#L807) + * and subsequently fails to reconnect + * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L863) + * when websocket transport is abruptly disconnected + * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L906) + * hosts used + * [reconnects with the default host](./spec/acceptance/realtime/connection_failures_spec.rb#L922) + * after successfully reconnecting and resuming + * [retains connection_id and updates the connection_key (#RTN15e, #RTN16d)](./spec/acceptance/realtime/connection_failures_spec.rb#L945) + * [includes the error received in the connection state change from Ably but leaves the channels attached](./spec/acceptance/realtime/connection_failures_spec.rb#L960) + * [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L986) + * [retains the client_msg_serial (#RTN15c2, #RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1037) + * when messages were published whilst the client was disconnected + * [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L1004) + * 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#L1077) + * [issue a reattach for all attached channels and fail all message awaiting an ACK (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1092) + * [issue a reattach for all attaching channels and fail all queued messages (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1130) + * [issue a attach for all suspended channels (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1166) + * [sets the error reason on each channel](./spec/acceptance/realtime/connection_failures_spec.rb#L1204) + * [continues to use the client_msg_serial (#RTN15c3)](./spec/acceptance/realtime/connection_failures_spec.rb#L1219) + * 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#L1256) + * 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#L1287) + * 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#L1303) + * 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#L1316) + * 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#L1287) + * 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#L1303) + * 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#L1316) + * 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#L1360) + * with any other error (#RTN15c4) + * [moves the connection to the failed state](./spec/acceptance/realtime/connection_failures_spec.rb#L1394) + * fallback host feature + * with a hostname endpoint + * [never uses a fallback host (#REC2c2)](./spec/acceptance/realtime/connection_failures_spec.rb#L1438) + * with custom realtime websocket port option + * FAILED: ~~[uses the custom port for every connection attempt, including to fallback hosts](./spec/acceptance/realtime/connection_failures_spec.rb#L1456)~~ + * with the test app routing policy endpoint + * and no fallback hosts provided + * [uses the default fallback hosts for that routing policy (#REC2c3, #REC2c4)](./spec/acceptance/realtime/connection_failures_spec.rb#L1482) + * when the connection succeeds + * [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#L1498) + * :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#L1526) + * with the default production routing policy endpoint + * when the Internet is down + * [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L1558) + * when the Internet is up + * and two fallback hosts + * [uses a fallback host + the original host once on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L1581) + * [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#L1600) + * [uses the correct host name for the WebSocket requests to the fallback hosts](./spec/acceptance/realtime/connection_failures_spec.rb#L1623) + * :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#L1653) + * :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#L1673) -### Ably::Rest::Channel messages -_(see [spec/acceptance/rest/message_spec.rb](./spec/acceptance/rest/message_spec.rb))_ +### Ably::PubSub::Realtime::Connection +_(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_ * using JSON protocol - * publishing with an ASCII_8BIT message name - * [is converted into UTF_8](./spec/acceptance/rest/message_spec.rb#L19) - * a single Message object (#RSL1a) - * [publishes the message](./spec/acceptance/rest/message_spec.rb#L32) - * an array of Message objects (#RSL1a) - * [publishes three messages](./spec/acceptance/rest/message_spec.rb#L47) - * an array of hashes (#RSL1a) - * [publishes three messages](./spec/acceptance/rest/message_spec.rb#L59) - * a name with data payload (#RSL1a, #RSL1b) - * [publishes the message](./spec/acceptance/rest/message_spec.rb#L69) + * intialization + * [connects automatically](./spec/acceptance/realtime/connection_spec.rb#L23) + * current_host + * [is available immediately after the client is instanced](./spec/acceptance/realtime/connection_spec.rb#L31) + * with :auto_connect option set to false + * [does not connect automatically](./spec/acceptance/realtime/connection_spec.rb#L42) + * [connects when method #connect is called](./spec/acceptance/realtime/connection_spec.rb#L50) + * with token auth + * for renewable tokens + * that are valid for the duration of the test + * with valid pre authorized token expiring in the future + * [uses the existing token created by Auth](./spec/acceptance/realtime/connection_spec.rb#L72) + * that expire + * opening a new connection + * with almost expired tokens + * FAILED: ~~[renews token every time after it expires](./spec/acceptance/realtime/connection_spec.rb#L107)~~ + * with immediately expired token and no fallback hosts + * [renews the token on connect, and makes one immediate subsequent attempt to obtain a new token (#RSA4b)](./spec/acceptance/realtime/connection_spec.rb#L137) + * when disconnected_retry_timeout is 0.5 seconds + * [renews the token on connect, and continues to attempt renew based on the retry schedule](./spec/acceptance/realtime/connection_spec.rb#L152) + * using implicit token auth + * [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L182) + * 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) + * connection state + * [retains messages published when disconnected three times during authentication](./spec/acceptance/realtime/connection_spec.rb#L273) + * and subsequent token is invalid + * [transitions the connection to the failed state](./spec/acceptance/realtime/connection_spec.rb#L308) + * for non-renewable tokens + * that are expired + * opening a new connection + * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L338) + * when connected + * [transitions state to failed (#RSA4a)](./spec/acceptance/realtime/connection_spec.rb#L354) + * 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#L374) + * that is incompatible with the current client client_id + * [fails the connection](./spec/acceptance/realtime/connection_spec.rb#L386) + * wildcard + * [configures the Client#client_id and Auth#client_id with a wildcard once CONNECTED](./spec/acceptance/realtime/connection_spec.rb#L400) + * initialization state changes + * with implicit #connect + * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L432) + * with explicit #connect + * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L438) + * #connect with no fallbacks + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L448) + * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L453) + * [calls the provided block on success even if state changes to disconnected first](./spec/acceptance/realtime/connection_spec.rb#L460) + * when can't connect to host + * [logs error on failed connection attempt](./spec/acceptance/realtime/connection_spec.rb#L489) + * when explicitly reconnecting disconnected/suspended connection in retry (#RTN11c) + * when suspended + * [reconnects immediately](./spec/acceptance/realtime/connection_spec.rb#L529) + * when disconnected + * [reconnects immediately](./spec/acceptance/realtime/connection_spec.rb#L563) + * when reconnecting a failed connection + * [transitions all channels state to initialized and cleares error_reason](./spec/acceptance/realtime/connection_spec.rb#L593) + * with invalid auth details + * [calls the Deferrable errback only once on connection failure](./spec/acceptance/realtime/connection_spec.rb#L621) + * when already connected + * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L637) + * connection#id + * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L651) + * connection#key + * [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L658) + * once connected + * connection#id + * [is a string](./spec/acceptance/realtime/connection_spec.rb#L669) + * [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L676) + * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L683) + * connection#key + * [is a string](./spec/acceptance/realtime/connection_spec.rb#L692) + * [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L699) + * [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L706) + * 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#L716) + * when closing + * [fails the deferrable before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L733) + * #msgSerial + * when messages are queued for publish before a connection is established + * [the msgSerial is always incrementing (and not reset when the new connection is established) ensuring messages are never de-duped by the realtime service](./spec/acceptance/realtime/connection_spec.rb#L757) + * #close + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L789) + * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L796) + * when already closed + * [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L807) + * 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#L834) + * :connecting RTN12f + * :connected does not arrive when trying to close + * [moves to closed](./spec/acceptance/realtime/connection_spec.rb#L852) + * :connected arrive when trying to close + * [moves to connected and then to closed](./spec/acceptance/realtime/connection_spec.rb#L879) + * :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#L900) + * with an unresponsive connection + * [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L927) + * :suspended RTN12d + * [immediatly closes connection](./spec/acceptance/realtime/connection_spec.rb#L956) + * :disconnected RTN12d + * [immediatly closes connection](./spec/acceptance/realtime/connection_spec.rb#L991) + * #ping + * [echoes a heart beat (#RTN13a)](./spec/acceptance/realtime/connection_spec.rb#L1024) + * [sends a unique ID in each protocol message (#RTN13e)](./spec/acceptance/realtime/connection_spec.rb#L1034) + * [waits until the connection becomes CONNECTED when in the CONNETING state](./spec/acceptance/realtime/connection_spec.rb#L1058) + * with incompatible states + * when not connected + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1071) + * when suspended + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1080) + * when failed + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1092) + * when closed + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1104) + * when it becomes closed + * [fails the deferrable (#RTN13b)](./spec/acceptance/realtime/connection_spec.rb#L1118) + * with a success block that raises an exception + * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L1131) + * when ping times out + * [fails the deferrable logs a warning (#RTN13a, #RTN13c)](./spec/acceptance/realtime/connection_spec.rb#L1145) + * [yields to the block with a nil value](./spec/acceptance/realtime/connection_spec.rb#L1164) + * 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#L1190) + * [disconnects the transport if no heartbeat received since connected (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L1200) + * [disconnects the transport if no heartbeat received since last event received (#RTN23a)](./spec/acceptance/realtime/connection_spec.rb#L1211) + * 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#L1226) + * [receives websocket heartbeat messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1235) + * with websocket heartbeats disabled (undocumented) + * [does not provide the heartbeats argument in the websocket connection params (#RTN23b)](./spec/acceptance/realtime/connection_spec.rb#L1251) + * [receives websocket protocol messages (#RTN23b) [slow test as need to wait for heartbeat]](./spec/acceptance/realtime/connection_spec.rb#L1260) + * #details + * [is nil before connected](./spec/acceptance/realtime/connection_spec.rb#L1278) + * [contains the ConnectionDetails object once connected (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1285) + * [contains the new ConnectionDetails object once a subsequent connection is created (#RTN21)](./spec/acceptance/realtime/connection_spec.rb#L1294) + * 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#L1315) + * recovery + * #recovery_key + * [is available when connection is in one of the states: connecting, connected, disconnected](./spec/acceptance/realtime/connection_spec.rb#L1352) + * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L1382) + * opening a new connection using a recently disconnected connection's #recovery_key + * connection#id after recovery + * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L1394) + * 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#L1416) + * when messages have been published + * the new connection + * [uses the correct msgSerial from the old connection](./spec/acceptance/realtime/connection_spec.rb#L1445) + * when messages are published before the new connection is recovered + * the new connection + * [uses the correct msgSerial from the old connection for the queued messages](./spec/acceptance/realtime/connection_spec.rb#L1475) + * with :recover option + * with invalid syntax + * [logs recovery decode error as a warning and connects successfully](./spec/acceptance/realtime/connection_spec.rb#L1522) + * with invalid connection key + * [connects but sets the error reason and includes the reason in the state change](./spec/acceptance/realtime/connection_spec.rb#L1537) + * with many connections simultaneously + * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L1556) + * when a state transition is unsupported + * [logs the invalid state change as fatal](./spec/acceptance/realtime/connection_spec.rb#L1576) + * protocol failure + * receiving an invalid ProtocolMessage + * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L1592) + * undocumented method + * #internet_up? + * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1610) + * 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#L1621) + * 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#L1631) + * when the Internet is up + * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L1662) + * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1669) + * with a TLS connection + * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1645) + * with a non-TLS connection + * [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L1655) + * when the Internet is down + * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L1684) + * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L1691) + * 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#L1705) + * 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#L1738) + * 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#L1769) + * connection state change + * [emits event to all and single subscribers](./spec/acceptance/realtime/connection_spec.rb#L1783) + * [emits a ConnectionStateChange object](./spec/acceptance/realtime/connection_spec.rb#L1798) + * ConnectionStateChange object + * [has current state](./spec/acceptance/realtime/connection_spec.rb#L1806) + * [has a previous state](./spec/acceptance/realtime/connection_spec.rb#L1814) + * [has the event that generated the state change (#TH5)](./spec/acceptance/realtime/connection_spec.rb#L1822) + * [has an empty reason when there is no error](./spec/acceptance/realtime/connection_spec.rb#L1838) + * on failure + * [has a reason Error object when there is an error on the connection](./spec/acceptance/realtime/connection_spec.rb#L1851) + * retry_in + * [is nil when a retry is not required](./spec/acceptance/realtime/connection_spec.rb#L1866) + * [is 0 when first attempt to connect fails](./spec/acceptance/realtime/connection_spec.rb#L1873) + * [is 0 when an immediate reconnect will occur](./spec/acceptance/realtime/connection_spec.rb#L1883) + * [contains the next retry period when an immediate reconnect will not occur](./spec/acceptance/realtime/connection_spec.rb#L1893) + * whilst CONNECTED + * when a CONNECTED message is received (#RTN24) + * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1927) + * [updates the ConnectionDetail and Connection attributes (#RTC8a1)](./spec/acceptance/realtime/connection_spec.rb#L1942) + * when a CONNECTED message with an error is received + * [emits an UPDATE event](./spec/acceptance/realtime/connection_spec.rb#L1975) + * version params + * [sends the protocol version param v (#G4, #RTN2f)](./spec/acceptance/realtime/connection_spec.rb#L1996) + * [sends the lib version param agent (#RCS7d)](./spec/acceptance/realtime/connection_spec.rb#L2005) + * transport_params (#RTC1f) + * [pases transport_params to query](./spec/acceptance/realtime/connection_spec.rb#L2018) + * when changing default param + * [overrides default param (#RTC1f1)](./spec/acceptance/realtime/connection_spec.rb#L2031) + +### Ably::PubSub::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) * with supported data payload content type * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L82) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L49) * JSON Array - * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L91) + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L57) * String - * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L100) + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L65) * Binary - * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L109) - * with supported extra payload content type (#RSL1h, #RSL6a2) - * JSON Object (Hash) - * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L122) - * JSON Array - * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/rest/message_spec.rb#L131) - * nil - * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L138) - * idempotency (#RSL1k) - * [idempotent publishing is set as per clientOptions](./spec/acceptance/rest/message_spec.rb#L207) - * [idempotent publishing is enabled by default (#TO3n)](./spec/acceptance/rest/message_spec.rb#L217) - * when ID is not included (#RSL1k2) - * with Message object - * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L154) - * with #publish arguments only - * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L161) - * when ID is included (#RSL1k2, #RSL1k5) - * [the ID provided is used for the published messages](./spec/acceptance/rest/message_spec.rb#L186) - * [for multiple messages in one publish operation (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L191) - * [for multiple messages in one publish operation with IDs following the required format described in RSL1k1 (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L198) - * with Message object - * [three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L172) - * with #publish arguments only - * [three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L180) - * when idempotent publishing is enabled in the client library ClientOptions (#TO3n) - * [the ID is populated with a random ID and serial 0 from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L280) - * when there is a network failure triggering an automatic retry (#RSL1k4) - * [for multiple messages in one publish operation](./spec/acceptance/rest/message_spec.rb#L273) - * with Message object - * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L243) - * with #publish arguments only - * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L253) - * with explicitly provided message ID - * [two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L265) - * when publishing a batch of messages - * [the ID is populated with a single random ID and sequence of serials from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L288) + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L73) + * a single Message object (#RSL1a) + * [publishes the message](./spec/acceptance/realtime/message_spec.rb#L84) + * an array of Message objects (#RSL1a) + * [publishes three messages](./spec/acceptance/realtime/message_spec.rb#L101) + * an array of hashes (#RSL1a) + * [publishes three messages](./spec/acceptance/realtime/message_spec.rb#L124) + * a name with data payload (#RSL1a, #RSL1b) + * [publishes a message](./spec/acceptance/realtime/message_spec.rb#L145) + * with supported extra payload content type (#RTL6h, #RSL6a2) + * JSON Object (Hash) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L171) + * JSON Array + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L179) + * nil + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L185) * with unsupported data payload content type * Integer - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L305) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L196) * Float - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L313) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L205) * Boolean - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L321) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L214) * False - * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L329) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 4 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 5 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 6 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 7 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 8 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 9 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 10 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 11 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 12 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 13 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 14 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 15 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 16 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 17 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 18 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 19 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 20 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 21 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 22 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 23 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 24 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 25 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 26 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 27 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 28 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 29 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 30 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 31 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 32 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 33 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 34 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 35 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 36 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 37 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 38 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 39 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 40 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 41 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 42 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 43 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 44 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 45 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 46 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 47 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 48 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 49 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 50 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 51 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 52 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 53 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 54 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 55 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 56 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 57 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 58 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 59 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 60 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 61 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 62 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 63 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 64 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 65 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 66 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 67 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 68 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 69 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 70 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 71 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 72 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * item 73 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#L374) - * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L389) - * when publishing lots of messages - * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L422) - * when retrieving #history with a different protocol - * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L449) - * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L449) - * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L449) - * 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#L465) - * 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#L486) - * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L492) - * 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#L513) - * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L519) - * 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#L540) - * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L546) + * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L223) + * with ASCII_8BIT message name + * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L232) + * when the message publisher has a client_id + * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L248) + * #connection_id attribute + * over realtime + * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L261) + * when retrieved over REST + * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L273) + * local echo when published + * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L285) + * 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#L305) + * [will not echo messages to the client from other REST clients publishing using that connection_key](./spec/acceptance/realtime/message_spec.rb#L323) + * [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#L336) + * 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#L362) + * without suitable publishing permissions + * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L407) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 4 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 5 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 6 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 7 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 8 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 9 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 10 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 11 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 12 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 13 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 14 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 15 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 16 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 17 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 18 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 19 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 20 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 21 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 22 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 23 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 24 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 25 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 26 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 27 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 28 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 29 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 30 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 31 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 32 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 33 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 34 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 35 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 36 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 37 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 38 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 39 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 40 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 41 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 42 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 43 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 44 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 45 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 46 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 47 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 48 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 49 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 50 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 51 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 52 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 53 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 54 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 55 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 56 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 57 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 58 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 59 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 60 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 61 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 62 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 63 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 64 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 65 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 66 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 67 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 68 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 69 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 70 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 71 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 72 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * item 73 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#L458) + * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L478) + * with multiple sends from one client to another + * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L517) + * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L534) + * subscribing with a different transport protocol + * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L568) + * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L568) + * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L568) + * 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#L589) + * 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#L609) + * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L620) + * 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#L640) + * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L651) + * 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#L671) + * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L682) + * 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#L701) + * 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#L746) + * the connection becomes suspended + * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L772) + * the connection becomes failed + * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L799) + * 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#L840) + * when encoding string + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L858) + * when decoding string + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L840) + * when encoding string + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L858) + * when decoding jsonObject + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L840) + * when encoding jsonObject + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L858) + * when decoding jsonArray + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L840) + * when encoding jsonArray + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L858) + * when decoding binary + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L840) + * when encoding binary + * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L858) + * 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#L892) + * when retrieving a string using JSON protocol + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L920) + * when publishing a string using JSON protocol + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L892) + * when retrieving a string using JSON protocol + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L920) + * when publishing a jsonObject using JSON protocol + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L892) + * when retrieving a jsonObject using JSON protocol + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L920) + * when publishing a jsonArray using JSON protocol + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L892) + * when retrieving a jsonArray using JSON protocol + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L920) + * when publishing a binary using JSON protocol + * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L892) + * when retrieving a binary using JSON protocol + * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L920) -### Ably::Rest::Presence -_(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_ +### Ably::PubSub::Realtime::Presence history +_(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_ * using JSON protocol - * tested against presence fixture data set up in test app + * [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#L44) + +### Ably::PubSub::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, no members are received and the presence channel is synced (#RTP1)](./spec/acceptance/realtime/presence_spec.rb#L707) + * 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#L736) + * 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#L788) + * 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#L804) + * 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#L841) + * [ignores presence events with timestamps / identifiers prior to the current :present event in the MembersMap (#RTP2c)](./spec/acceptance/realtime/presence_spec.rb#L889) + * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get (#RTP2f)](./spec/acceptance/realtime/presence_spec.rb#L934) + * #get + * by default + * [waits until sync is complete (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L984) + * with :wait_for_sync option set to false (#RTP11c1) + * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L1005) + * state + * once opened + * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L1032) + * #enter + * data attribute + * when provided as argument option to #enter + * [changes to value provided in #leave](./spec/acceptance/realtime/presence_spec.rb#L1057) + * message #connection_id + * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1081) + * without necessary capabilities to join presence + * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1100) + * it should behave like a public presence method + * [presence enter : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) + * [presence enter : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) + * [presence enter : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) + * [presence enter : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) + * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) + * [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) + * when :queue_messages client option is false + * and connection state initialized + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) + * and connection state connecting + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) + * and connection state disconnected + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) + * and connection state connected + * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) + * with supported data payload content type + * JSON Object (Hash) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) + * JSON Array + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) + * String + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) + * Binary + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) + * with unsupported data payload content type + * Integer + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) + * Float + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) + * Boolean + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) + * False + * [raises an UnsupportedDataType 40013 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#L1112) + * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L1137) + * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L1149) + * when ENTERED + * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L1122) + * it should behave like a public presence method + * [presence update : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) + * [presence update : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) + * [presence update : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) + * [presence update : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) + * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) + * [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) + * when :queue_messages client option is false + * and connection state initialized + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) + * and connection state connecting + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) + * and connection state disconnected + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) + * and connection state connected + * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) + * with supported data payload content type + * JSON Object (Hash) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) + * JSON Array + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) + * String + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) + * Binary + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) + * with unsupported data payload content type + * Integer + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) + * Float + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) + * Boolean + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) + * False + * [raises an UnsupportedDataType 40013 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 + * [succeeds and does not emit an event (#RTP10d)](./spec/acceptance/realtime/presence_spec.rb#L1244) + * :data option + * when set to a string + * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L1170) + * when set to nil + * [emits the last value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L1185) + * 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#L1200) + * and sync is complete + * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L1215) + * 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) + * with supported data payload content type + * JSON Object (Hash) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) + * JSON Array + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) + * String + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) + * Binary + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) + * with unsupported data payload content type + * Integer + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) + * Float + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) + * Boolean + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) + * False + * [raises an UnsupportedDataType 40013 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#L1262) + * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L1275) + * 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#L1300) + * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L1314) + * message #connection_id + * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L1335) + * without necessary capabilities to enter on behalf of another client + * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L1355) + * it should behave like a public presence method + * [presence enter_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) + * [presence enter_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) + * [presence enter_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) + * [presence enter_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) + * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) + * [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) + * when :queue_messages client option is false + * and connection state initialized + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) + * and connection state connecting + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) + * and connection state disconnected + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) + * and connection state connected + * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) + * with supported data payload content type + * JSON Object (Hash) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) + * JSON Array + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) + * String + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) + * Binary + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) + * with unsupported data payload content type + * Integer + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) + * Float + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) + * Boolean + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) + * False + * [raises an UnsupportedDataType 40013 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) + * it should behave like a presence on behalf of another client method + * :enter_client when authenticated with a wildcard client_id + * and a valid client_id + * [succeeds](./spec/acceptance/realtime/presence_spec.rb#L362) + * and a wildcard client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L372) + * and an empty client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L379) + * and a client_id that is not a string type + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L386) + * :enter_client when authenticated with a valid client_id + * and another invalid client_id + * before authentication + * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L402) + * after authentication + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L411) + * and a wildcard client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L421) + * and an empty client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L428) + * :enter_client when anonymous and no client_id + * and another invalid client_id + * before authentication + * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L444) + * after authentication + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L453) + * 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) + * #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#L1369) + * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L1395) + * FAILED: ~~[enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L1409)~~ + * it should behave like a public presence method + * [presence update_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) + * [presence update_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) + * [presence update_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) + * [presence update_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) + * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) + * [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) + * when :queue_messages client option is false + * and connection state initialized + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) + * and connection state connecting + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) + * and connection state disconnected + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) + * and connection state connected + * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) + * with supported data payload content type + * JSON Object (Hash) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) + * JSON Array + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) + * String + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) + * Binary + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) + * with unsupported data payload content type + * Integer + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) + * Float + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) + * Boolean + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) + * False + * [raises an UnsupportedDataType 40013 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) + * it should behave like a presence on behalf of another client method + * :update_client when authenticated with a wildcard client_id + * and a valid client_id + * [succeeds](./spec/acceptance/realtime/presence_spec.rb#L362) + * and a wildcard client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L372) + * and an empty client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L379) + * and a client_id that is not a string type + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L386) + * :update_client when authenticated with a valid client_id + * and another invalid client_id + * before authentication + * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L402) + * after authentication + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L411) + * and a wildcard client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L421) + * and an empty client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L428) + * :update_client when anonymous and no client_id + * and another invalid client_id + * before authentication + * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L444) + * after authentication + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L453) + * 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) + * #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#L1441) + * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L1467) + * with a new value in :data option + * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1493) + * with a nil value in :data option + * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1508) + * with no :data option + * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1523) + * it should behave like a public presence method + * [presence leave_client : raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L63) + * [presence leave_client : raise an exception if the channel becomes detached](./spec/acceptance/realtime/presence_spec.rb#L81) + * [presence leave_client : raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L97) + * [presence leave_client : raise an exception if the channel becomes failed](./spec/acceptance/realtime/presence_spec.rb#L114) + * [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L130) + * [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) + * when :queue_messages client option is false + * and connection state initialized + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L142) + * and connection state connecting + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L152) + * and connection state disconnected + * [fails the deferrable](./spec/acceptance/realtime/presence_spec.rb#L167) + * and connection state connected + * [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L182) + * with supported data payload content type + * JSON Object (Hash) + * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L209) + * JSON Array + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L219) + * String + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L229) + * Binary + * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239) + * with unsupported data payload content type + * Integer + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259) + * Float + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268) + * Boolean + * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277) + * False + * [raises an UnsupportedDataType 40013 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) + * it should behave like a presence on behalf of another client method + * :leave_client when authenticated with a wildcard client_id + * and a valid client_id + * [succeeds](./spec/acceptance/realtime/presence_spec.rb#L362) + * and a wildcard client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L372) + * and an empty client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L379) + * and a client_id that is not a string type + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L386) + * :leave_client when authenticated with a valid client_id + * and another invalid client_id + * before authentication + * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L402) + * after authentication + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L411) + * and a wildcard client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L421) + * and an empty client_id + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L428) + * :leave_client when anonymous and no client_id + * and another invalid client_id + * before authentication + * [allows the operation and then Ably rejects the operation](./spec/acceptance/realtime/presence_spec.rb#L444) + * after authentication + * [throws an exception](./spec/acceptance/realtime/presence_spec.rb#L453) + * 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#L1544) + * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1549) + * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1556) + * [implicitly attaches the channel (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1564) + * [fails if the connection is DETACHED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1599) + * [fails if the connection is FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1616) + * [returns the current members on the channel (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1700) + * [filters by connection_id option if provided (#RTP11c3)](./spec/acceptance/realtime/presence_spec.rb#L1717) + * [filters by client_id option if provided (#RTP11c2)](./spec/acceptance/realtime/presence_spec.rb#L1739) + * [does not wait for SYNC to complete if :wait_for_sync option is false (#RTP11c1)](./spec/acceptance/realtime/presence_spec.rb#L1763) + * [returns the list of members and waits for SYNC to complete by default (#RTP11a)](./spec/acceptance/realtime/presence_spec.rb#L1775) + * when the channel is SUSPENDED + * with wait_for_sync: true + * [results in an error with @code@ @91005@ and a @message@ stating that the presence state is out of sync (#RTP11d)](./spec/acceptance/realtime/presence_spec.rb#L1574) + * 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#L1587) + * during a sync + * when :wait_for_sync is true + * [fails if the connection becomes FAILED (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1653) + * [fails if the channel becomes detached (#RTP11b)](./spec/acceptance/realtime/presence_spec.rb#L1676) + * when a member enters and then leaves + * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1788) + * when a member enters and the presence map is updated + * [adds the member as being :present (#RTP2d)](./spec/acceptance/realtime/presence_spec.rb#L1803) + * with lots of members on different clients + * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1824) + * #subscribe + * [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1901) + * with no arguments + * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1862) + * with event name + * [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1882) + * with a callback that raises an exception + * [logs the error and continues](./spec/acceptance/realtime/presence_spec.rb#L1914) + * #unsubscribe + * with no arguments + * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1935) + * with event name + * [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1953) + * REST #get + * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1972) + * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1988) + * client_id with ASCII_8BIT + * in connection set up + * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L2008) + * in channel options + * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L2021) + * encoding and decoding of presence message data + * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L2047) + * #subscribe + * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L2066) + * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L2078) + * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L2092) * #get - * [returns current members on the channel with their action set to :present](./spec/acceptance/rest/presence_spec.rb#L41) - * with :limit option - * [returns a paged response limiting number of members per page](./spec/acceptance/rest/presence_spec.rb#L57) - * default :limit - * [defaults to a limit of 100](./spec/acceptance/rest/presence_spec.rb#L86) - * 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#L138) - * default behaviour - * [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#L165) - * direction: :backwards - * [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#L225) - * set to 1000 - * [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#L268) - * with Time object value - * [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#L268) - * with Time object value - * [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#L289) - * decoding - * with encoded fixture data - * #history - * [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#L315) - * decoding permutations using mocked #history - * valid decodeable content - * #get - * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L368) - * #history - * [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#L416) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L420) - * #history - * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L440) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L444) + * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2108) + * REST #get + * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L2122) + * when cipher settings do not match publisher + * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L2138) + * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L2151) + * leaving + * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L2169) + * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L2179) + * connection failure mid-way through a large member sync + * [resumes the SYNC operation (#RTP3)](./spec/acceptance/realtime/presence_spec.rb#L2198) + * 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#L2236) + * 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#L2285) + * 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#L2332) + * when the client does not have presence subscribe privileges but is present on the channel + * [receives presence updates for all presence events generated by the current connection and the presence map is kept up to date (#RTP17a)](./spec/acceptance/realtime/presence_spec.rb#L2389) + * 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#L2437) + * #RTP17b + * [updates presence members on leave](./spec/acceptance/realtime/presence_spec.rb#L2465) + * [does no update presence members on fabricated leave](./spec/acceptance/realtime/presence_spec.rb#L2490) + * when a channel becomes attached again + * 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#L2539) + * 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#L2614) + * channel state side effects (RTP5) + * channel transitions to the ATTACHED state (RTP5b) + * [all queued presence messages are sent](./spec/acceptance/realtime/presence_spec.rb#L2668) + * 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#L2688) + * 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#L2715) + * 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#L2753) -### Ably::Rest::Push::Admin -_(see [spec/acceptance/rest/push_admin_spec.rb](./spec/acceptance/rest/push_admin_spec.rb))_ +### Ably::PubSub::Realtime::Push::Admin +_(see [spec/acceptance/realtime/push_admin_spec.rb](./spec/acceptance/realtime/push_admin_spec.rb))_ * using JSON protocol * #publish - * [accepts valid push data and recipient (#RSH1a)](./spec/acceptance/rest/push_admin_spec.rb#L111) - * without publish permissions - * [raises a permissions issue exception](./spec/acceptance/rest/push_admin_spec.rb#L40) - * invalid arguments (#RHS1a) - * [raises an exception with a nil recipient](./spec/acceptance/rest/push_admin_spec.rb#L46) - * [raises an exception with a empty recipient](./spec/acceptance/rest/push_admin_spec.rb#L50) - * [raises an exception with a nil recipient](./spec/acceptance/rest/push_admin_spec.rb#L54) - * [raises an exception with a empty recipient](./spec/acceptance/rest/push_admin_spec.rb#L58) - * invalid recipient (#RSH1a) - * [raises an error after receiving a 40x realtime response](./spec/acceptance/rest/push_admin_spec.rb#L64) - * invalid push data (#RSH1a) - * [raises an error after receiving a 40x realtime response](./spec/acceptance/rest/push_admin_spec.rb#L70) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/push_admin_spec.rb#L35) + * [accepts valid push data and recipient](./spec/acceptance/realtime/push_admin_spec.rb#L125) + * invalid arguments + * [raises an exception with a nil recipient](./spec/acceptance/realtime/push_admin_spec.rb#L44) + * [raises an exception with a empty recipient](./spec/acceptance/realtime/push_admin_spec.rb#L49) + * [raises an exception with a nil recipient](./spec/acceptance/realtime/push_admin_spec.rb#L54) + * [raises an exception with a empty recipient](./spec/acceptance/realtime/push_admin_spec.rb#L59) + * invalid recipient + * [raises an error after receiving a 40x realtime response](./spec/acceptance/realtime/push_admin_spec.rb#L68) + * invalid push data + * [raises an error after receiving a 40x realtime response](./spec/acceptance/realtime/push_admin_spec.rb#L79) * recipient variable case - * [is converted to snakeCase](./spec/acceptance/rest/push_admin_spec.rb#L105) + * [is converted to snakeCase](./spec/acceptance/realtime/push_admin_spec.rb#L117) * using test environment channel recipient (#RSH1a) - * [triggers a push notification](./spec/acceptance/rest/push_admin_spec.rb#L136) - * #device_registrations (#RSH1b) + * [triggers a push notification](./spec/acceptance/realtime/push_admin_spec.rb#L155) + * #device_registrations * without permissions - * [raises a permissions not authorized exception](./spec/acceptance/rest/push_admin_spec.rb#L156) - * #list (#RSH1b2) - * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/rest/push_admin_spec.rb#L197) - * [returns an empty PaginatedResult if not params match](./spec/acceptance/rest/push_admin_spec.rb#L203) - * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L209) - * [provides filtering](./spec/acceptance/rest/push_admin_spec.rb#L221) - * #get (#RSH1b1) - * [returns a DeviceDetails object if a device ID string is provided](./spec/acceptance/rest/push_admin_spec.rb#L266) - * [returns a DeviceDetails object if a DeviceDetails object is provided](./spec/acceptance/rest/push_admin_spec.rb#L274) - * [raises a ResourceMissing exception if device ID does not exist](./spec/acceptance/rest/push_admin_spec.rb#L282) - * #save (#RSH1b3) - * [saves the new DeviceDetails Hash object](./spec/acceptance/rest/push_admin_spec.rb#L327) - * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L342) - * [does not allow some fields to be configured](./spec/acceptance/rest/push_admin_spec.rb#L401) - * [allows device_secret to be configured](./spec/acceptance/rest/push_admin_spec.rb#L414) - * [saves the new DeviceDetails object](./spec/acceptance/rest/push_admin_spec.rb#L423) - * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L432) - * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L445) - * with FCM target - * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L356) - * with web target - * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L378) - * #remove_where (#RSH1b5) - * [removes all matching device registrations by client_id](./spec/acceptance/rest/push_admin_spec.rb#L497) - * [removes device by device_id](./spec/acceptance/rest/push_admin_spec.rb#L502) - * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L507) - * #remove (#RSH1b4) - * [removes the provided device id string](./spec/acceptance/rest/push_admin_spec.rb#L560) - * [removes the provided DeviceDetails](./spec/acceptance/rest/push_admin_spec.rb#L565) - * [succeeds if the item does not exist](./spec/acceptance/rest/push_admin_spec.rb#L570) - * #channel_subscriptions (#RSH1c) - * #list (#RSH1c1) - * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/rest/push_admin_spec.rb#L638) - * [returns an empty PaginatedResult if params do not match](./spec/acceptance/rest/push_admin_spec.rb#L644) - * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L650) - * [provides filtering](./spec/acceptance/rest/push_admin_spec.rb#L662) - * [raises an exception if none of the required filters are provided](./spec/acceptance/rest/push_admin_spec.rb#L690) - * #list_channels (#RSH1c2) - * [returns a PaginatedResult object containing String objects](./spec/acceptance/rest/push_admin_spec.rb#L717) - * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L724) - * [returns an accurate number of channels after devices are deleted](./spec/acceptance/rest/push_admin_spec.rb#L739) - * #save (#RSH1c3) - * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L764) - * [saves the new device_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L775) - * [saves the client_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L786) - * [saves the device_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L797) - * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L808) - * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L821) - * #remove_where (#RSH1c5) - * PENDING: *[removes matching channels](./spec/acceptance/rest/push_admin_spec.rb#L856)* - * [removes matching client_ids](./spec/acceptance/rest/push_admin_spec.rb#L864) - * [removes matching device_ids](./spec/acceptance/rest/push_admin_spec.rb#L870) - * [device_id and client_id filters in the same request are not suppoorted](./spec/acceptance/rest/push_admin_spec.rb#L876) - * [succeeds on no match](./spec/acceptance/rest/push_admin_spec.rb#L880) - * #remove (#RSH1c4) - * [removes match for Hash object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L910) - * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L915) - * [removes match for Hash object by channel and device_id](./spec/acceptance/rest/push_admin_spec.rb#L922) - * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L927) - * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L934) + * [raises a permissions not authorized exception](./spec/acceptance/realtime/push_admin_spec.rb#L183) + * #list + * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/realtime/push_admin_spec.rb#L233) + * [supports paging](./spec/acceptance/realtime/push_admin_spec.rb#L241) + * [raises an exception if params are invalid](./spec/acceptance/realtime/push_admin_spec.rb#L257) + * #get + * [returns a DeviceDetails object if a device ID string is provided](./spec/acceptance/realtime/push_admin_spec.rb#L296) + * with a failed request + * [raises a ResourceMissing exception if device ID does not exist](./spec/acceptance/realtime/push_admin_spec.rb#L313) + * #save + * [saves the new DeviceDetails Hash object](./spec/acceptance/realtime/push_admin_spec.rb#L362) + * with a failed request + * [fails if data is invalid](./spec/acceptance/realtime/push_admin_spec.rb#L380) + * #remove_where + * [removes all matching device registrations by client_id](./spec/acceptance/realtime/push_admin_spec.rb#L418) + * #remove + * [removes the provided device id string](./spec/acceptance/realtime/push_admin_spec.rb#L457) + * #channel_subscriptions + * #list + * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/realtime/push_admin_spec.rb#L533) + * [supports paging](./spec/acceptance/realtime/push_admin_spec.rb#L541) + * [raises an exception if none of the required filters are provided](./spec/acceptance/realtime/push_admin_spec.rb#L557) + * #list_channels + * [returns a PaginatedResult object containing String objects](./spec/acceptance/realtime/push_admin_spec.rb#L584) + * #save + * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/realtime/push_admin_spec.rb#L599) + * [raises an exception for invalid params](./spec/acceptance/realtime/push_admin_spec.rb#L610) + * failed requests + * [fails for invalid requests](./spec/acceptance/realtime/push_admin_spec.rb#L623) + * #remove_where + * [removes matching client_ids](./spec/acceptance/realtime/push_admin_spec.rb#L650) + * [succeeds on no match](./spec/acceptance/realtime/push_admin_spec.rb#L677) + * failed requests + * [device_id and client_id filters in the same request are not supported](./spec/acceptance/realtime/push_admin_spec.rb#L669) + * #remove + * [removes match for Hash object by channel and client_id](./spec/acceptance/realtime/push_admin_spec.rb#L697) + * [succeeds even if there is no match](./spec/acceptance/realtime/push_admin_spec.rb#L709) -### Ably::Rest::Client#stats -_(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_ +### Ably::PubSub::Realtime::Client#stats +_(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_ * using JSON protocol - * fetching application stats - * [returns a PaginatedResult object](./spec/acceptance/rest/stats_spec.rb#L54) - * by minute - * with no options - * [uses the minute interval by default](./spec/acceptance/rest/stats_spec.rb#L66) - * with :from set to last interval and :limit set to 1 - * [retrieves only one stat](./spec/acceptance/rest/stats_spec.rb#L75) - * [returns zero value for any missing metrics](./spec/acceptance/rest/stats_spec.rb#L79) - * [returns all aggregated message data](./spec/acceptance/rest/stats_spec.rb#L84) - * [returns inbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L89) - * [returns inbound realtime message data](./spec/acceptance/rest/stats_spec.rb#L94) - * [returns outbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L99) - * [returns persisted presence all data](./spec/acceptance/rest/stats_spec.rb#L104) - * [returns connections all data](./spec/acceptance/rest/stats_spec.rb#L109) - * [returns channels all data](./spec/acceptance/rest/stats_spec.rb#L114) - * [returns api_requests data](./spec/acceptance/rest/stats_spec.rb#L119) - * [returns token_requests data](./spec/acceptance/rest/stats_spec.rb#L124) - * [returns stat objects with #interval_granularity equal to :minute](./spec/acceptance/rest/stats_spec.rb#L129) - * [returns stat objects with #interval_id matching :start](./spec/acceptance/rest/stats_spec.rb#L133) - * [returns stat objects with #interval_time matching :start Time](./spec/acceptance/rest/stats_spec.rb#L137) - * with :start set to first interval, :limit set to 1 and direction :forwards - * [returns the first interval stats as stats are provided forwards from :start](./spec/acceptance/rest/stats_spec.rb#L147) - * [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L151) - * with :end set to last interval, :limit set to 1 and direction :backwards - * [returns the 3rd interval stats first as stats are provided backwards from :end](./spec/acceptance/rest/stats_spec.rb#L163) - * [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L167) - * with :end set to last interval and :limit set to 3 to ensure only last years stats are included - * the REST API - * [defaults to direction :backwards](./spec/acceptance/rest/stats_spec.rb#L179) - * with :end set to previous year interval - * the REST API - * [defaults to 100 items for pagination](./spec/acceptance/rest/stats_spec.rb#L191) - * by hour - * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L215) - * by day - * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L215) - * by month - * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L215) - * when argument start is after end - * [should raise an exception](./spec/acceptance/rest/stats_spec.rb#L227) + * fetching stats + * [returns a PaginatedResult](./spec/acceptance/realtime/stats_spec.rb#L10) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/stats_spec.rb#L29) + * with options + * [passes the option arguments to the REST stat method](./spec/acceptance/realtime/stats_spec.rb#L20) -### Ably::Rest::Client#time -_(see [spec/acceptance/rest/time_spec.rb](./spec/acceptance/rest/time_spec.rb))_ +### Ably::PubSub::Realtime::Client#time +_(see [spec/acceptance/realtime/time_spec.rb](./spec/acceptance/realtime/time_spec.rb))_ * using JSON protocol * fetching the service time - * [should return the service time as a Time object](./spec/acceptance/rest/time_spec.rb#L10) + * [should return the service time as a Time object](./spec/acceptance/realtime/time_spec.rb#L10) + * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/time_spec.rb#L19) * with reconfigured HTTP timeout - * [should raise a timeout exception](./spec/acceptance/rest/time_spec.rb#L19) + * [should raise a timeout exception](./spec/acceptance/realtime/time_spec.rb#L31) ### Ably::Models::ChannelOptions _(see [spec/lib/unit/models/channel_options_spec.rb](./spec/lib/unit/models/channel_options_spec.rb))_ @@ -3321,6 +3322,283 @@ _(see [spec/unit/auth_spec.rb](./spec/unit/auth_spec.rb))_ * [should have no default TTL](./spec/unit/auth_spec.rb#L71) * [should have no default capability](./spec/unit/auth_spec.rb#L75) +### Ably::PubSub::Http::Channel +_(see [spec/unit/http/channel_spec.rb](./spec/unit/http/channel_spec.rb))_ + * #initializer + * as UTF_8 string + * [is permitted](./spec/unit/http/channel_spec.rb#L25) + * [remains as UTF-8](./spec/unit/http/channel_spec.rb#L29) + * as frozen UTF_8 string + * [is permitted](./spec/unit/http/channel_spec.rb#L38) + * [remains as UTF-8](./spec/unit/http/channel_spec.rb#L42) + * as SHIFT_JIS string + * [gets converted to UTF-8](./spec/unit/http/channel_spec.rb#L50) + * [is compatible with original encoding](./spec/unit/http/channel_spec.rb#L54) + * as ASCII_8BIT string + * [gets converted to UTF-8](./spec/unit/http/channel_spec.rb#L62) + * [is compatible with original encoding](./spec/unit/http/channel_spec.rb#L66) + * as Integer + * [raises an argument error](./spec/unit/http/channel_spec.rb#L74) + * as Nil + * [raises an argument error](./spec/unit/http/channel_spec.rb#L82) + * #publish name argument + * as UTF_8 string + * [is permitted](./spec/unit/http/channel_spec.rb#L94) + * as frozen UTF_8 string + * [is permitted](./spec/unit/http/channel_spec.rb#L103) + * as SHIFT_JIS string + * [is permitted](./spec/unit/http/channel_spec.rb#L111) + * as ASCII_8BIT string + * [is permitted](./spec/unit/http/channel_spec.rb#L119) + * as Integer + * [raises an argument error](./spec/unit/http/channel_spec.rb#L127) + * max message size exceeded + * when max_message_size is nil + * and a message size is 65537 bytes + * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/http/channel_spec.rb#L135) + * when max_message_size is 65536 bytes + * and a message size is 65537 bytes + * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/http/channel_spec.rb#L145) + * and a message size is 10 bytes + * [should send a message](./spec/unit/http/channel_spec.rb#L151) + * when max_message_size is 10 bytes + * and a message size is 11 bytes + * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/http/channel_spec.rb#L161) + * and a message size is 2 bytes + * [should send a message](./spec/unit/http/channel_spec.rb#L167) + * #publish returns PublishResult (#RSL1n) + * with serials in response body + * [returns a PublishResult with serials](./spec/unit/http/channel_spec.rb#L179) + * with empty response body (204) + * [returns a PublishResult with empty serials](./spec/unit/http/channel_spec.rb#L189) + * with non-hash response body + * [returns a PublishResult with empty serials](./spec/unit/http/channel_spec.rb#L199) + * #update_message (#RSL15) + * with a valid message containing serial + * [sends a PATCH request](./spec/unit/http/channel_spec.rb#L224) + * [returns an UpdateDeleteResult](./spec/unit/http/channel_spec.rb#L234) + * [sets action to MESSAGE_UPDATE](./spec/unit/http/channel_spec.rb#L240) + * with an operation parameter + * [includes the operation as version in the payload](./spec/unit/http/channel_spec.rb#L254) + * with a MessageOperation object + * [serializes the operation via as_json](./spec/unit/http/channel_spec.rb#L268) + * without serial (#RSL15a) + * [raises an InvalidRequest exception](./spec/unit/http/channel_spec.rb#L282) + * with a Hash message + * [converts to Message and validates serial](./spec/unit/http/channel_spec.rb#L288) + * [works when serial is present](./spec/unit/http/channel_spec.rb#L292) + * does not mutate the original message (#RSL15c) + * [the original message is unchanged](./spec/unit/http/channel_spec.rb#L301) + * with query params (#RSL15f) + * [passes params as qs_params](./spec/unit/http/channel_spec.rb#L312) + * #delete_message (#RSL15) + * with a valid message containing serial + * [sends a PATCH request with action MESSAGE_DELETE](./spec/unit/http/channel_spec.rb#L341) + * [returns an UpdateDeleteResult](./spec/unit/http/channel_spec.rb#L351) + * with an operation parameter + * [includes the operation as version in the payload](./spec/unit/http/channel_spec.rb#L362) + * without serial + * [raises an InvalidRequest exception](./spec/unit/http/channel_spec.rb#L375) + * does not mutate the original message + * [the original message is unchanged](./spec/unit/http/channel_spec.rb#L383) + * #append_message (#RSL15) + * with a valid message containing serial + * [sends a PATCH request with action MESSAGE_APPEND](./spec/unit/http/channel_spec.rb#L409) + * [returns an UpdateDeleteResult](./spec/unit/http/channel_spec.rb#L419) + * with an operation parameter + * [includes the operation as version in the payload](./spec/unit/http/channel_spec.rb#L430) + * without serial + * [raises an InvalidRequest exception](./spec/unit/http/channel_spec.rb#L443) + * does not mutate the original message + * [the original message is unchanged](./spec/unit/http/channel_spec.rb#L451) + +### Ably::PubSub::Http::Channels +_(see [spec/unit/http/channels_spec.rb](./spec/unit/http/channels_spec.rb))_ + * [[] creates a channel](./spec/unit/http/channels_spec.rb#L91) + * #get + * when channel doesn't exist + * hash + * [is expected to be a kind of Hash](./spec/unit/http/channels_spec.rb#L24) + * [creates a channel (RSN3a)](./spec/unit/http/channels_spec.rb#L16) + * ChannelOptions object + * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/http/channels_spec.rb#L31) + * [creates a channel (RSN3a)](./spec/unit/http/channels_spec.rb#L16) + * when an existing channel exists + * hash + * [is expected to be a kind of Hash](./spec/unit/http/channels_spec.rb#L48) + * [will reuse a channel object if it exists (RSN3a)](./spec/unit/http/channels_spec.rb#L39) + * ChannelOptions object + * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/http/channels_spec.rb#L55) + * [will reuse a channel object if it exists (RSN3a)](./spec/unit/http/channels_spec.rb#L39) + * with new channel_options modes + * hash + * [is expected to be a kind of Hash](./spec/unit/http/channels_spec.rb#L76) + * [will update channel with provided options modes (RSN3c)](./spec/unit/http/channels_spec.rb#L62) + * ChannelOptions object + * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/http/channels_spec.rb#L83) + * [will update channel with provided options modes (RSN3c)](./spec/unit/http/channels_spec.rb#L62) + * #fetch + * [retrieves a channel if it exists](./spec/unit/http/channels_spec.rb#L97) + * [calls the block if channel is missing](./spec/unit/http/channels_spec.rb#L102) + * destroying channels + * [#release releases the channel resoures](./spec/unit/http/channels_spec.rb#L110) + * is Enumerable + * [allows enumeration](./spec/unit/http/channels_spec.rb#L126) + * [provides #length](./spec/unit/http/channels_spec.rb#L142) + * #each + * [returns an enumerator](./spec/unit/http/channels_spec.rb#L131) + * [yields each channel](./spec/unit/http/channels_spec.rb#L135) + +### Ably::PubSub::Http::Client +_(see [spec/unit/http/client_spec.rb](./spec/unit/http/client_spec.rb))_ + * behaves like a client initializer + * with invalid arguments + * empty hash + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L20) + * nil + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L28) + * key: "invalid" + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L36) + * key: "invalid:asdad" + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44) + * key and key_name + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52) + * key and key_secret + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60) + * with valid arguments + * key only + * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L71) + * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L75) + * with a string key instead of options hash + * [sets the key](./spec/shared/client_initializer_behaviour.rb#L95) + * [sets the key_name](./spec/shared/client_initializer_behaviour.rb#L99) + * [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L103) + * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L107) + * with a string token key instead of options hash + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L119) + * with token + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L127) + * with token_details + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L135) + * with token_params + * [configures default_token_params](./spec/shared/client_initializer_behaviour.rb#L143) + * endpoint (#REC1) + * [defaults to main](./spec/shared/client_initializer_behaviour.rb#L154) + * [uses the main production primary domain (#REC1a)](./spec/shared/client_initializer_behaviour.rb#L158) + * with a routing policy name + * [uses the production primary domain for that routing policy (#REC1b4)](./spec/shared/client_initializer_behaviour.rb#L166) + * with a nonprod routing policy name + * [uses the non-production primary domain for that routing policy (#REC1b3)](./spec/shared/client_initializer_behaviour.rb#L175) + * with hostname foo.example.com + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) + * with hostname localhost + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) + * with hostname 127.0.0.1 + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) + * with hostname ::1 + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) + * with port option and non-TLS connections + * [uses the custom port for non-TLS requests](./spec/shared/client_initializer_behaviour.rb#L194) + * with tls_port option and a TLS connection + * [uses the custom port for TLS requests](./spec/shared/client_initializer_behaviour.rb#L202) + * tls + * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L225) + * set to false + * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L216) + * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L220) + * logger + * default + * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L236) + * [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L240) + * with log_level :none + * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L248) + * with custom logger and log_level + * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L258) + * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L262) + * fallback hosts (#REC2) + * [defaults to the main production fallback hosts (#REC2c1)](./spec/shared/client_initializer_behaviour.rb#L273) + * with a routing policy name + * [uses the production fallback hosts for that routing policy (#REC2c4)](./spec/shared/client_initializer_behaviour.rb#L281) + * with a nonprod routing policy name + * [uses the non-production fallback hosts for that routing policy (#REC2c3)](./spec/shared/client_initializer_behaviour.rb#L289) + * with hostname foo.example.com + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with hostname localhost + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with hostname 127.0.0.1 + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with hostname ::1 + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with custom fallback hosts configured + * and endpoint main + * [uses the custom provided fallback hosts (#REC2a2)](./spec/shared/client_initializer_behaviour.rb#L311) + * and endpoint nonprod:sandbox + * [uses the custom provided fallback hosts (#REC2a2)](./spec/shared/client_initializer_behaviour.rb#L311) + * and endpoint foo.example.com + * [uses the custom provided fallback hosts (#REC2a2)](./spec/shared/client_initializer_behaviour.rb#L311) + * with an empty fallback hosts list + * [has no fallback hosts](./spec/shared/client_initializer_behaviour.rb#L321) + * with a custom port + * [uses the default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L329) + * with a custom TLS port + * [uses the default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L337) + * delegators + * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L351) + * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L356) + * 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/http/client_spec.rb#L17) + * fallback_retry_timeout (#RSC15f) + * default + * [is set to 10 minutes](./spec/unit/http/client_spec.rb#L27) + * when provided + * [configures a new timeout](./spec/unit/http/client_spec.rb#L35) + * use agent + * set agent to non-default value + * default agent + * [should return default ably agent](./spec/unit/http/client_spec.rb#L46) + * custom agent + * [should overwrite client.agent](./spec/unit/http/client_spec.rb#L54) + * :use_token_auth + * set to false + * with a key and :tls => false + * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/http/client_spec.rb#L66) + * without a key + * [fails as a key is required if not using token auth](./spec/unit/http/client_spec.rb#L74) + * set to true + * without a key or token + * [fails as a key is required to issue tokens](./spec/unit/http/client_spec.rb#L84) + * max_message_size + * is not present + * [should return default 65536 (#TO3l8)](./spec/unit/http/client_spec.rb#L95) + * is nil + * [should return default 65536 (#TO3l8)](./spec/unit/http/client_spec.rb#L103) + * is customized 131072 bytes + * [should return 131072](./spec/unit/http/client_spec.rb#L112) + * request_id generation + * [includes request_id in URL](./spec/unit/http/client_spec.rb#L121) + * push + * [#device is not supported and raises an exception](./spec/unit/http/client_spec.rb#L129) + * [#push returns a Push object](./spec/unit/http/client_spec.rb#L133) + +### Ably::PubSub::Http +_(see [spec/unit/http/http_spec.rb](./spec/unit/http/http_spec.rb))_ + * [constructor refuses and points at the factory function](./spec/unit/http/http_spec.rb#L9) + +### Ably::PubSub::Http::Channel::PushChannel +_(see [spec/unit/http/push_channel_spec.rb](./spec/unit/http/push_channel_spec.rb))_ + * [is constructed with a channel](./spec/unit/http/push_channel_spec.rb#L10) + * [raises an exception if constructed with an invalid type](./spec/unit/http/push_channel_spec.rb#L14) + * [exposes the channel as attribute #channel](./spec/unit/http/push_channel_spec.rb#L18) + * [is available in the #push attribute of the channel](./spec/unit/http/push_channel_spec.rb#L22) + * methods not implemented as push notifications + * [#subscribe_device raises an unsupported exception](./spec/unit/http/push_channel_spec.rb#L31) + * [#subscribe_client_id raises an unsupported exception](./spec/unit/http/push_channel_spec.rb#L31) + * [#unsubscribe_device raises an unsupported exception](./spec/unit/http/push_channel_spec.rb#L31) + * [#unsubscribe_client_id raises an unsupported exception](./spec/unit/http/push_channel_spec.rb#L31) + * [#get_subscriptions raises an unsupported exception](./spec/unit/http/push_channel_spec.rb#L31) + ### 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) @@ -3615,46 +3893,46 @@ _(see [spec/unit/models/http_paginated_result_spec.rb](./spec/unit/models/http_p * [returns an enumerator](./spec/unit/models/http_paginated_result_spec.rb#L46) * [yields each item](./spec/unit/models/http_paginated_result_spec.rb#L50) * with non paged http response - * [is the last page](./spec/unit/models/http_paginated_result_spec.rb#L174) - * [does not have next page](./spec/unit/models/http_paginated_result_spec.rb#L178) - * [does not support pagination](./spec/unit/models/http_paginated_result_spec.rb#L182) - * [returns nil when accessing next page](./spec/unit/models/http_paginated_result_spec.rb#L186) - * [returns nil when accessing first page](./spec/unit/models/http_paginated_result_spec.rb#L190) + * [is the last page](./spec/unit/models/http_paginated_result_spec.rb#L166) + * [does not have next page](./spec/unit/models/http_paginated_result_spec.rb#L170) + * [does not support pagination](./spec/unit/models/http_paginated_result_spec.rb#L174) + * [returns nil when accessing next page](./spec/unit/models/http_paginated_result_spec.rb#L178) + * [returns nil when accessing first page](./spec/unit/models/http_paginated_result_spec.rb#L182) * with paged http response - * [has next page](./spec/unit/models/http_paginated_result_spec.rb#L208) - * [is not the last page](./spec/unit/models/http_paginated_result_spec.rb#L212) - * [supports pagination](./spec/unit/models/http_paginated_result_spec.rb#L216) + * [has next page](./spec/unit/models/http_paginated_result_spec.rb#L200) + * [is not the last page](./spec/unit/models/http_paginated_result_spec.rb#L204) + * [supports pagination](./spec/unit/models/http_paginated_result_spec.rb#L208) * accessing next page - * [returns another HttpPaginatedResponse](./spec/unit/models/http_paginated_result_spec.rb#L244) - * [retrieves the next page of results](./spec/unit/models/http_paginated_result_spec.rb#L248) - * [does not have a next page](./spec/unit/models/http_paginated_result_spec.rb#L253) - * [is the last page](./spec/unit/models/http_paginated_result_spec.rb#L257) - * [returns nil when trying to access the last page when it is the last page](./spec/unit/models/http_paginated_result_spec.rb#L261) + * [returns another HttpPaginatedResponse](./spec/unit/models/http_paginated_result_spec.rb#L236) + * [retrieves the next page of results](./spec/unit/models/http_paginated_result_spec.rb#L240) + * [does not have a next page](./spec/unit/models/http_paginated_result_spec.rb#L245) + * [is the last page](./spec/unit/models/http_paginated_result_spec.rb#L249) + * [returns nil when trying to access the last page when it is the last page](./spec/unit/models/http_paginated_result_spec.rb#L253) * and then first page - * [returns a HttpPaginatedResponse](./spec/unit/models/http_paginated_result_spec.rb#L272) - * [retrieves the first page of results](./spec/unit/models/http_paginated_result_spec.rb#L276) + * [returns a HttpPaginatedResponse](./spec/unit/models/http_paginated_result_spec.rb#L264) + * [retrieves the first page of results](./spec/unit/models/http_paginated_result_spec.rb#L268) * response metadata * successful response - * [#success? is true](./spec/unit/models/http_paginated_result_spec.rb#L288) - * [#status_code reflects status code](./spec/unit/models/http_paginated_result_spec.rb#L292) - * [#error_code to be empty](./spec/unit/models/http_paginated_result_spec.rb#L296) - * [#error_message to be empty](./spec/unit/models/http_paginated_result_spec.rb#L300) - * [#headers to be a hash](./spec/unit/models/http_paginated_result_spec.rb#L304) + * [#success? is true](./spec/unit/models/http_paginated_result_spec.rb#L280) + * [#status_code reflects status code](./spec/unit/models/http_paginated_result_spec.rb#L284) + * [#error_code to be empty](./spec/unit/models/http_paginated_result_spec.rb#L288) + * [#error_message to be empty](./spec/unit/models/http_paginated_result_spec.rb#L292) + * [#headers to be a hash](./spec/unit/models/http_paginated_result_spec.rb#L296) * failed response - * [#success? is false](./spec/unit/models/http_paginated_result_spec.rb#L313) - * [#status_code reflects status code](./spec/unit/models/http_paginated_result_spec.rb#L317) - * [#error_code to be populated](./spec/unit/models/http_paginated_result_spec.rb#L321) - * [#error_message to be populated](./spec/unit/models/http_paginated_result_spec.rb#L325) - * [#headers to be present](./spec/unit/models/http_paginated_result_spec.rb#L329) + * [#success? is false](./spec/unit/models/http_paginated_result_spec.rb#L305) + * [#status_code reflects status code](./spec/unit/models/http_paginated_result_spec.rb#L309) + * [#error_code to be populated](./spec/unit/models/http_paginated_result_spec.rb#L313) + * [#error_message to be populated](./spec/unit/models/http_paginated_result_spec.rb#L317) + * [#headers to be present](./spec/unit/models/http_paginated_result_spec.rb#L321) * #items Array conversion and nil handling #HP3 * with Json Array - * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L344) + * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L336) * with Json Object - * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L354) + * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L346) * with empty response - * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L365) + * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L357) * with nil response - * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L375) + * [is an array](./spec/unit/models/http_paginated_result_spec.rb#L367) ### Ably::Models::MessageEncoders::Base64 _(see [spec/unit/models/message_encoders/base64_spec.rb](./spec/unit/models/message_encoders/base64_spec.rb))_ @@ -3810,6 +4088,23 @@ _(see [spec/unit/models/message_encoders/utf8_spec.rb](./spec/unit/models/messag * [leaves the message data intact](./spec/unit/models/message_encoders/utf8_spec.rb#L47) * [leaves the encoding intact](./spec/unit/models/message_encoders/utf8_spec.rb#L51) +### Ably::Models::MessageOperation +_(see [spec/unit/models/message_operation_spec.rb](./spec/unit/models/message_operation_spec.rb))_ + * #client_id (#MOP2a) + * [returns the client_id](./spec/unit/models/message_operation_spec.rb#L10) + * #description (#MOP2b) + * [returns the description](./spec/unit/models/message_operation_spec.rb#L18) + * #metadata (#MOP2c) + * [returns the metadata hash](./spec/unit/models/message_operation_spec.rb#L26) + * when empty + * [returns nil for all fields](./spec/unit/models/message_operation_spec.rb#L34) + * with camelCase keys from wire + * [converts to snake_case access](./spec/unit/models/message_operation_spec.rb#L44) + * #attributes + * [prevents modification](./spec/unit/models/message_operation_spec.rb#L52) + * #as_json + * [returns a hash suitable for JSON serialization](./spec/unit/models/message_operation_spec.rb#L60) + ### Ably::Models::Message _(see [spec/unit/models/message_spec.rb](./spec/unit/models/message_spec.rb))_ * serialization of the Message object (#RSL1j) @@ -3938,6 +4233,47 @@ _(see [spec/unit/models/message_spec.rb](./spec/unit/models/message_spec.rb))_ * [should return 1234-1234-5678-9009 message id](./spec/unit/models/message_spec.rb#L634) * when no delta * [should return nil](./spec/unit/models/message_spec.rb#L642) + * #action (#TM2j) + * when action is present + * [returns the action as an ACTION enum](./spec/unit/models/message_spec.rb#L652) + * [can be compared with a symbol](./spec/unit/models/message_spec.rb#L656) + * [can be compared with an integer](./spec/unit/models/message_spec.rb#L660) + * when action is not present + * [returns nil](./spec/unit/models/message_spec.rb#L668) + * ACTION enum values (#TM5) + * [has message_create as 0](./spec/unit/models/message_spec.rb#L674) + * [has message_update as 1](./spec/unit/models/message_spec.rb#L678) + * [has message_delete as 2](./spec/unit/models/message_spec.rb#L682) + * [has meta as 3](./spec/unit/models/message_spec.rb#L686) + * [has message_summary as 4](./spec/unit/models/message_spec.rb#L690) + * [has message_append as 5](./spec/unit/models/message_spec.rb#L694) + * #serial (#TM2r) + * [returns the serial attribute](./spec/unit/models/message_spec.rb#L704) + * when not present + * [returns nil](./spec/unit/models/message_spec.rb#L711) + * #version (#TM2s) + * [returns the version attribute](./spec/unit/models/message_spec.rb#L721) + * when not present + * [returns nil](./spec/unit/models/message_spec.rb#L728) + * #created_at + * [returns a Time object](./spec/unit/models/message_spec.rb#L738) + * when not present + * [returns nil](./spec/unit/models/message_spec.rb#L745) + * #updated_at + * [returns a Time object](./spec/unit/models/message_spec.rb#L755) + * when not present + * [returns nil](./spec/unit/models/message_spec.rb#L762) + * #as_json + * with action + * [converts action to integer](./spec/unit/models/message_spec.rb#L772) + * [includes name](./spec/unit/models/message_spec.rb#L776) + * without action + * [does not include action key](./spec/unit/models/message_spec.rb#L784) + * with serial and version + * [includes serial](./spec/unit/models/message_spec.rb#L792) + * [includes version](./spec/unit/models/message_spec.rb#L796) + * excludes nil values + * [does not include nil attributes](./spec/unit/models/message_spec.rb#L804) ### Ably::Models::PaginatedResult _(see [spec/unit/models/paginated_result_spec.rb](./spec/unit/models/paginated_result_spec.rb))_ @@ -3952,24 +4288,24 @@ _(see [spec/unit/models/paginated_result_spec.rb](./spec/unit/models/paginated_r * [returns an enumerator](./spec/unit/models/paginated_result_spec.rb#L44) * [yields each item](./spec/unit/models/paginated_result_spec.rb#L48) * with non paged http response - * [is the last page](./spec/unit/models/paginated_result_spec.rb#L172) - * [does not have next page](./spec/unit/models/paginated_result_spec.rb#L176) - * [does not support pagination](./spec/unit/models/paginated_result_spec.rb#L180) - * [returns nil when accessing next page](./spec/unit/models/paginated_result_spec.rb#L184) - * [returns nil when accessing first page](./spec/unit/models/paginated_result_spec.rb#L188) + * [is the last page](./spec/unit/models/paginated_result_spec.rb#L164) + * [does not have next page](./spec/unit/models/paginated_result_spec.rb#L168) + * [does not support pagination](./spec/unit/models/paginated_result_spec.rb#L172) + * [returns nil when accessing next page](./spec/unit/models/paginated_result_spec.rb#L176) + * [returns nil when accessing first page](./spec/unit/models/paginated_result_spec.rb#L180) * with paged http response - * [has next page](./spec/unit/models/paginated_result_spec.rb#L206) - * [is not the last page](./spec/unit/models/paginated_result_spec.rb#L210) - * [supports pagination](./spec/unit/models/paginated_result_spec.rb#L214) + * [has next page](./spec/unit/models/paginated_result_spec.rb#L198) + * [is not the last page](./spec/unit/models/paginated_result_spec.rb#L202) + * [supports pagination](./spec/unit/models/paginated_result_spec.rb#L206) * accessing next page - * [returns another PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L242) - * [retrieves the next page of results](./spec/unit/models/paginated_result_spec.rb#L246) - * [does not have a next page](./spec/unit/models/paginated_result_spec.rb#L251) - * [is the last page](./spec/unit/models/paginated_result_spec.rb#L255) - * [returns nil when trying to access the last page when it is the last page](./spec/unit/models/paginated_result_spec.rb#L259) + * [returns another PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L234) + * [retrieves the next page of results](./spec/unit/models/paginated_result_spec.rb#L238) + * [does not have a next page](./spec/unit/models/paginated_result_spec.rb#L243) + * [is the last page](./spec/unit/models/paginated_result_spec.rb#L247) + * [returns nil when trying to access the last page when it is the last page](./spec/unit/models/paginated_result_spec.rb#L251) * and then first page - * [returns a PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L270) - * [retrieves the first page of results](./spec/unit/models/paginated_result_spec.rb#L274) + * [returns a PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L262) + * [retrieves the first page of results](./spec/unit/models/paginated_result_spec.rb#L266) ### Ably::Models::PresenceMessage _(see [spec/unit/models/presence_message_spec.rb](./spec/unit/models/presence_message_spec.rb))_ @@ -4153,41 +4489,68 @@ _(see [spec/unit/models/protocol_message_spec.rb](./spec/unit/models/protocol_me * when has another future flag * [#has_presence_flag? is false](./spec/unit/models/protocol_message_spec.rb#L208) * [#has_backlog_flag? is true](./spec/unit/models/protocol_message_spec.rb#L212) + * #res (#TR4s) + * when present + * [returns the res array](./spec/unit/models/protocol_message_spec.rb#L223) + * [contains publish result entries with serials](./spec/unit/models/protocol_message_spec.rb#L228) + * when absent + * [returns nil](./spec/unit/models/protocol_message_spec.rb#L237) + * with multiple entries + * [returns all entries](./spec/unit/models/protocol_message_spec.rb#L251) * #params (#RTL4k1) * when present - * [is expected to eq {:foo=>:bar}](./spec/unit/models/protocol_message_spec.rb#L224) + * [is expected to eq {:foo => :bar}](./spec/unit/models/protocol_message_spec.rb#L264) * when empty - * [is expected to eq {}](./spec/unit/models/protocol_message_spec.rb#L230) + * [is expected to eq {}](./spec/unit/models/protocol_message_spec.rb#L270) * #error * with no error attribute - * [returns nil](./spec/unit/models/protocol_message_spec.rb#L240) + * [returns nil](./spec/unit/models/protocol_message_spec.rb#L280) * with nil error - * [returns nil](./spec/unit/models/protocol_message_spec.rb#L248) + * [returns nil](./spec/unit/models/protocol_message_spec.rb#L288) * with error - * [returns a valid ErrorInfo object](./spec/unit/models/protocol_message_spec.rb#L256) + * [returns a valid ErrorInfo object](./spec/unit/models/protocol_message_spec.rb#L296) * #messages (#TR4k) - * [contains Message objects](./spec/unit/models/protocol_message_spec.rb#L266) + * [contains Message objects](./spec/unit/models/protocol_message_spec.rb#L306) * #messages (#RTL21) - * [contains Message objects in ascending order](./spec/unit/models/protocol_message_spec.rb#L284) + * [contains Message objects in ascending order](./spec/unit/models/protocol_message_spec.rb#L324) * #presence (#TR4l) - * [contains PresenceMessage objects](./spec/unit/models/protocol_message_spec.rb#L296) + * [contains PresenceMessage objects](./spec/unit/models/protocol_message_spec.rb#L336) * #message_size (#TO3l8) * on presence - * [should return 13 bytes (sum in bytes: data and client_id)](./spec/unit/models/protocol_message_spec.rb#L309) + * [should return 13 bytes (sum in bytes: data and client_id)](./spec/unit/models/protocol_message_spec.rb#L349) * on message - * [should return 76 bytes (sum in bytes: data, client_id, name, extras)](./spec/unit/models/protocol_message_spec.rb#L319) + * [should return 76 bytes (sum in bytes: data, client_id, name, extras)](./spec/unit/models/protocol_message_spec.rb#L359) * #connection_details (#TR4o) * with a JSON value - * [contains a ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L331) - * [contains the attributes from the JSON connectionDetails](./spec/unit/models/protocol_message_spec.rb#L335) + * [contains a ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L371) + * [contains the attributes from the JSON connectionDetails](./spec/unit/models/protocol_message_spec.rb#L375) * without a JSON value - * [contains an empty ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L344) + * [contains an empty ConnectionDetails object](./spec/unit/models/protocol_message_spec.rb#L384) * #auth (#TR4p) * with a JSON value - * [contains a AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L358) - * [contains the attributes from the JSON auth details](./spec/unit/models/protocol_message_spec.rb#L362) + * [contains a AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L398) + * [contains the attributes from the JSON auth details](./spec/unit/models/protocol_message_spec.rb#L402) * without a JSON value - * [contains an empty AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L370) + * [contains an empty AuthDetails object](./spec/unit/models/protocol_message_spec.rb#L410) + +### Ably::Models::PublishResult +_(see [spec/unit/models/publish_result_spec.rb](./spec/unit/models/publish_result_spec.rb))_ + * #serials (#RSL1n) + * when present + * [returns the serials array](./spec/unit/models/publish_result_spec.rb#L11) + * with nullable entries + * [preserves nil entries](./spec/unit/models/publish_result_spec.rb#L19) + * when empty array + * [returns empty array](./spec/unit/models/publish_result_spec.rb#L27) + * when nil + * [returns empty array](./spec/unit/models/publish_result_spec.rb#L35) + * when not provided + * [returns empty array](./spec/unit/models/publish_result_spec.rb#L43) + * #attributes + * [returns the underlying attributes](./spec/unit/models/publish_result_spec.rb#L52) + * [prevents modification](./spec/unit/models/publish_result_spec.rb#L56) + * truthiness + * [is truthy for backward compatibility with boolean publish returns](./spec/unit/models/publish_result_spec.rb#L64) ### Ably::Models::PushChannelSubscription _(see [spec/unit/models/push_channel_subscription_spec.rb](./spec/unit/models/push_channel_subscription_spec.rb))_ @@ -4216,133 +4579,45 @@ _(see [spec/unit/models/push_channel_subscription_spec.rb](./spec/unit/models/pu ### Ably::Models::Stats _(see [spec/unit/models/stats_spec.rb](./spec/unit/models/stats_spec.rb))_ - * #all stats - * [returns a MessageTypes object](./spec/unit/models/stats_spec.rb#L17) - * [returns value for message counts](./spec/unit/models/stats_spec.rb#L21) - * [returns value for all data transferred](./spec/unit/models/stats_spec.rb#L25) - * [returns zero for empty values](./spec/unit/models/stats_spec.rb#L29) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L33) - * #all - * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) - * #presence - * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) - * #messages - * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) - * #persisted stats - * [returns a MessageTypes object](./spec/unit/models/stats_spec.rb#L17) - * [returns value for message counts](./spec/unit/models/stats_spec.rb#L21) - * [returns value for all data transferred](./spec/unit/models/stats_spec.rb#L25) - * [returns zero for empty values](./spec/unit/models/stats_spec.rb#L29) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L33) - * #all - * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) - * #presence - * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) - * #messages - * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) - * #inbound stats - * [returns a MessageTraffic object](./spec/unit/models/stats_spec.rb#L59) - * [returns value for realtime message counts](./spec/unit/models/stats_spec.rb#L63) - * [returns value for all presence data](./spec/unit/models/stats_spec.rb#L67) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L71) - * #realtime - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #rest - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #webhook - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #all - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #outbound stats - * [returns a MessageTraffic object](./spec/unit/models/stats_spec.rb#L59) - * [returns value for realtime message counts](./spec/unit/models/stats_spec.rb#L63) - * [returns value for all presence data](./spec/unit/models/stats_spec.rb#L67) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L71) - * #realtime - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #rest - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #webhook - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #all - * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) - * #connections stats - * [returns a ConnectionTypes object](./spec/unit/models/stats_spec.rb#L91) - * [returns value for tls opened counts](./spec/unit/models/stats_spec.rb#L95) - * [returns value for all peak connections](./spec/unit/models/stats_spec.rb#L99) - * [returns zero for empty values](./spec/unit/models/stats_spec.rb#L103) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L107) - * #tls - * [is a ResourceCount object](./spec/unit/models/stats_spec.rb#L113) - * #plain - * [is a ResourceCount object](./spec/unit/models/stats_spec.rb#L113) - * #all - * [is a ResourceCount object](./spec/unit/models/stats_spec.rb#L113) - * #channels stats - * [returns a ResourceCount object](./spec/unit/models/stats_spec.rb#L126) - * [returns value for opened counts](./spec/unit/models/stats_spec.rb#L130) - * [returns value for peak channels](./spec/unit/models/stats_spec.rb#L134) - * [returns zero for empty values](./spec/unit/models/stats_spec.rb#L138) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L142) - * #opened - * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) - * #peak - * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) - * #mean - * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) - * #min - * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) - * #refused - * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) - * #api_requests stats - * [returns a RequestCount object](./spec/unit/models/stats_spec.rb#L164) - * [returns value for succeeded](./spec/unit/models/stats_spec.rb#L168) - * [returns value for failed](./spec/unit/models/stats_spec.rb#L172) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L176) - * #succeeded - * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) - * #failed - * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) - * #refused - * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) - * #token_requests stats - * [returns a RequestCount object](./spec/unit/models/stats_spec.rb#L164) - * [returns value for succeeded](./spec/unit/models/stats_spec.rb#L168) - * [returns value for failed](./spec/unit/models/stats_spec.rb#L172) - * [raises an exception for unknown attributes](./spec/unit/models/stats_spec.rb#L176) - * #succeeded - * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) - * #failed - * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) - * #refused - * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) - * #interval_granularity - * [returns the granularity of the interval_id](./spec/unit/models/stats_spec.rb#L193) + * #interval_id + * [returns the interval ID string](./spec/unit/models/stats_spec.rb#L11) * #interval_time - * [returns a Time object representing the start of the interval](./spec/unit/models/stats_spec.rb#L201) + * [returns a Time object representing the start of the interval](./spec/unit/models/stats_spec.rb#L18) + * #unit + * [returns the unit from the JSON response](./spec/unit/models/stats_spec.rb#L25) + * #entries + * [returns the entries hash](./spec/unit/models/stats_spec.rb#L32) + * [returns an empty hash when entries is not present](./spec/unit/models/stats_spec.rb#L39) + * #in_progress + * [returns the in_progress string when present](./spec/unit/models/stats_spec.rb#L46) + * [returns nil when not present](./spec/unit/models/stats_spec.rb#L51) + * #schema + * [returns the schema URI](./spec/unit/models/stats_spec.rb#L58) + * #app_id + * [returns the application ID](./spec/unit/models/stats_spec.rb#L65) * class methods * #to_interval_id * when time zone of time argument is UTC - * [converts time 2014-02-03:05:06 with granularity :month into 2014-02](./spec/unit/models/stats_spec.rb#L209) - * [converts time 2014-02-03:05:06 with granularity :day into 2014-02-03](./spec/unit/models/stats_spec.rb#L213) - * [converts time 2014-02-03:05:06 with granularity :hour into 2014-02-03:05](./spec/unit/models/stats_spec.rb#L217) - * [converts time 2014-02-03:05:06 with granularity :minute into 2014-02-03:05:06](./spec/unit/models/stats_spec.rb#L221) - * [fails with invalid granularity](./spec/unit/models/stats_spec.rb#L225) - * [fails with invalid time](./spec/unit/models/stats_spec.rb#L229) + * [converts time 2014-02-03:05:06 with granularity :month into 2014-02](./spec/unit/models/stats_spec.rb#L74) + * [converts time 2014-02-03:05:06 with granularity :day into 2014-02-03](./spec/unit/models/stats_spec.rb#L78) + * [converts time 2014-02-03:05:06 with granularity :hour into 2014-02-03:05](./spec/unit/models/stats_spec.rb#L82) + * [converts time 2014-02-03:05:06 with granularity :minute into 2014-02-03:05:06](./spec/unit/models/stats_spec.rb#L86) + * [fails with invalid granularity](./spec/unit/models/stats_spec.rb#L90) + * [fails with invalid time](./spec/unit/models/stats_spec.rb#L94) * when time zone of time argument is +02:00 - * [converts time 2014-02-03:06 with granularity :hour into 2014-02-03:04 at UTC +00:00](./spec/unit/models/stats_spec.rb#L235) + * [converts time 2014-02-03:06 with granularity :hour into 2014-02-03:04 at UTC +00:00](./spec/unit/models/stats_spec.rb#L100) * #from_interval_id - * [converts a month interval_id 2014-02 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L242) - * [converts a day interval_id 2014-02-03 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L247) - * [converts an hour interval_id 2014-02-03:05 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L252) - * [converts a minute interval_id 2014-02-03:05:06 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L257) - * [fails with an invalid interval_id 14-20](./spec/unit/models/stats_spec.rb#L262) + * [converts a month interval_id 2014-02 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L107) + * [converts a day interval_id 2014-02-03 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L112) + * [converts an hour interval_id 2014-02-03:05 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L117) + * [converts a minute interval_id 2014-02-03:05:06 into a Time object in UTC 0](./spec/unit/models/stats_spec.rb#L122) + * [fails with an invalid interval_id 14-20](./spec/unit/models/stats_spec.rb#L127) * #granularity_from_interval_id - * [returns a :month interval_id for 2014-02](./spec/unit/models/stats_spec.rb#L268) - * [returns a :day interval_id for 2014-02-03](./spec/unit/models/stats_spec.rb#L272) - * [returns a :hour interval_id for 2014-02-03:05](./spec/unit/models/stats_spec.rb#L276) - * [returns a :minute interval_id for 2014-02-03:05:06](./spec/unit/models/stats_spec.rb#L280) - * [fails with an invalid interval_id 14-20](./spec/unit/models/stats_spec.rb#L284) + * [returns a :month interval_id for 2014-02](./spec/unit/models/stats_spec.rb#L133) + * [returns a :day interval_id for 2014-02-03](./spec/unit/models/stats_spec.rb#L137) + * [returns a :hour interval_id for 2014-02-03:05](./spec/unit/models/stats_spec.rb#L141) + * [returns a :minute interval_id for 2014-02-03:05:06](./spec/unit/models/stats_spec.rb#L145) + * [fails with an invalid interval_id 14-20](./spec/unit/models/stats_spec.rb#L149) ### Ably::Models::TokenDetails _(see [spec/unit/models/token_details_spec.rb](./spec/unit/models/token_details_spec.rb))_ @@ -4450,6 +4725,21 @@ _(see [spec/unit/models/token_request_spec.rb](./spec/unit/models/token_request_ * with JSON string * [returns a valid TokenRequest object](./spec/unit/models/token_request_spec.rb#L174) +### Ably::Models::UpdateDeleteResult +_(see [spec/unit/models/update_delete_result_spec.rb](./spec/unit/models/update_delete_result_spec.rb))_ + * #version_serial (#UDR2a) + * when present + * [returns the version serial](./spec/unit/models/update_delete_result_spec.rb#L11) + * when nil + * [returns nil](./spec/unit/models/update_delete_result_spec.rb#L19) + * when not provided + * [returns nil](./spec/unit/models/update_delete_result_spec.rb#L27) + * with camelCase keys from wire + * [converts to snake_case access](./spec/unit/models/update_delete_result_spec.rb#L36) + * #attributes + * [returns the underlying attributes](./spec/unit/models/update_delete_result_spec.rb#L44) + * [prevents modification](./spec/unit/models/update_delete_result_spec.rb#L48) + ### Ably::Modules::EventEmitter _(see [spec/unit/modules/event_emitter_spec.rb](./spec/unit/modules/event_emitter_spec.rb))_ * #emit event fan out @@ -4528,7 +4818,61 @@ _(see [spec/unit/modules/state_emitter_spec.rb](./spec/unit/modules/state_emitte * [returns true for #initializing? if state matches](./spec/unit/modules/state_emitter_spec.rb#L64) * [returns false for #connecting? if state does not match](./spec/unit/modules/state_emitter_spec.rb#L68) -### Ably::Realtime::Channel +### direct construction +_(see [spec/unit/pubsub/direct_construction_spec.rb](./spec/unit/pubsub/direct_construction_spec.rb))_ + * Ably::PubSub::Http::Client.new + * [raises DirectConstructionNotSupported](./spec/unit/pubsub/direct_construction_spec.rb#L21) + * [names itself and points at a factory function](./spec/unit/pubsub/direct_construction_spec.rb#L26) + * [raises for Hash options too](./spec/unit/pubsub/direct_construction_spec.rb#L35) + * Ably::PubSub::Realtime::Client.new + * [raises DirectConstructionNotSupported](./spec/unit/pubsub/direct_construction_spec.rb#L21) + * [names itself and points at a factory function](./spec/unit/pubsub/direct_construction_spec.rb#L26) + * [raises for Hash options too](./spec/unit/pubsub/direct_construction_spec.rb#L35) + * Ably::Internal + * [creates a usable REST client](./spec/unit/pubsub/direct_construction_spec.rb#L43) + * [creates a usable realtime client](./spec/unit/pubsub/direct_construction_spec.rb#L49) + * [is what the realtime client uses to build its REST client](./spec/unit/pubsub/direct_construction_spec.rb#L57) + * [declares no side of its own](./spec/unit/pubsub/direct_construction_spec.rb#L62) + * the supported path + * [creates an HTTP client declaring the server side](./spec/unit/pubsub/direct_construction_spec.rb#L70) + * [creates a realtime client declaring the server side](./spec/unit/pubsub/direct_construction_spec.rb#L75) + +### Pub/Sub gem packaging +_(see [spec/unit/pubsub/packaging_spec.rb](./spec/unit/pubsub/packaging_spec.rb))_ + * [ships no load-path file in both gems](./spec/unit/pubsub/packaging_spec.rb#L24) + * [core does not ship the server subtree](./spec/unit/pubsub/packaging_spec.rb#L30) + * [core ships its own pubsub subtrees](./spec/unit/pubsub/packaging_spec.rb#L36) + * [server ships only the lib/ably/pubsub/server subtree under lib](./spec/unit/pubsub/packaging_spec.rb#L42) + * [core does not ship the ably-common submodule](./spec/unit/pubsub/packaging_spec.rb#L48) + * [core ships every Ruby file under core/lib](./spec/unit/pubsub/packaging_spec.rb#L61) + * [server ships every Ruby file under server/lib](./spec/unit/pubsub/packaging_spec.rb#L67) + * [releases both gems at one version (lockstep)](./spec/unit/pubsub/packaging_spec.rb#L73) + * [server pins core at exactly the shared version](./spec/unit/pubsub/packaging_spec.rb#L77) + +### Ably::PubSub::Server +_(see [spec/unit/pubsub/server_spec.rb](./spec/unit/pubsub/server_spec.rb))_ + * [releases in lockstep with ably-pubsub-core](./spec/unit/pubsub/server_spec.rb#L14) + * [declares an identifier whose -server suffix billing classification depends on](./spec/unit/pubsub/server_spec.rb#L18) + * .create_http_client + * [returns an HTTP (REST) client](./spec/unit/pubsub/server_spec.rb#L25) + * [appends the side-declaring agent entry to the base agent, versionless](./spec/unit/pubsub/server_spec.rb#L29) + * [sends the side-declaring agent entry in the Ably-Agent header](./spec/unit/pubsub/server_spec.rb#L34) + * with an options hash + * [passes the options through and stamps the side](./spec/unit/pubsub/server_spec.rb#L41) + * with a token string + * [constructs a token-auth client with the side stamped](./spec/unit/pubsub/server_spec.rb#L50) + * when the caller supplies their own agents + * [preserves the caller entries and appends the side entry](./spec/unit/pubsub/server_spec.rb#L59) + * when the caller tries to override the side entry + * [the package wins the collision on its own identifier](./spec/unit/pubsub/server_spec.rb#L67) + * [does not mutate the caller options](./spec/unit/pubsub/server_spec.rb#L73) + * .create_realtime_client + * [returns a realtime client](./spec/unit/pubsub/server_spec.rb#L84) + * [appends the side-declaring agent entry sent as the realtime agent connection param](./spec/unit/pubsub/server_spec.rb#L88) + * with an API key string + * [constructs a key-auth client with the side stamped](./spec/unit/pubsub/server_spec.rb#L96) + +### Ably::PubSub::Realtime::Channel _(see [spec/unit/realtime/channel_spec.rb](./spec/unit/realtime/channel_spec.rb))_ * #initializer * as UTF_8 string @@ -4572,7 +4916,7 @@ _(see [spec/unit/realtime/channel_spec.rb](./spec/unit/realtime/channel_spec.rb) * [with a non-matching event name argument has no effect](./spec/unit/realtime/channel_spec.rb#L233) * [with no block argument unsubscribes all blocks for the event name argument](./spec/unit/realtime/channel_spec.rb#L239) -### Ably::Realtime::Channels +### Ably::PubSub::Realtime::Channels _(see [spec/unit/realtime/channels_spec.rb](./spec/unit/realtime/channels_spec.rb))_ * creating channels * [[] creates a channel](./spec/unit/realtime/channels_spec.rb#L81) @@ -4597,127 +4941,138 @@ _(see [spec/unit/realtime/channels_spec.rb](./spec/unit/realtime/channels_spec.r * [retrieves a channel if it exists](./spec/unit/realtime/channels_spec.rb#L88) * [calls the block if channel is missing](./spec/unit/realtime/channels_spec.rb#L93) * destroying channels - * [#release detaches and then releases the channel resources](./spec/unit/realtime/channels_spec.rb#L101) + * [#release does nothing if the channel does not exist (RTS4c)](./spec/unit/realtime/channels_spec.rb#L107) + * [#release releases a channel in the initialized state without detaching (RTS4d)](./spec/unit/realtime/channels_spec.rb#L113) + * [#release releases a channel in the detached state without detaching (RTS4d)](./spec/unit/realtime/channels_spec.rb#L113) + * [#release releases a channel in the failed state without detaching (RTS4d)](./spec/unit/realtime/channels_spec.rb#L113) + * [#release raises 90011 and leaves a channel in the attaching state untouched (RTS4e)](./spec/unit/realtime/channels_spec.rb#L122) + * [#release raises 90011 and leaves a channel in the attached state untouched (RTS4e)](./spec/unit/realtime/channels_spec.rb#L122) + * [#release raises 90011 and leaves a channel in the detaching state untouched (RTS4e)](./spec/unit/realtime/channels_spec.rb#L122) + * [#release raises 90011 and leaves a channel in the suspended state untouched (RTS4e)](./spec/unit/realtime/channels_spec.rb#L122) * is Enumerable - * [allows enumeration](./spec/unit/realtime/channels_spec.rb#L118) - * [provides #length](./spec/unit/realtime/channels_spec.rb#L134) + * [allows enumeration](./spec/unit/realtime/channels_spec.rb#L144) + * [provides #length](./spec/unit/realtime/channels_spec.rb#L160) * #each - * [returns an enumerator](./spec/unit/realtime/channels_spec.rb#L123) - * [yields each channel](./spec/unit/realtime/channels_spec.rb#L127) + * [returns an enumerator](./spec/unit/realtime/channels_spec.rb#L149) + * [yields each channel](./spec/unit/realtime/channels_spec.rb#L153) -### Ably::Realtime::Client +### Ably::PubSub::Realtime::Client _(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_ * behaves like a client initializer * with invalid arguments * empty hash - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L28) + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L20) * nil - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L36) + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L28) * key: "invalid" - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44) + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L36) * key: "invalid:asdad" - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52) + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44) * key and key_name - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60) + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52) * key and key_secret - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L68) + * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60) * with valid arguments * key only - * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L79) - * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L83) + * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L71) + * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L75) * with a string key instead of options hash - * [sets the key](./spec/shared/client_initializer_behaviour.rb#L103) - * [sets the key_name](./spec/shared/client_initializer_behaviour.rb#L107) - * [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L111) - * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L115) + * [sets the key](./spec/shared/client_initializer_behaviour.rb#L95) + * [sets the key_name](./spec/shared/client_initializer_behaviour.rb#L99) + * [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L103) + * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L107) * with a string token key instead of options hash - * [sets the token](./spec/shared/client_initializer_behaviour.rb#L127) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L119) * with token - * [sets the token](./spec/shared/client_initializer_behaviour.rb#L135) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L127) * with token_details - * [sets the token](./spec/shared/client_initializer_behaviour.rb#L143) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L135) * with token_params - * [configures default_token_params](./spec/shared/client_initializer_behaviour.rb#L151) - * endpoint - * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L162) - * with environment option - * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L169) - * with rest_host option - * PENDING: *[uses an alternate endpoint for REST clients](./spec/shared/client_initializer_behaviour.rb#L177)* - * with realtime_host option - * [uses an alternate endpoint for Realtime clients](./spec/shared/client_initializer_behaviour.rb#L186) + * [configures default_token_params](./spec/shared/client_initializer_behaviour.rb#L143) + * endpoint (#REC1) + * [defaults to main](./spec/shared/client_initializer_behaviour.rb#L154) + * [uses the main production primary domain (#REC1a)](./spec/shared/client_initializer_behaviour.rb#L158) + * with a routing policy name + * [uses the production primary domain for that routing policy (#REC1b4)](./spec/shared/client_initializer_behaviour.rb#L166) + * with a nonprod routing policy name + * [uses the non-production primary domain for that routing policy (#REC1b3)](./spec/shared/client_initializer_behaviour.rb#L175) + * with hostname foo.example.com + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) + * with hostname localhost + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) + * with hostname 127.0.0.1 + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) + * with hostname ::1 + * [uses the hostname as the primary domain (#REC1b2)](./spec/shared/client_initializer_behaviour.rb#L185) * with port option and non-TLS connections - * [uses the custom port for non-TLS requests](./spec/shared/client_initializer_behaviour.rb#L195) + * [uses the custom port for non-TLS requests](./spec/shared/client_initializer_behaviour.rb#L194) * with tls_port option and a TLS connection - * [uses the custom port for TLS requests](./spec/shared/client_initializer_behaviour.rb#L203) + * [uses the custom port for TLS requests](./spec/shared/client_initializer_behaviour.rb#L202) * tls - * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L226) + * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L225) * set to false - * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L217) - * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L221) + * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L216) + * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L220) * logger * default - * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L237) - * [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L241) + * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L236) + * [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L240) * with log_level :none - * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L249) + * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L248) * with custom logger and log_level - * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L259) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L263) - * environment - * when set without custom fallback hosts configured - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L275) - * [uses the default fallback hosts (#TBC, see https://github.com/ably/wiki/issues/361)](./spec/shared/client_initializer_behaviour.rb#L279) - * when set with custom fallback hosts configured - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L289) - * [uses the custom provided fallback hosts (#RSC15a)](./spec/shared/client_initializer_behaviour.rb#L293) - * when set with fallback_hosts_use_default - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L304) - * [uses the production default fallback hosts (#RTN17b)](./spec/shared/client_initializer_behaviour.rb#L308) - * rest_host - * when set without custom fallback hosts configured - * [sets the custom_host attribute](./spec/shared/client_initializer_behaviour.rb#L319) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L323) - * when set with environment and without custom fallback hosts configured - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L333) - * [sets the custom_host attribute](./spec/shared/client_initializer_behaviour.rb#L337) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L341) - * when set with custom fallback hosts configured - * [sets the custom_host attribute](./spec/shared/client_initializer_behaviour.rb#L351) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L355) - * realtime_host - * when set without custom fallback hosts configured - * [sets the realtime_host option](./spec/shared/client_initializer_behaviour.rb#L368) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L372) - * custom port - * when set without custom fallback hosts configured - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L383) - * custom TLS port - * when set without custom fallback hosts configured - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L394) + * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L258) + * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L262) + * fallback hosts (#REC2) + * [defaults to the main production fallback hosts (#REC2c1)](./spec/shared/client_initializer_behaviour.rb#L273) + * with a routing policy name + * [uses the production fallback hosts for that routing policy (#REC2c4)](./spec/shared/client_initializer_behaviour.rb#L281) + * with a nonprod routing policy name + * [uses the non-production fallback hosts for that routing policy (#REC2c3)](./spec/shared/client_initializer_behaviour.rb#L289) + * with hostname foo.example.com + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with hostname localhost + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with hostname 127.0.0.1 + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with hostname ::1 + * [has no default fallback hosts (#REC2c2)](./spec/shared/client_initializer_behaviour.rb#L298) + * with custom fallback hosts configured + * and endpoint main + * [uses the custom provided fallback hosts (#REC2a2)](./spec/shared/client_initializer_behaviour.rb#L311) + * and endpoint nonprod:sandbox + * [uses the custom provided fallback hosts (#REC2a2)](./spec/shared/client_initializer_behaviour.rb#L311) + * and endpoint foo.example.com + * [uses the custom provided fallback hosts (#REC2a2)](./spec/shared/client_initializer_behaviour.rb#L311) + * with an empty fallback hosts list + * [has no fallback hosts](./spec/shared/client_initializer_behaviour.rb#L321) + * with a custom port + * [uses the default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L329) + * with a custom TLS port + * [uses the default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L337) * delegators - * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L408) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L413) + * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L351) + * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L356) * 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) + * [#endpoint](./spec/unit/realtime/client_spec.rb#L23) + * [#primary_domain](./spec/unit/realtime/client_spec.rb#L23) * [#use_tls?](./spec/unit/realtime/client_spec.rb#L23) * [#log_level](./spec/unit/realtime/client_spec.rb#L23) - * [#custom_host](./spec/unit/realtime/client_spec.rb#L23) + * [#custom_port](./spec/unit/realtime/client_spec.rb#L23) * when :transport_params option is passed * [converts options to strings](./spec/unit/realtime/client_spec.rb#L39) * push * [#device is not supported and raises an exception](./spec/unit/realtime/client_spec.rb#L47) * [#push returns a Push object](./spec/unit/realtime/client_spec.rb#L51) -### Ably::Realtime::Connection +### Ably::PubSub::Realtime::Connection _(see [spec/unit/realtime/connection_spec.rb](./spec/unit/realtime/connection_spec.rb))_ * callbacks * [are supported for valid STATE events](./spec/unit/realtime/connection_spec.rb#L21) * [fail with unacceptable STATE event names](./spec/unit/realtime/connection_spec.rb#L27) -### Ably::Realtime::Presence +### Ably::PubSub::Realtime::Presence _(see [spec/unit/realtime/presence_spec.rb](./spec/unit/realtime/presence_spec.rb))_ * callbacks * [are supported for valid STATE events](./spec/unit/realtime/presence_spec.rb#L13) @@ -4736,7 +5091,7 @@ _(see [spec/unit/realtime/presence_spec.rb](./spec/unit/realtime/presence_spec.r * [with a non-matching action argument has no effect](./spec/unit/realtime/presence_spec.rb#L125) * [with no block argument unsubscribes all blocks for the action argument](./spec/unit/realtime/presence_spec.rb#L131) -### Ably::Realtime::Channel::PushChannel +### Ably::PubSub::Realtime::Channel::PushChannel _(see [spec/unit/realtime/push_channel_spec.rb](./spec/unit/realtime/push_channel_spec.rb))_ * [is constructed with a channel](./spec/unit/realtime/push_channel_spec.rb#L10) * [raises an exception if constructed with an invalid type](./spec/unit/realtime/push_channel_spec.rb#L14) @@ -4749,11 +5104,11 @@ _(see [spec/unit/realtime/push_channel_spec.rb](./spec/unit/realtime/push_channe * [#unsubscribe_client_id raises an unsupported exception](./spec/unit/realtime/push_channel_spec.rb#L31) * [#get_subscriptions raises an unsupported exception](./spec/unit/realtime/push_channel_spec.rb#L31) -### Ably::Realtime +### Ably::PubSub::Realtime _(see [spec/unit/realtime/realtime_spec.rb](./spec/unit/realtime/realtime_spec.rb))_ - * [constructor returns an Ably::Realtime::Client](./spec/unit/realtime/realtime_spec.rb#L6) + * [constructor refuses and points at the factory function](./spec/unit/realtime/realtime_spec.rb#L8) -### Ably::Realtime::RecoveryKeyContext +### Ably::PubSub::Realtime::RecoveryKeyContext _(see [spec/unit/realtime/recovery_key_context_spec.rb](./spec/unit/realtime/recovery_key_context_spec.rb))_ * connection recovery key * [should encode recovery key - RTN16i, RTN16f, RTN16j](./spec/unit/realtime/recovery_key_context_spec.rb#L8) @@ -4802,235 +5157,6 @@ _(see [spec/unit/realtime/safe_deferrable_spec.rb](./spec/unit/realtime/safe_def * #succeed * [calls the callbacks defined with #callback, but not the ones added for #errback](./spec/shared/safe_deferrable_behaviour.rb#L65) -### Ably::Rest::Channel -_(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#L24) - * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L28) - * as frozen UTF_8 string - * [is permitted](./spec/unit/rest/channel_spec.rb#L37) - * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L41) - * as SHIFT_JIS string - * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L49) - * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L53) - * as ASCII_8BIT string - * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L61) - * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L65) - * as Integer - * [raises an argument error](./spec/unit/rest/channel_spec.rb#L73) - * as Nil - * [raises an argument error](./spec/unit/rest/channel_spec.rb#L81) - * #publish name argument - * as UTF_8 string - * [is permitted](./spec/unit/rest/channel_spec.rb#L93) - * as frozen UTF_8 string - * [is permitted](./spec/unit/rest/channel_spec.rb#L102) - * as SHIFT_JIS string - * [is permitted](./spec/unit/rest/channel_spec.rb#L110) - * as ASCII_8BIT string - * [is permitted](./spec/unit/rest/channel_spec.rb#L118) - * as Integer - * [raises an argument error](./spec/unit/rest/channel_spec.rb#L126) - * max message size exceeded - * when max_message_size is nil - * and a message size is 65537 bytes - * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/rest/channel_spec.rb#L134) - * when max_message_size is 65536 bytes - * and a message size is 65537 bytes - * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/rest/channel_spec.rb#L144) - * and a message size is 10 bytes - * [should send a message](./spec/unit/rest/channel_spec.rb#L150) - * when max_message_size is 10 bytes - * and a message size is 11 bytes - * [should raise Ably::Exceptions::MaxMessageSizeExceeded](./spec/unit/rest/channel_spec.rb#L160) - * and a message size is 2 bytes - * [should send a message](./spec/unit/rest/channel_spec.rb#L166) - -### Ably::Rest::Channels -_(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_ - * [[] creates a channel](./spec/unit/rest/channels_spec.rb#L91) - * #get - * when channel doesn't exist - * hash - * [is expected to be a kind of Hash](./spec/unit/rest/channels_spec.rb#L24) - * [creates a channel (RSN3a)](./spec/unit/rest/channels_spec.rb#L16) - * ChannelOptions object - * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/rest/channels_spec.rb#L31) - * [creates a channel (RSN3a)](./spec/unit/rest/channels_spec.rb#L16) - * when an existing channel exists - * hash - * [is expected to be a kind of Hash](./spec/unit/rest/channels_spec.rb#L48) - * [will reuse a channel object if it exists (RSN3a)](./spec/unit/rest/channels_spec.rb#L39) - * ChannelOptions object - * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/rest/channels_spec.rb#L55) - * [will reuse a channel object if it exists (RSN3a)](./spec/unit/rest/channels_spec.rb#L39) - * with new channel_options modes - * hash - * [is expected to be a kind of Hash](./spec/unit/rest/channels_spec.rb#L76) - * [will update channel with provided options modes (RSN3c)](./spec/unit/rest/channels_spec.rb#L62) - * ChannelOptions object - * [is expected to be a kind of Ably::Models::ChannelOptions](./spec/unit/rest/channels_spec.rb#L83) - * [will update channel with provided options modes (RSN3c)](./spec/unit/rest/channels_spec.rb#L62) - * #fetch - * [retrieves a channel if it exists](./spec/unit/rest/channels_spec.rb#L97) - * [calls the block if channel is missing](./spec/unit/rest/channels_spec.rb#L102) - * destroying channels - * [#release releases the channel resoures](./spec/unit/rest/channels_spec.rb#L110) - * is Enumerable - * [allows enumeration](./spec/unit/rest/channels_spec.rb#L126) - * [provides #length](./spec/unit/rest/channels_spec.rb#L142) - * #each - * [returns an enumerator](./spec/unit/rest/channels_spec.rb#L131) - * [yields each channel](./spec/unit/rest/channels_spec.rb#L135) - -### Ably::Rest::Client -_(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_ - * behaves like a client initializer - * with invalid arguments - * empty hash - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L28) - * nil - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L36) - * key: "invalid" - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44) - * key: "invalid:asdad" - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52) - * key and key_name - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60) - * key and key_secret - * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L68) - * with valid arguments - * key only - * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L79) - * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L83) - * with a string key instead of options hash - * [sets the key](./spec/shared/client_initializer_behaviour.rb#L103) - * [sets the key_name](./spec/shared/client_initializer_behaviour.rb#L107) - * [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L111) - * [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L115) - * with a string token key instead of options hash - * [sets the token](./spec/shared/client_initializer_behaviour.rb#L127) - * with token - * [sets the token](./spec/shared/client_initializer_behaviour.rb#L135) - * with token_details - * [sets the token](./spec/shared/client_initializer_behaviour.rb#L143) - * with token_params - * [configures default_token_params](./spec/shared/client_initializer_behaviour.rb#L151) - * endpoint - * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L162) - * with environment option - * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L169) - * with rest_host option - * [uses an alternate endpoint for REST clients](./spec/shared/client_initializer_behaviour.rb#L177) - * with realtime_host option - * PENDING: *[uses an alternate endpoint for Realtime clients](./spec/shared/client_initializer_behaviour.rb#L186)* - * with port option and non-TLS connections - * [uses the custom port for non-TLS requests](./spec/shared/client_initializer_behaviour.rb#L195) - * with tls_port option and a TLS connection - * [uses the custom port for TLS requests](./spec/shared/client_initializer_behaviour.rb#L203) - * tls - * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L226) - * set to false - * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L217) - * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L221) - * logger - * default - * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L237) - * [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L241) - * with log_level :none - * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L249) - * with custom logger and log_level - * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L259) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L263) - * environment - * when set without custom fallback hosts configured - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L275) - * [uses the default fallback hosts (#TBC, see https://github.com/ably/wiki/issues/361)](./spec/shared/client_initializer_behaviour.rb#L279) - * when set with custom fallback hosts configured - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L289) - * [uses the custom provided fallback hosts (#RSC15a)](./spec/shared/client_initializer_behaviour.rb#L293) - * when set with fallback_hosts_use_default - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L304) - * [uses the production default fallback hosts (#RTN17b)](./spec/shared/client_initializer_behaviour.rb#L308) - * rest_host - * when set without custom fallback hosts configured - * [sets the custom_host attribute](./spec/shared/client_initializer_behaviour.rb#L319) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L323) - * when set with environment and without custom fallback hosts configured - * [sets the environment attribute](./spec/shared/client_initializer_behaviour.rb#L333) - * [sets the custom_host attribute](./spec/shared/client_initializer_behaviour.rb#L337) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L341) - * when set with custom fallback hosts configured - * [sets the custom_host attribute](./spec/shared/client_initializer_behaviour.rb#L351) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L355) - * realtime_host - * when set without custom fallback hosts configured - * [sets the realtime_host option](./spec/shared/client_initializer_behaviour.rb#L368) - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L372) - * custom port - * when set without custom fallback hosts configured - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L383) - * custom TLS port - * when set without custom fallback hosts configured - * [has no default fallback hosts](./spec/shared/client_initializer_behaviour.rb#L394) - * delegators - * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L408) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L413) - * 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) - * fallback_retry_timeout (#RSC15f) - * default - * [is set to 10 minutes](./spec/unit/rest/client_spec.rb#L27) - * when provided - * [configures a new timeout](./spec/unit/rest/client_spec.rb#L35) - * use agent - * set agent to non-default value - * default agent - * [should return default ably agent](./spec/unit/rest/client_spec.rb#L46) - * custom agent - * [should overwrite client.agent](./spec/unit/rest/client_spec.rb#L54) - * :use_token_auth - * set to false - * with a key and :tls => false - * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/rest/client_spec.rb#L66) - * without a key - * [fails as a key is required if not using token auth](./spec/unit/rest/client_spec.rb#L74) - * set to true - * without a key or token - * [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L84) - * max_message_size - * is not present - * [should return default 65536 (#TO3l8)](./spec/unit/rest/client_spec.rb#L95) - * is nil - * [should return default 65536 (#TO3l8)](./spec/unit/rest/client_spec.rb#L103) - * is customized 131072 bytes - * [should return 131072](./spec/unit/rest/client_spec.rb#L112) - * request_id generation - * [includes request_id in URL](./spec/unit/rest/client_spec.rb#L121) - * push - * [#device is not supported and raises an exception](./spec/unit/rest/client_spec.rb#L129) - * [#push returns a Push object](./spec/unit/rest/client_spec.rb#L133) - -### Ably::Rest::Channel::PushChannel -_(see [spec/unit/rest/push_channel_spec.rb](./spec/unit/rest/push_channel_spec.rb))_ - * [is constructed with a channel](./spec/unit/rest/push_channel_spec.rb#L10) - * [raises an exception if constructed with an invalid type](./spec/unit/rest/push_channel_spec.rb#L14) - * [exposes the channel as attribute #channel](./spec/unit/rest/push_channel_spec.rb#L18) - * [is available in the #push attribute of the channel](./spec/unit/rest/push_channel_spec.rb#L22) - * methods not implemented as push notifications - * [#subscribe_device raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31) - * [#subscribe_client_id raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31) - * [#unsubscribe_device raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31) - * [#unsubscribe_client_id raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31) - * [#get_subscriptions raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31) - -### 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) - ### Ably::Util::Crypto _(see [spec/unit/util/crypto_spec.rb](./spec/unit/util/crypto_spec.rb))_ * defaults @@ -5075,6 +5201,6 @@ _(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_ ## Test summary - * Passing tests: 2495 - * Pending tests: 5 - * Failing tests: 0 + * Passing tests: 2551 + * Pending tests: 3 + * Failing tests: 4