SPEC.md in ably-0.7.5 vs SPEC.md in ably-0.7.6
- old
+ new
@@ -1,24 +1,29 @@
-# Ably Real-time & REST Client Library 0.7.3 Specification
+# Ably Realtime & REST Client Library 0.7.5 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,26 +107,26 @@
### 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
* [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
* [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)
@@ -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)
@@ -631,74 +641,80 @@
* [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)
+ * with client_id
+ * [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L357)
* before #authorise has been called
- * [has no current_token](./spec/acceptance/rest/auth_spec.rb#L334)
+ * [has no current_token](./spec/acceptance/rest/auth_spec.rb#L364)
* #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 thare are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L411)
* 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#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)
* 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)
+ * [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#L397)
- * [uses the token request returned from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L401)
+ * [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)
* for every subsequent #request_token
* without a provided block
- * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L407)
+ * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L437)
* 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 block and calls the new #request_token block](./spec/acceptance/rest/auth_spec.rb#L444)
* #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 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)
* 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#L473)
+ * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L478)
* with option :ttl
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459)
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489)
* with option :capability
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459)
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489)
* with option :nonce
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459)
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489)
* with option :timestamp
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459)
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489)
* with option :client_id
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L459)
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L489)
* with additional invalid attributes
- * [are ignored](./spec/acceptance/rest/auth_spec.rb#L467)
+ * [are ignored](./spec/acceptance/rest/auth_spec.rb#L497)
* 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#L508)
+ * [should raise an exception if key id is missing](./spec/acceptance/rest/auth_spec.rb#L512)
* 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#L521)
* 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#L531)
* signing
- * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L518)
+ * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L548)
* 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)
+ * [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)
* 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#L621)
* 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#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)
+ * 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)
### 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
@@ -727,11 +743,11 @@
### 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)
@@ -902,77 +918,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#L143)
* 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#L153)
* :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#L143)
* 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#L153)
* 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)
+ * 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#L236)
* #history
- * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L223)
+ * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L253)
* 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#L284)
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L288)
* #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#L308)
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L312)
### 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
@@ -1247,40 +1270,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,66 +1458,139 @@
* 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
+### Ably::Models::Stats
_(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)
+ * #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)
+ * #all
+ * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39)
+ * #presence
+ * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39)
+ * #messages
+ * [is a MessageCount object](./spec/unit/models/stat_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)
+ * #all
+ * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39)
+ * #presence
+ * [is a MessageCount object](./spec/unit/models/stat_spec.rb#L39)
+ * #messages
+ * [is a MessageCount object](./spec/unit/models/stat_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)
+ * #realtime
+ * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77)
+ * #rest
+ * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77)
+ * #webhook
+ * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77)
+ * #all
+ * [is a MessageTypes object](./spec/unit/models/stat_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)
+ * #realtime
+ * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77)
+ * #rest
+ * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77)
+ * #webhook
+ * [is a MessageTypes object](./spec/unit/models/stat_spec.rb#L77)
+ * #all
+ * [is a MessageTypes object](./spec/unit/models/stat_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)
+ * #tls
+ * [is a ResourceCount object](./spec/unit/models/stat_spec.rb#L113)
+ * #plain
+ * [is a ResourceCount object](./spec/unit/models/stat_spec.rb#L113)
+ * #all
+ * [is a ResourceCount object](./spec/unit/models/stat_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)
+ * #opened
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L148)
+ * #peak
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L148)
+ * #mean
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L148)
+ * #min
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L148)
+ * #refused
+ * [is a Integer object](./spec/unit/models/stat_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)
+ * #succeeded
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L182)
+ * #failed
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L182)
+ * #refused
+ * [is a Integer object](./spec/unit/models/stat_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)
+ * #succeeded
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L182)
+ * #failed
+ * [is a Integer object](./spec/unit/models/stat_spec.rb#L182)
+ * #refused
+ * [is a Integer object](./spec/unit/models/stat_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/stat_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/stat_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/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)
* 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/stat_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/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)
* #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/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)
### Ably::Models::Token
_(see [spec/unit/models/token_spec.rb](./spec/unit/models/token_spec.rb))_
* behaves like a model
* attributes
@@ -1646,54 +1745,57 @@
* 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_id
* [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)
+ * 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 api_key](./spec/shared/client_initializer_behaviour.rb#L95)
+ * [constructs an key](./spec/shared/client_initializer_behaviour.rb#L106)
* 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_secret](./spec/shared/client_initializer_behaviour.rb#L111)
+ * [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)
* with a string token key instead of options hash
- * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L119)
+ * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L130)
* with token
- * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L127)
+ * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L138)
* endpoint
- * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L133)
+ * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L144)
* with environment option
- * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L140)
+ * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L151)
* tls
- * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L159)
+ * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L170)
* 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#L161)
+ * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L165)
* 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#L177)
+ * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L181)
* 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#L189)
* 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#L207)
+ * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L211)
* 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#L221)
+ * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L226)
* 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 +1871,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 +1925,70 @@
* 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_id
* [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)
+ * 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 api_key](./spec/shared/client_initializer_behaviour.rb#L95)
+ * [constructs an key](./spec/shared/client_initializer_behaviour.rb#L106)
* 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_secret](./spec/shared/client_initializer_behaviour.rb#L111)
+ * [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)
* with a string token key instead of options hash
- * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L119)
+ * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L130)
* with token
- * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L127)
+ * [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L138)
* endpoint
- * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L133)
+ * [defaults to production](./spec/shared/client_initializer_behaviour.rb#L144)
* with environment option
- * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L140)
+ * [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L151)
* tls
- * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L159)
+ * [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L170)
* 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#L161)
+ * [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L165)
* 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#L177)
+ * [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L181)
* 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#L189)
* 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#L207)
+ * [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L211)
* 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#L221)
+ * [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L226)
* 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_id
+ * [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 +2025,8 @@
-------
## Test summary
- * Passing tests: 942
+ * Passing tests: 1011
* Pending tests: 7
* Failing tests: 0