SPEC.md in ably-0.7.6 vs SPEC.md in ably-0.8.0

- old
+ new

@@ -1,6 +1,6 @@ -# Ably Realtime & REST Client Library 0.7.5 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#L21) @@ -113,35 +113,35 @@ * :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 :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 :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) @@ -601,120 +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#L357) + * [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#L364) + * [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#L411) + * [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#L375) - * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L380) - * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L384) + * [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#L395) - * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L400) - * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L406) - * with token_request_block - * [calls the block](./spec/acceptance/rest/auth_spec.rb#L427) - * [uses the token request returned from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L431) + * [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#L437) + * 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#L444) + * [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#L460) - * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L464) - * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L468) + * [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#L473) - * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L478) + * [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#L489) - * with option :capability - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576) * with option :nonce - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489) - * with option :timestamp - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576) * with option :client_id - * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489) + * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576) * with additional invalid attributes - * [are ignored](./spec/acceptance/rest/auth_spec.rb#L497) + * [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#L508) - * [should raise an exception if key id is missing](./spec/acceptance/rest/auth_spec.rb#L512) + * [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#L521) + * [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#L531) + * [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#L548) + * [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#L571) - * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L575) - * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L583) - * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L591) + * 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#L621) + * [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#L630) - * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L634) - * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L638) + * [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#L653) - * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L657) - * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L661) - * when using legacy :api_key option and basic auth - * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L671) - * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L675) + * [#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 @@ -737,11 +739,11 @@ * [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 @@ -754,18 +756,18 @@ * 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 @@ -783,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 @@ -932,37 +934,37 @@ * [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#L143) + * [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#L153) + * [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#L143) + * [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#L153) + * [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#L173) - * #get * [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#L236) + * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L243) * #history - * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L253) + * [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#L284) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L288) + * [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#L308) - * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L312) + * [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 @@ -1015,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 @@ -1459,179 +1465,220 @@ * [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::Stats -_(see [spec/unit/models/stat_spec.rb](./spec/unit/models/stat_spec.rb))_ +_(see [spec/unit/models/stats_spec.rb](./spec/unit/models/stats_spec.rb))_ * #all stats - * [returns a MessageTypes object](./spec/unit/models/stat_spec.rb#L17) - * [returns value for message counts](./spec/unit/models/stat_spec.rb#L21) - * [returns value for all data transferred](./spec/unit/models/stat_spec.rb#L25) - * [returns zero for empty values](./spec/unit/models/stat_spec.rb#L29) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L33) + * [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/stat_spec.rb#L39) + * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) * #presence - * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39) + * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) * #messages - * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39) + * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) * #persisted stats - * [returns a MessageTypes object](./spec/unit/models/stat_spec.rb#L17) - * [returns value for message counts](./spec/unit/models/stat_spec.rb#L21) - * [returns value for all data transferred](./spec/unit/models/stat_spec.rb#L25) - * [returns zero for empty values](./spec/unit/models/stat_spec.rb#L29) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L33) + * [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/stat_spec.rb#L39) + * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) * #presence - * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39) + * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) * #messages - * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39) + * [is a MessageCount object](./spec/unit/models/stats_spec.rb#L39) * #inbound stats - * [returns a MessageTraffic object](./spec/unit/models/stat_spec.rb#L59) - * [returns value for realtime message counts](./spec/unit/models/stat_spec.rb#L63) - * [returns value for all presence data](./spec/unit/models/stat_spec.rb#L67) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L71) + * [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/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #rest - * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #webhook - * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #all - * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #outbound stats - * [returns a MessageTraffic object](./spec/unit/models/stat_spec.rb#L59) - * [returns value for realtime message counts](./spec/unit/models/stat_spec.rb#L63) - * [returns value for all presence data](./spec/unit/models/stat_spec.rb#L67) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L71) + * [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/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #rest - * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #webhook - * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #all - * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77) + * [is a MessageTypes object](./spec/unit/models/stats_spec.rb#L77) * #connections stats - * [returns a ConnectionTypes object](./spec/unit/models/stat_spec.rb#L91) - * [returns value for tls opened counts](./spec/unit/models/stat_spec.rb#L95) - * [returns value for all peak connections](./spec/unit/models/stat_spec.rb#L99) - * [returns zero for empty values](./spec/unit/models/stat_spec.rb#L103) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L107) + * [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/stat_spec.rb#L113) + * [is a ResourceCount object](./spec/unit/models/stats_spec.rb#L113) * #plain - * [is a ResourceCount object](./spec/unit/models/stat_spec.rb#L113) + * [is a ResourceCount object](./spec/unit/models/stats_spec.rb#L113) * #all - * [is a ResourceCount object](./spec/unit/models/stat_spec.rb#L113) + * [is a ResourceCount object](./spec/unit/models/stats_spec.rb#L113) * #channels stats - * [returns a ResourceCount object](./spec/unit/models/stat_spec.rb#L126) - * [returns value for opened counts](./spec/unit/models/stat_spec.rb#L130) - * [returns value for peak channels](./spec/unit/models/stat_spec.rb#L134) - * [returns zero for empty values](./spec/unit/models/stat_spec.rb#L138) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L142) + * [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/stat_spec.rb#L148) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) * #peak - * [is a Integer object](./spec/unit/models/stat_spec.rb#L148) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) * #mean - * [is a Integer object](./spec/unit/models/stat_spec.rb#L148) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) * #min - * [is a Integer object](./spec/unit/models/stat_spec.rb#L148) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) * #refused - * [is a Integer object](./spec/unit/models/stat_spec.rb#L148) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L148) * #api_requests stats - * [returns a RequestCount object](./spec/unit/models/stat_spec.rb#L164) - * [returns value for succeeded](./spec/unit/models/stat_spec.rb#L168) - * [returns value for failed](./spec/unit/models/stat_spec.rb#L172) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L176) + * [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/stat_spec.rb#L182) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) * #failed - * [is a Integer object](./spec/unit/models/stat_spec.rb#L182) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) * #refused - * [is a Integer object](./spec/unit/models/stat_spec.rb#L182) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) * #token_requests stats - * [returns a RequestCount object](./spec/unit/models/stat_spec.rb#L164) - * [returns value for succeeded](./spec/unit/models/stat_spec.rb#L168) - * [returns value for failed](./spec/unit/models/stat_spec.rb#L172) - * [raises an exception for unknown attributes](./spec/unit/models/stat_spec.rb#L176) + * [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/stat_spec.rb#L182) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) * #failed - * [is a Integer object](./spec/unit/models/stat_spec.rb#L182) + * [is a Integer object](./spec/unit/models/stats_spec.rb#L182) * #refused - * [is a Integer object](./spec/unit/models/stat_spec.rb#L182) + * [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#L193) + * [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#L201) + * [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#L209) - * [converts time 2014-02-03:05:06 with granularity :day into 2014-02-03](./spec/unit/models/stat_spec.rb#L213) - * [converts time 2014-02-03:05:06 with granularity :hour into 2014-02-03:05](./spec/unit/models/stat_spec.rb#L217) - * [converts time 2014-02-03:05:06 with granularity :minute into 2014-02-03:05:06](./spec/unit/models/stat_spec.rb#L221) - * [fails with invalid granularity](./spec/unit/models/stat_spec.rb#L225) - * [fails with invalid time](./spec/unit/models/stat_spec.rb#L229) + * [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#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#L235) * #from_interval_id - * [converts a month interval_id 2014-02 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L242) - * [converts a day interval_id 2014-02-03 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L247) - * [converts an hour interval_id 2014-02-03:05 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L252) - * [converts a minute interval_id 2014-02-03:05:06 into a Time object in UTC 0](./spec/unit/models/stat_spec.rb#L257) - * [fails with an invalid interval_id 14-20](./spec/unit/models/stat_spec.rb#L262) + * [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#L268) - * [returns a :day interval_id for 2014-02-03](./spec/unit/models/stat_spec.rb#L272) - * [returns a :hour interval_id for 2014-02-03:05](./spec/unit/models/stat_spec.rb#L276) - * [returns a :minute interval_id for 2014-02-03:05:06](./spec/unit/models/stat_spec.rb#L280) - * [fails with an invalid interval_id 14-20](./spec/unit/models/stat_spec.rb#L284) + * [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) @@ -1749,53 +1796,50 @@ * [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_id + * 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) * client_id as only option * [requires a valid key](./spec/shared/client_initializer_behaviour.rb#L76) * with valid arguments * key only * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87) - * with legacy :api_key only - * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L94) - * [sets the Auth#key](./spec/shared/client_initializer_behaviour.rb#L98) - * key_id and key_secret - * [constructs an key](./spec/shared/client_initializer_behaviour.rb#L106) * with a string key instead of options hash - * [sets the key](./spec/shared/client_initializer_behaviour.rb#L114) - * [sets the key_id](./spec/shared/client_initializer_behaviour.rb#L118) - * [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L122) + * [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#L130) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L119) * with token - * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L138) + * [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#L144) + * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L141) * with environment option - * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L151) + * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L148) * tls - * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L170) + * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L167) * set to false - * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L161) - * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L165) + * [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#L177) - * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L181) + * [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#L189) + * [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#L207) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L211) + * [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#L221) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L226) + * [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) @@ -1929,53 +1973,50 @@ * [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_id + * 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) * client_id as only option * [requires a valid key](./spec/shared/client_initializer_behaviour.rb#L76) * with valid arguments * key only * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87) - * with legacy :api_key only - * [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L94) - * [sets the Auth#key](./spec/shared/client_initializer_behaviour.rb#L98) - * key_id and key_secret - * [constructs an key](./spec/shared/client_initializer_behaviour.rb#L106) * with a string key instead of options hash - * [sets the key](./spec/shared/client_initializer_behaviour.rb#L114) - * [sets the key_id](./spec/shared/client_initializer_behaviour.rb#L118) - * [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L122) + * [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#L130) + * [sets the token](./spec/shared/client_initializer_behaviour.rb#L119) * with token - * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L138) + * [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#L144) + * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L141) * with environment option - * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L151) + * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L148) * tls - * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L170) + * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L167) * set to false - * [uses plain text](./spec/shared/client_initializer_behaviour.rb#L161) - * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L165) + * [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#L177) - * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L181) + * [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#L189) + * [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#L207) - * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L211) + * [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#L221) - * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L226) + * [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 @@ -1983,11 +2024,11 @@ * 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 key * [fails as an key is required if not using token auth](./spec/unit/rest/client_spec.rb#L36) * set to true - * without an key or token_id + * 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) @@ -2025,8 +2066,8 @@ ------- ## Test summary - * Passing tests: 1011 + * Passing tests: 1028 * Pending tests: 7 * Failing tests: 0