lib/submodules/ably-ruby/SPEC.md in ably-rest-0.7.5 vs lib/submodules/ably-ruby/SPEC.md in ably-rest-0.8.1

- old
+ new

@@ -1,24 +1,29 @@ -# Ably Real-time & REST Client Library 0.7.3 Specification +# Ably Realtime & REST Client Library 0.8.0 Specification ### Ably::Realtime::Channel#history _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_ * using JSON and MsgPack protocol - * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_history_spec.rb#L20) + * [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 real-time history](./spec/acceptance/realtime/channel_history_spec.rb#L33) + * [retrieves realtime history](./spec/acceptance/realtime/channel_history_spec.rb#L34) * with two clients publishing messages on the same channel - * [retrieves real-time history on both channels](./spec/acceptance/realtime/channel_history_spec.rb#L45) + * [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#L87) - * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L96) + * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L88) + * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L97) * in multiple ProtocolMessages - * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L107) - * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L118) + * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L108) + * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L119) * and REST history - * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L134) + * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L135) + * with option until_attach: true + * [retrieves all messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L160) + * [raises an exception unless state is attached](./spec/acceptance/realtime/channel_history_spec.rb#L199) + * and two pages of messages + * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/channel_history_spec.rb#L175) ### Ably::Realtime::Channel _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_ * using JSON and MsgPack protocol * initialization @@ -102,41 +107,41 @@ ### Ably::Realtime::Client _(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/client_spec.rb))_ * using JSON and MsgPack protocol * initialization * basic auth - * [is enabled by default with a provided :api_key option](./spec/acceptance/realtime/client_spec.rb#L18) + * [is enabled by default with a provided :key option](./spec/acceptance/realtime/client_spec.rb#L18) * :tls option * set to false to forec 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#L31) * token auth * with TLS enabled - * and a pre-generated Token provided with the :token_id option + * and a pre-generated Token provided with the :token option * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L51) - * with valid :api_key and :use_token_auth option set to true + * with valid :key and :use_token_auth option set to true * [automatically authorises on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L64) * with client_id * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L77) * with TLS disabled - * and a pre-generated Token provided with the :token_id option + * and a pre-generated Token provided with the :token option * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L51) - * with valid :api_key and :use_token_auth option set to true + * with valid :key and :use_token_auth option set to true * [automatically authorises on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L64) * with client_id * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L77) - * with token_request_block - * [calls the block](./spec/acceptance/realtime/client_spec.rb#L102) - * [uses the token request when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L109) + * with a Proc for the :auth_callback option + * [calls the Proc](./spec/acceptance/realtime/client_spec.rb#L102) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L109) ### Ably::Realtime::Connection failures _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/realtime/connection_failures_spec.rb))_ * using JSON and MsgPack protocol * authentication failure * when API key is invalid * with invalid app part of the key * [enters the failed state and returns a not found error](./spec/acceptance/realtime/connection_failures_spec.rb#L26) - * with invalid key ID part of the key + * with invalid key name part of the key * [enters the failed state and returns an authorization error](./spec/acceptance/realtime/connection_failures_spec.rb#L40) * 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#L95) @@ -329,77 +334,82 @@ * 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#L138) * without suitable publishing permissions * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L183) * server incorrectly resends a message that was already received by the client library - * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L202) + * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L203) * encoding and decoding encrypted messages * with AES-128-CBC using crypto-data-128.json fixtures * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * with AES-256-CBC using crypto-data-256.json fixtures * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * 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](./spec/acceptance/realtime/message_spec.rb#L266) - * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L284) + * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267) + * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285) * with multiple sends from one client to another - * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L323) + * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L324) * subscribing with a different transport protocol - * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L366) - * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L366) - * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L366) + * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L367) + * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L367) + * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L367) * 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#L385) + * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L386) * 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](./spec/acceptance/realtime/message_spec.rb#L403) - * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L412) + * [delivers the message but still encrypted with a value in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L404) + * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L413) * 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](./spec/acceptance/realtime/message_spec.rb#L434) - * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L443) + * [delivers the message but still encrypted with the cipher detials in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L435) + * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L444) * 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#L465) - * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L474) + * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L466) + * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L475) ### Ably::Realtime::Presence history _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_ * using JSON and MsgPack 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#L41) + * with option until_attach: true + * [retrieves all presence messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L60) + * [raises an exception unless state is attached](./spec/acceptance/realtime/presence_history_spec.rb#L92) + * and two pages of messages + * [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L73) ### Ably::Realtime::Presence _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_ * using JSON and MsgPack protocol * when attached (but not present) on a presence channel with an anonymous client (no client ID) @@ -591,114 +601,122 @@ ### Ably::Auth _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_ * using JSON and MsgPack protocol * [has immutable options](./spec/acceptance/rest/auth_spec.rb#L54) * #request_token - * [returns a valid requested token in the expected format with valid issued_at and expires_at attributes](./spec/acceptance/rest/auth_spec.rb#L69) + * [returns a valid requested token in the expected format with valid issued and expires attributes](./spec/acceptance/rest/auth_spec.rb#L69) * with option :client_id - * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L95) + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100) * with option :capability - * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L95) + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100) * with option :nonce - * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L95) + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100) * with option :timestamp - * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L95) + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100) * with option :ttl - * [overrides default and uses camelCase notation for all attributes](./spec/acceptance/rest/auth_spec.rb#L95) - * with :key_id & :key_secret options - * [key_id is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L124) + * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100) + * with :key option + * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L129) + * with :key_name & :key_secret options + * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L158) * with :query_time option - * [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L132) + * [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L166) * without :query_time option - * [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#L141) + * [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#L175) * 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#L188) - * [returns a valid token generated from the token request](./spec/acceptance/rest/auth_spec.rb#L193) + * [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L223) + * [returns a valid token generated from the token request](./spec/acceptance/rest/auth_spec.rb#L228) * with :query_params - * [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L200) + * [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L235) * with :headers - * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L208) + * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L243) * with POST - * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L216) - * when response from :auth_url is a token - * [returns a Token created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L240) + * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L251) + * when response from :auth_url is a token details object + * [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L276) + * 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#L293) * when response is invalid * 500 - * [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L255) + * [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L306) * XML - * [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L266) - * with token_request_block that returns a token request - * [calls the block when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L284) - * [uses the token request from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L289) - * with token_request_block that returns a token - * [calls the block when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L317) - * [uses the token request from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L322) + * [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L317) + * with a Proc for the :auth_callback option + * that returns a TokenRequest + * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L336) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L341) + * that returns a TokenDetails JSON object + * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L370) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L375) + * that returns a TokenDetails object + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L396) + * that returns a Token string + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L412) + * with client_id + * [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L444) * before #authorise has been called - * [has no current_token](./spec/acceptance/rest/auth_spec.rb#L334) + * [has no current_token_details](./spec/acceptance/rest/auth_spec.rb#L451) * #authorise - * [updates the persisted auth options thare are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L381) + * [updates the persisted auth options that are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L498) * when called for the first time since the client has been instantiated - * [passes all options to #request_token](./spec/acceptance/rest/auth_spec.rb#L345) - * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L350) - * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L354) + * [passes all options to #request_token](./spec/acceptance/rest/auth_spec.rb#L462) + * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L467) + * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L471) * with previous authorisation - * [does not request a token if current_token has not expired](./spec/acceptance/rest/auth_spec.rb#L365) - * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L370) - * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L376) - * with token_request_block - * [calls the block](./spec/acceptance/rest/auth_spec.rb#L397) - * [uses the token request returned from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L401) + * [does not request a token if current_token_details has not expired](./spec/acceptance/rest/auth_spec.rb#L482) + * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L487) + * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L493) + * with a Proc for the :auth_callback option + * [calls the Proc](./spec/acceptance/rest/auth_spec.rb#L514) + * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L518) * for every subsequent #request_token - * without a provided block - * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L407) + * without a :auth_callback Proc + * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L524) * with a provided block - * [does not call the originally provided block and calls the new #request_token block](./spec/acceptance/rest/auth_spec.rb#L414) + * [does not call the originally provided Proc and calls the new #request_token :auth_callback Proc](./spec/acceptance/rest/auth_spec.rb#L531) * #create_token_request - * [uses the key ID from the client](./spec/acceptance/rest/auth_spec.rb#L430) - * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L434) - * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L438) + * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L547) + * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L551) + * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L555) * the nonce - * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L443) - * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L448) + * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L560) + * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L565) * with option :ttl - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459) - * with option :capability - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576) * with option :nonce - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459) - * with option :timestamp - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576) * with option :client_id - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576) * with additional invalid attributes - * [are ignored](./spec/acceptance/rest/auth_spec.rb#L467) + * [are ignored](./spec/acceptance/rest/auth_spec.rb#L584) * when required fields are missing - * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L478) - * [should raise an exception if key id is missing](./spec/acceptance/rest/auth_spec.rb#L482) + * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L595) + * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L599) * with :query_time option - * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L491) + * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L608) * with :timestamp option - * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L501) + * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L618) * signing - * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L518) + * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L640) * using token authentication - * with :token_id option - * [authenticates successfully using the provided :token_id](./spec/acceptance/rest/auth_spec.rb#L541) - * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L545) - * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L553) - * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L561) + * with :token option + * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L663) + * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L667) + * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L675) + * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L683) * when implicit as a result of using :client id * and requests to the Ably server are mocked - * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L591) + * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L711) * a token is created - * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L600) - * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L604) - * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L608) - * when using an :api_key and basic auth - * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L623) - * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L627) + * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L720) + * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L724) + * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L728) + * when using an :key and basic auth + * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L743) + * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L747) + * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L751) ### 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 @@ -721,35 +739,35 @@ * [should raise a ServerError exception](./spec/acceptance/rest/base_spec.rb#L105) * token authentication failures * when auth#token_renewable? * [should automatically reissue a token](./spec/acceptance/rest/base_spec.rb#L143) * when NOT auth#token_renewable? - * [should raise an InvalidToken exception](./spec/acceptance/rest/base_spec.rb#L156) + * [should raise an InvalidToken exception](./spec/acceptance/rest/base_spec.rb#L158) ### Ably::Rest::Channel _(see [spec/acceptance/rest/channel_spec.rb](./spec/acceptance/rest/channel_spec.rb))_ * using JSON and MsgPack protocol * #publish - * [should publish the message adn return true indicating success](./spec/acceptance/rest/channel_spec.rb#L17) + * [should publish the message and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L17) * #history * [should return the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L39) * [should return paged history using the PaginatedResource model](./spec/acceptance/rest/channel_spec.rb#L67) * message timestamps * [should all be after the messages were published](./spec/acceptance/rest/channel_spec.rb#L52) * message IDs * [should be unique](./spec/acceptance/rest/channel_spec.rb#L60) * #history option * :start * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L116) + * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L123) * with a Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L126) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L133) * :end * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L116) + * [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L123) * with a Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L126) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L133) ### Ably::Rest::Channels _(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_spec.rb))_ * using JSON and MsgPack protocol * using shortcut method #channel on the client object @@ -767,47 +785,47 @@ ### Ably::Rest::Client _(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.rb))_ * using JSON and MsgPack protocol * #initialize - * with an auth block - * [calls the block to get a new token](./spec/acceptance/rest/client_spec.rb#L20) + * with a :auth_callback Proc + * [calls the auth Proc to get a new token](./spec/acceptance/rest/client_spec.rb#L20) * with an auth URL * [sends an HTTP request to the provided URL to get a new token](./spec/acceptance/rest/client_spec.rb#L34) * using tokens * when expired - * [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#L55) + * [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#L58) * when token has not expired - * [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L69) + * [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L72) * connection transport * for default host - * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L85) - * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L89) + * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L88) + * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L92) * for the fallback hosts - * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L95) - * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L99) + * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L98) + * [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L102) * 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](./spec/acceptance/rest/client_spec.rb#L112) + * [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](./spec/acceptance/rest/client_spec.rb#L115) * when environment is NOT production - * [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L129) + * [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L132) * when environment is production * and connection times out - * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L169) + * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L172) * and the total request time exeeds 10 seconds - * [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L184) + * [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L187) * and connection fails - * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L200) + * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L203) * with a custom host * that does not exist - * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L216) + * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L219) * fallback hosts - * [are never used](./spec/acceptance/rest/client_spec.rb#L237) + * [are never used](./spec/acceptance/rest/client_spec.rb#L240) * that times out - * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L252) + * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L255) * fallback hosts - * [are never used](./spec/acceptance/rest/client_spec.rb#L265) + * [are never used](./spec/acceptance/rest/client_spec.rb#L268) ### Ably::Models::MessageEncoders _(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_ * with binary transport protocol * without encryption @@ -902,77 +920,84 @@ ### Ably::Rest::Presence _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_ * using JSON and MsgPack protocol * 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/rest/presence_spec.rb#L30) + * [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#L44) + * [returns a paged response limiting number of members per page](./spec/acceptance/rest/presence_spec.rb#L55) * #history - * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L62) + * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L67) * with options * direction: :forwards - * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L78) + * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L83) * direction: :backwards - * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L93) + * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L98) * #history * with time range options * :start * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L138) + * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L150) * with Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L148) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L160) * :end * with milliseconds since epoch value - * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L138) + * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L150) * with Time object value - * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L148) + * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L160) * decoding + * with encoded fixture data + * #history + * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L180) + * #get + * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L187) + * decoding permutations using mocked #history * valid decodeable content * #get - * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L206) + * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L243) * #history - * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L223) + * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L260) * invalid data * #get - * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L254) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L258) + * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L291) + * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L295) * #history - * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L278) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L282) + * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L315) + * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L319) ### Ably::Rest::Client#stats _(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_ * using JSON and MsgPack protocol * fetching application stats * by minute * with :from set to last interval and :limit set to 1 * [retrieves only one stat](./spec/acceptance/rest/stats_spec.rb#L50) - * [returns all aggregated message data](./spec/acceptance/rest/stats_spec.rb#L54) - * [returns inbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L59) - * [returns inbound realtime message data](./spec/acceptance/rest/stats_spec.rb#L64) - * [returns outbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L69) - * [returns persisted presence all data](./spec/acceptance/rest/stats_spec.rb#L74) - * [returns connections all data](./spec/acceptance/rest/stats_spec.rb#L79) - * [returns channels all data](./spec/acceptance/rest/stats_spec.rb#L84) - * [returns api_requests data](./spec/acceptance/rest/stats_spec.rb#L89) - * [returns token_requests data](./spec/acceptance/rest/stats_spec.rb#L94) - * [returns stat objects with #interval_granularity equal to :minute](./spec/acceptance/rest/stats_spec.rb#L99) - * [returns stat objects with #interval_id matching :start](./spec/acceptance/rest/stats_spec.rb#L103) - * [returns stat objects with #interval_time matching :start Time](./spec/acceptance/rest/stats_spec.rb#L107) + * [returns zero value for any missing metrics](./spec/acceptance/rest/stats_spec.rb#L54) + * [returns all aggregated message data](./spec/acceptance/rest/stats_spec.rb#L59) + * [returns inbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L64) + * [returns inbound realtime message data](./spec/acceptance/rest/stats_spec.rb#L69) + * [returns outbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L74) + * [returns persisted presence all data](./spec/acceptance/rest/stats_spec.rb#L79) + * [returns connections all data](./spec/acceptance/rest/stats_spec.rb#L84) + * [returns channels all data](./spec/acceptance/rest/stats_spec.rb#L89) + * [returns api_requests data](./spec/acceptance/rest/stats_spec.rb#L94) + * [returns token_requests data](./spec/acceptance/rest/stats_spec.rb#L99) + * [returns stat objects with #interval_granularity equal to :minute](./spec/acceptance/rest/stats_spec.rb#L104) + * [returns stat objects with #interval_id matching :start](./spec/acceptance/rest/stats_spec.rb#L108) + * [returns stat objects with #interval_time matching :start Time](./spec/acceptance/rest/stats_spec.rb#L112) * 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#L117) - * [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L121) + * [returns the first interval stats as stats are provided forwards from :start](./spec/acceptance/rest/stats_spec.rb#L122) + * [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L126) * 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#L134) - * [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L138) + * [returns the 3rd interval stats first as stats are provided backwards from :end](./spec/acceptance/rest/stats_spec.rb#L139) + * [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L143) * by hour - * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L162) + * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L167) * by day - * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L162) + * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L167) * by month - * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L162) + * [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L167) ### Ably::Rest::Client#time _(see [spec/acceptance/rest/time_spec.rb](./spec/acceptance/rest/time_spec.rb))_ * using JSON and MsgPack protocol * fetching the service time @@ -992,10 +1017,14 @@ * as ASCII_8BIT string * [gets converted to UTF-8](./spec/unit/auth_spec.rb#L51) * [is compatible with original encoding](./spec/unit/auth_spec.rb#L55) * as Integer * [raises an argument error](./spec/unit/auth_spec.rb#L63) + * defaults + * [should default TTL to 1 hour](./spec/unit/auth_spec.rb#L73) + * [should default capability to all](./spec/unit/auth_spec.rb#L77) + * [should only have defaults for :ttl and :capability](./spec/unit/auth_spec.rb#L81) ### Ably::Logger _(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_ * [uses the language provided Logger by default](./spec/unit/logger_spec.rb#L15) * with a custom Logger @@ -1247,40 +1276,43 @@ * as Nil * [is permitted](./spec/unit/models/message_spec.rb#L134) ### Ably::Models::PaginatedResource _(see [spec/unit/models/paginated_resource_spec.rb](./spec/unit/models/paginated_resource_spec.rb))_ - * [returns correct length from body](./spec/unit/models/paginated_resource_spec.rb#L30) - * [supports alias methods for length](./spec/unit/models/paginated_resource_spec.rb#L34) - * [is Enumerable](./spec/unit/models/paginated_resource_spec.rb#L39) - * [is iterable](./spec/unit/models/paginated_resource_spec.rb#L43) - * [provides [] accessor method](./spec/unit/models/paginated_resource_spec.rb#L61) - * [#first gets the first item in page](./spec/unit/models/paginated_resource_spec.rb#L67) - * [#last gets the last item in page](./spec/unit/models/paginated_resource_spec.rb#L71) - * #each - * [returns an enumerator](./spec/unit/models/paginated_resource_spec.rb#L48) - * [yields each item](./spec/unit/models/paginated_resource_spec.rb#L52) + * #items + * [returns correct length from body](./spec/unit/models/paginated_resource_spec.rb#L31) + * [is Enumerable](./spec/unit/models/paginated_resource_spec.rb#L35) + * [is iterable](./spec/unit/models/paginated_resource_spec.rb#L39) + * [provides [] accessor method](./spec/unit/models/paginated_resource_spec.rb#L57) + * [#first gets the first item in page](./spec/unit/models/paginated_resource_spec.rb#L63) + * [#last gets the last item in page](./spec/unit/models/paginated_resource_spec.rb#L67) + * #each + * [returns an enumerator](./spec/unit/models/paginated_resource_spec.rb#L44) + * [yields each item](./spec/unit/models/paginated_resource_spec.rb#L48) * with non paged http response - * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L175) - * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L179) - * [does not support pagination](./spec/unit/models/paginated_resource_spec.rb#L183) - * [raises an exception when accessing next page](./spec/unit/models/paginated_resource_spec.rb#L187) - * [raises an exception when accessing first page](./spec/unit/models/paginated_resource_spec.rb#L191) + * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L172) + * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L176) + * [does not have next page](./spec/unit/models/paginated_resource_spec.rb#L180) + * [does not support pagination](./spec/unit/models/paginated_resource_spec.rb#L184) + * [returns nil when accessing next page](./spec/unit/models/paginated_resource_spec.rb#L188) + * [returns nil when accessing first page](./spec/unit/models/paginated_resource_spec.rb#L192) * with paged http response - * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L209) - * [is not the last page](./spec/unit/models/paginated_resource_spec.rb#L213) - * [supports pagination](./spec/unit/models/paginated_resource_spec.rb#L217) + * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L210) + * [has next page](./spec/unit/models/paginated_resource_spec.rb#L214) + * [is not the last page](./spec/unit/models/paginated_resource_spec.rb#L218) + * [supports pagination](./spec/unit/models/paginated_resource_spec.rb#L222) * accessing next page - * [returns another PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L245) - * [retrieves the next page of results](./spec/unit/models/paginated_resource_spec.rb#L249) - * [is not the first page](./spec/unit/models/paginated_resource_spec.rb#L254) - * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L258) - * [raises an exception if trying to access the last page when it is the last page](./spec/unit/models/paginated_resource_spec.rb#L262) + * [returns another PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L250) + * [retrieves the next page of results](./spec/unit/models/paginated_resource_spec.rb#L254) + * [is not the first page](./spec/unit/models/paginated_resource_spec.rb#L259) + * [does not have a next page](./spec/unit/models/paginated_resource_spec.rb#L263) + * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L267) + * [returns nil when trying to access the last page when it is the last page](./spec/unit/models/paginated_resource_spec.rb#L271) * and then first page - * [returns a PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L273) - * [retrieves the first page of results](./spec/unit/models/paginated_resource_spec.rb#L277) - * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L281) + * [returns a PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L282) + * [retrieves the first page of results](./spec/unit/models/paginated_resource_spec.rb#L286) + * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L290) ### Ably::Models::PresenceMessage _(see [spec/unit/models/presence_message_spec.rb](./spec/unit/models/presence_message_spec.rb))_ * behaves like a model * attributes @@ -1432,107 +1464,221 @@ * with nil error * [returns nil](./spec/unit/models/protocol_message_spec.rb#L253) * with error * [returns a valid ErrorInfo object](./spec/unit/models/protocol_message_spec.rb#L261) -### Ably::Models::Stat -_(see [spec/unit/models/stat_spec.rb](./spec/unit/models/stat_spec.rb))_ - * behaves like a model - * attributes - * #interval_id - * [retrieves attribute :interval_id](./spec/shared/model_behaviour.rb#L15) - * #all - * [retrieves attribute :all](./spec/shared/model_behaviour.rb#L15) - * #inbound - * [retrieves attribute :inbound](./spec/shared/model_behaviour.rb#L15) - * #outbound - * [retrieves attribute :outbound](./spec/shared/model_behaviour.rb#L15) - * #persisted - * [retrieves attribute :persisted](./spec/shared/model_behaviour.rb#L15) - * #connections - * [retrieves attribute :connections](./spec/shared/model_behaviour.rb#L15) - * #channels - * [retrieves attribute :channels](./spec/shared/model_behaviour.rb#L15) - * #api_requests - * [retrieves attribute :api_requests](./spec/shared/model_behaviour.rb#L15) - * #token_requests - * [retrieves attribute :token_requests](./spec/shared/model_behaviour.rb#L15) - * #== - * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41) - * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46) - * [is false when class type differs](./spec/shared/model_behaviour.rb#L50) - * is immutable - * [prevents changes](./spec/shared/model_behaviour.rb#L76) - * [dups options](./spec/shared/model_behaviour.rb#L80) +### 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/stat_spec.rb#L17) + * [returns the granularity of the interval_id](./spec/unit/models/stats_spec.rb#L193) * #interval_time - * [returns a Time object representing the start of the interval](./spec/unit/models/stat_spec.rb#L25) + * [returns a Time object representing the start of the interval](./spec/unit/models/stats_spec.rb#L201) * 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/stat_spec.rb#L33) - * [converts time 2014-02-03:05:06 with granularity :day into 2014-02-03](./spec/unit/models/stat_spec.rb#L37) - * [converts time 2014-02-03:05:06 with granularity :hour into 2014-02-03:05](./spec/unit/models/stat_spec.rb#L41) - * [converts time 2014-02-03:05:06 with granularity :minute into 2014-02-03:05:06](./spec/unit/models/stat_spec.rb#L45) - * [fails with invalid granularity](./spec/unit/models/stat_spec.rb#L49) - * [fails with invalid time](./spec/unit/models/stat_spec.rb#L53) + * [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) * 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/stat_spec.rb#L59) + * [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) * #from_interval_id - * [converts a month interval_id 2014-02 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L66) - * [converts a day interval_id 2014-02-03 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L71) - * [converts an hour interval_id 2014-02-03:05 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L76) - * [converts a minute interval_id 2014-02-03:05:06 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L81) - * [fails with an invalid interval_id 14-20](./spec/unit/models/stat_spec.rb#L86) + * [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) * #granularity_from_interval_id - * [returns a :month interval_id for 2014-02](./spec/unit/models/stat_spec.rb#L92) - * [returns a :day interval_id for 2014-02-03](./spec/unit/models/stat_spec.rb#L96) - * [returns a :hour interval_id for 2014-02-03:05](./spec/unit/models/stat_spec.rb#L100) - * [returns a :minute interval_id for 2014-02-03:05:06](./spec/unit/models/stat_spec.rb#L104) - * [fails with an invalid interval_id 14-20](./spec/unit/models/stat_spec.rb#L108) + * [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) -### Ably::Models::Token -_(see [spec/unit/models/token_spec.rb](./spec/unit/models/token_spec.rb))_ +### Ably::Models::TokenDetails +_(see [spec/unit/models/token_details_spec.rb](./spec/unit/models/token_details_spec.rb))_ * behaves like a model * attributes - * #id - * [retrieves attribute :id](./spec/shared/model_behaviour.rb#L15) - * #capability - * [retrieves attribute :capability](./spec/shared/model_behaviour.rb#L15) + * #token + * [retrieves attribute :token](./spec/shared/model_behaviour.rb#L15) + * #key_name + * [retrieves attribute :key_name](./spec/shared/model_behaviour.rb#L15) * #client_id * [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15) - * #nonce - * [retrieves attribute :nonce](./spec/shared/model_behaviour.rb#L15) * #== * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41) * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46) * [is false when class type differs](./spec/shared/model_behaviour.rb#L50) * is immutable * [prevents changes](./spec/shared/model_behaviour.rb#L76) * [dups options](./spec/shared/model_behaviour.rb#L80) - * defaults - * [should default TTL to 1 hour](./spec/unit/models/token_spec.rb#L14) - * [should default capability to all](./spec/unit/models/token_spec.rb#L18) - * [should only have defaults for :ttl and :capability](./spec/unit/models/token_spec.rb#L22) * attributes - * #key_id - * [retrieves attribute :key](./spec/unit/models/token_spec.rb#L32) - * #issued_at - * [retrieves attribute :issued_at as Time](./spec/unit/models/token_spec.rb#L42) - * #expires_at - * [retrieves attribute :expires as Time](./spec/unit/models/token_spec.rb#L42) + * #capability + * [retrieves attribute :capability as parsed JSON](./spec/unit/models/token_details_spec.rb#L21) + * #issued with :issued option as milliseconds in constructor + * [retrieves attribute :issued as Time](./spec/unit/models/token_details_spec.rb#L31) + * #issued with :issued option as a Time in constructor + * [retrieves attribute :issued as Time](./spec/unit/models/token_details_spec.rb#L40) + * #issued when converted to JSON + * [is in milliseconds](./spec/unit/models/token_details_spec.rb#L49) + * #expires with :expires option as milliseconds in constructor + * [retrieves attribute :expires as Time](./spec/unit/models/token_details_spec.rb#L31) + * #expires with :expires option as a Time in constructor + * [retrieves attribute :expires as Time](./spec/unit/models/token_details_spec.rb#L40) + * #expires when converted to JSON + * [is in milliseconds](./spec/unit/models/token_details_spec.rb#L49) * #expired? * once grace period buffer has passed - * [is true](./spec/unit/models/token_spec.rb#L55) + * [is true](./spec/unit/models/token_details_spec.rb#L61) * within grace period buffer - * [is false](./spec/unit/models/token_spec.rb#L63) + * [is false](./spec/unit/models/token_details_spec.rb#L69) * == - * [is true when attributes are the same](./spec/unit/models/token_spec.rb#L73) - * [is false when attributes are not the same](./spec/unit/models/token_spec.rb#L78) - * [is false when class type differs](./spec/unit/models/token_spec.rb#L82) + * [is true when attributes are the same](./spec/unit/models/token_details_spec.rb#L79) + * [is false when attributes are not the same](./spec/unit/models/token_details_spec.rb#L84) + * [is false when class type differs](./spec/unit/models/token_details_spec.rb#L88) +### Ably::Models::TokenRequest +_(see [spec/unit/models/token_request_spec.rb](./spec/unit/models/token_request_spec.rb))_ + * behaves like a model + * attributes + * #key_name + * [retrieves attribute :key_name](./spec/shared/model_behaviour.rb#L15) + * #client_id + * [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15) + * #nonce + * [retrieves attribute :nonce](./spec/shared/model_behaviour.rb#L15) + * #mac + * [retrieves attribute :mac](./spec/shared/model_behaviour.rb#L15) + * #== + * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41) + * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46) + * [is false when class type differs](./spec/shared/model_behaviour.rb#L50) + * is immutable + * [prevents changes](./spec/shared/model_behaviour.rb#L76) + * [dups options](./spec/shared/model_behaviour.rb#L80) + * attributes + * #capability + * [retrieves attribute :capability as parsed JSON](./spec/unit/models/token_request_spec.rb#L18) + * #timestamp + * with :timestamp option as milliseconds in constructor + * [retrieves attribute :timestamp as Time](./spec/unit/models/token_request_spec.rb#L29) + * with :timestamp option as Time in constructor + * [retrieves attribute :timestamp as Time](./spec/unit/models/token_request_spec.rb#L38) + * when converted to JSON + * [is in milliseconds since epoch](./spec/unit/models/token_request_spec.rb#L47) + * #ttl + * with :ttl option as milliseconds in constructor + * [retrieves attribute :ttl as seconds](./spec/unit/models/token_request_spec.rb#L59) + * when converted to JSON + * [is in milliseconds since epoch](./spec/unit/models/token_request_spec.rb#L68) + * == + * [is true when attributes are the same](./spec/unit/models/token_request_spec.rb#L78) + * [is false when attributes are not the same](./spec/unit/models/token_request_spec.rb#L83) + * [is false when class type differs](./spec/unit/models/token_request_spec.rb#L87) + ### Ably::Modules::EventEmitter _(see [spec/unit/modules/event_emitter_spec.rb](./spec/unit/modules/event_emitter_spec.rb))_ * #trigger event fan out * [should emit an event for any number of subscribers](./spec/unit/modules/event_emitter_spec.rb#L19) * [sends only messages to matching event names](./spec/unit/modules/event_emitter_spec.rb#L28) @@ -1646,54 +1792,54 @@ * 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) - * api_key: "invalid" + * key: "invalid" * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44) - * api_key: "invalid:asdad" + * key: "invalid:asdad" * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52) - * api_key and key_id + * key and key_name * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60) - * api_key and key_secret + * key and key_secret * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L68) * client_id as only option * [requires a valid key](./spec/shared/client_initializer_behaviour.rb#L76) * with valid arguments - * api_key only + * key only * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87) - * key_id and key_secret - * [constructs an api_key](./spec/shared/client_initializer_behaviour.rb#L95) * with a string key instead of options hash - * [sets the api_key](./spec/shared/client_initializer_behaviour.rb#L103) - * [sets the key_id](./spec/shared/client_initializer_behaviour.rb#L107) + * [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) * with a string token key instead of options hash - * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L119) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L119) * with token - * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L127) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L127) + * with token_details + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L135) * endpoint - * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L133) + * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L141) * with environment option - * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L140) + * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L148) * tls - * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L159) + * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L167) * set to false - * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L150) - * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L154) + * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L158) + * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L162) * logger * default - * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L166) - * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L170) + * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L174) + * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L178) * with log_level :none - * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L178) + * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L186) * with custom logger and log_level - * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L196) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L200) + * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L204) + * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L208) * delegators - * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L210) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L215) + * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L218) + * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L223) * delegation to the REST Client * [passes on the options to the initializer](./spec/unit/realtime/client_spec.rb#L15) * for attribute * [#environment](./spec/unit/realtime/client_spec.rb#L23) * [#use_tls?](./spec/unit/realtime/client_spec.rb#L23) @@ -1769,11 +1915,11 @@ * [adds a callback that is called when #succed is called](./spec/shared/safe_deferrable_behaviour.rb#L44) * [catches exceptions in the callback and logs the error to the logger](./spec/shared/safe_deferrable_behaviour.rb#L51) * #succeed * [calls the callbacks defined with #callback, but not the ones added for #errback](./spec/shared/safe_deferrable_behaviour.rb#L61) -### Ably::Rest::Channels +### 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#L16) * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L20) @@ -1823,67 +1969,67 @@ * 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) - * api_key: "invalid" + * key: "invalid" * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44) - * api_key: "invalid:asdad" + * key: "invalid:asdad" * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52) - * api_key and key_id + * key and key_name * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60) - * api_key and key_secret + * key and key_secret * [raises an exception](./spec/shared/client_initializer_behaviour.rb#L68) * client_id as only option * [requires a valid key](./spec/shared/client_initializer_behaviour.rb#L76) * with valid arguments - * api_key only + * key only * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87) - * key_id and key_secret - * [constructs an api_key](./spec/shared/client_initializer_behaviour.rb#L95) * with a string key instead of options hash - * [sets the api_key](./spec/shared/client_initializer_behaviour.rb#L103) - * [sets the key_id](./spec/shared/client_initializer_behaviour.rb#L107) + * [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) * with a string token key instead of options hash - * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L119) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L119) * with token - * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L127) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L127) + * with token_details + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L135) * endpoint - * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L133) + * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L141) * with environment option - * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L140) + * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L148) * tls - * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L159) + * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L167) * set to false - * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L150) - * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L154) + * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L158) + * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L162) * logger * default - * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L166) - * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L170) + * [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L174) + * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L178) * with log_level :none - * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L178) + * [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L186) * with custom logger and log_level - * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L196) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L200) + * [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L204) + * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L208) * delegators - * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L210) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L215) + * [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L218) + * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L223) * initializer options * TLS * disabled * [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#L17) * :use_token_auth * set to false - * with an api_key with :tls => false + * with an key with :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#L28) - * without an api_key - * [fails as an api_key is required if not using token auth](./spec/unit/rest/client_spec.rb#L36) + * without an key + * [fails as an key is required if not using token auth](./spec/unit/rest/client_spec.rb#L36) * set to true - * without an api_key or token_id - * [fails as an api_key is required to issue tokens](./spec/unit/rest/client_spec.rb#L46) + * without an key or token + * [fails as an key is required to issue tokens](./spec/unit/rest/client_spec.rb#L46) ### 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) @@ -1920,8 +2066,8 @@ ------- ## Test summary - * Passing tests: 942 + * Passing tests: 1028 * Pending tests: 7 * Failing tests: 0