ably-rest 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +5 -13
  2. data/CHANGELOG.md +45 -0
  3. data/LICENSE +15 -0
  4. data/README.md +14 -1
  5. data/lib/submodules/ably-ruby/CHANGELOG.md +45 -0
  6. data/lib/submodules/ably-ruby/LICENSE +15 -0
  7. data/lib/submodules/ably-ruby/README.md +18 -14
  8. data/lib/submodules/ably-ruby/SPEC.md +482 -336
  9. data/lib/submodules/ably-ruby/ably.gemspec +1 -1
  10. data/lib/submodules/ably-ruby/lib/ably.rb +1 -1
  11. data/lib/submodules/ably-ruby/lib/ably/exceptions.rb +4 -1
  12. data/lib/submodules/ably-ruby/lib/ably/models/{paginated_resource.rb → paginated_result.rb} +8 -8
  13. data/lib/submodules/ably-ruby/lib/ably/models/presence_message.rb +1 -1
  14. data/lib/submodules/ably-ruby/lib/ably/modules/conversions.rb +15 -0
  15. data/lib/submodules/ably-ruby/lib/ably/modules/encodeable.rb +2 -2
  16. data/lib/submodules/ably-ruby/lib/ably/modules/event_emitter.rb +8 -8
  17. data/lib/submodules/ably-ruby/lib/ably/modules/safe_deferrable.rb +15 -3
  18. data/lib/submodules/ably-ruby/lib/ably/modules/state_emitter.rb +2 -2
  19. data/lib/submodules/ably-ruby/lib/ably/modules/state_machine.rb +1 -1
  20. data/lib/submodules/ably-ruby/lib/ably/realtime/channel.rb +2 -4
  21. data/lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb +1 -1
  22. data/lib/submodules/ably-ruby/lib/ably/realtime/client.rb +4 -4
  23. data/lib/submodules/ably-ruby/lib/ably/realtime/client/incoming_message_dispatcher.rb +2 -2
  24. data/lib/submodules/ably-ruby/lib/ably/realtime/connection.rb +2 -2
  25. data/lib/submodules/ably-ruby/lib/ably/realtime/connection/connection_manager.rb +3 -3
  26. data/lib/submodules/ably-ruby/lib/ably/realtime/connection/connection_state_machine.rb +1 -1
  27. data/lib/submodules/ably-ruby/lib/ably/realtime/connection/websocket_transport.rb +2 -2
  28. data/lib/submodules/ably-ruby/lib/ably/realtime/presence.rb +23 -5
  29. data/lib/submodules/ably-ruby/lib/ably/realtime/presence/members_map.rb +16 -13
  30. data/lib/submodules/ably-ruby/lib/ably/rest/channel.rb +3 -2
  31. data/lib/submodules/ably-ruby/lib/ably/rest/client.rb +2 -2
  32. data/lib/submodules/ably-ruby/lib/ably/rest/presence.rb +4 -4
  33. data/lib/submodules/ably-ruby/lib/ably/util/pub_sub.rb +1 -1
  34. data/lib/submodules/ably-ruby/lib/ably/util/safe_deferrable.rb +1 -1
  35. data/lib/submodules/ably-ruby/lib/ably/version.rb +1 -1
  36. data/lib/submodules/ably-ruby/spec/acceptance/realtime/channel_history_spec.rb +1 -1
  37. data/lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb +5 -15
  38. data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_failures_spec.rb +2 -2
  39. data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_spec.rb +16 -14
  40. data/lib/submodules/ably-ruby/spec/acceptance/realtime/message_spec.rb +91 -8
  41. data/lib/submodules/ably-ruby/spec/acceptance/realtime/presence_spec.rb +190 -71
  42. data/lib/submodules/ably-ruby/spec/acceptance/realtime/stats_spec.rb +2 -2
  43. data/lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb +1 -1
  44. data/lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb +1 -1
  45. data/lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb +73 -1
  46. data/lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb +4 -2
  47. data/lib/submodules/ably-ruby/spec/unit/models/{paginated_resource_spec.rb → paginated_result_spec.rb} +18 -18
  48. data/lib/submodules/ably-ruby/spec/unit/modules/event_emitter_spec.rb +27 -27
  49. data/lib/submodules/ably-ruby/spec/unit/modules/state_emitter_spec.rb +1 -1
  50. data/lib/submodules/ably-ruby/spec/unit/realtime/channel_spec.rb +2 -2
  51. data/lib/submodules/ably-ruby/spec/unit/realtime/connection_spec.rb +3 -3
  52. data/lib/submodules/ably-ruby/spec/unit/realtime/presence_spec.rb +2 -2
  53. metadata +35 -33
  54. data/LICENSE.txt +0 -22
  55. data/lib/submodules/ably-ruby/LICENSE.txt +0 -22
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MDNkYTBjM2I5MTE0YWViNzdlYTM1NzJiZjM2YzBkYzBjOWRkMjFiNg==
5
- data.tar.gz: !binary |-
6
- M2Y1NTIxMzM1NmQ2NzllNjE5ZmJiOTMyMGQxYzA5MzBhYzEyZmEwNQ==
2
+ SHA1:
3
+ metadata.gz: ef2fa15604f31aba5f195c27fc770e8286e751ba
4
+ data.tar.gz: 6726fb25c2fd8fecfd120b763838105d213f0d9c
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZTc0ZjFlNGUzMmY4ZTAzOGE2MWY2N2EzMDMzYzVjMTUyMWFjZjUwYjE0ZTgx
10
- YzJhMjIwY2UyZmU5ZGI1MmM1ZTBhMDMzNjI4OGY2OGQyOGNjOTU3YmI5NTk1
11
- MzhmZTJiYTcyNjI3ZGJlYzk1ZWUyNjBkNTVlM2M4M2QwZGI0OGE=
12
- data.tar.gz: !binary |-
13
- MjVkZmM1YmExMjVmOTNmZmVlZjhkYTlmMDgwMjdjYTZhOGE2ZmE4OWQwMzhi
14
- YzZmZmVjNTJkYzBmOGYyYjYzM2ZjNTYwZDkwNDRmOTJiZjU4NDJiOTUzM2Y3
15
- YzEyNjcxOWIyYjRiNTM4MDUyODM0ZjExZGRlOGVhODNkNWQ4Njc=
6
+ metadata.gz: b5450fca1fe779000c26bce9360c70d3fce19369e7d06d75cb701613e16848922b3db3f8653a5e54748ff7142d03b8da5aab0908a2105832b3d5f951855aedb6
7
+ data.tar.gz: f762c928f040729a63c535c3a6ea17a0fa6af63877b1d7d7e0451c6fb55db66a2b40dcdf4d8110cb2defdcf8093921ce053b73b70a5295a6b0fc5c3f1fbbd9f3
@@ -0,0 +1,45 @@
1
+ # Change Log
2
+
3
+ **Merged pull requests:**
4
+
5
+ - Ensure files are required in a consistent order [\#51](https://github.com/ably/ably-ruby/pull/51) ([SimonWoolf](https://github.com/SimonWoolf))
6
+
7
+ ## [v0.8.2](https://github.com/ably/ably-ruby/tree/v0.8.2) (2015-05-20)
8
+
9
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v0.8.1...v0.8.2)
10
+
11
+ **Implemented enhancements:**
12
+
13
+ - Ensure Array object can be used in place of Hash for payload [\#44](https://github.com/ably/ably-ruby/issues/44)
14
+
15
+ - Change connect\_automatically option to auto\_connect for consistency [\#42](https://github.com/ably/ably-ruby/issues/42)
16
+
17
+ - Rename PaginatedResource to PaginatedResult for consistency [\#40](https://github.com/ably/ably-ruby/issues/40)
18
+
19
+ - EventEmitter should use `emit` not `trigger` to be consistent with other libs [\#31](https://github.com/ably/ably-ruby/issues/31)
20
+
21
+ - Add exceptions when data attribute for messages/presence is not String, Binary or JSON data [\#4](https://github.com/ably/ably-ruby/issues/4)
22
+
23
+ - Auth Callback and Auth URL should support tokens as well as token requests [\#2](https://github.com/ably/ably-ruby/issues/2)
24
+
25
+ **Closed issues:**
26
+
27
+ - Realtime Presence\#get does not wait by default [\#47](https://github.com/ably/ably-ruby/issues/47)
28
+
29
+ - No implicit attach when accessing channel.presence [\#45](https://github.com/ably/ably-ruby/issues/45)
30
+
31
+ **Merged pull requests:**
32
+
33
+ - Reject invalid payload type [\#48](https://github.com/ably/ably-ruby/pull/48) ([mattheworiordan](https://github.com/mattheworiordan))
34
+
35
+ ## [v0.8.1](https://github.com/ably/ably-ruby/tree/v0.8.1) (2015-04-23)
36
+
37
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v0.8.0...v0.8.1)
38
+
39
+ ## [v0.8.0](https://github.com/ably/ably-ruby/tree/v0.8.0) (2015-04-23)
40
+
41
+ [Initial implementation of client library specification 0.8](http://docs.ably.io/client-lib-development-guide/features/)
42
+
43
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.6...v0.8.0)
44
+
45
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ Copyright (c) 2015 Ably
2
+
3
+ Copyright 2015 Ably Real-time Ltd
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
data/README.md CHANGED
@@ -91,10 +91,23 @@ stats.first = #<Ably::Models::Stat ...>
91
91
  client.time #=> 2013-12-12 14:23:34 +0000
92
92
  ```
93
93
 
94
+ ## Support, feedback and troubleshooting
95
+
96
+ Please visit http://support.ably.io/ for access to our knowledgebase and to ask for any assistance.
97
+
98
+ You can also view the [community reported Github issues](https://github.com/ably/ably-ruby-rest/issues).
99
+
100
+ To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).
101
+
94
102
  ## Contributing
95
103
 
96
104
  1. Fork it
97
105
  2. Create your feature branch (`git checkout -b my-new-feature`)
98
106
  3. Commit your changes (`git commit -am 'Add some feature'`)
107
+ 4. Ensure you have added suitable tests and the test suite is passing(`bundle exec rspec`)
99
108
  4. Push to the branch (`git push origin my-new-feature`)
100
- 5. Create new Pull Request
109
+ 5. Create a new Pull Request
110
+
111
+ ## License
112
+
113
+ Copyright (c) 2015 Ably Real-time Ltd, Licensed under the Apache License, Version 2.0. Refer to [LICENSE](LICENSE) for the license terms.
@@ -0,0 +1,45 @@
1
+ # Change Log
2
+
3
+ **Merged pull requests:**
4
+
5
+ - Ensure files are required in a consistent order [\#51](https://github.com/ably/ably-ruby/pull/51) ([SimonWoolf](https://github.com/SimonWoolf))
6
+
7
+ ## [v0.8.2](https://github.com/ably/ably-ruby/tree/v0.8.2) (2015-05-20)
8
+
9
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v0.8.1...v0.8.2)
10
+
11
+ **Implemented enhancements:**
12
+
13
+ - Ensure Array object can be used in place of Hash for payload [\#44](https://github.com/ably/ably-ruby/issues/44)
14
+
15
+ - Change connect\_automatically option to auto\_connect for consistency [\#42](https://github.com/ably/ably-ruby/issues/42)
16
+
17
+ - Rename PaginatedResource to PaginatedResult for consistency [\#40](https://github.com/ably/ably-ruby/issues/40)
18
+
19
+ - EventEmitter should use `emit` not `trigger` to be consistent with other libs [\#31](https://github.com/ably/ably-ruby/issues/31)
20
+
21
+ - Add exceptions when data attribute for messages/presence is not String, Binary or JSON data [\#4](https://github.com/ably/ably-ruby/issues/4)
22
+
23
+ - Auth Callback and Auth URL should support tokens as well as token requests [\#2](https://github.com/ably/ably-ruby/issues/2)
24
+
25
+ **Closed issues:**
26
+
27
+ - Realtime Presence\#get does not wait by default [\#47](https://github.com/ably/ably-ruby/issues/47)
28
+
29
+ - No implicit attach when accessing channel.presence [\#45](https://github.com/ably/ably-ruby/issues/45)
30
+
31
+ **Merged pull requests:**
32
+
33
+ - Reject invalid payload type [\#48](https://github.com/ably/ably-ruby/pull/48) ([mattheworiordan](https://github.com/mattheworiordan))
34
+
35
+ ## [v0.8.1](https://github.com/ably/ably-ruby/tree/v0.8.1) (2015-04-23)
36
+
37
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v0.8.0...v0.8.1)
38
+
39
+ ## [v0.8.0](https://github.com/ably/ably-ruby/tree/v0.8.0) (2015-04-23)
40
+
41
+ [Initial implementation of client library specification 0.8](http://docs.ably.io/client-lib-development-guide/features/)
42
+
43
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.6...v0.8.0)
44
+
45
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
@@ -0,0 +1,15 @@
1
+ Copyright (c) 2015 Ably
2
+
3
+ Copyright 2015 Ably Real-time Ltd
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
@@ -103,11 +103,11 @@ channel.publish('greeting', 'Hello World!')
103
103
 
104
104
  ```ruby
105
105
  channel.history do |messages_page|
106
- messages_page #=> #<Ably::Models::PaginatedResource ...>
106
+ messages_page #=> #<Ably::Models::PaginatedResult ...>
107
107
  messages_page.items.first # #<Ably::Models::Message ...>
108
108
  messages_page.items.first.data # payload for the message
109
109
  messages_page.items.length # number of messages in the current page of history
110
- messages_page.next # retrieves the next page => #<Ably::Models::PaginatedResource ...>
110
+ messages_page.next # retrieves the next page => #<Ably::Models::PaginatedResult ...>
111
111
  messages_page.has_next? # false, there are more pages
112
112
  end
113
113
  ```
@@ -127,7 +127,7 @@ channel.presence.history do |presence_page|
127
127
  presence_page.items.first.action # Any of :enter, :update or :leave
128
128
  presence_page.items.first.client_id # client ID of member
129
129
  presence_page.items.first.data # optional data payload of member
130
- presence_page.next # retrieves the next page => #<Ably::Models::PaginatedResource ...>
130
+ presence_page.next # retrieves the next page => #<Ably::Models::PaginatedResult ...>
131
131
  end
132
132
  ```
133
133
 
@@ -153,30 +153,30 @@ channel.publish('myEvent', 'Hello!') #=> true
153
153
  ### Querying the History
154
154
 
155
155
  ```ruby
156
- messages_page = channel.history #=> #<Ably::Models::PaginatedResource ...>
156
+ messages_page = channel.history #=> #<Ably::Models::PaginatedResult ...>
157
157
  messages_page.items.first #=> #<Ably::Models::Message ...>
158
158
  messages_page.items.first.data # payload for the message
159
- messages_page.next # retrieves the next page => #<Ably::Models::PaginatedResource ...>
159
+ messages_page.next # retrieves the next page => #<Ably::Models::PaginatedResult ...>
160
160
  messages_page.has_next? # false, there are more pages
161
161
  ```
162
162
 
163
163
  ### Presence on a channel
164
164
 
165
165
  ```ruby
166
- members_page = channel.presence.get # => #<Ably::Models::PaginatedResource ...>
166
+ members_page = channel.presence.get # => #<Ably::Models::PaginatedResult ...>
167
167
  members_page.items.first # first member present in this page => #<Ably::Models::PresenceMessage ...>
168
168
  members_page.items.first.client_id # client ID of first member present
169
- members_page.next # retrieves the next page => #<Ably::Models::PaginatedResource ...>
169
+ members_page.next # retrieves the next page => #<Ably::Models::PaginatedResult ...>
170
170
  members_page.has_next? # false, there are more pages
171
171
  ```
172
172
 
173
173
  ### Querying the Presence History
174
174
 
175
175
  ```ruby
176
- presence_page = channel.presence.history #=> #<Ably::Models::PaginatedResource ...>
176
+ presence_page = channel.presence.history #=> #<Ably::Models::PaginatedResult ...>
177
177
  presence_page.items.first #=> #<Ably::Models::PresenceMessage ...>
178
178
  presence_page.items.first.client_id # client ID of first member
179
- presence_page.next # retrieves the next page => #<Ably::Models::PaginatedResource ...>
179
+ presence_page.next # retrieves the next page => #<Ably::Models::PaginatedResult ...>
180
180
  ```
181
181
 
182
182
  ### Generate Token and Token Request
@@ -200,9 +200,9 @@ token = client.auth.create_token_request
200
200
  ### Fetching your application's stats
201
201
 
202
202
  ```ruby
203
- stats_page = client.stats #=> #<Ably::Models::PaginatedResource ...>
203
+ stats_page = client.stats #=> #<Ably::Models::PaginatedResult ...>
204
204
  stats_page.items.first = #<Ably::Models::Stats ...>
205
- stats_page.next # retrieves the next page => #<Ably::Models::PaginatedResource ...>
205
+ stats_page.next # retrieves the next page => #<Ably::Models::PaginatedResult ...>
206
206
  ```
207
207
 
208
208
  ### Fetching the Ably service time
@@ -215,9 +215,13 @@ client.time #=> 2013-12-12 14:23:34 +0000
215
215
 
216
216
  If you only need to use the REST features of this library and do not want EventMachine as a dependency, then you should use the [Ably Ruby REST gem](https://rubygems.org/gems/ably-rest).
217
217
 
218
- ## Support and feedback
218
+ ## Support, feedback and troubleshooting
219
219
 
220
- Please visit https://support.ably.io/ for access to our knowledgebase and to ask for any assistance.
220
+ Please visit http://support.ably.io/ for access to our knowledgebase and to ask for any assistance.
221
+
222
+ You can also view the [community reported Github issues](https://github.com/ably/ably-ruby/issues).
223
+
224
+ To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).
221
225
 
222
226
  ## Contributing
223
227
 
@@ -230,4 +234,4 @@ Please visit https://support.ably.io/ for access to our knowledgebase and to ask
230
234
 
231
235
  ## License
232
236
 
233
- Copyright (c) 2015 Ably, Licensed under an MIT license. Refer to [LICENSE.txt](LICENSE.txt) for the license terms.
237
+ Copyright (c) 2015 Ably Real-time Ltd, Licensed under the Apache License, Version 2.0. Refer to [LICENSE](LICENSE) for the license terms.
@@ -1,4 +1,4 @@
1
- # Ably Realtime & REST Client Library 0.8.0 Specification
1
+ # Ably Realtime & REST Client Library 0.8.2 Specification
2
2
 
3
3
  ### Ably::Realtime::Channel#history
4
4
  _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_
@@ -27,82 +27,81 @@ _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realt
27
27
  _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_
28
28
  * using JSON and MsgPack protocol
29
29
  * initialization
30
- * with :connect_automatically option set to false on connection
30
+ * with :auto_connect option set to false on connection
31
31
  * [remains initialized when accessing a channel](./spec/acceptance/realtime/channel_spec.rb#L21)
32
32
  * [opens a connection implicitly on #attach](./spec/acceptance/realtime/channel_spec.rb#L29)
33
- * [opens a connection implicitly when accessing #presence](./spec/acceptance/realtime/channel_spec.rb#L36)
34
33
  * #attach
35
- * [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L49)
36
- * [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L59)
37
- * [attaches to a channel](./spec/acceptance/realtime/channel_spec.rb#L72)
38
- * [attaches to a channel and calls the provided block](./spec/acceptance/realtime/channel_spec.rb#L80)
39
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L87)
40
- * [calls the SafeDeferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L92)
34
+ * [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L39)
35
+ * [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L49)
36
+ * [attaches to a channel](./spec/acceptance/realtime/channel_spec.rb#L62)
37
+ * [attaches to a channel and calls the provided block](./spec/acceptance/realtime/channel_spec.rb#L70)
38
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L77)
39
+ * [calls the SafeDeferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L82)
41
40
  * when state is :failed
42
- * [reattaches](./spec/acceptance/realtime/channel_spec.rb#L103)
41
+ * [reattaches](./spec/acceptance/realtime/channel_spec.rb#L93)
43
42
  * when state is :detaching
44
- * [moves straight to attaching and skips detached](./spec/acceptance/realtime/channel_spec.rb#L116)
43
+ * [moves straight to attaching and skips detached](./spec/acceptance/realtime/channel_spec.rb#L106)
45
44
  * with many connections and many channels on each simultaneously
46
- * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L142)
45
+ * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L132)
47
46
  * failure as a result of insufficient key permissions
48
- * [triggers failed event](./spec/acceptance/realtime/channel_spec.rb#L165)
49
- * [calls the errback of the returned Deferrable](./spec/acceptance/realtime/channel_spec.rb#L174)
50
- * [triggers an error event](./spec/acceptance/realtime/channel_spec.rb#L182)
51
- * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L191)
47
+ * [emits failed event](./spec/acceptance/realtime/channel_spec.rb#L155)
48
+ * [calls the errback of the returned Deferrable](./spec/acceptance/realtime/channel_spec.rb#L164)
49
+ * [emits an error event](./spec/acceptance/realtime/channel_spec.rb#L172)
50
+ * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L181)
52
51
  * and subsequent authorisation with suitable permissions
53
- * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L200)
52
+ * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L190)
54
53
  * #detach
55
- * [detaches from a channel](./spec/acceptance/realtime/channel_spec.rb#L222)
56
- * [detaches from a channel and calls the provided block](./spec/acceptance/realtime/channel_spec.rb#L232)
57
- * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L241)
58
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L253)
59
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L260)
54
+ * [detaches from a channel](./spec/acceptance/realtime/channel_spec.rb#L212)
55
+ * [detaches from a channel and calls the provided block](./spec/acceptance/realtime/channel_spec.rb#L222)
56
+ * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L231)
57
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L243)
58
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L250)
60
59
  * when state is :failed
61
- * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L273)
60
+ * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L263)
62
61
  * when state is :attaching
63
- * [moves straight to :detaching state and skips :attached](./spec/acceptance/realtime/channel_spec.rb#L284)
62
+ * [moves straight to :detaching state and skips :attached](./spec/acceptance/realtime/channel_spec.rb#L274)
64
63
  * when state is :detaching
65
- * [ignores subsequent #detach calls but calls the callback if provided](./spec/acceptance/realtime/channel_spec.rb#L302)
64
+ * [ignores subsequent #detach calls but calls the callback if provided](./spec/acceptance/realtime/channel_spec.rb#L292)
66
65
  * channel recovery in :attaching state
67
66
  * the transport is disconnected before the ATTACHED protocol message is received
68
- * PENDING: *[attach times out and fails if not ATTACHED protocol message received](./spec/acceptance/realtime/channel_spec.rb#L321)*
69
- * PENDING: *[channel is ATTACHED if ATTACHED protocol message is later received](./spec/acceptance/realtime/channel_spec.rb#L322)*
70
- * PENDING: *[sends an ATTACH protocol message in response to a channel message being received on the attaching channel](./spec/acceptance/realtime/channel_spec.rb#L323)*
67
+ * PENDING: *[attach times out and fails if not ATTACHED protocol message received](./spec/acceptance/realtime/channel_spec.rb#L311)*
68
+ * PENDING: *[channel is ATTACHED if ATTACHED protocol message is later received](./spec/acceptance/realtime/channel_spec.rb#L312)*
69
+ * PENDING: *[sends an ATTACH protocol message in response to a channel message being received on the attaching channel](./spec/acceptance/realtime/channel_spec.rb#L313)*
71
70
  * #publish
72
71
  * when attached
73
- * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L329)
72
+ * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L319)
74
73
  * when not yet attached
75
- * [publishes queued messages once attached](./spec/acceptance/realtime/channel_spec.rb#L341)
76
- * [publishes queued messages within a single protocol message](./spec/acceptance/realtime/channel_spec.rb#L349)
74
+ * [publishes queued messages once attached](./spec/acceptance/realtime/channel_spec.rb#L331)
75
+ * [publishes queued messages within a single protocol message](./spec/acceptance/realtime/channel_spec.rb#L339)
77
76
  * #subscribe
78
77
  * with an event argument
79
- * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L372)
78
+ * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L362)
80
79
  * with no event argument
81
- * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L382)
80
+ * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L372)
82
81
  * many times with different event names
83
- * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L392)
82
+ * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L382)
84
83
  * #unsubscribe
85
84
  * with an event argument
86
- * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L415)
85
+ * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L405)
87
86
  * with no event argument
88
- * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L428)
87
+ * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L418)
89
88
  * when connection state changes to
90
89
  * :failed
91
90
  * an :attached channel
92
- * [transitions state to :failed](./spec/acceptance/realtime/channel_spec.rb#L451)
93
- * [triggers an error event on the channel](./spec/acceptance/realtime/channel_spec.rb#L461)
94
- * [updates the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L471)
91
+ * [transitions state to :failed](./spec/acceptance/realtime/channel_spec.rb#L441)
92
+ * [emits an error event on the channel](./spec/acceptance/realtime/channel_spec.rb#L451)
93
+ * [updates the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L461)
95
94
  * a :detached channel
96
- * [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L483)
95
+ * [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L473)
97
96
  * a :failed channel
98
- * [remains in the :failed state and ignores the failure error](./spec/acceptance/realtime/channel_spec.rb#L503)
97
+ * [remains in the :failed state and ignores the failure error](./spec/acceptance/realtime/channel_spec.rb#L493)
99
98
  * :closed
100
99
  * an :attached channel
101
- * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L526)
100
+ * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L516)
102
101
  * a :detached channel
103
- * [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L537)
102
+ * [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L527)
104
103
  * a :failed channel
105
- * [remains in the :failed state and retains the error_reason](./spec/acceptance/realtime/channel_spec.rb#L558)
104
+ * [remains in the :failed state and retains the error_reason](./spec/acceptance/realtime/channel_spec.rb#L548)
106
105
 
107
106
  ### Ably::Realtime::Client
108
107
  _(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/client_spec.rb))_
@@ -170,7 +169,7 @@ _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/r
170
169
  * when DISCONNECTED ProtocolMessage received from the server
171
170
  * [reconnects automatically and immediately](./spec/acceptance/realtime/connection_failures_spec.rb#L292)
172
171
  * and subsequently fails to reconnect
173
- * [retries every CONNECT_RETRY_CONFIG[:disconnected][:retry_every] seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L322)
172
+ * [retries every 15 seconds](./spec/acceptance/realtime/connection_failures_spec.rb#L322)
174
173
  * when websocket transport is closed
175
174
  * [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L365)
176
175
  * after successfully reconnecting and resuming
@@ -200,7 +199,7 @@ _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/c
200
199
  * using JSON and MsgPack protocol
201
200
  * intialization
202
201
  * [connects automatically](./spec/acceptance/realtime/connection_spec.rb#L23)
203
- * with :connect_automatically option set to false
202
+ * with :auto_connect option set to false
204
203
  * [does not connect automatically](./spec/acceptance/realtime/connection_spec.rb#L35)
205
204
  * [connects when method #connect is called](./spec/acceptance/realtime/connection_spec.rb#L43)
206
205
  * with token auth
@@ -231,9 +230,9 @@ _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/c
231
230
  * PENDING: *[transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L195)*
232
231
  * initialization state changes
233
232
  * with implicit #connect
234
- * [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L222)
233
+ * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L222)
235
234
  * with explicit #connect
236
- * [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L228)
235
+ * [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L228)
237
236
  * #connect
238
237
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L236)
239
238
  * [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L241)
@@ -276,127 +275,145 @@ _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/c
276
275
  * [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L508)
277
276
  * recovery
278
277
  * #recovery_key
279
- * [is composed of connection id and serial that is kept up to date with each message ACK received](./spec/acceptance/realtime/connection_spec.rb#L545)
280
- * [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#L566)
281
- * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L590)
278
+ * [is composed of connection key and serial that is kept up to date with each message ACK received](./spec/acceptance/realtime/connection_spec.rb#L545)
279
+ * [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#L568)
280
+ * [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L592)
282
281
  * opening a new connection using a recently disconnected connection's #recovery_key
283
282
  * connection#id and connection#key after recovery
284
- * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L604)
283
+ * [remains the same](./spec/acceptance/realtime/connection_spec.rb#L606)
285
284
  * when messages have been sent whilst the old connection is disconnected
286
285
  * the new connection
287
- * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L645)
286
+ * [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L647)
288
287
  * with :recover option
289
288
  * with invalid syntax
290
- * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L670)
289
+ * [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L672)
291
290
  * with invalid formatted value sent to server
292
- * [triggers a fatal error on the connection object, sets the #error_reason and disconnects](./spec/acceptance/realtime/connection_spec.rb#L679)
291
+ * [emits a fatal error on the connection object, sets the #error_reason and disconnects](./spec/acceptance/realtime/connection_spec.rb#L681)
293
292
  * with expired (missing) value sent to server
294
- * [triggers an error on the connection object, sets the #error_reason, yet will connect anyway](./spec/acceptance/realtime/connection_spec.rb#L694)
293
+ * [emits an error on the connection object, sets the #error_reason, yet will connect anyway](./spec/acceptance/realtime/connection_spec.rb#L696)
295
294
  * with many connections simultaneously
296
- * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L713)
295
+ * [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L715)
297
296
  * when a state transition is unsupported
298
- * [emits a StateChangeError](./spec/acceptance/realtime/connection_spec.rb#L733)
297
+ * [emits a StateChangeError](./spec/acceptance/realtime/connection_spec.rb#L735)
299
298
  * protocol failure
300
299
  * receiving an invalid ProtocolMessage
301
- * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L749)
300
+ * [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L751)
302
301
  * undocumented method
303
302
  * #internet_up?
304
- * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L765)
303
+ * [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L767)
305
304
  * internet up URL protocol
306
305
  * when using TLS for the connection
307
- * [uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L776)
306
+ * [uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L778)
308
307
  * when using a non-secured connection
309
- * [uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L786)
308
+ * [uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L788)
310
309
  * when the Internet is up
311
- * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L795)
312
- * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L802)
310
+ * [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L797)
311
+ * [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L804)
313
312
  * when the Internet is down
314
- * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L814)
315
- * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L821)
313
+ * [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L816)
314
+ * [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L823)
316
315
 
317
316
  ### Ably::Realtime::Channel Message
318
317
  _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/message_spec.rb))_
319
318
  * using JSON and MsgPack protocol
320
319
  * [sends a String data payload](./spec/acceptance/realtime/message_spec.rb#L25)
320
+ * with supported data payload content type
321
+ * JSON Object (Hash)
322
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/message_spec.rb#L48)
323
+ * JSON Array
324
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L56)
325
+ * String
326
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L64)
327
+ * Binary
328
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L72)
329
+ * with unsupported data payload content type
330
+ * Integer
331
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/message_spec.rb#L82)
332
+ * Float
333
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/message_spec.rb#L91)
334
+ * Boolean
335
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/message_spec.rb#L100)
336
+ * False
337
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/message_spec.rb#L109)
321
338
  * with ASCII_8BIT message name
322
- * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L37)
339
+ * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L118)
323
340
  * when the message publisher has a client_id
324
- * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L53)
341
+ * [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L134)
325
342
  * #connection_id attribute
326
343
  * over realtime
327
- * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L66)
344
+ * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L147)
328
345
  * when retrieved over REST
329
- * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L78)
346
+ * [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L159)
330
347
  * local echo when published
331
- * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L90)
348
+ * [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L171)
332
349
  * with :echo_messages option set to false
333
- * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L106)
350
+ * [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L187)
334
351
  * publishing lots of messages across two connections
335
- * [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)
352
+ * [sends and receives the messages on both opened connections and calls the success callbacks for each message published](./spec/acceptance/realtime/message_spec.rb#L219)
336
353
  * without suitable publishing permissions
337
- * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L183)
354
+ * [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L264)
338
355
  * server incorrectly resends a message that was already received by the client library
339
- * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L203)
356
+ * [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L284)
340
357
  * encoding and decoding encrypted messages
341
358
  * with AES-128-CBC using crypto-data-128.json fixtures
342
359
  * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
343
360
  * behaves like an Ably encrypter and decrypter
344
361
  * with #publish and #subscribe
345
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
346
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
362
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
363
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
347
364
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
348
365
  * behaves like an Ably encrypter and decrypter
349
366
  * with #publish and #subscribe
350
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
351
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
367
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
368
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
352
369
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
353
370
  * behaves like an Ably encrypter and decrypter
354
371
  * with #publish and #subscribe
355
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
356
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
372
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
373
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
357
374
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
358
375
  * behaves like an Ably encrypter and decrypter
359
376
  * with #publish and #subscribe
360
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
361
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
377
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
378
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
362
379
  * with AES-256-CBC using crypto-data-256.json fixtures
363
380
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
364
381
  * behaves like an Ably encrypter and decrypter
365
382
  * with #publish and #subscribe
366
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
367
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
383
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
384
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
368
385
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
369
386
  * behaves like an Ably encrypter and decrypter
370
387
  * with #publish and #subscribe
371
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
372
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
388
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
389
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
373
390
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
374
391
  * behaves like an Ably encrypter and decrypter
375
392
  * with #publish and #subscribe
376
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
377
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
393
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
394
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
378
395
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
379
396
  * behaves like an Ably encrypter and decrypter
380
397
  * with #publish and #subscribe
381
- * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L267)
382
- * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L285)
398
+ * [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L348)
399
+ * [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L366)
383
400
  * with multiple sends from one client to another
384
- * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L324)
401
+ * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L405)
385
402
  * subscribing with a different transport protocol
386
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L367)
387
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L367)
388
- * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L367)
403
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L448)
404
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L448)
405
+ * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L448)
389
406
  * publishing on an unencrypted channel and subscribing on an encrypted channel with another client
390
- * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L386)
407
+ * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L467)
391
408
  * publishing on an encrypted channel and subscribing on an unencrypted channel with another client
392
- * [delivers the message but still encrypted with a value in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L404)
393
- * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L413)
409
+ * [delivers the message but still encrypted with a value in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L485)
410
+ * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L494)
394
411
  * publishing on an encrypted channel and subscribing with a different algorithm on another client
395
- * [delivers the message but still encrypted with the cipher detials in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L435)
396
- * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L444)
412
+ * [delivers the message but still encrypted with the cipher detials in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L516)
413
+ * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L525)
397
414
  * publishing on an encrypted channel and subscribing with a different key on another client
398
- * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L466)
399
- * [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L475)
415
+ * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L547)
416
+ * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L558)
400
417
 
401
418
  ### Ably::Realtime::Presence history
402
419
  _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_
@@ -413,182 +430,293 @@ _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/real
413
430
  _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_
414
431
  * using JSON and MsgPack protocol
415
432
  * when attached (but not present) on a presence channel with an anonymous client (no client ID)
416
- * [maintains state as other clients enter and leave the channel](./spec/acceptance/realtime/presence_spec.rb#L118)
433
+ * [maintains state as other clients enter and leave the channel](./spec/acceptance/realtime/presence_spec.rb#L219)
417
434
  * #sync_complete?
418
435
  * when attaching to a channel without any members present
419
- * [is true and the presence channel is considered synced immediately](./spec/acceptance/realtime/presence_spec.rb#L190)
436
+ * [is true and the presence channel is considered synced immediately](./spec/acceptance/realtime/presence_spec.rb#L295)
420
437
  * when attaching to a channel with members present
421
- * [is false and the presence channel will subsequently be synced](./spec/acceptance/realtime/presence_spec.rb#L199)
438
+ * [is false and the presence channel will subsequently be synced](./spec/acceptance/realtime/presence_spec.rb#L304)
422
439
  * 250 existing (present) members on a channel (3 SYNC pages)
423
440
  * requires at least 3 SYNC ProtocolMessages
424
441
  * when a client attaches to the presence channel
425
- * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L231)
442
+ * [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L336)
426
443
  * and a member leaves before the SYNC operation is complete
427
- * [emits :leave immediately as the member leaves](./spec/acceptance/realtime/presence_spec.rb#L245)
428
- * [ignores presence events with timestamps prior to the current :present event in the MembersMap](./spec/acceptance/realtime/presence_spec.rb#L283)
429
- * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get](./spec/acceptance/realtime/presence_spec.rb#L322)
444
+ * [emits :leave immediately as the member leaves](./spec/acceptance/realtime/presence_spec.rb#L350)
445
+ * [ignores presence events with timestamps prior to the current :present event in the MembersMap](./spec/acceptance/realtime/presence_spec.rb#L388)
446
+ * [does not emit :present after the :leave event has been emitted, and that member is not included in the list of members via #get with :wait_for_sync](./spec/acceptance/realtime/presence_spec.rb#L427)
430
447
  * #get
431
- * [waits until sync is complete](./spec/acceptance/realtime/presence_spec.rb#L368)
432
- * automatic attachment of channel on access to presence object
433
- * [is implicit if presence state is initialized](./spec/acceptance/realtime/presence_spec.rb#L388)
434
- * [is disabled if presence state is not initialized](./spec/acceptance/realtime/presence_spec.rb#L396)
448
+ * with :wait_for_sync option set to true
449
+ * [waits until sync is complete](./spec/acceptance/realtime/presence_spec.rb#L474)
450
+ * by default
451
+ * [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L491)
435
452
  * state
436
453
  * once opened
437
- * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L413)
454
+ * [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L515)
438
455
  * #enter
439
- * [allows client_id to be set on enter for anonymous clients](./spec/acceptance/realtime/presence_spec.rb#L436)
440
- * [raises an exception if client_id is not set](./spec/acceptance/realtime/presence_spec.rb#L483)
456
+ * [allows client_id to be set on enter for anonymous clients](./spec/acceptance/realtime/presence_spec.rb#L538)
457
+ * [raises an exception if client_id is not set](./spec/acceptance/realtime/presence_spec.rb#L585)
441
458
  * data attribute
442
459
  * when provided as argument option to #enter
443
- * [remains intact following #leave](./spec/acceptance/realtime/presence_spec.rb#L447)
460
+ * [remains intact following #leave](./spec/acceptance/realtime/presence_spec.rb#L549)
444
461
  * message #connection_id
445
- * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L471)
462
+ * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L573)
446
463
  * without necessary capabilities to join presence
447
- * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L495)
464
+ * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L597)
448
465
  * it should behave like a public presence method
449
466
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
450
467
  * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
451
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L56)
452
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L63)
453
- * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L73)
468
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L157)
469
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L164)
470
+ * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L174)
471
+ * with supported data payload content type
472
+ * JSON Object (Hash)
473
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L73)
474
+ * JSON Array
475
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L83)
476
+ * String
477
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L93)
478
+ * Binary
479
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L103)
480
+ * with unsupported data payload content type
481
+ * Integer
482
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L123)
483
+ * Float
484
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L132)
485
+ * Boolean
486
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L141)
487
+ * False
488
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L150)
454
489
  * if connection fails before success
455
- * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L94)
490
+ * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L195)
456
491
  * #update
457
- * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L507)
458
- * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L532)
459
- * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L542)
492
+ * [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L609)
493
+ * [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L634)
494
+ * [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L644)
460
495
  * when ENTERED
461
- * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L517)
496
+ * [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L619)
462
497
  * it should behave like a public presence method
463
498
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
464
499
  * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
465
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L56)
466
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L63)
467
- * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L73)
500
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L157)
501
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L164)
502
+ * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L174)
503
+ * with supported data payload content type
504
+ * JSON Object (Hash)
505
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L73)
506
+ * JSON Array
507
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L83)
508
+ * String
509
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L93)
510
+ * Binary
511
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L103)
512
+ * with unsupported data payload content type
513
+ * Integer
514
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L123)
515
+ * Float
516
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L132)
517
+ * Boolean
518
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L141)
519
+ * False
520
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L150)
468
521
  * if connection fails before success
469
- * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L94)
522
+ * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L195)
470
523
  * #leave
471
- * [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L600)
524
+ * [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L718)
472
525
  * :data option
473
526
  * when set to a string
474
- * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L561)
527
+ * [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L663)
475
528
  * when set to nil
476
- * [emits the previously defined value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L574)
529
+ * [emits a nil value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L676)
477
530
  * when not passed as an argument
478
- * [emits the previously defined value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L587)
531
+ * [emits the previously defined value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L689)
532
+ * and sync is complete
533
+ * [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L702)
479
534
  * it should behave like a public presence method
480
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L56)
481
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L63)
482
- * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L73)
535
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L157)
536
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L164)
537
+ * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L174)
538
+ * with supported data payload content type
539
+ * JSON Object (Hash)
540
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L73)
541
+ * JSON Array
542
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L83)
543
+ * String
544
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L93)
545
+ * Binary
546
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L103)
547
+ * with unsupported data payload content type
548
+ * Integer
549
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L123)
550
+ * Float
551
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L132)
552
+ * Boolean
553
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L141)
554
+ * False
555
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L150)
483
556
  * if connection fails before success
484
- * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L94)
557
+ * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L195)
485
558
  * :left event
486
- * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L609)
487
- * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L620)
559
+ * [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L727)
560
+ * [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L738)
488
561
  * entering/updating/leaving presence state on behalf of another client_id
489
562
  * #enter_client
490
563
  * multiple times on the same channel with different client_ids
491
- * [has no affect on the client's presence state and only enters on behalf of the provided client_id](./spec/acceptance/realtime/presence_spec.rb#L641)
492
- * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L655)
564
+ * [has no affect on the client's presence state and only enters on behalf of the provided client_id](./spec/acceptance/realtime/presence_spec.rb#L759)
565
+ * [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L773)
493
566
  * message #connection_id
494
- * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L674)
567
+ * [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L792)
495
568
  * it should behave like a public presence method
496
569
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
497
570
  * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
498
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L56)
499
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L63)
500
- * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L73)
571
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L157)
572
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L164)
573
+ * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L174)
574
+ * with supported data payload content type
575
+ * JSON Object (Hash)
576
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L73)
577
+ * JSON Array
578
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L83)
579
+ * String
580
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L93)
581
+ * Binary
582
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L103)
583
+ * with unsupported data payload content type
584
+ * Integer
585
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L123)
586
+ * Float
587
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L132)
588
+ * Boolean
589
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L141)
590
+ * False
591
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L150)
501
592
  * if connection fails before success
502
- * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L94)
593
+ * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L195)
503
594
  * without necessary capabilities to enter on behalf of another client
504
- * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L696)
595
+ * [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L814)
505
596
  * #update_client
506
597
  * multiple times on the same channel with different client_ids
507
- * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L707)
508
- * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L731)
509
- * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L743)
598
+ * [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L825)
599
+ * [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L849)
600
+ * [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L861)
510
601
  * it should behave like a public presence method
511
602
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
512
603
  * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
513
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L56)
514
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L63)
515
- * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L73)
604
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L157)
605
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L164)
606
+ * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L174)
607
+ * with supported data payload content type
608
+ * JSON Object (Hash)
609
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L73)
610
+ * JSON Array
611
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L83)
612
+ * String
613
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L93)
614
+ * Binary
615
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L103)
616
+ * with unsupported data payload content type
617
+ * Integer
618
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L123)
619
+ * Float
620
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L132)
621
+ * Boolean
622
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L141)
623
+ * False
624
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L150)
516
625
  * if connection fails before success
517
- * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L94)
626
+ * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L195)
518
627
  * #leave_client
519
628
  * leaves a channel
520
629
  * multiple times on the same channel with different client_ids
521
- * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L772)
522
- * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L796)
630
+ * [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L890)
631
+ * [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L914)
523
632
  * with a new value in :data option
524
- * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L820)
633
+ * [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L938)
525
634
  * with a nil value in :data option
526
- * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L833)
635
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L951)
527
636
  * with no :data option
528
- * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L846)
637
+ * [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L964)
529
638
  * it should behave like a public presence method
530
639
  * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
531
640
  * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
532
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L56)
533
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L63)
534
- * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L73)
641
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L157)
642
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L164)
643
+ * [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L174)
644
+ * with supported data payload content type
645
+ * JSON Object (Hash)
646
+ * [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L73)
647
+ * JSON Array
648
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L83)
649
+ * String
650
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L93)
651
+ * Binary
652
+ * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L103)
653
+ * with unsupported data payload content type
654
+ * Integer
655
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L123)
656
+ * Float
657
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L132)
658
+ * Boolean
659
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L141)
660
+ * False
661
+ * [raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L150)
535
662
  * if connection fails before success
536
- * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L94)
663
+ * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L195)
537
664
  * #get
538
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L864)
539
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L869)
540
- * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L876)
541
- * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L884)
542
- * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L884)
543
- * [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#L959)
544
- * [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L974)
545
- * [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L996)
546
- * [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#L1020)
665
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L982)
666
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L987)
667
+ * [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L994)
668
+ * [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L1002)
669
+ * [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L1002)
670
+ * [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#L1079)
671
+ * [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L1094)
672
+ * [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L1116)
673
+ * [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#L1140)
547
674
  * during a sync
548
- * [fails if the connection fails](./spec/acceptance/realtime/presence_spec.rb#L914)
549
- * [fails if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L934)
675
+ * when :wait_for_sync is true
676
+ * [fails if the connection fails](./spec/acceptance/realtime/presence_spec.rb#L1033)
677
+ * [fails if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L1053)
550
678
  * when a member enters and then leaves
551
- * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1030)
679
+ * [has no members](./spec/acceptance/realtime/presence_spec.rb#L1150)
552
680
  * with lots of members on different clients
553
- * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1047)
681
+ * [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1167)
554
682
  * #subscribe
555
683
  * with no arguments
556
- * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1083)
684
+ * [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1203)
557
685
  * #unsubscribe
558
686
  * with no arguments
559
- * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1105)
687
+ * [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1225)
560
688
  * REST #get
561
- * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1124)
562
- * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1137)
689
+ * [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1244)
690
+ * [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1257)
563
691
  * client_id with ASCII_8BIT
564
692
  * in connection set up
565
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1154)
693
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1274)
566
694
  * in channel options
567
- * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1167)
695
+ * [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1287)
568
696
  * encoding and decoding of presence message data
569
- * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L1191)
697
+ * [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L1311)
570
698
  * #subscribe
571
- * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L1210)
572
- * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L1222)
573
- * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L1236)
699
+ * [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L1330)
700
+ * [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L1342)
701
+ * [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L1356)
574
702
  * #get
575
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L1252)
703
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L1372)
576
704
  * REST #get
577
- * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L1265)
705
+ * [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L1385)
578
706
  * when cipher settings do not match publisher
579
- * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L1280)
580
- * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L1293)
707
+ * [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L1400)
708
+ * [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L1413)
581
709
  * leaving
582
- * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L1310)
583
- * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L1320)
710
+ * [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L1430)
711
+ * [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L1440)
584
712
  * connection failure mid-way through a large member sync
585
- * PENDING: *[resumes the SYNC operation](./spec/acceptance/realtime/presence_spec.rb#L1339)*
713
+ * [resumes the SYNC operation](./spec/acceptance/realtime/presence_spec.rb#L1458)
586
714
 
587
715
  ### Ably::Realtime::Client#stats
588
716
  _(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_
589
717
  * using JSON and MsgPack protocol
590
718
  * fetching stats
591
- * [should return a PaginatedResource](./spec/acceptance/realtime/stats_spec.rb#L10)
719
+ * [should return a PaginatedResult](./spec/acceptance/realtime/stats_spec.rb#L10)
592
720
  * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/stats_spec.rb#L17)
593
721
 
594
722
  ### Ably::Realtime::Client#time
@@ -605,116 +733,116 @@ _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
605
733
  * #request_token
606
734
  * [returns a valid requested token in the expected format with valid issued and expires attributes](./spec/acceptance/rest/auth_spec.rb#L69)
607
735
  * with option :client_id
608
- * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100)
736
+ * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L101)
609
737
  * with option :capability
610
- * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100)
738
+ * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L101)
611
739
  * with option :nonce
612
- * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100)
740
+ * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L101)
613
741
  * with option :timestamp
614
- * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100)
742
+ * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L101)
615
743
  * with option :ttl
616
- * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L100)
744
+ * [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L101)
617
745
  * with :key option
618
- * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L129)
746
+ * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L130)
619
747
  * with :key_name & :key_secret options
620
- * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L158)
748
+ * [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L159)
621
749
  * with :query_time option
622
- * [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L166)
750
+ * [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L167)
623
751
  * without :query_time option
624
- * [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#L175)
752
+ * [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#L176)
625
753
  * with :auth_url option
626
754
  * when response from :auth_url is a valid token request
627
- * [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L223)
628
- * [returns a valid token generated from the token request](./spec/acceptance/rest/auth_spec.rb#L228)
755
+ * [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L224)
756
+ * [returns a valid token generated from the token request](./spec/acceptance/rest/auth_spec.rb#L229)
629
757
  * with :query_params
630
- * [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L235)
758
+ * [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L236)
631
759
  * with :headers
632
- * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L243)
760
+ * [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L244)
633
761
  * with POST
634
- * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L251)
762
+ * [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L252)
635
763
  * when response from :auth_url is a token details object
636
- * [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L276)
764
+ * [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L277)
637
765
  * when response from :auth_url is text/plain content type and a token string
638
- * [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L293)
766
+ * [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L294)
639
767
  * when response is invalid
640
768
  * 500
641
- * [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L306)
769
+ * [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L307)
642
770
  * XML
643
- * [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L317)
771
+ * [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L318)
644
772
  * with a Proc for the :auth_callback option
645
773
  * that returns a TokenRequest
646
- * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L336)
647
- * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L341)
774
+ * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L337)
775
+ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L342)
648
776
  * that returns a TokenDetails JSON object
649
- * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L370)
650
- * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L375)
777
+ * [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L371)
778
+ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L376)
651
779
  * that returns a TokenDetails object
652
- * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L396)
780
+ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L397)
653
781
  * that returns a Token string
654
- * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L412)
782
+ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L413)
655
783
  * with client_id
656
- * [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L444)
784
+ * [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L445)
657
785
  * before #authorise has been called
658
- * [has no current_token_details](./spec/acceptance/rest/auth_spec.rb#L451)
786
+ * [has no current_token_details](./spec/acceptance/rest/auth_spec.rb#L452)
659
787
  * #authorise
660
- * [updates the persisted auth options that are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L498)
788
+ * [updates the persisted auth options that are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L499)
661
789
  * when called for the first time since the client has been instantiated
662
- * [passes all options to #request_token](./spec/acceptance/rest/auth_spec.rb#L462)
663
- * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L467)
664
- * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L471)
790
+ * [passes all options to #request_token](./spec/acceptance/rest/auth_spec.rb#L463)
791
+ * [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L468)
792
+ * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L472)
665
793
  * with previous authorisation
666
- * [does not request a token if current_token_details has not expired](./spec/acceptance/rest/auth_spec.rb#L482)
667
- * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L487)
668
- * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L493)
794
+ * [does not request a token if current_token_details has not expired](./spec/acceptance/rest/auth_spec.rb#L483)
795
+ * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L488)
796
+ * [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L494)
669
797
  * with a Proc for the :auth_callback option
670
- * [calls the Proc](./spec/acceptance/rest/auth_spec.rb#L514)
671
- * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L518)
798
+ * [calls the Proc](./spec/acceptance/rest/auth_spec.rb#L515)
799
+ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L519)
672
800
  * for every subsequent #request_token
673
801
  * without a :auth_callback Proc
674
- * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L524)
802
+ * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L525)
675
803
  * with a provided block
676
- * [does not call the originally provided Proc and calls the new #request_token :auth_callback Proc](./spec/acceptance/rest/auth_spec.rb#L531)
804
+ * [does not call the originally provided Proc and calls the new #request_token :auth_callback Proc](./spec/acceptance/rest/auth_spec.rb#L532)
677
805
  * #create_token_request
678
- * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L547)
679
- * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L551)
680
- * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L555)
806
+ * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L548)
807
+ * [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L552)
808
+ * [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L556)
681
809
  * the nonce
682
- * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L560)
683
- * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L565)
810
+ * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L561)
811
+ * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L566)
684
812
  * with option :ttl
685
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576)
813
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L577)
686
814
  * with option :nonce
687
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576)
815
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L577)
688
816
  * with option :client_id
689
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L576)
817
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L577)
690
818
  * with additional invalid attributes
691
- * [are ignored](./spec/acceptance/rest/auth_spec.rb#L584)
819
+ * [are ignored](./spec/acceptance/rest/auth_spec.rb#L585)
692
820
  * when required fields are missing
693
- * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L595)
694
- * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L599)
821
+ * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L596)
822
+ * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L600)
695
823
  * with :query_time option
696
- * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L608)
824
+ * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L609)
697
825
  * with :timestamp option
698
- * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L618)
826
+ * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L619)
699
827
  * signing
700
- * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L640)
828
+ * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L641)
701
829
  * using token authentication
702
830
  * with :token option
703
- * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L663)
704
- * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L667)
705
- * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L675)
706
- * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L683)
831
+ * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L664)
832
+ * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L668)
833
+ * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L676)
834
+ * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L684)
707
835
  * when implicit as a result of using :client id
708
836
  * and requests to the Ably server are mocked
709
- * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L711)
837
+ * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L712)
710
838
  * a token is created
711
- * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L720)
712
- * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L724)
713
- * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L728)
839
+ * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L721)
840
+ * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L725)
841
+ * [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L729)
714
842
  * when using an :key and basic auth
715
- * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L743)
716
- * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L747)
717
- * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L751)
843
+ * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L744)
844
+ * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L748)
845
+ * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L752)
718
846
 
719
847
  ### Ably::Rest
720
848
  _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
@@ -747,10 +875,10 @@ _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
747
875
  _(see [spec/acceptance/rest/channel_spec.rb](./spec/acceptance/rest/channel_spec.rb))_
748
876
  * using JSON and MsgPack protocol
749
877
  * #publish
750
- * [should publish the message and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L17)
878
+ * FAILED: ~~[should publish the message and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L17)~~
751
879
  * #history
752
880
  * [should return the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L39)
753
- * [should return paged history using the PaginatedResource model](./spec/acceptance/rest/channel_spec.rb#L67)
881
+ * [should return paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L67)
754
882
  * message timestamps
755
883
  * [should all be after the messages were published](./spec/acceptance/rest/channel_spec.rb#L52)
756
884
  * message IDs
@@ -854,7 +982,7 @@ _(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_sp
854
982
  * with UTF-8 data
855
983
  * [applies utf-8, cipher and base64 encodings and sets the encoding attribute to "utf-8/cipher+aes-128-cbc/base64"](./spec/acceptance/rest/encoders_spec.rb#L154)
856
984
  * with binary data
857
- * [applies cipher and base64 encoding and sets the encoding attribute to "utf-8/cipher+aes-128-cbc/base64"](./spec/acceptance/rest/encoders_spec.rb#L165)
985
+ * [applies cipher and base64 encoding and sets the encoding attribute to "cipher+aes-128-cbc/base64"](./spec/acceptance/rest/encoders_spec.rb#L165)
858
986
  * with JSON data
859
987
  * [applies json, utf-8, cipher and base64 encoding and sets the encoding attribute to "json/utf-8/cipher+aes-128-cbc/base64"](./spec/acceptance/rest/encoders_spec.rb#L176)
860
988
 
@@ -863,59 +991,77 @@ _(see [spec/acceptance/rest/message_spec.rb](./spec/acceptance/rest/message_spec
863
991
  * using JSON and MsgPack protocol
864
992
  * publishing with an ASCII_8BIT message name
865
993
  * [is converted into UTF_8](./spec/acceptance/rest/message_spec.rb#L18)
994
+ * with supported data payload content type
995
+ * JSON Object (Hash)
996
+ * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L30)
997
+ * JSON Array
998
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L39)
999
+ * String
1000
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L48)
1001
+ * Binary
1002
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L57)
1003
+ * with unsupported data payload content type
1004
+ * Integer
1005
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/rest/message_spec.rb#L68)
1006
+ * Float
1007
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/rest/message_spec.rb#L76)
1008
+ * Boolean
1009
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/rest/message_spec.rb#L84)
1010
+ * False
1011
+ * [is raises an UnsupportedDataTypeError 40011 exception](./spec/acceptance/rest/message_spec.rb#L92)
866
1012
  * encryption and encoding
867
1013
  * with #publish and #history
868
1014
  * with AES-128-CBC using crypto-data-128.json fixtures
869
1015
  * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
870
1016
  * behaves like an Ably encrypter and decrypter
871
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
872
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1017
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1018
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
873
1019
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
874
1020
  * behaves like an Ably encrypter and decrypter
875
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
876
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1021
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1022
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
877
1023
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
878
1024
  * behaves like an Ably encrypter and decrypter
879
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
880
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1025
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1026
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
881
1027
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
882
1028
  * behaves like an Ably encrypter and decrypter
883
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
884
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1029
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1030
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
885
1031
  * with AES-256-CBC using crypto-data-256.json fixtures
886
1032
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
887
1033
  * behaves like an Ably encrypter and decrypter
888
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
889
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1034
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1035
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
890
1036
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
891
1037
  * behaves like an Ably encrypter and decrypter
892
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
893
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1038
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1039
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
894
1040
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
895
1041
  * behaves like an Ably encrypter and decrypter
896
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
897
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1042
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1043
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
898
1044
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
899
1045
  * behaves like an Ably encrypter and decrypter
900
- * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
901
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
1046
+ * [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L137)
1047
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L152)
902
1048
  * when publishing lots of messages
903
- * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L113)
1049
+ * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L185)
904
1050
  * when retrieving #history with a different protocol
905
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L140)
906
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L140)
907
- * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L140)
1051
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L212)
1052
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L212)
1053
+ * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L212)
908
1054
  * when publishing on an unencrypted channel and retrieving with #history on an encrypted channel
909
- * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L156)
1055
+ * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L228)
910
1056
  * when publishing on an encrypted channel and retrieving with #history on an unencrypted channel
911
- * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L177)
912
- * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L183)
1057
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L249)
1058
+ * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L255)
913
1059
  * publishing on an encrypted channel and retrieving #history with a different algorithm on another client
914
- * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L204)
915
- * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L210)
1060
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L276)
1061
+ * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L282)
916
1062
  * publishing on an encrypted channel and subscribing with a different key on another client
917
- * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L231)
918
- * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L237)
1063
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L303)
1064
+ * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L309)
919
1065
 
920
1066
  ### Ably::Rest::Presence
921
1067
  _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_
@@ -926,43 +1072,43 @@ _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_sp
926
1072
  * with :limit option
927
1073
  * [returns a paged response limiting number of members per page](./spec/acceptance/rest/presence_spec.rb#L55)
928
1074
  * #history
929
- * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L67)
1075
+ * [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L69)
930
1076
  * with options
931
1077
  * direction: :forwards
932
- * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L83)
1078
+ * [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L85)
933
1079
  * direction: :backwards
934
- * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L98)
1080
+ * [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L100)
935
1081
  * #history
936
1082
  * with time range options
937
1083
  * :start
938
1084
  * with milliseconds since epoch value
939
- * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L150)
1085
+ * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L152)
940
1086
  * with Time object value
941
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L160)
1087
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L162)
942
1088
  * :end
943
1089
  * with milliseconds since epoch value
944
- * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L150)
1090
+ * [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L152)
945
1091
  * with Time object value
946
- * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L160)
1092
+ * [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L162)
947
1093
  * decoding
948
1094
  * with encoded fixture data
949
1095
  * #history
950
- * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L180)
1096
+ * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L182)
951
1097
  * #get
952
- * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L187)
1098
+ * [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L189)
953
1099
  * decoding permutations using mocked #history
954
1100
  * valid decodeable content
955
1101
  * #get
956
- * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L243)
1102
+ * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L245)
957
1103
  * #history
958
- * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L260)
1104
+ * [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L262)
959
1105
  * invalid data
960
1106
  * #get
961
- * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L291)
962
- * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L295)
1107
+ * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L293)
1108
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L297)
963
1109
  * #history
964
- * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L315)
965
- * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L319)
1110
+ * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L317)
1111
+ * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L321)
966
1112
 
967
1113
  ### Ably::Rest::Client#stats
968
1114
  _(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_
@@ -1276,41 +1422,41 @@ _(see [spec/unit/models/message_spec.rb](./spec/unit/models/message_spec.rb))_
1276
1422
  * as Nil
1277
1423
  * [is permitted](./spec/unit/models/message_spec.rb#L134)
1278
1424
 
1279
- ### Ably::Models::PaginatedResource
1280
- _(see [spec/unit/models/paginated_resource_spec.rb](./spec/unit/models/paginated_resource_spec.rb))_
1425
+ ### Ably::Models::PaginatedResult
1426
+ _(see [spec/unit/models/paginated_result_spec.rb](./spec/unit/models/paginated_result_spec.rb))_
1281
1427
  * #items
1282
- * [returns correct length from body](./spec/unit/models/paginated_resource_spec.rb#L31)
1283
- * [is Enumerable](./spec/unit/models/paginated_resource_spec.rb#L35)
1284
- * [is iterable](./spec/unit/models/paginated_resource_spec.rb#L39)
1285
- * [provides [] accessor method](./spec/unit/models/paginated_resource_spec.rb#L57)
1286
- * [#first gets the first item in page](./spec/unit/models/paginated_resource_spec.rb#L63)
1287
- * [#last gets the last item in page](./spec/unit/models/paginated_resource_spec.rb#L67)
1428
+ * [returns correct length from body](./spec/unit/models/paginated_result_spec.rb#L31)
1429
+ * [is Enumerable](./spec/unit/models/paginated_result_spec.rb#L35)
1430
+ * [is iterable](./spec/unit/models/paginated_result_spec.rb#L39)
1431
+ * [provides [] accessor method](./spec/unit/models/paginated_result_spec.rb#L57)
1432
+ * [#first gets the first item in page](./spec/unit/models/paginated_result_spec.rb#L63)
1433
+ * [#last gets the last item in page](./spec/unit/models/paginated_result_spec.rb#L67)
1288
1434
  * #each
1289
- * [returns an enumerator](./spec/unit/models/paginated_resource_spec.rb#L44)
1290
- * [yields each item](./spec/unit/models/paginated_resource_spec.rb#L48)
1435
+ * [returns an enumerator](./spec/unit/models/paginated_result_spec.rb#L44)
1436
+ * [yields each item](./spec/unit/models/paginated_result_spec.rb#L48)
1291
1437
  * with non paged http response
1292
- * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L172)
1293
- * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L176)
1294
- * [does not have next page](./spec/unit/models/paginated_resource_spec.rb#L180)
1295
- * [does not support pagination](./spec/unit/models/paginated_resource_spec.rb#L184)
1296
- * [returns nil when accessing next page](./spec/unit/models/paginated_resource_spec.rb#L188)
1297
- * [returns nil when accessing first page](./spec/unit/models/paginated_resource_spec.rb#L192)
1438
+ * [is the first page](./spec/unit/models/paginated_result_spec.rb#L172)
1439
+ * [is the last page](./spec/unit/models/paginated_result_spec.rb#L176)
1440
+ * [does not have next page](./spec/unit/models/paginated_result_spec.rb#L180)
1441
+ * [does not support pagination](./spec/unit/models/paginated_result_spec.rb#L184)
1442
+ * [returns nil when accessing next page](./spec/unit/models/paginated_result_spec.rb#L188)
1443
+ * [returns nil when accessing first page](./spec/unit/models/paginated_result_spec.rb#L192)
1298
1444
  * with paged http response
1299
- * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L210)
1300
- * [has next page](./spec/unit/models/paginated_resource_spec.rb#L214)
1301
- * [is not the last page](./spec/unit/models/paginated_resource_spec.rb#L218)
1302
- * [supports pagination](./spec/unit/models/paginated_resource_spec.rb#L222)
1445
+ * [is the first page](./spec/unit/models/paginated_result_spec.rb#L210)
1446
+ * [has next page](./spec/unit/models/paginated_result_spec.rb#L214)
1447
+ * [is not the last page](./spec/unit/models/paginated_result_spec.rb#L218)
1448
+ * [supports pagination](./spec/unit/models/paginated_result_spec.rb#L222)
1303
1449
  * accessing next page
1304
- * [returns another PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L250)
1305
- * [retrieves the next page of results](./spec/unit/models/paginated_resource_spec.rb#L254)
1306
- * [is not the first page](./spec/unit/models/paginated_resource_spec.rb#L259)
1307
- * [does not have a next page](./spec/unit/models/paginated_resource_spec.rb#L263)
1308
- * [is the last page](./spec/unit/models/paginated_resource_spec.rb#L267)
1309
- * [returns nil when trying to access the last page when it is the last page](./spec/unit/models/paginated_resource_spec.rb#L271)
1450
+ * [returns another PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L250)
1451
+ * [retrieves the next page of results](./spec/unit/models/paginated_result_spec.rb#L254)
1452
+ * [is not the first page](./spec/unit/models/paginated_result_spec.rb#L259)
1453
+ * [does not have a next page](./spec/unit/models/paginated_result_spec.rb#L263)
1454
+ * [is the last page](./spec/unit/models/paginated_result_spec.rb#L267)
1455
+ * [returns nil when trying to access the last page when it is the last page](./spec/unit/models/paginated_result_spec.rb#L271)
1310
1456
  * and then first page
1311
- * [returns a PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L282)
1312
- * [retrieves the first page of results](./spec/unit/models/paginated_resource_spec.rb#L286)
1313
- * [is the first page](./spec/unit/models/paginated_resource_spec.rb#L290)
1457
+ * [returns a PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L282)
1458
+ * [retrieves the first page of results](./spec/unit/models/paginated_result_spec.rb#L286)
1459
+ * [is the first page](./spec/unit/models/paginated_result_spec.rb#L290)
1314
1460
 
1315
1461
  ### Ably::Models::PresenceMessage
1316
1462
  _(see [spec/unit/models/presence_message_spec.rb](./spec/unit/models/presence_message_spec.rb))_
@@ -1679,7 +1825,7 @@ _(see [spec/unit/models/token_request_spec.rb](./spec/unit/models/token_request_
1679
1825
 
1680
1826
  ### Ably::Modules::EventEmitter
1681
1827
  _(see [spec/unit/modules/event_emitter_spec.rb](./spec/unit/modules/event_emitter_spec.rb))_
1682
- * #trigger event fan out
1828
+ * #emit event fan out
1683
1829
  * [should emit an event for any number of subscribers](./spec/unit/modules/event_emitter_spec.rb#L19)
1684
1830
  * [sends only messages to matching event names](./spec/unit/modules/event_emitter_spec.rb#L28)
1685
1831
  * #on subscribe to multiple events
@@ -1716,7 +1862,7 @@ _(see [spec/unit/modules/state_emitter_spec.rb](./spec/unit/modules/state_emitte
1716
1862
  * [#state= sets current state](./spec/unit/modules/state_emitter_spec.rb#L32)
1717
1863
  * [#change_state sets current state](./spec/unit/modules/state_emitter_spec.rb#L36)
1718
1864
  * #change_state with arguments
1719
- * [passes the arguments through to the triggered callback](./spec/unit/modules/state_emitter_spec.rb#L44)
1865
+ * [passes the arguments through to the executed callback](./spec/unit/modules/state_emitter_spec.rb#L44)
1720
1866
  * #state?
1721
1867
  * [returns true if state matches](./spec/unit/modules/state_emitter_spec.rb#L55)
1722
1868
  * [returns false if state does not match](./spec/unit/modules/state_emitter_spec.rb#L59)
@@ -2068,6 +2214,6 @@ _(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_
2068
2214
 
2069
2215
  ## Test summary
2070
2216
 
2071
- * Passing tests: 1028
2072
- * Pending tests: 7
2217
+ * Passing tests: 1092
2218
+ * Pending tests: 6
2073
2219
  * Failing tests: 0