ably-rest 0.8.2 → 0.8.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -43
- data/SPEC.md +707 -580
- data/lib/submodules/ably-ruby/.travis.yml +1 -0
- data/lib/submodules/ably-ruby/CHANGELOG.md +143 -3
- data/lib/submodules/ably-ruby/README.md +1 -1
- data/lib/submodules/ably-ruby/SPEC.md +842 -520
- data/lib/submodules/ably-ruby/ably.gemspec +1 -1
- data/lib/submodules/ably-ruby/lib/ably/auth.rb +114 -87
- data/lib/submodules/ably-ruby/lib/ably/exceptions.rb +40 -14
- data/lib/submodules/ably-ruby/lib/ably/models/message.rb +3 -5
- data/lib/submodules/ably-ruby/lib/ably/models/paginated_result.rb +3 -12
- data/lib/submodules/ably-ruby/lib/ably/models/presence_message.rb +8 -2
- data/lib/submodules/ably-ruby/lib/ably/models/protocol_message.rb +15 -3
- data/lib/submodules/ably-ruby/lib/ably/models/stat.rb +1 -1
- data/lib/submodules/ably-ruby/lib/ably/models/token_details.rb +1 -1
- data/lib/submodules/ably-ruby/lib/ably/modules/channels_collection.rb +7 -1
- data/lib/submodules/ably-ruby/lib/ably/modules/conversions.rb +1 -1
- data/lib/submodules/ably-ruby/lib/ably/modules/encodeable.rb +6 -3
- data/lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb +2 -2
- data/lib/submodules/ably-ruby/lib/ably/modules/model_common.rb +1 -1
- data/lib/submodules/ably-ruby/lib/ably/modules/state_machine.rb +2 -2
- data/lib/submodules/ably-ruby/lib/ably/realtime.rb +1 -0
- data/lib/submodules/ably-ruby/lib/ably/realtime/auth.rb +191 -0
- data/lib/submodules/ably-ruby/lib/ably/realtime/channel.rb +97 -25
- data/lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb +11 -3
- data/lib/submodules/ably-ruby/lib/ably/realtime/client.rb +22 -6
- data/lib/submodules/ably-ruby/lib/ably/realtime/connection.rb +73 -40
- data/lib/submodules/ably-ruby/lib/ably/realtime/connection/connection_manager.rb +48 -33
- data/lib/submodules/ably-ruby/lib/ably/realtime/presence.rb +17 -3
- data/lib/submodules/ably-ruby/lib/ably/rest/channel.rb +43 -16
- data/lib/submodules/ably-ruby/lib/ably/rest/client.rb +57 -26
- data/lib/submodules/ably-ruby/lib/ably/rest/middleware/exceptions.rb +3 -1
- data/lib/submodules/ably-ruby/lib/ably/rest/middleware/fail_if_unsupported_mime_type.rb +4 -2
- data/lib/submodules/ably-ruby/lib/ably/rest/presence.rb +1 -0
- data/lib/submodules/ably-ruby/lib/ably/version.rb +1 -1
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/auth_spec.rb +242 -0
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb +277 -5
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/channels_spec.rb +64 -0
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/client_spec.rb +26 -5
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_failures_spec.rb +23 -6
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_spec.rb +167 -16
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/message_spec.rb +9 -8
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/presence_history_spec.rb +1 -0
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/presence_spec.rb +121 -10
- data/lib/submodules/ably-ruby/spec/acceptance/realtime/stats_spec.rb +13 -1
- data/lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb +161 -79
- data/lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb +3 -3
- data/lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb +142 -15
- data/lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb +23 -0
- data/lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb +180 -18
- data/lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb +8 -8
- data/lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb +136 -25
- data/lib/submodules/ably-ruby/spec/acceptance/rest/stats_spec.rb +60 -4
- data/lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb +54 -3
- data/lib/submodules/ably-ruby/spec/unit/auth_spec.rb +7 -6
- data/lib/submodules/ably-ruby/spec/unit/models/message_spec.rb +1 -9
- data/lib/submodules/ably-ruby/spec/unit/models/paginated_result_spec.rb +1 -18
- data/lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb +1 -1
- data/lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb +21 -1
- data/lib/submodules/ably-ruby/spec/unit/realtime/channel_spec.rb +10 -3
- data/lib/submodules/ably-ruby/spec/unit/realtime/channels_spec.rb +27 -8
- data/lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb +0 -8
- data/lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb +7 -7
- metadata +5 -2
@@ -1,7 +1,39 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [Unreleased](https://github.com/ably/ably-ruby/tree/HEAD)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.8.2...HEAD)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Implement :queue\_messages option [\#36](https://github.com/ably/ably-ruby/issues/36)
|
10
|
+
|
11
|
+
- Check that a non 200-299 status code for REST requests uses fallback hosts [\#35](https://github.com/ably/ably-ruby/issues/35)
|
12
|
+
|
13
|
+
- Move stats fixtures into ably-common [\#34](https://github.com/ably/ably-ruby/issues/34)
|
14
|
+
|
15
|
+
- Add tests for messages with no data or name fields [\#21](https://github.com/ably/ably-ruby/issues/21)
|
16
|
+
|
17
|
+
- Namespace MsgPack as MsgPack5 because compliance is not merged in [\#12](https://github.com/ably/ably-ruby/issues/12)
|
18
|
+
|
19
|
+
- Add test coverage for receiving messages more than once i.e. historical messages resent somehow on reconnect [\#11](https://github.com/ably/ably-ruby/issues/11)
|
20
|
+
|
21
|
+
- Add async methods for Authentication in the realtime library [\#8](https://github.com/ably/ably-ruby/issues/8)
|
22
|
+
|
23
|
+
**Fixed bugs:**
|
24
|
+
|
25
|
+
- Check that a non 200-299 status code for REST requests uses fallback hosts [\#35](https://github.com/ably/ably-ruby/issues/35)
|
26
|
+
|
27
|
+
**Closed issues:**
|
28
|
+
|
29
|
+
- Scope default token params in arguments [\#55](https://github.com/ably/ably-ruby/issues/55)
|
30
|
+
|
31
|
+
- Channel options can be reset when accessing a channel with \#get [\#46](https://github.com/ably/ably-ruby/issues/46)
|
32
|
+
|
3
33
|
**Merged pull requests:**
|
4
34
|
|
35
|
+
- Separate token params for auth [\#57](https://github.com/ably/ably-ruby/pull/57) ([mattheworiordan](https://github.com/mattheworiordan))
|
36
|
+
|
5
37
|
- Ensure files are required in a consistent order [\#51](https://github.com/ably/ably-ruby/pull/51) ([SimonWoolf](https://github.com/SimonWoolf))
|
6
38
|
|
7
39
|
## [v0.8.2](https://github.com/ably/ably-ruby/tree/v0.8.2) (2015-05-20)
|
@@ -38,8 +70,116 @@
|
|
38
70
|
|
39
71
|
## [v0.8.0](https://github.com/ably/ably-ruby/tree/v0.8.0) (2015-04-23)
|
40
72
|
|
41
|
-
[Initial implementation of client library specification 0.8](http://docs.ably.io/client-lib-development-guide/features/)
|
42
|
-
|
43
73
|
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.6...v0.8.0)
|
44
74
|
|
45
|
-
|
75
|
+
**Merged pull requests:**
|
76
|
+
|
77
|
+
- Token naming refactor [\#29](https://github.com/ably/ably-ruby/pull/29) ([mattheworiordan](https://github.com/mattheworiordan))
|
78
|
+
|
79
|
+
## [v0.7.6](https://github.com/ably/ably-ruby/tree/v0.7.6) (2015-04-17)
|
80
|
+
|
81
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.5...v0.7.6)
|
82
|
+
|
83
|
+
**Implemented enhancements:**
|
84
|
+
|
85
|
+
- Rename Stat to Stats for consistency [\#32](https://github.com/ably/ably-ruby/issues/32)
|
86
|
+
|
87
|
+
- Stats objects [\#24](https://github.com/ably/ably-ruby/issues/24)
|
88
|
+
|
89
|
+
- Need a test to handle errors in callbacks [\#13](https://github.com/ably/ably-ruby/issues/13)
|
90
|
+
|
91
|
+
- Allow token ID or API key in the client constructor [\#5](https://github.com/ably/ably-ruby/issues/5)
|
92
|
+
|
93
|
+
**Fixed bugs:**
|
94
|
+
|
95
|
+
- Need a test to handle errors in callbacks [\#13](https://github.com/ably/ably-ruby/issues/13)
|
96
|
+
|
97
|
+
**Closed issues:**
|
98
|
+
|
99
|
+
- New ttl format [\#15](https://github.com/ably/ably-ruby/issues/15)
|
100
|
+
|
101
|
+
**Merged pull requests:**
|
102
|
+
|
103
|
+
- Test encoded presence fixture data for \#get & \#history [\#28](https://github.com/ably/ably-ruby/pull/28) ([mattheworiordan](https://github.com/mattheworiordan))
|
104
|
+
|
105
|
+
- Add coveralls.io coverage reporting [\#27](https://github.com/ably/ably-ruby/pull/27) ([mattheworiordan](https://github.com/mattheworiordan))
|
106
|
+
|
107
|
+
- New paginated resource [\#26](https://github.com/ably/ably-ruby/pull/26) ([mattheworiordan](https://github.com/mattheworiordan))
|
108
|
+
|
109
|
+
- Typed stats similar to Java library + zero default for empty stats [\#25](https://github.com/ably/ably-ruby/pull/25) ([mattheworiordan](https://github.com/mattheworiordan))
|
110
|
+
|
111
|
+
## [v0.7.5](https://github.com/ably/ably-ruby/tree/v0.7.5) (2015-03-21)
|
112
|
+
|
113
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.4...v0.7.5)
|
114
|
+
|
115
|
+
## [v0.7.4](https://github.com/ably/ably-ruby/tree/v0.7.4) (2015-03-21)
|
116
|
+
|
117
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.2...v0.7.4)
|
118
|
+
|
119
|
+
**Merged pull requests:**
|
120
|
+
|
121
|
+
- Presence Member Map [\#14](https://github.com/ably/ably-ruby/pull/14) ([mattheworiordan](https://github.com/mattheworiordan))
|
122
|
+
|
123
|
+
## [v0.7.2](https://github.com/ably/ably-ruby/tree/v0.7.2) (2015-02-10)
|
124
|
+
|
125
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.1...v0.7.2)
|
126
|
+
|
127
|
+
**Implemented enhancements:**
|
128
|
+
|
129
|
+
- Use PresenceMap for presence instead of queues [\#10](https://github.com/ably/ably-ruby/issues/10)
|
130
|
+
|
131
|
+
**Merged pull requests:**
|
132
|
+
|
133
|
+
- Update README to include various missing snippets for core features [\#9](https://github.com/ably/ably-ruby/pull/9) ([kouno](https://github.com/kouno))
|
134
|
+
|
135
|
+
- Fix connection retry frequency [\#7](https://github.com/ably/ably-ruby/pull/7) ([kouno](https://github.com/kouno))
|
136
|
+
|
137
|
+
## [v0.7.1](https://github.com/ably/ably-ruby/tree/v0.7.1) (2015-01-18)
|
138
|
+
|
139
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.7.0...v0.7.1)
|
140
|
+
|
141
|
+
## [v0.7.0](https://github.com/ably/ably-ruby/tree/v0.7.0) (2015-01-12)
|
142
|
+
|
143
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.6.2...v0.7.0)
|
144
|
+
|
145
|
+
**Closed issues:**
|
146
|
+
|
147
|
+
- JSON encoder should only append utf-8 before a cipher encoder is applied [\#1](https://github.com/ably/ably-ruby/issues/1)
|
148
|
+
|
149
|
+
## [v0.6.2](https://github.com/ably/ably-ruby/tree/v0.6.2) (2014-12-10)
|
150
|
+
|
151
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.2.0...v0.6.2)
|
152
|
+
|
153
|
+
## [v0.2.0](https://github.com/ably/ably-ruby/tree/v0.2.0) (2014-12-09)
|
154
|
+
|
155
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.1.6...v0.2.0)
|
156
|
+
|
157
|
+
## [v0.1.6](https://github.com/ably/ably-ruby/tree/v0.1.6) (2014-10-31)
|
158
|
+
|
159
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.1.5...v0.1.6)
|
160
|
+
|
161
|
+
## [v0.1.5](https://github.com/ably/ably-ruby/tree/v0.1.5) (2014-10-23)
|
162
|
+
|
163
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.1.4...v0.1.5)
|
164
|
+
|
165
|
+
## [v0.1.4](https://github.com/ably/ably-ruby/tree/v0.1.4) (2014-09-27)
|
166
|
+
|
167
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.1.3...v0.1.4)
|
168
|
+
|
169
|
+
## [v0.1.3](https://github.com/ably/ably-ruby/tree/v0.1.3) (2014-09-26)
|
170
|
+
|
171
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.1.2...v0.1.3)
|
172
|
+
|
173
|
+
## [v0.1.2](https://github.com/ably/ably-ruby/tree/v0.1.2) (2014-09-25)
|
174
|
+
|
175
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.1.1...v0.1.2)
|
176
|
+
|
177
|
+
## [v0.1.1](https://github.com/ably/ably-ruby/tree/v0.1.1) (2014-09-23)
|
178
|
+
|
179
|
+
[Full Changelog](https://github.com/ably/ably-ruby/compare/v0.1.0...v0.1.1)
|
180
|
+
|
181
|
+
## [v0.1.0](https://github.com/ably/ably-ruby/tree/v0.1.0) (2014-09-23)
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
@@ -187,7 +187,7 @@ token_details = client.auth.request_token
|
|
187
187
|
token_details.token # => "xVLyHw.CLchevH3hF....MDh9ZC_Q"
|
188
188
|
client = Ably::Rest.new(token: token_details.token)
|
189
189
|
|
190
|
-
token = client.auth.create_token_request
|
190
|
+
token = client.auth.create_token_request(token_params: { ttl: 3600 })
|
191
191
|
# => {"id"=>...,
|
192
192
|
# "clientId"=>nil,
|
193
193
|
# "ttl"=>3600,
|
@@ -1,5 +1,60 @@
|
|
1
1
|
# Ably Realtime & REST Client Library 0.8.2 Specification
|
2
2
|
|
3
|
+
### Ably::Realtime::Auth
|
4
|
+
_(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_spec.rb))_
|
5
|
+
* using JSON and MsgPack protocol
|
6
|
+
* with basic auth
|
7
|
+
* #authentication_security_requirements_met?
|
8
|
+
* [returns true](./spec/acceptance/realtime/auth_spec.rb#L20)
|
9
|
+
* #key
|
10
|
+
* [contains the API key](./spec/acceptance/realtime/auth_spec.rb#L27)
|
11
|
+
* #key_name
|
12
|
+
* [contains the API key name](./spec/acceptance/realtime/auth_spec.rb#L34)
|
13
|
+
* #key_secret
|
14
|
+
* [contains the API key secret](./spec/acceptance/realtime/auth_spec.rb#L41)
|
15
|
+
* #using_basic_auth?
|
16
|
+
* [is true when using Basic Auth](./spec/acceptance/realtime/auth_spec.rb#L48)
|
17
|
+
* #using_token_auth?
|
18
|
+
* [is false when using Basic Auth](./spec/acceptance/realtime/auth_spec.rb#L55)
|
19
|
+
* with token auth
|
20
|
+
* #client_id
|
21
|
+
* [contains the ClientOptions client ID](./spec/acceptance/realtime/auth_spec.rb#L67)
|
22
|
+
* #token
|
23
|
+
* [contains the current token after auth](./spec/acceptance/realtime/auth_spec.rb#L76)
|
24
|
+
* #current_token_details
|
25
|
+
* [contains the current token after auth](./spec/acceptance/realtime/auth_spec.rb#L83)
|
26
|
+
* #token_renewable?
|
27
|
+
* [is true when an API key exists](./spec/acceptance/realtime/auth_spec.rb#L93)
|
28
|
+
* #options (auth_options)
|
29
|
+
* [contains the configured auth options](./spec/acceptance/realtime/auth_spec.rb#L103)
|
30
|
+
* #token_params
|
31
|
+
* [contains the configured auth options](./spec/acceptance/realtime/auth_spec.rb#L114)
|
32
|
+
* #using_basic_auth?
|
33
|
+
* [is false when using Token Auth](./spec/acceptance/realtime/auth_spec.rb#L123)
|
34
|
+
* #using_token_auth?
|
35
|
+
* [is true when using Token Auth](./spec/acceptance/realtime/auth_spec.rb#L132)
|
36
|
+
*
|
37
|
+
* #create_token_request
|
38
|
+
* [returns a token request asynchronously](./spec/acceptance/realtime/auth_spec.rb#L146)
|
39
|
+
* #create_token_request_async
|
40
|
+
* [returns a token request synchronously](./spec/acceptance/realtime/auth_spec.rb#L156)
|
41
|
+
* #request_token
|
42
|
+
* [returns a token asynchronously](./spec/acceptance/realtime/auth_spec.rb#L166)
|
43
|
+
* #request_token_async
|
44
|
+
* [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L177)
|
45
|
+
* #authorise
|
46
|
+
* [returns a token asynchronously](./spec/acceptance/realtime/auth_spec.rb#L188)
|
47
|
+
* #authorise_async
|
48
|
+
* [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L199)
|
49
|
+
* #auth_params
|
50
|
+
* [returns the auth params asynchronously](./spec/acceptance/realtime/auth_spec.rb#L211)
|
51
|
+
* #auth_params
|
52
|
+
* [returns the auth params synchronously](./spec/acceptance/realtime/auth_spec.rb#L220)
|
53
|
+
* #auth_header
|
54
|
+
* [returns an auth header asynchronously](./spec/acceptance/realtime/auth_spec.rb#L227)
|
55
|
+
* #auth_header
|
56
|
+
* [returns an auth header synchronously](./spec/acceptance/realtime/auth_spec.rb#L236)
|
57
|
+
|
3
58
|
### Ably::Realtime::Channel#history
|
4
59
|
_(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_
|
5
60
|
* using JSON and MsgPack protocol
|
@@ -62,46 +117,100 @@ _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/chan
|
|
62
117
|
* [moves straight to :detaching state and skips :attached](./spec/acceptance/realtime/channel_spec.rb#L274)
|
63
118
|
* when state is :detaching
|
64
119
|
* [ignores subsequent #detach calls but calls the callback if provided](./spec/acceptance/realtime/channel_spec.rb#L292)
|
120
|
+
* when state is :initialized
|
121
|
+
* [does nothing as there is no channel to detach](./spec/acceptance/realtime/channel_spec.rb#L309)
|
122
|
+
* [returns a valid deferrable](./spec/acceptance/realtime/channel_spec.rb#L317)
|
65
123
|
* channel recovery in :attaching state
|
66
124
|
* the transport is disconnected before the ATTACHED protocol message is received
|
67
|
-
* PENDING: *[attach times out and fails if not ATTACHED protocol message received](./spec/acceptance/realtime/channel_spec.rb#
|
68
|
-
* PENDING: *[channel is ATTACHED if ATTACHED protocol message is later received](./spec/acceptance/realtime/channel_spec.rb#
|
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#
|
125
|
+
* PENDING: *[attach times out and fails if not ATTACHED protocol message received](./spec/acceptance/realtime/channel_spec.rb#L329)*
|
126
|
+
* PENDING: *[channel is ATTACHED if ATTACHED protocol message is later received](./spec/acceptance/realtime/channel_spec.rb#L330)*
|
127
|
+
* PENDING: *[sends an ATTACH protocol message in response to a channel message being received on the attaching channel](./spec/acceptance/realtime/channel_spec.rb#L331)*
|
70
128
|
* #publish
|
71
129
|
* when attached
|
72
|
-
* [publishes messages](./spec/acceptance/realtime/channel_spec.rb#
|
130
|
+
* [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L340)
|
73
131
|
* when not yet attached
|
74
|
-
* [publishes queued messages once attached](./spec/acceptance/realtime/channel_spec.rb#
|
75
|
-
* [publishes queued messages within a single protocol message](./spec/acceptance/realtime/channel_spec.rb#
|
132
|
+
* [publishes queued messages once attached](./spec/acceptance/realtime/channel_spec.rb#L352)
|
133
|
+
* [publishes queued messages within a single protocol message](./spec/acceptance/realtime/channel_spec.rb#L360)
|
134
|
+
* with :queue_messages client option set to false
|
135
|
+
* and connection state initialized
|
136
|
+
* [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L383)
|
137
|
+
* and connection state connecting
|
138
|
+
* [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L391)
|
139
|
+
* and connection state disconnected
|
140
|
+
* [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L403)
|
141
|
+
* and connection state connected
|
142
|
+
* [publishes the message](./spec/acceptance/realtime/channel_spec.rb#L416)
|
143
|
+
* with name and data arguments
|
144
|
+
* [publishes the message and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L427)
|
145
|
+
* with an array of Hash objects with :name and :data attributes
|
146
|
+
* [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L445)
|
147
|
+
* with an array of Message objects
|
148
|
+
* [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L473)
|
149
|
+
* with two invalid message out of 12
|
150
|
+
* PENDING: *[calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L501)*
|
151
|
+
* only invalid messages
|
152
|
+
* PENDING: *[calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L527)*
|
153
|
+
* with many many messages and many connections simultaneously
|
154
|
+
* [publishes all messages, all success callbacks are called, and a history request confirms all messages were published](./spec/acceptance/realtime/channel_spec.rb#L551)
|
76
155
|
* #subscribe
|
77
156
|
* with an event argument
|
78
|
-
* [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#
|
157
|
+
* [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L574)
|
158
|
+
* before attach
|
159
|
+
* [receives messages as soon as attached](./spec/acceptance/realtime/channel_spec.rb#L584)
|
79
160
|
* with no event argument
|
80
|
-
* [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#
|
161
|
+
* [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L598)
|
81
162
|
* many times with different event names
|
82
|
-
* [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#
|
163
|
+
* [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L608)
|
83
164
|
* #unsubscribe
|
84
165
|
* with an event argument
|
85
|
-
* [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#
|
166
|
+
* [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L631)
|
86
167
|
* with no event argument
|
87
|
-
* [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#
|
168
|
+
* [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L644)
|
88
169
|
* when connection state changes to
|
89
170
|
* :failed
|
90
171
|
* an :attached channel
|
91
|
-
* [transitions state to :failed](./spec/acceptance/realtime/channel_spec.rb#
|
92
|
-
* [emits an error event on the channel](./spec/acceptance/realtime/channel_spec.rb#
|
93
|
-
* [updates the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#
|
172
|
+
* [transitions state to :failed](./spec/acceptance/realtime/channel_spec.rb#L667)
|
173
|
+
* [emits an error event on the channel](./spec/acceptance/realtime/channel_spec.rb#L678)
|
174
|
+
* [updates the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L689)
|
94
175
|
* a :detached channel
|
95
|
-
* [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#
|
176
|
+
* [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L702)
|
96
177
|
* a :failed channel
|
97
|
-
* [remains in the :failed state and ignores the failure error](./spec/acceptance/realtime/channel_spec.rb#
|
178
|
+
* [remains in the :failed state and ignores the failure error](./spec/acceptance/realtime/channel_spec.rb#L722)
|
179
|
+
* a channel ATTACH request
|
180
|
+
* [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L743)
|
98
181
|
* :closed
|
99
182
|
* an :attached channel
|
100
|
-
* [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#
|
183
|
+
* [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L757)
|
101
184
|
* a :detached channel
|
102
|
-
* [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#
|
185
|
+
* [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L768)
|
103
186
|
* a :failed channel
|
104
|
-
* [remains in the :failed state and retains the error_reason](./spec/acceptance/realtime/channel_spec.rb#
|
187
|
+
* [remains in the :failed state and retains the error_reason](./spec/acceptance/realtime/channel_spec.rb#L789)
|
188
|
+
* a channel ATTACH request when connection CLOSED
|
189
|
+
* [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L810)
|
190
|
+
* a channel ATTACH request when connection CLOSING
|
191
|
+
* [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L822)
|
192
|
+
* #presence
|
193
|
+
* [returns a Ably::Realtime::Presence object](./spec/acceptance/realtime/channel_spec.rb#L836)
|
194
|
+
|
195
|
+
### Ably::Realtime::Channels
|
196
|
+
_(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/channels_spec.rb))_
|
197
|
+
* using JSON and MsgPack protocol
|
198
|
+
* using shortcut method #channel on the client object
|
199
|
+
* behaves like a channel
|
200
|
+
* [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6)
|
201
|
+
* [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L11)
|
202
|
+
* using #get method on client#channels
|
203
|
+
* behaves like a channel
|
204
|
+
* [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6)
|
205
|
+
* [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L11)
|
206
|
+
* accessing an existing channel object with different options
|
207
|
+
* [overrides the existing channel options and returns the channel object](./spec/acceptance/realtime/channels_spec.rb#L39)
|
208
|
+
* accessing an existing channel object without specifying any channel options
|
209
|
+
* [returns the existing channel without modifying the channel options](./spec/acceptance/realtime/channels_spec.rb#L50)
|
210
|
+
* using undocumented array accessor [] method on client#channels
|
211
|
+
* behaves like a channel
|
212
|
+
* [returns a channel object](./spec/acceptance/realtime/channels_spec.rb#L6)
|
213
|
+
* [returns channel object and passes the provided options](./spec/acceptance/realtime/channels_spec.rb#L11)
|
105
214
|
|
106
215
|
### Ably::Realtime::Client
|
107
216
|
_(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/client_spec.rb))_
|
@@ -110,7 +219,7 @@ _(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/clien
|
|
110
219
|
* basic auth
|
111
220
|
* [is enabled by default with a provided :key option](./spec/acceptance/realtime/client_spec.rb#L18)
|
112
221
|
* :tls option
|
113
|
-
* set to false to
|
222
|
+
* set to false to force a plain-text connection
|
114
223
|
* [fails to connect because a private key cannot be sent over a non-secure connection](./spec/acceptance/realtime/client_spec.rb#L31)
|
115
224
|
* token auth
|
116
225
|
* with TLS enabled
|
@@ -130,6 +239,12 @@ _(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/clien
|
|
130
239
|
* with a Proc for the :auth_callback option
|
131
240
|
* [calls the Proc](./spec/acceptance/realtime/client_spec.rb#L102)
|
132
241
|
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L109)
|
242
|
+
* #connection
|
243
|
+
* [provides access to the Connection object](./spec/acceptance/realtime/client_spec.rb#L120)
|
244
|
+
* #channels
|
245
|
+
* [provides access to the Channels collection object](./spec/acceptance/realtime/client_spec.rb#L127)
|
246
|
+
* #auth
|
247
|
+
* [provides access to the Realtime::Auth object](./spec/acceptance/realtime/client_spec.rb#L134)
|
133
248
|
|
134
249
|
### Ably::Realtime::Connection failures
|
135
250
|
_(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/realtime/connection_failures_spec.rb))_
|
@@ -152,7 +267,7 @@ _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/r
|
|
152
267
|
* [transitions connection state to :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L151)
|
153
268
|
* when connection state is :failed
|
154
269
|
* #close
|
155
|
-
* [will not transition state to :close and raises a
|
270
|
+
* [will not transition state to :close and raises a InvalidStateChange exception](./spec/acceptance/realtime/connection_failures_spec.rb#L170)
|
156
271
|
* #error_reason
|
157
272
|
* [contains the error when state is disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L184)
|
158
273
|
* [contains the error when state is suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L184)
|
@@ -161,8 +276,8 @@ _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/r
|
|
161
276
|
* [is reset to nil when :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L204)
|
162
277
|
* #connect
|
163
278
|
* connection opening times out
|
164
|
-
* [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#
|
165
|
-
* [calls the errback of the returned Deferrable object when first connection attempt fails](./spec/acceptance/realtime/connection_failures_spec.rb#
|
279
|
+
* [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L233)
|
280
|
+
* [calls the errback of the returned Deferrable object when first connection attempt fails](./spec/acceptance/realtime/connection_failures_spec.rb#L246)
|
166
281
|
* when retry intervals are stubbed to attempt reconnection quickly
|
167
282
|
* [never calls the provided success block](./spec/acceptance/realtime/connection_failures_spec.rb#L263)
|
168
283
|
* connection resume
|
@@ -181,18 +296,20 @@ _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/r
|
|
181
296
|
* because the connection_key is not or no longer valid
|
182
297
|
* [updates the connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L470)
|
183
298
|
* [detaches all channels](./spec/acceptance/realtime/connection_failures_spec.rb#L485)
|
184
|
-
* [emits an error on the channel and sets the error reason](./spec/acceptance/realtime/connection_failures_spec.rb#
|
299
|
+
* [emits an error on the channel and sets the error reason](./spec/acceptance/realtime/connection_failures_spec.rb#L504)
|
185
300
|
* fallback host feature
|
186
301
|
* with custom realtime websocket host option
|
187
|
-
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#
|
188
|
-
* with
|
302
|
+
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L543)
|
303
|
+
* with custom realtime websocket port option
|
189
304
|
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L559)
|
305
|
+
* with non-production environment
|
306
|
+
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L576)
|
190
307
|
* with production environment
|
191
308
|
* when the Internet is down
|
192
|
-
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#
|
309
|
+
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L604)
|
193
310
|
* when the Internet is up
|
194
|
-
* [uses a fallback host on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#
|
195
|
-
* [uses the primary host when suspended, and a fallback host on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#
|
311
|
+
* [uses a fallback host on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L621)
|
312
|
+
* [uses the primary host when suspended, and a fallback host on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L640)
|
196
313
|
|
197
314
|
### Ably::Realtime::Connection
|
198
315
|
_(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_
|
@@ -206,112 +323,129 @@ _(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/c
|
|
206
323
|
* for renewable tokens
|
207
324
|
* that are valid for the duration of the test
|
208
325
|
* with valid pre authorised token expiring in the future
|
209
|
-
* [uses the existing token created by Auth](./spec/acceptance/realtime/connection_spec.rb#
|
326
|
+
* [uses the existing token created by Auth](./spec/acceptance/realtime/connection_spec.rb#L64)
|
210
327
|
* with implicit authorisation
|
211
|
-
* [uses the token created by the implicit authorisation](./spec/acceptance/realtime/connection_spec.rb#
|
328
|
+
* [uses the token created by the implicit authorisation](./spec/acceptance/realtime/connection_spec.rb#L76)
|
212
329
|
* that expire
|
213
330
|
* opening a new connection
|
214
331
|
* with recently expired token
|
215
|
-
* [renews the token on connect](./spec/acceptance/realtime/connection_spec.rb#
|
332
|
+
* [renews the token on connect without changing connection state](./spec/acceptance/realtime/connection_spec.rb#L108)
|
216
333
|
* with immediately expiring token
|
217
|
-
* [renews the token on connect, and only makes one subsequent attempt to obtain a new token](./spec/acceptance/realtime/connection_spec.rb#
|
218
|
-
* [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#
|
334
|
+
* [renews the token on connect, and only makes one subsequent attempt to obtain a new token](./spec/acceptance/realtime/connection_spec.rb#L127)
|
335
|
+
* [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L137)
|
219
336
|
* when connected with a valid non-expired token
|
220
337
|
* that then expires following the connection being opened
|
221
|
-
* PENDING: *[retains connection state](./spec/acceptance/realtime/connection_spec.rb#
|
222
|
-
* PENDING: *[changes state to failed if a new token cannot be issued](./spec/acceptance/realtime/connection_spec.rb#
|
338
|
+
* PENDING: *[retains connection state](./spec/acceptance/realtime/connection_spec.rb#L193)*
|
339
|
+
* PENDING: *[changes state to failed if a new token cannot be issued](./spec/acceptance/realtime/connection_spec.rb#L194)*
|
223
340
|
* the server
|
224
|
-
* [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#
|
341
|
+
* [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L164)
|
225
342
|
* for non-renewable tokens
|
226
343
|
* that are expired
|
227
344
|
* opening a new connection
|
228
|
-
* [transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#
|
345
|
+
* [transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L214)
|
229
346
|
* when connected
|
230
|
-
* PENDING: *[transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#
|
347
|
+
* PENDING: *[transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L227)*
|
231
348
|
* initialization state changes
|
232
349
|
* with implicit #connect
|
233
|
-
* [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#
|
350
|
+
* [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L254)
|
234
351
|
* with explicit #connect
|
235
|
-
* [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#
|
352
|
+
* [are emitted in order](./spec/acceptance/realtime/connection_spec.rb#L260)
|
236
353
|
* #connect
|
237
|
-
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#
|
238
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#
|
354
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L268)
|
355
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L273)
|
239
356
|
* when already connected
|
240
|
-
* [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#
|
357
|
+
* [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L282)
|
358
|
+
* connection#id
|
359
|
+
* [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L296)
|
360
|
+
* connection#key
|
361
|
+
* [is null before connecting](./spec/acceptance/realtime/connection_spec.rb#L303)
|
241
362
|
* once connected
|
242
363
|
* connection#id
|
243
|
-
* [is a string](./spec/acceptance/realtime/connection_spec.rb#
|
244
|
-
* [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#
|
245
|
-
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#
|
364
|
+
* [is a string](./spec/acceptance/realtime/connection_spec.rb#L313)
|
365
|
+
* [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L320)
|
366
|
+
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L327)
|
246
367
|
* connection#key
|
247
|
-
* [is a string](./spec/acceptance/realtime/connection_spec.rb#
|
248
|
-
* [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#
|
249
|
-
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#
|
368
|
+
* [is a string](./spec/acceptance/realtime/connection_spec.rb#L336)
|
369
|
+
* [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L343)
|
370
|
+
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L350)
|
250
371
|
* following a previous connection being opened and closed
|
251
|
-
* [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#
|
372
|
+
* [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L360)
|
373
|
+
* when closing
|
374
|
+
* [raises an exception before the connection is closed](./spec/acceptance/realtime/connection_spec.rb#L377)
|
252
375
|
* #serial connection serial
|
253
|
-
* [is set to -1 when a new connection is opened](./spec/acceptance/realtime/connection_spec.rb#
|
254
|
-
* [is set to 0 when a message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#
|
255
|
-
* [is set to 1 when the second message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#
|
376
|
+
* [is set to -1 when a new connection is opened](./spec/acceptance/realtime/connection_spec.rb#L392)
|
377
|
+
* [is set to 0 when a message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#L413)
|
378
|
+
* [is set to 1 when the second message sent ACK is received](./spec/acceptance/realtime/connection_spec.rb#L420)
|
256
379
|
* when a message is sent but the ACK has not yet been received
|
257
|
-
* [the sent message msgSerial is 0 but the connection serial remains at -1](./spec/acceptance/realtime/connection_spec.rb#
|
380
|
+
* [the sent message msgSerial is 0 but the connection serial remains at -1](./spec/acceptance/realtime/connection_spec.rb#L400)
|
258
381
|
* #close
|
259
|
-
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#
|
260
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#
|
382
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/connection_spec.rb#L431)
|
383
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L438)
|
261
384
|
* when already closed
|
262
|
-
* [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#
|
385
|
+
* [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L449)
|
263
386
|
* when connection state is
|
264
387
|
* :initialized
|
265
|
-
* [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#
|
388
|
+
* [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L477)
|
266
389
|
* :connected
|
267
|
-
* [changes the connection state to :closing and waits for the server to confirm connection is :closed with a ProtocolMessage](./spec/acceptance/realtime/connection_spec.rb#
|
390
|
+
* [changes the connection state to :closing and waits for the server to confirm connection is :closed with a ProtocolMessage](./spec/acceptance/realtime/connection_spec.rb#L495)
|
268
391
|
* with an unresponsive connection
|
269
|
-
* [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#
|
392
|
+
* [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L525)
|
270
393
|
* #ping
|
271
|
-
* [echoes a heart beat](./spec/acceptance/realtime/connection_spec.rb#
|
394
|
+
* [echoes a heart beat](./spec/acceptance/realtime/connection_spec.rb#L548)
|
272
395
|
* when not connected
|
273
|
-
* [raises an exception](./spec/acceptance/realtime/connection_spec.rb#
|
396
|
+
* [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L558)
|
274
397
|
* with a success block that raises an exception
|
275
|
-
* [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#
|
398
|
+
* [catches the exception and logs the error](./spec/acceptance/realtime/connection_spec.rb#L565)
|
276
399
|
* recovery
|
277
400
|
* #recovery_key
|
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#
|
279
|
-
* [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#
|
280
|
-
* [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#
|
401
|
+
* [is composed of connection key and serial that is kept up to date with each message ACK received](./spec/acceptance/realtime/connection_spec.rb#L602)
|
402
|
+
* [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#L625)
|
403
|
+
* [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L649)
|
281
404
|
* opening a new connection using a recently disconnected connection's #recovery_key
|
282
405
|
* connection#id and connection#key after recovery
|
283
|
-
* [remains the same](./spec/acceptance/realtime/connection_spec.rb#
|
406
|
+
* [remains the same](./spec/acceptance/realtime/connection_spec.rb#L663)
|
284
407
|
* when messages have been sent whilst the old connection is disconnected
|
285
408
|
* the new connection
|
286
|
-
* [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#
|
409
|
+
* [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L704)
|
287
410
|
* with :recover option
|
288
411
|
* with invalid syntax
|
289
|
-
* [raises an exception](./spec/acceptance/realtime/connection_spec.rb#
|
412
|
+
* [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L729)
|
290
413
|
* with invalid formatted value sent to server
|
291
|
-
* [emits a fatal error on the connection object, sets the #error_reason and disconnects](./spec/acceptance/realtime/connection_spec.rb#
|
414
|
+
* [emits a fatal error on the connection object, sets the #error_reason and disconnects](./spec/acceptance/realtime/connection_spec.rb#L738)
|
292
415
|
* with expired (missing) value sent to server
|
293
|
-
* [emits an error on the connection object, sets the #error_reason, yet will connect anyway](./spec/acceptance/realtime/connection_spec.rb#
|
416
|
+
* [emits an error on the connection object, sets the #error_reason, yet will connect anyway](./spec/acceptance/realtime/connection_spec.rb#L753)
|
294
417
|
* with many connections simultaneously
|
295
|
-
* [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#
|
418
|
+
* [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L772)
|
296
419
|
* when a state transition is unsupported
|
297
|
-
* [emits a
|
420
|
+
* [emits a InvalidStateChange](./spec/acceptance/realtime/connection_spec.rb#L792)
|
298
421
|
* protocol failure
|
299
422
|
* receiving an invalid ProtocolMessage
|
300
|
-
* [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#
|
423
|
+
* [emits an error on the connection and logs a fatal error message](./spec/acceptance/realtime/connection_spec.rb#L808)
|
301
424
|
* undocumented method
|
302
425
|
* #internet_up?
|
303
|
-
* [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#
|
426
|
+
* [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L824)
|
304
427
|
* internet up URL protocol
|
305
428
|
* when using TLS for the connection
|
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#
|
429
|
+
* [uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L835)
|
307
430
|
* when using a non-secured connection
|
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#
|
431
|
+
* [uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt](./spec/acceptance/realtime/connection_spec.rb#L845)
|
309
432
|
* when the Internet is up
|
310
|
-
* [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#
|
311
|
-
* [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#
|
433
|
+
* [calls the block with true](./spec/acceptance/realtime/connection_spec.rb#L876)
|
434
|
+
* [calls the success callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L883)
|
435
|
+
* with a TLS connection
|
436
|
+
* [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L859)
|
437
|
+
* with a non-TLS connection
|
438
|
+
* [checks the Internet up URL over TLS](./spec/acceptance/realtime/connection_spec.rb#L869)
|
312
439
|
* when the Internet is down
|
313
|
-
* [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#
|
314
|
-
* [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#
|
440
|
+
* [calls the block with false](./spec/acceptance/realtime/connection_spec.rb#L898)
|
441
|
+
* [calls the failure callback of the Deferrable](./spec/acceptance/realtime/connection_spec.rb#L905)
|
442
|
+
* state change side effects
|
443
|
+
* when connection enters the :disconnected state
|
444
|
+
* [queues messages to be sent and all channels remain attached](./spec/acceptance/realtime/connection_spec.rb#L919)
|
445
|
+
* when connection enters the :suspended state
|
446
|
+
* [detaches the channels and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L952)
|
447
|
+
* when connection enters the :failed state
|
448
|
+
* [sets all channels to failed and prevents publishing of messages on those channels](./spec/acceptance/realtime/connection_spec.rb#L973)
|
315
449
|
|
316
450
|
### Ably::Realtime::Channel Message
|
317
451
|
_(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/message_spec.rb))_
|
@@ -328,396 +462,459 @@ _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/mess
|
|
328
462
|
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L72)
|
329
463
|
* with unsupported data payload content type
|
330
464
|
* Integer
|
331
|
-
* [is raises an
|
465
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L82)
|
332
466
|
* Float
|
333
|
-
* [is raises an
|
467
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L91)
|
334
468
|
* Boolean
|
335
|
-
* [is raises an
|
469
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L100)
|
336
470
|
* False
|
337
|
-
* [is raises an
|
471
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L109)
|
338
472
|
* with ASCII_8BIT message name
|
339
473
|
* [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L118)
|
340
474
|
* when the message publisher has a client_id
|
341
|
-
* [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L134)
|
475
|
+
* PENDING: *[contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L134)*
|
342
476
|
* #connection_id attribute
|
343
477
|
* over realtime
|
344
|
-
* [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#
|
478
|
+
* [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L148)
|
345
479
|
* when retrieved over REST
|
346
|
-
* [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#
|
480
|
+
* [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L160)
|
347
481
|
* local echo when published
|
348
|
-
* [is enabled by default](./spec/acceptance/realtime/message_spec.rb#
|
482
|
+
* [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L172)
|
349
483
|
* with :echo_messages option set to false
|
350
|
-
* [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#
|
484
|
+
* [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L188)
|
351
485
|
* publishing lots of messages across two connections
|
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#
|
486
|
+
* [sends and receives the messages on both opened connections and calls the success callbacks for each message published](./spec/acceptance/realtime/message_spec.rb#L220)
|
353
487
|
* without suitable publishing permissions
|
354
|
-
* [calls the error callback](./spec/acceptance/realtime/message_spec.rb#
|
488
|
+
* [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L265)
|
355
489
|
* server incorrectly resends a message that was already received by the client library
|
356
|
-
* [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#
|
490
|
+
* [discards the message and logs it as an error to the channel](./spec/acceptance/realtime/message_spec.rb#L285)
|
357
491
|
* encoding and decoding encrypted messages
|
358
492
|
* with AES-128-CBC using crypto-data-128.json fixtures
|
359
493
|
* item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
|
360
494
|
* behaves like an Ably encrypter and decrypter
|
361
495
|
* with #publish and #subscribe
|
362
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
363
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
496
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
497
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
364
498
|
* item 1 with encrypted encoding cipher+aes-128-cbc/base64
|
365
499
|
* behaves like an Ably encrypter and decrypter
|
366
500
|
* with #publish and #subscribe
|
367
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
368
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
501
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
502
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
369
503
|
* item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
370
504
|
* behaves like an Ably encrypter and decrypter
|
371
505
|
* with #publish and #subscribe
|
372
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
373
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
506
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
507
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
374
508
|
* item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
375
509
|
* behaves like an Ably encrypter and decrypter
|
376
510
|
* with #publish and #subscribe
|
377
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
378
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
511
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
512
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
379
513
|
* with AES-256-CBC using crypto-data-256.json fixtures
|
380
514
|
* item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
|
381
515
|
* behaves like an Ably encrypter and decrypter
|
382
516
|
* with #publish and #subscribe
|
383
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
384
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
517
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
518
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
385
519
|
* item 1 with encrypted encoding cipher+aes-256-cbc/base64
|
386
520
|
* behaves like an Ably encrypter and decrypter
|
387
521
|
* with #publish and #subscribe
|
388
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
389
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
522
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
523
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
390
524
|
* item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
391
525
|
* behaves like an Ably encrypter and decrypter
|
392
526
|
* with #publish and #subscribe
|
393
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
394
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
527
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
528
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
395
529
|
* item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
396
530
|
* behaves like an Ably encrypter and decrypter
|
397
531
|
* with #publish and #subscribe
|
398
|
-
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#
|
399
|
-
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#
|
532
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L349)
|
533
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L367)
|
400
534
|
* with multiple sends from one client to another
|
401
|
-
* [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#
|
535
|
+
* [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L406)
|
402
536
|
* subscribing with a different transport protocol
|
403
|
-
* [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#
|
404
|
-
* [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#
|
405
|
-
* [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#
|
537
|
+
* [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L449)
|
538
|
+
* [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L449)
|
539
|
+
* [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L449)
|
406
540
|
* publishing on an unencrypted channel and subscribing on an encrypted channel with another client
|
407
|
-
* [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#
|
541
|
+
* [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L468)
|
408
542
|
* publishing on an encrypted channel and subscribing on an unencrypted channel with another client
|
409
|
-
* [delivers the message but still encrypted with a value in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#
|
410
|
-
* [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#
|
543
|
+
* [delivers the message but still encrypted with a value in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L486)
|
544
|
+
* [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L495)
|
411
545
|
* publishing on an encrypted channel and subscribing with a different algorithm on another client
|
412
|
-
* [delivers the message but still encrypted with the cipher detials in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#
|
413
|
-
* [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#
|
546
|
+
* [delivers the message but still encrypted with the cipher detials in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L517)
|
547
|
+
* [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L526)
|
414
548
|
* publishing on an encrypted channel and subscribing with a different key on another client
|
415
|
-
* [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#
|
416
|
-
* [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#
|
549
|
+
* [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L548)
|
550
|
+
* [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L559)
|
417
551
|
|
418
552
|
### Ably::Realtime::Presence history
|
419
553
|
_(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_
|
420
554
|
* using JSON and MsgPack protocol
|
421
555
|
* [provides up to the moment presence history](./spec/acceptance/realtime/presence_history_spec.rb#L21)
|
422
|
-
* [ensures REST presence history message IDs match ProtocolMessage wrapped message and connection IDs via Realtime](./spec/acceptance/realtime/presence_history_spec.rb#
|
556
|
+
* [ensures REST presence history message IDs match ProtocolMessage wrapped message and connection IDs via Realtime](./spec/acceptance/realtime/presence_history_spec.rb#L42)
|
423
557
|
* with option until_attach: true
|
424
|
-
* [retrieves all presence messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#
|
425
|
-
* [raises an exception unless state is attached](./spec/acceptance/realtime/presence_history_spec.rb#
|
558
|
+
* [retrieves all presence messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L61)
|
559
|
+
* [raises an exception unless state is attached](./spec/acceptance/realtime/presence_history_spec.rb#L93)
|
426
560
|
* and two pages of messages
|
427
|
-
* [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#
|
561
|
+
* [retrieves two pages of messages before channel was attached](./spec/acceptance/realtime/presence_history_spec.rb#L74)
|
428
562
|
|
429
563
|
### Ably::Realtime::Presence
|
430
564
|
_(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_
|
431
565
|
* using JSON and MsgPack protocol
|
432
566
|
* when attached (but not present) on a presence channel with an anonymous client (no client ID)
|
433
|
-
* [maintains state as other clients enter and leave the channel](./spec/acceptance/realtime/presence_spec.rb#
|
567
|
+
* [maintains state as other clients enter and leave the channel](./spec/acceptance/realtime/presence_spec.rb#L282)
|
434
568
|
* #sync_complete?
|
435
569
|
* when attaching to a channel without any members present
|
436
|
-
* [is true and the presence channel is considered synced immediately](./spec/acceptance/realtime/presence_spec.rb#
|
570
|
+
* [is true and the presence channel is considered synced immediately](./spec/acceptance/realtime/presence_spec.rb#L358)
|
437
571
|
* when attaching to a channel with members present
|
438
|
-
* [is false and the presence channel will subsequently be synced](./spec/acceptance/realtime/presence_spec.rb#
|
572
|
+
* [is false and the presence channel will subsequently be synced](./spec/acceptance/realtime/presence_spec.rb#L367)
|
439
573
|
* 250 existing (present) members on a channel (3 SYNC pages)
|
440
574
|
* requires at least 3 SYNC ProtocolMessages
|
441
575
|
* when a client attaches to the presence channel
|
442
|
-
* [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#
|
576
|
+
* [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L399)
|
443
577
|
* and a member leaves before the SYNC operation is complete
|
444
|
-
* [emits :leave immediately as the member leaves](./spec/acceptance/realtime/presence_spec.rb#
|
445
|
-
* [ignores presence events with timestamps prior to the current :present event in the MembersMap](./spec/acceptance/realtime/presence_spec.rb#
|
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#
|
578
|
+
* [emits :leave immediately as the member leaves](./spec/acceptance/realtime/presence_spec.rb#L413)
|
579
|
+
* [ignores presence events with timestamps prior to the current :present event in the MembersMap](./spec/acceptance/realtime/presence_spec.rb#L451)
|
580
|
+
* [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#L490)
|
447
581
|
* #get
|
448
582
|
* with :wait_for_sync option set to true
|
449
|
-
* [waits until sync is complete](./spec/acceptance/realtime/presence_spec.rb#
|
583
|
+
* [waits until sync is complete](./spec/acceptance/realtime/presence_spec.rb#L537)
|
450
584
|
* by default
|
451
|
-
* [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#
|
585
|
+
* [it does not wait for sync](./spec/acceptance/realtime/presence_spec.rb#L554)
|
452
586
|
* state
|
453
587
|
* once opened
|
454
|
-
* [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#
|
588
|
+
* [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L578)
|
455
589
|
* #enter
|
456
|
-
* [allows client_id to be set on enter for anonymous clients](./spec/acceptance/realtime/presence_spec.rb#
|
457
|
-
* [raises an exception if client_id is not set](./spec/acceptance/realtime/presence_spec.rb#
|
590
|
+
* [allows client_id to be set on enter for anonymous clients](./spec/acceptance/realtime/presence_spec.rb#L601)
|
591
|
+
* [raises an exception if client_id is not set](./spec/acceptance/realtime/presence_spec.rb#L648)
|
458
592
|
* data attribute
|
459
593
|
* when provided as argument option to #enter
|
460
|
-
* [remains intact following #leave](./spec/acceptance/realtime/presence_spec.rb#
|
594
|
+
* [remains intact following #leave](./spec/acceptance/realtime/presence_spec.rb#L612)
|
461
595
|
* message #connection_id
|
462
|
-
* [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#
|
596
|
+
* [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L636)
|
463
597
|
* without necessary capabilities to join presence
|
464
|
-
* [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#
|
598
|
+
* [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L660)
|
465
599
|
* it should behave like a public presence method
|
466
600
|
* [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
|
467
601
|
* [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
|
468
|
-
* [
|
469
|
-
* [
|
470
|
-
* [
|
602
|
+
* [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L55)
|
603
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L212)
|
604
|
+
* [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L219)
|
605
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L227)
|
606
|
+
* [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L237)
|
607
|
+
* when :queue_messages client option is false
|
608
|
+
* and connection state initialized
|
609
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L67)
|
610
|
+
* and connection state connecting
|
611
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L75)
|
612
|
+
* and connection state disconnected
|
613
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L88)
|
614
|
+
* and connection state connected
|
615
|
+
* [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L101)
|
471
616
|
* with supported data payload content type
|
472
617
|
* JSON Object (Hash)
|
473
|
-
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#
|
618
|
+
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L128)
|
474
619
|
* JSON Array
|
475
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
620
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L138)
|
476
621
|
* String
|
477
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
622
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L148)
|
478
623
|
* Binary
|
479
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
624
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L158)
|
480
625
|
* with unsupported data payload content type
|
481
626
|
* Integer
|
482
|
-
* [raises an
|
627
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L178)
|
483
628
|
* Float
|
484
|
-
* [raises an
|
629
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L187)
|
485
630
|
* Boolean
|
486
|
-
* [raises an
|
631
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L196)
|
487
632
|
* False
|
488
|
-
* [raises an
|
633
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L205)
|
489
634
|
* if connection fails before success
|
490
|
-
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
635
|
+
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L258)
|
491
636
|
* #update
|
492
|
-
* [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#
|
493
|
-
* [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#
|
494
|
-
* [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#
|
637
|
+
* [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L672)
|
638
|
+
* [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L697)
|
639
|
+
* [updates the data to nil if :data argument is not provided (assumes nil value)](./spec/acceptance/realtime/presence_spec.rb#L707)
|
495
640
|
* when ENTERED
|
496
|
-
* [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#
|
641
|
+
* [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L682)
|
497
642
|
* it should behave like a public presence method
|
498
643
|
* [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
|
499
644
|
* [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
|
500
|
-
* [
|
501
|
-
* [
|
502
|
-
* [
|
645
|
+
* [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L55)
|
646
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L212)
|
647
|
+
* [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L219)
|
648
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L227)
|
649
|
+
* [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L237)
|
650
|
+
* when :queue_messages client option is false
|
651
|
+
* and connection state initialized
|
652
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L67)
|
653
|
+
* and connection state connecting
|
654
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L75)
|
655
|
+
* and connection state disconnected
|
656
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L88)
|
657
|
+
* and connection state connected
|
658
|
+
* [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L101)
|
503
659
|
* with supported data payload content type
|
504
660
|
* JSON Object (Hash)
|
505
|
-
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#
|
661
|
+
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L128)
|
506
662
|
* JSON Array
|
507
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
663
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L138)
|
508
664
|
* String
|
509
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
665
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L148)
|
510
666
|
* Binary
|
511
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
667
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L158)
|
512
668
|
* with unsupported data payload content type
|
513
669
|
* Integer
|
514
|
-
* [raises an
|
670
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L178)
|
515
671
|
* Float
|
516
|
-
* [raises an
|
672
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L187)
|
517
673
|
* Boolean
|
518
|
-
* [raises an
|
674
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L196)
|
519
675
|
* False
|
520
|
-
* [raises an
|
676
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L205)
|
521
677
|
* if connection fails before success
|
522
|
-
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
678
|
+
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L258)
|
523
679
|
* #leave
|
524
|
-
* [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#
|
680
|
+
* [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L781)
|
525
681
|
* :data option
|
526
682
|
* when set to a string
|
527
|
-
* [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#
|
683
|
+
* [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L726)
|
528
684
|
* when set to nil
|
529
|
-
* [emits a nil value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#
|
685
|
+
* [emits a nil value for the data attribute when leaving](./spec/acceptance/realtime/presence_spec.rb#L739)
|
530
686
|
* when not passed as an argument
|
531
|
-
* [emits the previously defined value as a convenience](./spec/acceptance/realtime/presence_spec.rb#
|
687
|
+
* [emits the previously defined value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L752)
|
532
688
|
* and sync is complete
|
533
|
-
* [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#
|
689
|
+
* [does not cache members that have left](./spec/acceptance/realtime/presence_spec.rb#L765)
|
534
690
|
* it should behave like a public presence method
|
535
|
-
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#
|
536
|
-
* [
|
537
|
-
* [
|
691
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L212)
|
692
|
+
* [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L219)
|
693
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L227)
|
694
|
+
* [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L237)
|
538
695
|
* with supported data payload content type
|
539
696
|
* JSON Object (Hash)
|
540
|
-
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#
|
697
|
+
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L128)
|
541
698
|
* JSON Array
|
542
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
699
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L138)
|
543
700
|
* String
|
544
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
701
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L148)
|
545
702
|
* Binary
|
546
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
703
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L158)
|
547
704
|
* with unsupported data payload content type
|
548
705
|
* Integer
|
549
|
-
* [raises an
|
706
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L178)
|
550
707
|
* Float
|
551
|
-
* [raises an
|
708
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L187)
|
552
709
|
* Boolean
|
553
|
-
* [raises an
|
710
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L196)
|
554
711
|
* False
|
555
|
-
* [raises an
|
712
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L205)
|
556
713
|
* if connection fails before success
|
557
|
-
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
714
|
+
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L258)
|
558
715
|
* :left event
|
559
|
-
* [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#
|
560
|
-
* [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#
|
716
|
+
* [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L790)
|
717
|
+
* [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L801)
|
561
718
|
* entering/updating/leaving presence state on behalf of another client_id
|
562
719
|
* #enter_client
|
563
720
|
* multiple times on the same channel with different client_ids
|
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#
|
565
|
-
* [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#
|
721
|
+
* [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#L822)
|
722
|
+
* [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L836)
|
566
723
|
* message #connection_id
|
567
|
-
* [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#
|
724
|
+
* [matches the current client connection_id](./spec/acceptance/realtime/presence_spec.rb#L855)
|
568
725
|
* it should behave like a public presence method
|
569
726
|
* [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
|
570
727
|
* [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
|
571
|
-
* [
|
572
|
-
* [
|
573
|
-
* [
|
728
|
+
* [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L55)
|
729
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L212)
|
730
|
+
* [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L219)
|
731
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L227)
|
732
|
+
* [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L237)
|
733
|
+
* when :queue_messages client option is false
|
734
|
+
* and connection state initialized
|
735
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L67)
|
736
|
+
* and connection state connecting
|
737
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L75)
|
738
|
+
* and connection state disconnected
|
739
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L88)
|
740
|
+
* and connection state connected
|
741
|
+
* [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L101)
|
574
742
|
* with supported data payload content type
|
575
743
|
* JSON Object (Hash)
|
576
|
-
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#
|
744
|
+
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L128)
|
577
745
|
* JSON Array
|
578
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
746
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L138)
|
579
747
|
* String
|
580
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
748
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L148)
|
581
749
|
* Binary
|
582
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
750
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L158)
|
583
751
|
* with unsupported data payload content type
|
584
752
|
* Integer
|
585
|
-
* [raises an
|
753
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L178)
|
586
754
|
* Float
|
587
|
-
* [raises an
|
755
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L187)
|
588
756
|
* Boolean
|
589
|
-
* [raises an
|
757
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L196)
|
590
758
|
* False
|
591
|
-
* [raises an
|
759
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L205)
|
592
760
|
* if connection fails before success
|
593
|
-
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
761
|
+
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L258)
|
594
762
|
* without necessary capabilities to enter on behalf of another client
|
595
|
-
* [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#
|
763
|
+
* [calls the Deferrable errback on capabilities failure](./spec/acceptance/realtime/presence_spec.rb#L877)
|
596
764
|
* #update_client
|
597
765
|
* multiple times on the same channel with different client_ids
|
598
|
-
* [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#
|
599
|
-
* [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#
|
600
|
-
* [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#
|
766
|
+
* [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L888)
|
767
|
+
* [updates the data attribute to null for the member when :data option is not provided (assumed null)](./spec/acceptance/realtime/presence_spec.rb#L912)
|
768
|
+
* [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L924)
|
601
769
|
* it should behave like a public presence method
|
602
770
|
* [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
|
603
771
|
* [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
|
604
|
-
* [
|
605
|
-
* [
|
606
|
-
* [
|
772
|
+
* [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L55)
|
773
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L212)
|
774
|
+
* [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L219)
|
775
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L227)
|
776
|
+
* [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L237)
|
777
|
+
* when :queue_messages client option is false
|
778
|
+
* and connection state initialized
|
779
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L67)
|
780
|
+
* and connection state connecting
|
781
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L75)
|
782
|
+
* and connection state disconnected
|
783
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L88)
|
784
|
+
* and connection state connected
|
785
|
+
* [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L101)
|
607
786
|
* with supported data payload content type
|
608
787
|
* JSON Object (Hash)
|
609
|
-
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#
|
788
|
+
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L128)
|
610
789
|
* JSON Array
|
611
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
790
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L138)
|
612
791
|
* String
|
613
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
792
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L148)
|
614
793
|
* Binary
|
615
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
794
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L158)
|
616
795
|
* with unsupported data payload content type
|
617
796
|
* Integer
|
618
|
-
* [raises an
|
797
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L178)
|
619
798
|
* Float
|
620
|
-
* [raises an
|
799
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L187)
|
621
800
|
* Boolean
|
622
|
-
* [raises an
|
801
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L196)
|
623
802
|
* False
|
624
|
-
* [raises an
|
803
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L205)
|
625
804
|
* if connection fails before success
|
626
|
-
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
805
|
+
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L258)
|
627
806
|
* #leave_client
|
628
807
|
* leaves a channel
|
629
808
|
* multiple times on the same channel with different client_ids
|
630
|
-
* [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#
|
631
|
-
* [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#
|
809
|
+
* [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L953)
|
810
|
+
* [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L977)
|
632
811
|
* with a new value in :data option
|
633
|
-
* [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#
|
812
|
+
* [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L1001)
|
634
813
|
* with a nil value in :data option
|
635
|
-
* [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#
|
814
|
+
* [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1014)
|
636
815
|
* with no :data option
|
637
|
-
* [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#
|
816
|
+
* [emits the leave event with the previous value as a convenience](./spec/acceptance/realtime/presence_spec.rb#L1027)
|
638
817
|
* it should behave like a public presence method
|
639
818
|
* [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L44)
|
640
819
|
* [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L44)
|
641
|
-
* [
|
642
|
-
* [
|
643
|
-
* [
|
820
|
+
* [implicitly attaches the channel](./spec/acceptance/realtime/presence_spec.rb#L55)
|
821
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L212)
|
822
|
+
* [allows a block to be passed in that is executed upon success](./spec/acceptance/realtime/presence_spec.rb#L219)
|
823
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L227)
|
824
|
+
* [catches exceptions in the provided method block and logs them to the logger](./spec/acceptance/realtime/presence_spec.rb#L237)
|
825
|
+
* when :queue_messages client option is false
|
826
|
+
* and connection state initialized
|
827
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L67)
|
828
|
+
* and connection state connecting
|
829
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L75)
|
830
|
+
* and connection state disconnected
|
831
|
+
* [raises an exception](./spec/acceptance/realtime/presence_spec.rb#L88)
|
832
|
+
* and connection state connected
|
833
|
+
* [publishes the message](./spec/acceptance/realtime/presence_spec.rb#L101)
|
644
834
|
* with supported data payload content type
|
645
835
|
* JSON Object (Hash)
|
646
|
-
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#
|
836
|
+
* [is encoded and decoded to the same hash](./spec/acceptance/realtime/presence_spec.rb#L128)
|
647
837
|
* JSON Array
|
648
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
838
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L138)
|
649
839
|
* String
|
650
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
840
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L148)
|
651
841
|
* Binary
|
652
|
-
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#
|
842
|
+
* [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L158)
|
653
843
|
* with unsupported data payload content type
|
654
844
|
* Integer
|
655
|
-
* [raises an
|
845
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L178)
|
656
846
|
* Float
|
657
|
-
* [raises an
|
847
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L187)
|
658
848
|
* Boolean
|
659
|
-
* [raises an
|
849
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L196)
|
660
850
|
* False
|
661
|
-
* [raises an
|
851
|
+
* [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L205)
|
662
852
|
* if connection fails before success
|
663
|
-
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
853
|
+
* [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L258)
|
664
854
|
* #get
|
665
|
-
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#
|
666
|
-
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#
|
667
|
-
* [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#
|
668
|
-
* [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
669
|
-
* [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#
|
670
|
-
* [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#
|
671
|
-
* [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#
|
672
|
-
* [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#
|
673
|
-
* [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#
|
855
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/presence_spec.rb#L1045)
|
856
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L1050)
|
857
|
+
* [catches exceptions in the provided method block](./spec/acceptance/realtime/presence_spec.rb#L1057)
|
858
|
+
* [raise an exception if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L1065)
|
859
|
+
* [raise an exception if the channel is failed](./spec/acceptance/realtime/presence_spec.rb#L1065)
|
860
|
+
* [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#L1142)
|
861
|
+
* [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L1157)
|
862
|
+
* [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L1179)
|
863
|
+
* [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#L1203)
|
674
864
|
* during a sync
|
675
865
|
* when :wait_for_sync is true
|
676
|
-
* [fails if the connection fails](./spec/acceptance/realtime/presence_spec.rb#
|
677
|
-
* [fails if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#
|
866
|
+
* [fails if the connection fails](./spec/acceptance/realtime/presence_spec.rb#L1096)
|
867
|
+
* [fails if the channel is detached](./spec/acceptance/realtime/presence_spec.rb#L1116)
|
678
868
|
* when a member enters and then leaves
|
679
|
-
* [has no members](./spec/acceptance/realtime/presence_spec.rb#
|
869
|
+
* [has no members](./spec/acceptance/realtime/presence_spec.rb#L1213)
|
680
870
|
* with lots of members on different clients
|
681
|
-
* [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#
|
871
|
+
* [returns a complete list of members on all clients](./spec/acceptance/realtime/presence_spec.rb#L1230)
|
682
872
|
* #subscribe
|
873
|
+
* [implicitly attaches](./spec/acceptance/realtime/presence_spec.rb#L1305)
|
683
874
|
* with no arguments
|
684
|
-
* [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#
|
875
|
+
* [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1266)
|
876
|
+
* with event name
|
877
|
+
* [calls the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1286)
|
685
878
|
* #unsubscribe
|
686
879
|
* with no arguments
|
687
|
-
* [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#
|
880
|
+
* [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L1318)
|
881
|
+
* with event name
|
882
|
+
* [removes the callback for specified presence event](./spec/acceptance/realtime/presence_spec.rb#L1336)
|
688
883
|
* REST #get
|
689
|
-
* [returns current members](./spec/acceptance/realtime/presence_spec.rb#
|
690
|
-
* [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#
|
884
|
+
* [returns current members](./spec/acceptance/realtime/presence_spec.rb#L1355)
|
885
|
+
* [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L1368)
|
691
886
|
* client_id with ASCII_8BIT
|
692
887
|
* in connection set up
|
693
|
-
* [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#
|
888
|
+
* [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1385)
|
694
889
|
* in channel options
|
695
|
-
* [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#
|
890
|
+
* [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L1398)
|
696
891
|
* encoding and decoding of presence message data
|
697
|
-
* [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#
|
892
|
+
* [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L1422)
|
698
893
|
* #subscribe
|
699
|
-
* [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#
|
700
|
-
* [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#
|
701
|
-
* [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#
|
894
|
+
* [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L1441)
|
895
|
+
* [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L1453)
|
896
|
+
* [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L1467)
|
702
897
|
* #get
|
703
|
-
* [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#
|
898
|
+
* [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L1483)
|
704
899
|
* REST #get
|
705
|
-
* [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#
|
900
|
+
* [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L1496)
|
706
901
|
* when cipher settings do not match publisher
|
707
|
-
* [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#
|
708
|
-
* [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#
|
902
|
+
* [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L1511)
|
903
|
+
* [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L1524)
|
709
904
|
* leaving
|
710
|
-
* [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#
|
711
|
-
* [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#
|
905
|
+
* [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L1541)
|
906
|
+
* [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L1551)
|
712
907
|
* connection failure mid-way through a large member sync
|
713
|
-
* [resumes the SYNC operation](./spec/acceptance/realtime/presence_spec.rb#
|
908
|
+
* [resumes the SYNC operation](./spec/acceptance/realtime/presence_spec.rb#L1569)
|
714
909
|
|
715
910
|
### Ably::Realtime::Client#stats
|
716
911
|
_(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_
|
717
912
|
* using JSON and MsgPack protocol
|
718
913
|
* fetching stats
|
719
|
-
* [
|
720
|
-
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/stats_spec.rb#
|
914
|
+
* [returns a PaginatedResult](./spec/acceptance/realtime/stats_spec.rb#L10)
|
915
|
+
* [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/stats_spec.rb#L29)
|
916
|
+
* with options
|
917
|
+
* [passes the option arguments to the REST stat method](./spec/acceptance/realtime/stats_spec.rb#L20)
|
721
918
|
|
722
919
|
### Ably::Realtime::Client#time
|
723
920
|
_(see [spec/acceptance/realtime/time_spec.rb](./spec/acceptance/realtime/time_spec.rb))_
|
@@ -729,120 +926,132 @@ _(see [spec/acceptance/realtime/time_spec.rb](./spec/acceptance/realtime/time_sp
|
|
729
926
|
### Ably::Auth
|
730
927
|
_(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
|
731
928
|
* using JSON and MsgPack protocol
|
732
|
-
* [has immutable options](./spec/acceptance/rest/auth_spec.rb#
|
929
|
+
* [has immutable options](./spec/acceptance/rest/auth_spec.rb#L60)
|
733
930
|
* #request_token
|
734
|
-
* [
|
735
|
-
* with
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
931
|
+
* [creates a TokenRequest automatically and sends it to Ably to obtain a token](./spec/acceptance/rest/auth_spec.rb#L75)
|
932
|
+
* [returns a valid TokenDetails object in the expected format with valid issued and expires attributes](./spec/acceptance/rest/auth_spec.rb#L84)
|
933
|
+
* with token_param :client_id
|
934
|
+
* [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L117)
|
935
|
+
* with token_param :capability
|
936
|
+
* [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L117)
|
937
|
+
* with token_param :nonce
|
938
|
+
* [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L117)
|
939
|
+
* with token_param :timestamp
|
940
|
+
* [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L117)
|
941
|
+
* with token_param :ttl
|
942
|
+
* [overrides default and uses camelCase notation for attributes](./spec/acceptance/rest/auth_spec.rb#L117)
|
745
943
|
* with :key option
|
746
|
-
* [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#
|
944
|
+
* [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L147)
|
747
945
|
* with :key_name & :key_secret options
|
748
|
-
* [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#
|
946
|
+
* [key_name is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L177)
|
749
947
|
* with :query_time option
|
750
|
-
* [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#
|
948
|
+
* [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L185)
|
751
949
|
* without :query_time option
|
752
|
-
* [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#
|
950
|
+
* [does not query the server for the time](./spec/acceptance/rest/auth_spec.rb#L194)
|
753
951
|
* with :auth_url option
|
754
952
|
* when response from :auth_url is a valid token request
|
755
|
-
* [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#
|
756
|
-
* [returns a valid token generated from the token request](./spec/acceptance/rest/auth_spec.rb#
|
953
|
+
* [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L242)
|
954
|
+
* [returns a valid token generated from the token request](./spec/acceptance/rest/auth_spec.rb#L247)
|
757
955
|
* with :query_params
|
758
|
-
* [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#
|
956
|
+
* [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L254)
|
759
957
|
* with :headers
|
760
|
-
* [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#
|
958
|
+
* [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L262)
|
761
959
|
* with POST
|
762
|
-
* [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#
|
960
|
+
* [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L270)
|
763
961
|
* when response from :auth_url is a token details object
|
764
|
-
* [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#
|
962
|
+
* [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L295)
|
765
963
|
* when response from :auth_url is text/plain content type and a token string
|
766
|
-
* [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#
|
964
|
+
* [returns TokenDetails created from the token JSON](./spec/acceptance/rest/auth_spec.rb#L313)
|
767
965
|
* when response is invalid
|
768
966
|
* 500
|
769
|
-
* [raises ServerError](./spec/acceptance/rest/auth_spec.rb#
|
967
|
+
* [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L327)
|
770
968
|
* XML
|
771
|
-
* [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#
|
969
|
+
* [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L338)
|
772
970
|
* with a Proc for the :auth_callback option
|
773
971
|
* that returns a TokenRequest
|
774
|
-
* [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#
|
775
|
-
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#
|
972
|
+
* [calls the Proc with token_params when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L361)
|
973
|
+
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L365)
|
776
974
|
* that returns a TokenDetails JSON object
|
777
|
-
* [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#
|
778
|
-
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#
|
975
|
+
* [calls the Proc when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L394)
|
976
|
+
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L399)
|
779
977
|
* that returns a TokenDetails object
|
780
|
-
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#
|
978
|
+
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L420)
|
781
979
|
* that returns a Token string
|
782
|
-
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#
|
783
|
-
* with client_id
|
784
|
-
* [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#
|
980
|
+
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L436)
|
981
|
+
* with auth_option :client_id
|
982
|
+
* [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L467)
|
983
|
+
* with token_param :client_id
|
984
|
+
* [returns a token with the client_id](./spec/acceptance/rest/auth_spec.rb#L476)
|
785
985
|
* before #authorise has been called
|
786
|
-
* [has no current_token_details](./spec/acceptance/rest/auth_spec.rb#
|
986
|
+
* [has no current_token_details](./spec/acceptance/rest/auth_spec.rb#L483)
|
787
987
|
* #authorise
|
788
|
-
* [updates the persisted auth options that are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#
|
988
|
+
* [updates the persisted auth options that are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L533)
|
789
989
|
* when called for the first time since the client has been instantiated
|
790
|
-
* [passes all
|
791
|
-
* [returns a valid token](./spec/acceptance/rest/auth_spec.rb#
|
792
|
-
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#
|
990
|
+
* [passes all auth_options and token_params to #request_token](./spec/acceptance/rest/auth_spec.rb#L497)
|
991
|
+
* [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L502)
|
992
|
+
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L506)
|
793
993
|
* with previous authorisation
|
794
|
-
* [does not request a token if current_token_details has not expired](./spec/acceptance/rest/auth_spec.rb#
|
795
|
-
* [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#
|
796
|
-
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#
|
994
|
+
* [does not request a token if current_token_details has not expired](./spec/acceptance/rest/auth_spec.rb#L517)
|
995
|
+
* [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L522)
|
996
|
+
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L528)
|
797
997
|
* with a Proc for the :auth_callback option
|
798
|
-
* [calls the Proc](./spec/acceptance/rest/auth_spec.rb#
|
799
|
-
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#
|
998
|
+
* [calls the Proc](./spec/acceptance/rest/auth_spec.rb#L549)
|
999
|
+
* [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L553)
|
800
1000
|
* for every subsequent #request_token
|
801
1001
|
* without a :auth_callback Proc
|
802
|
-
* [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#
|
1002
|
+
* [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L559)
|
803
1003
|
* with a provided block
|
804
|
-
* [does not call the originally provided Proc and calls the new #request_token :auth_callback Proc](./spec/acceptance/rest/auth_spec.rb#
|
1004
|
+
* [does not call the originally provided Proc and calls the new #request_token :auth_callback Proc](./spec/acceptance/rest/auth_spec.rb#L566)
|
805
1005
|
* #create_token_request
|
806
|
-
* [
|
807
|
-
* [
|
808
|
-
* [uses the
|
1006
|
+
* [returns a TokenRequest object](./spec/acceptance/rest/auth_spec.rb#L583)
|
1007
|
+
* [returns a TokenRequest that can be passed to a client that can use it for authentication without an API key](./spec/acceptance/rest/auth_spec.rb#L587)
|
1008
|
+
* [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L594)
|
1009
|
+
* [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L598)
|
1010
|
+
* [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L611)
|
1011
|
+
* with a :ttl option below the Token expiry buffer that ensures tokens are renewed 15s before they expire as they are considered expired
|
1012
|
+
* [uses the Token expiry buffer default + 10s to allow for a token request in flight](./spec/acceptance/rest/auth_spec.rb#L605)
|
809
1013
|
* the nonce
|
810
|
-
* [is unique for every request](./spec/acceptance/rest/auth_spec.rb#
|
811
|
-
* [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#
|
812
|
-
* with
|
813
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
814
|
-
* with
|
815
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
816
|
-
* with
|
817
|
-
* [overrides default](./spec/acceptance/rest/auth_spec.rb#
|
1014
|
+
* [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L616)
|
1015
|
+
* [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L621)
|
1016
|
+
* with token param :ttl
|
1017
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L632)
|
1018
|
+
* with token param :nonce
|
1019
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L632)
|
1020
|
+
* with token param :client_id
|
1021
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L632)
|
1022
|
+
* when specifying capability
|
1023
|
+
* [overrides the default](./spec/acceptance/rest/auth_spec.rb#L643)
|
1024
|
+
* [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L647)
|
818
1025
|
* with additional invalid attributes
|
819
|
-
* [are ignored](./spec/acceptance/rest/auth_spec.rb#
|
1026
|
+
* [are ignored](./spec/acceptance/rest/auth_spec.rb#L657)
|
820
1027
|
* when required fields are missing
|
821
|
-
* [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#
|
822
|
-
* [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#
|
823
|
-
*
|
824
|
-
* [
|
825
|
-
|
826
|
-
|
1028
|
+
* [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L668)
|
1029
|
+
* [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L672)
|
1030
|
+
* timestamp attribute
|
1031
|
+
* [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L699)
|
1032
|
+
* with :query_time auth_option
|
1033
|
+
* [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L684)
|
1034
|
+
* with :timestamp option
|
1035
|
+
* [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L694)
|
827
1036
|
* signing
|
828
|
-
* [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#
|
1037
|
+
* [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L723)
|
829
1038
|
* using token authentication
|
830
1039
|
* with :token option
|
831
|
-
* [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#
|
832
|
-
* [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#
|
833
|
-
* [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#
|
834
|
-
* [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#
|
1040
|
+
* [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L746)
|
1041
|
+
* [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L750)
|
1042
|
+
* [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L758)
|
1043
|
+
* [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L766)
|
835
1044
|
* when implicit as a result of using :client id
|
836
1045
|
* and requests to the Ably server are mocked
|
837
|
-
* [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#
|
1046
|
+
* [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L794)
|
838
1047
|
* a token is created
|
839
|
-
* [before a request is made](./spec/acceptance/rest/auth_spec.rb#
|
840
|
-
* [when a message is published](./spec/acceptance/rest/auth_spec.rb#
|
841
|
-
* [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#
|
1048
|
+
* [before a request is made](./spec/acceptance/rest/auth_spec.rb#L803)
|
1049
|
+
* [when a message is published](./spec/acceptance/rest/auth_spec.rb#L807)
|
1050
|
+
* [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L811)
|
842
1051
|
* when using an :key and basic auth
|
843
|
-
* [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#
|
844
|
-
* [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#
|
845
|
-
* [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#
|
1052
|
+
* [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L826)
|
1053
|
+
* [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L830)
|
1054
|
+
* [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L834)
|
846
1055
|
|
847
1056
|
### Ably::Rest
|
848
1057
|
_(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
|
@@ -869,31 +1078,55 @@ _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
|
|
869
1078
|
* when auth#token_renewable?
|
870
1079
|
* [should automatically reissue a token](./spec/acceptance/rest/base_spec.rb#L143)
|
871
1080
|
* when NOT auth#token_renewable?
|
872
|
-
* [should raise an
|
1081
|
+
* [should raise an TokenExpired exception](./spec/acceptance/rest/base_spec.rb#L158)
|
873
1082
|
|
874
1083
|
### Ably::Rest::Channel
|
875
1084
|
_(see [spec/acceptance/rest/channel_spec.rb](./spec/acceptance/rest/channel_spec.rb))_
|
876
1085
|
* using JSON and MsgPack protocol
|
877
1086
|
* #publish
|
878
|
-
*
|
1087
|
+
* with name and data arguments
|
1088
|
+
* [publishes the message and return true indicating success](./spec/acceptance/rest/channel_spec.rb#L20)
|
1089
|
+
* with an array of Hash objects with :name and :data attributes
|
1090
|
+
* [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L34)
|
1091
|
+
* with an array of Message objects
|
1092
|
+
* [publishes an array of messages in one HTTP request](./spec/acceptance/rest/channel_spec.rb#L49)
|
1093
|
+
* without adequate permissions on the channel
|
1094
|
+
* [raises a permission error when publishing](./spec/acceptance/rest/channel_spec.rb#L61)
|
1095
|
+
* null attributes
|
1096
|
+
* when name is null
|
1097
|
+
* [publishes the message without a name attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L70)
|
1098
|
+
* when data is null
|
1099
|
+
* [publishes the message without a data attribute in the payload](./spec/acceptance/rest/channel_spec.rb#L81)
|
1100
|
+
* with neither name or data attributes
|
1101
|
+
* [publishes the message without any attributes in the payload](./spec/acceptance/rest/channel_spec.rb#L92)
|
879
1102
|
* #history
|
880
|
-
* [
|
881
|
-
* [
|
1103
|
+
* [returns a PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L119)
|
1104
|
+
* [returns the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L123)
|
1105
|
+
* [returns paged history using the PaginatedResult model](./spec/acceptance/rest/channel_spec.rb#L151)
|
882
1106
|
* message timestamps
|
883
|
-
* [
|
1107
|
+
* [are after the messages were published](./spec/acceptance/rest/channel_spec.rb#L136)
|
884
1108
|
* message IDs
|
885
|
-
* [
|
1109
|
+
* [is unique](./spec/acceptance/rest/channel_spec.rb#L144)
|
1110
|
+
* direction
|
1111
|
+
* [returns paged history backwards by default](./spec/acceptance/rest/channel_spec.rb#L172)
|
1112
|
+
* [returns history forward if specified in the options](./spec/acceptance/rest/channel_spec.rb#L178)
|
1113
|
+
* limit
|
1114
|
+
* [defaults to 100](./spec/acceptance/rest/channel_spec.rb#L190)
|
886
1115
|
* #history option
|
887
1116
|
* :start
|
888
1117
|
* with milliseconds since epoch value
|
889
|
-
* [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#
|
1118
|
+
* [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L233)
|
890
1119
|
* with a Time object value
|
891
|
-
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#
|
1120
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L243)
|
892
1121
|
* :end
|
893
1122
|
* with milliseconds since epoch value
|
894
|
-
* [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#
|
1123
|
+
* [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L233)
|
895
1124
|
* with a Time object value
|
896
|
-
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#
|
1125
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L243)
|
1126
|
+
* when argument start is after end
|
1127
|
+
* [should raise an exception](./spec/acceptance/rest/channel_spec.rb#L253)
|
1128
|
+
* #presence
|
1129
|
+
* [returns a REST Presence object](./spec/acceptance/rest/channel_spec.rb#L263)
|
897
1130
|
|
898
1131
|
### Ably::Rest::Channels
|
899
1132
|
_(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_spec.rb))_
|
@@ -906,6 +1139,10 @@ _(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_sp
|
|
906
1139
|
* behaves like a channel
|
907
1140
|
* [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6)
|
908
1141
|
* [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11)
|
1142
|
+
* accessing an existing channel object with different options
|
1143
|
+
* [overrides the existing channel options and returns the channel object](./spec/acceptance/rest/channels_spec.rb#L39)
|
1144
|
+
* accessing an existing channel object without specifying any channel options
|
1145
|
+
* [returns the existing channel without modifying the channel options](./spec/acceptance/rest/channels_spec.rb#L50)
|
909
1146
|
* using undocumented array accessor [] method on client#channels
|
910
1147
|
* behaves like a channel
|
911
1148
|
* [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6)
|
@@ -915,43 +1152,69 @@ _(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_sp
|
|
915
1152
|
_(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.rb))_
|
916
1153
|
* using JSON and MsgPack protocol
|
917
1154
|
* #initialize
|
918
|
-
* with
|
919
|
-
* [
|
1155
|
+
* with only an API key
|
1156
|
+
* [uses basic authentication](./spec/acceptance/rest/client_spec.rb#L24)
|
1157
|
+
* with an explicit string :token
|
1158
|
+
* [uses token authentication](./spec/acceptance/rest/client_spec.rb#L32)
|
1159
|
+
* with :use_token_auth set to true
|
1160
|
+
* [uses token authentication](./spec/acceptance/rest/client_spec.rb#L40)
|
1161
|
+
* with a :client_id configured
|
1162
|
+
* [uses token authentication](./spec/acceptance/rest/client_spec.rb#L48)
|
1163
|
+
* with an :auth_callback Proc
|
1164
|
+
* [calls the auth Proc to get a new token](./spec/acceptance/rest/client_spec.rb#L56)
|
1165
|
+
* [uses token authentication](./spec/acceptance/rest/client_spec.rb#L61)
|
920
1166
|
* with an auth URL
|
921
|
-
* [
|
1167
|
+
* [uses token authentication](./spec/acceptance/rest/client_spec.rb#L70)
|
1168
|
+
* before any REST request
|
1169
|
+
* [sends an HTTP request to the provided auth URL to get a new token](./spec/acceptance/rest/client_spec.rb#L81)
|
1170
|
+
* auth headers
|
1171
|
+
* with basic auth
|
1172
|
+
* [sends the API key in authentication part of the secure URL (the Authorization: Basic header is not used with the Faraday HTTP library by default)](./spec/acceptance/rest/client_spec.rb#L101)
|
1173
|
+
* with token auth
|
1174
|
+
* without specifying protocol
|
1175
|
+
* [sends the token string over HTTPS in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L120)
|
1176
|
+
* when setting constructor ClientOption :tls to false
|
1177
|
+
* [sends the token string over HTTP in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L130)
|
922
1178
|
* using tokens
|
923
1179
|
* when expired
|
924
|
-
* [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#
|
1180
|
+
* [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#L161)
|
925
1181
|
* when token has not expired
|
926
|
-
* [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#
|
1182
|
+
* [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L175)
|
927
1183
|
* connection transport
|
928
1184
|
* for default host
|
929
|
-
* [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#
|
930
|
-
* [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#
|
1185
|
+
* [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L191)
|
1186
|
+
* [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L195)
|
931
1187
|
* for the fallback hosts
|
932
|
-
* [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#
|
933
|
-
* [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#
|
1188
|
+
* [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L201)
|
1189
|
+
* [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L205)
|
934
1190
|
* fallback hosts
|
935
1191
|
* configured
|
936
|
-
* [should make connection attempts to A.ably-realtime.com, B.ably-realtime.com, C.ably-realtime.com, D.ably-realtime.com, E.ably-realtime.com](./spec/acceptance/rest/client_spec.rb#
|
1192
|
+
* [should make connection attempts to A.ably-realtime.com, B.ably-realtime.com, C.ably-realtime.com, D.ably-realtime.com, E.ably-realtime.com](./spec/acceptance/rest/client_spec.rb#L218)
|
937
1193
|
* when environment is NOT production
|
938
|
-
* [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#
|
1194
|
+
* [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L235)
|
939
1195
|
* when environment is production
|
940
1196
|
* and connection times out
|
941
|
-
* [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#
|
1197
|
+
* [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L272)
|
942
1198
|
* and the total request time exeeds 10 seconds
|
943
|
-
* [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#
|
1199
|
+
* [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L287)
|
944
1200
|
* and connection fails
|
945
|
-
* [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#
|
1201
|
+
* [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L303)
|
1202
|
+
* and basic authentication fails
|
1203
|
+
* [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L327)
|
1204
|
+
* and server returns a 50x error
|
1205
|
+
* [attempts the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L349)
|
946
1206
|
* with a custom host
|
947
1207
|
* that does not exist
|
948
|
-
* [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#
|
1208
|
+
* [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L365)
|
949
1209
|
* fallback hosts
|
950
|
-
* [are never used](./spec/acceptance/rest/client_spec.rb#
|
1210
|
+
* [are never used](./spec/acceptance/rest/client_spec.rb#L386)
|
951
1211
|
* that times out
|
952
|
-
* [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#
|
1212
|
+
* [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L401)
|
953
1213
|
* fallback hosts
|
954
|
-
* [are never used](./spec/acceptance/rest/client_spec.rb#
|
1214
|
+
* [are never used](./spec/acceptance/rest/client_spec.rb#L414)
|
1215
|
+
* #auth
|
1216
|
+
* [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L428)
|
1217
|
+
* [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L432)
|
955
1218
|
|
956
1219
|
### Ably::Models::MessageEncoders
|
957
1220
|
_(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_
|
@@ -1002,13 +1265,13 @@ _(see [spec/acceptance/rest/message_spec.rb](./spec/acceptance/rest/message_spec
|
|
1002
1265
|
* [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L57)
|
1003
1266
|
* with unsupported data payload content type
|
1004
1267
|
* Integer
|
1005
|
-
* [is raises an
|
1268
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L68)
|
1006
1269
|
* Float
|
1007
|
-
* [is raises an
|
1270
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L76)
|
1008
1271
|
* Boolean
|
1009
|
-
* [is raises an
|
1272
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L84)
|
1010
1273
|
* False
|
1011
|
-
* [is raises an
|
1274
|
+
* [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L92)
|
1012
1275
|
* encryption and encoding
|
1013
1276
|
* with #publish and #history
|
1014
1277
|
* with AES-128-CBC using crypto-data-128.json fixtures
|
@@ -1070,78 +1333,105 @@ _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_sp
|
|
1070
1333
|
* #get
|
1071
1334
|
* [returns current members on the channel with their action set to :present](./spec/acceptance/rest/presence_spec.rb#L41)
|
1072
1335
|
* with :limit option
|
1073
|
-
* [returns a paged response limiting number of members per page](./spec/acceptance/rest/presence_spec.rb#
|
1336
|
+
* [returns a paged response limiting number of members per page](./spec/acceptance/rest/presence_spec.rb#L57)
|
1337
|
+
* default :limit
|
1338
|
+
* [defaults to a limit of 100](./spec/acceptance/rest/presence_spec.rb#L89)
|
1339
|
+
* with :client_id option
|
1340
|
+
* PENDING: *[returns a list members filtered by the provided client ID](./spec/acceptance/rest/presence_spec.rb#L98)*
|
1341
|
+
* with :connection_id option
|
1342
|
+
* PENDING: *[returns a list members filtered by the provided connection ID](./spec/acceptance/rest/presence_spec.rb#L109)*
|
1074
1343
|
* #history
|
1075
|
-
* [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#
|
1344
|
+
* [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L120)
|
1345
|
+
* default behaviour
|
1346
|
+
* [uses backwards direction](./spec/acceptance/rest/presence_spec.rb#L135)
|
1076
1347
|
* with options
|
1077
1348
|
* direction: :forwards
|
1078
|
-
* [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#
|
1349
|
+
* [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L147)
|
1079
1350
|
* direction: :backwards
|
1080
|
-
* [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#
|
1351
|
+
* [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L162)
|
1081
1352
|
* #history
|
1082
|
-
* with
|
1083
|
-
*
|
1084
|
-
*
|
1085
|
-
* [
|
1086
|
-
*
|
1087
|
-
* [
|
1088
|
-
*
|
1089
|
-
*
|
1090
|
-
*
|
1091
|
-
|
1092
|
-
*
|
1353
|
+
* with options
|
1354
|
+
* limit options
|
1355
|
+
* default
|
1356
|
+
* [is set to 100](./spec/acceptance/rest/presence_spec.rb#L210)
|
1357
|
+
* set to 1000
|
1358
|
+
* [is passes the limit query param value 1000](./spec/acceptance/rest/presence_spec.rb#L223)
|
1359
|
+
* with time range options
|
1360
|
+
* :start
|
1361
|
+
* with milliseconds since epoch value
|
1362
|
+
* [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L253)
|
1363
|
+
* with Time object value
|
1364
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L263)
|
1365
|
+
* :end
|
1366
|
+
* with milliseconds since epoch value
|
1367
|
+
* [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L253)
|
1368
|
+
* with Time object value
|
1369
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L263)
|
1370
|
+
* when argument start is after end
|
1371
|
+
* [should raise an exception](./spec/acceptance/rest/presence_spec.rb#L274)
|
1093
1372
|
* decoding
|
1094
1373
|
* with encoded fixture data
|
1095
1374
|
* #history
|
1096
|
-
* [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#
|
1375
|
+
* [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L293)
|
1097
1376
|
* #get
|
1098
|
-
* [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#
|
1377
|
+
* [decodes encoded and encryped presence fixture data automatically](./spec/acceptance/rest/presence_spec.rb#L300)
|
1099
1378
|
* decoding permutations using mocked #history
|
1100
1379
|
* valid decodeable content
|
1101
1380
|
* #get
|
1102
|
-
* [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#
|
1381
|
+
* [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L356)
|
1103
1382
|
* #history
|
1104
|
-
* [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#
|
1383
|
+
* [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L373)
|
1105
1384
|
* invalid data
|
1106
1385
|
* #get
|
1107
|
-
* [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#
|
1108
|
-
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#
|
1386
|
+
* [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L404)
|
1387
|
+
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L408)
|
1109
1388
|
* #history
|
1110
|
-
* [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#
|
1111
|
-
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#
|
1389
|
+
* [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L428)
|
1390
|
+
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L432)
|
1112
1391
|
|
1113
1392
|
### Ably::Rest::Client#stats
|
1114
1393
|
_(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_
|
1115
1394
|
* using JSON and MsgPack protocol
|
1116
1395
|
* fetching application stats
|
1396
|
+
* [returns a PaginatedResult object](./spec/acceptance/rest/stats_spec.rb#L54)
|
1117
1397
|
* by minute
|
1398
|
+
* with no options
|
1399
|
+
* [uses the minute interval by default](./spec/acceptance/rest/stats_spec.rb#L66)
|
1118
1400
|
* with :from set to last interval and :limit set to 1
|
1119
|
-
* [retrieves only one stat](./spec/acceptance/rest/stats_spec.rb#
|
1120
|
-
* [returns zero value for any missing metrics](./spec/acceptance/rest/stats_spec.rb#
|
1121
|
-
* [returns all aggregated message data](./spec/acceptance/rest/stats_spec.rb#
|
1122
|
-
* [returns inbound realtime all data](./spec/acceptance/rest/stats_spec.rb#
|
1123
|
-
* [returns inbound realtime message data](./spec/acceptance/rest/stats_spec.rb#
|
1124
|
-
* [returns outbound realtime all data](./spec/acceptance/rest/stats_spec.rb#
|
1125
|
-
* [returns persisted presence all data](./spec/acceptance/rest/stats_spec.rb#
|
1126
|
-
* [returns connections all data](./spec/acceptance/rest/stats_spec.rb#
|
1127
|
-
* [returns channels all data](./spec/acceptance/rest/stats_spec.rb#
|
1128
|
-
* [returns api_requests data](./spec/acceptance/rest/stats_spec.rb#
|
1129
|
-
* [returns token_requests data](./spec/acceptance/rest/stats_spec.rb#
|
1130
|
-
* [returns stat objects with #interval_granularity equal to :minute](./spec/acceptance/rest/stats_spec.rb#
|
1131
|
-
* [returns stat objects with #interval_id matching :start](./spec/acceptance/rest/stats_spec.rb#
|
1132
|
-
* [returns stat objects with #interval_time matching :start Time](./spec/acceptance/rest/stats_spec.rb#
|
1401
|
+
* [retrieves only one stat](./spec/acceptance/rest/stats_spec.rb#L75)
|
1402
|
+
* [returns zero value for any missing metrics](./spec/acceptance/rest/stats_spec.rb#L79)
|
1403
|
+
* [returns all aggregated message data](./spec/acceptance/rest/stats_spec.rb#L84)
|
1404
|
+
* [returns inbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L89)
|
1405
|
+
* [returns inbound realtime message data](./spec/acceptance/rest/stats_spec.rb#L94)
|
1406
|
+
* [returns outbound realtime all data](./spec/acceptance/rest/stats_spec.rb#L99)
|
1407
|
+
* [returns persisted presence all data](./spec/acceptance/rest/stats_spec.rb#L104)
|
1408
|
+
* [returns connections all data](./spec/acceptance/rest/stats_spec.rb#L109)
|
1409
|
+
* [returns channels all data](./spec/acceptance/rest/stats_spec.rb#L114)
|
1410
|
+
* [returns api_requests data](./spec/acceptance/rest/stats_spec.rb#L119)
|
1411
|
+
* [returns token_requests data](./spec/acceptance/rest/stats_spec.rb#L124)
|
1412
|
+
* [returns stat objects with #interval_granularity equal to :minute](./spec/acceptance/rest/stats_spec.rb#L129)
|
1413
|
+
* [returns stat objects with #interval_id matching :start](./spec/acceptance/rest/stats_spec.rb#L133)
|
1414
|
+
* [returns stat objects with #interval_time matching :start Time](./spec/acceptance/rest/stats_spec.rb#L137)
|
1133
1415
|
* with :start set to first interval, :limit set to 1 and direction :forwards
|
1134
|
-
* [returns the first interval stats as stats are provided forwards from :start](./spec/acceptance/rest/stats_spec.rb#
|
1135
|
-
* [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#
|
1416
|
+
* [returns the first interval stats as stats are provided forwards from :start](./spec/acceptance/rest/stats_spec.rb#L147)
|
1417
|
+
* [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L151)
|
1136
1418
|
* with :end set to last interval, :limit set to 1 and direction :backwards
|
1137
|
-
* [returns the 3rd interval stats first as stats are provided backwards from :end](./spec/acceptance/rest/stats_spec.rb#
|
1138
|
-
* [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#
|
1419
|
+
* [returns the 3rd interval stats first as stats are provided backwards from :end](./spec/acceptance/rest/stats_spec.rb#L163)
|
1420
|
+
* [returns 3 pages of stats](./spec/acceptance/rest/stats_spec.rb#L167)
|
1421
|
+
* with :end set to last interval and :limit set to 3 to ensure only last years stats are included
|
1422
|
+
* the REST API
|
1423
|
+
* [defaults to direction :backwards](./spec/acceptance/rest/stats_spec.rb#L179)
|
1424
|
+
* with :end set to previous year interval
|
1425
|
+
* the REST API
|
1426
|
+
* [defaults to 100 items for pagination](./spec/acceptance/rest/stats_spec.rb#L191)
|
1139
1427
|
* by hour
|
1140
|
-
* [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#
|
1428
|
+
* [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L215)
|
1141
1429
|
* by day
|
1142
|
-
* [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#
|
1430
|
+
* [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L215)
|
1143
1431
|
* by month
|
1144
|
-
* [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#
|
1432
|
+
* [should aggregate the stats for that period](./spec/acceptance/rest/stats_spec.rb#L215)
|
1433
|
+
* when argument start is after end
|
1434
|
+
* [should raise an exception](./spec/acceptance/rest/stats_spec.rb#L227)
|
1145
1435
|
|
1146
1436
|
### Ably::Rest::Client#time
|
1147
1437
|
_(see [spec/acceptance/rest/time_spec.rb](./spec/acceptance/rest/time_spec.rb))_
|
@@ -1153,22 +1443,22 @@ _(see [spec/acceptance/rest/time_spec.rb](./spec/acceptance/rest/time_spec.rb))_
|
|
1153
1443
|
_(see [spec/unit/auth_spec.rb](./spec/unit/auth_spec.rb))_
|
1154
1444
|
* client_id option
|
1155
1445
|
* with nil value
|
1156
|
-
* [is permitted](./spec/unit/auth_spec.rb#
|
1446
|
+
* [is permitted](./spec/unit/auth_spec.rb#L20)
|
1157
1447
|
* as UTF_8 string
|
1158
|
-
* [is permitted](./spec/unit/auth_spec.rb#
|
1159
|
-
* [remains as UTF-8](./spec/unit/auth_spec.rb#
|
1448
|
+
* [is permitted](./spec/unit/auth_spec.rb#L28)
|
1449
|
+
* [remains as UTF-8](./spec/unit/auth_spec.rb#L32)
|
1160
1450
|
* as SHIFT_JIS string
|
1161
|
-
* [gets converted to UTF-8](./spec/unit/auth_spec.rb#
|
1162
|
-
* [is compatible with original encoding](./spec/unit/auth_spec.rb#
|
1451
|
+
* [gets converted to UTF-8](./spec/unit/auth_spec.rb#L40)
|
1452
|
+
* [is compatible with original encoding](./spec/unit/auth_spec.rb#L44)
|
1163
1453
|
* as ASCII_8BIT string
|
1164
|
-
* [gets converted to UTF-8](./spec/unit/auth_spec.rb#
|
1165
|
-
* [is compatible with original encoding](./spec/unit/auth_spec.rb#
|
1454
|
+
* [gets converted to UTF-8](./spec/unit/auth_spec.rb#L52)
|
1455
|
+
* [is compatible with original encoding](./spec/unit/auth_spec.rb#L56)
|
1166
1456
|
* as Integer
|
1167
|
-
* [raises an argument error](./spec/unit/auth_spec.rb#
|
1457
|
+
* [raises an argument error](./spec/unit/auth_spec.rb#L64)
|
1168
1458
|
* defaults
|
1169
|
-
* [should default TTL to 1 hour](./spec/unit/auth_spec.rb#
|
1170
|
-
* [should default capability to all](./spec/unit/auth_spec.rb#
|
1171
|
-
* [should
|
1459
|
+
* [should default TTL to 1 hour](./spec/unit/auth_spec.rb#L74)
|
1460
|
+
* [should default capability to all](./spec/unit/auth_spec.rb#L78)
|
1461
|
+
* [should have defaults for :ttl and :capability](./spec/unit/auth_spec.rb#L82)
|
1172
1462
|
|
1173
1463
|
### Ably::Logger
|
1174
1464
|
_(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_
|
@@ -1350,6 +1640,8 @@ _(see [spec/unit/models/message_encoders/utf8_spec.rb](./spec/unit/models/messag
|
|
1350
1640
|
_(see [spec/unit/models/message_spec.rb](./spec/unit/models/message_spec.rb))_
|
1351
1641
|
* behaves like a model
|
1352
1642
|
* attributes
|
1643
|
+
* #id
|
1644
|
+
* [retrieves attribute :id](./spec/shared/model_behaviour.rb#L15)
|
1353
1645
|
* #name
|
1354
1646
|
* [retrieves attribute :name](./spec/shared/model_behaviour.rb#L15)
|
1355
1647
|
* #client_id
|
@@ -1435,33 +1727,31 @@ _(see [spec/unit/models/paginated_result_spec.rb](./spec/unit/models/paginated_r
|
|
1435
1727
|
* [returns an enumerator](./spec/unit/models/paginated_result_spec.rb#L44)
|
1436
1728
|
* [yields each item](./spec/unit/models/paginated_result_spec.rb#L48)
|
1437
1729
|
* with non paged http response
|
1438
|
-
* [is the
|
1439
|
-
* [
|
1440
|
-
* [does not
|
1441
|
-
* [
|
1442
|
-
* [returns nil when accessing
|
1443
|
-
* [returns nil when accessing first page](./spec/unit/models/paginated_result_spec.rb#L192)
|
1730
|
+
* [is the last page](./spec/unit/models/paginated_result_spec.rb#L172)
|
1731
|
+
* [does not have next page](./spec/unit/models/paginated_result_spec.rb#L176)
|
1732
|
+
* [does not support pagination](./spec/unit/models/paginated_result_spec.rb#L180)
|
1733
|
+
* [returns nil when accessing next page](./spec/unit/models/paginated_result_spec.rb#L184)
|
1734
|
+
* [returns nil when accessing first page](./spec/unit/models/paginated_result_spec.rb#L188)
|
1444
1735
|
* with paged http response
|
1445
|
-
* [
|
1446
|
-
* [
|
1447
|
-
* [
|
1448
|
-
* [supports pagination](./spec/unit/models/paginated_result_spec.rb#L222)
|
1736
|
+
* [has next page](./spec/unit/models/paginated_result_spec.rb#L206)
|
1737
|
+
* [is not the last page](./spec/unit/models/paginated_result_spec.rb#L210)
|
1738
|
+
* [supports pagination](./spec/unit/models/paginated_result_spec.rb#L214)
|
1449
1739
|
* accessing next page
|
1450
|
-
* [returns another PaginatedResult](./spec/unit/models/paginated_result_spec.rb#
|
1451
|
-
* [retrieves the next page of results](./spec/unit/models/paginated_result_spec.rb#
|
1452
|
-
* [
|
1453
|
-
* [
|
1454
|
-
* [is the last page](./spec/unit/models/paginated_result_spec.rb#
|
1455
|
-
* [returns nil when trying to access the last page when it is the last page](./spec/unit/models/paginated_result_spec.rb#L271)
|
1740
|
+
* [returns another PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L242)
|
1741
|
+
* [retrieves the next page of results](./spec/unit/models/paginated_result_spec.rb#L246)
|
1742
|
+
* [does not have a next page](./spec/unit/models/paginated_result_spec.rb#L251)
|
1743
|
+
* [is the last page](./spec/unit/models/paginated_result_spec.rb#L255)
|
1744
|
+
* [returns nil when trying to access the last page when it is the last page](./spec/unit/models/paginated_result_spec.rb#L259)
|
1456
1745
|
* and then first page
|
1457
|
-
* [returns a PaginatedResult](./spec/unit/models/paginated_result_spec.rb#
|
1458
|
-
* [retrieves the first page of results](./spec/unit/models/paginated_result_spec.rb#
|
1459
|
-
* [is the first page](./spec/unit/models/paginated_result_spec.rb#L290)
|
1746
|
+
* [returns a PaginatedResult](./spec/unit/models/paginated_result_spec.rb#L270)
|
1747
|
+
* [retrieves the first page of results](./spec/unit/models/paginated_result_spec.rb#L274)
|
1460
1748
|
|
1461
1749
|
### Ably::Models::PresenceMessage
|
1462
1750
|
_(see [spec/unit/models/presence_message_spec.rb](./spec/unit/models/presence_message_spec.rb))_
|
1463
1751
|
* behaves like a model
|
1464
1752
|
* attributes
|
1753
|
+
* #id
|
1754
|
+
* [retrieves attribute :id](./spec/shared/model_behaviour.rb#L15)
|
1465
1755
|
* #client_id
|
1466
1756
|
* [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15)
|
1467
1757
|
* #data
|
@@ -1550,6 +1840,8 @@ _(see [spec/unit/models/protocol_message_spec.rb](./spec/unit/models/protocol_me
|
|
1550
1840
|
* [retrieves attribute :channel_serial](./spec/shared/model_behaviour.rb#L15)
|
1551
1841
|
* #connection_id
|
1552
1842
|
* [retrieves attribute :connection_id](./spec/shared/model_behaviour.rb#L15)
|
1843
|
+
* #connection_key
|
1844
|
+
* [retrieves attribute :connection_key](./spec/shared/model_behaviour.rb#L15)
|
1553
1845
|
* #==
|
1554
1846
|
* [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
|
1555
1847
|
* [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
|
@@ -1611,6 +1903,10 @@ _(see [spec/unit/models/protocol_message_spec.rb](./spec/unit/models/protocol_me
|
|
1611
1903
|
* [returns nil](./spec/unit/models/protocol_message_spec.rb#L253)
|
1612
1904
|
* with error
|
1613
1905
|
* [returns a valid ErrorInfo object](./spec/unit/models/protocol_message_spec.rb#L261)
|
1906
|
+
* #messages
|
1907
|
+
* [contains Message objects](./spec/unit/models/protocol_message_spec.rb#L271)
|
1908
|
+
* #presence
|
1909
|
+
* [contains PresenceMessage objects](./spec/unit/models/protocol_message_spec.rb#L281)
|
1614
1910
|
|
1615
1911
|
### Ably::Models::Stats
|
1616
1912
|
_(see [spec/unit/models/stats_spec.rb](./spec/unit/models/stats_spec.rb))_
|
@@ -1888,49 +2184,53 @@ _(see [spec/unit/realtime/channel_spec.rb](./spec/unit/realtime/channel_spec.rb)
|
|
1888
2184
|
* [raises an argument error](./spec/unit/realtime/channel_spec.rb#L63)
|
1889
2185
|
* #publish name argument
|
1890
2186
|
* as UTF_8 string
|
1891
|
-
* [is permitted](./spec/unit/realtime/channel_spec.rb#
|
2187
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L80)
|
1892
2188
|
* as SHIFT_JIS string
|
1893
|
-
* [is permitted](./spec/unit/realtime/channel_spec.rb#
|
2189
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L88)
|
1894
2190
|
* as ASCII_8BIT string
|
1895
|
-
* [is permitted](./spec/unit/realtime/channel_spec.rb#
|
2191
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L96)
|
1896
2192
|
* as Integer
|
1897
|
-
* [raises an argument error](./spec/unit/realtime/channel_spec.rb#
|
2193
|
+
* [raises an argument error](./spec/unit/realtime/channel_spec.rb#L104)
|
1898
2194
|
* as Nil
|
1899
|
-
* [
|
2195
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L112)
|
1900
2196
|
* callbacks
|
1901
|
-
* [are supported for valid STATE events](./spec/unit/realtime/channel_spec.rb#
|
1902
|
-
* [fail with unacceptable STATE event names](./spec/unit/realtime/channel_spec.rb#
|
2197
|
+
* [are supported for valid STATE events](./spec/unit/realtime/channel_spec.rb#L119)
|
2198
|
+
* [fail with unacceptable STATE event names](./spec/unit/realtime/channel_spec.rb#L125)
|
1903
2199
|
* subscriptions
|
1904
2200
|
* #subscribe
|
1905
|
-
* [without a block raises an invalid ArgumentError](./spec/unit/realtime/channel_spec.rb#
|
1906
|
-
* [with no event name specified subscribes the provided block to all events](./spec/unit/realtime/channel_spec.rb#
|
1907
|
-
* [with a single event name subscribes that block to matching events](./spec/unit/realtime/channel_spec.rb#
|
1908
|
-
* [with a multiple event name arguments subscribes that block to all of those event names](./spec/unit/realtime/channel_spec.rb#
|
1909
|
-
* [with a multiple duplicate event name arguments subscribes that block to all of those unique event names once](./spec/unit/realtime/channel_spec.rb#
|
2201
|
+
* [without a block raises an invalid ArgumentError](./spec/unit/realtime/channel_spec.rb#L167)
|
2202
|
+
* [with no event name specified subscribes the provided block to all events](./spec/unit/realtime/channel_spec.rb#L171)
|
2203
|
+
* [with a single event name subscribes that block to matching events](./spec/unit/realtime/channel_spec.rb#L177)
|
2204
|
+
* [with a multiple event name arguments subscribes that block to all of those event names](./spec/unit/realtime/channel_spec.rb#L184)
|
2205
|
+
* [with a multiple duplicate event name arguments subscribes that block to all of those unique event names once](./spec/unit/realtime/channel_spec.rb#L196)
|
1910
2206
|
* #unsubscribe
|
1911
|
-
* [with no event name specified unsubscribes that block from all events](./spec/unit/realtime/channel_spec.rb#
|
1912
|
-
* [with a single event name argument unsubscribes the provided block with the matching event name](./spec/unit/realtime/channel_spec.rb#
|
1913
|
-
* [with multiple event name arguments unsubscribes each of those matching event names with the provided block](./spec/unit/realtime/channel_spec.rb#
|
1914
|
-
* [with a non-matching event name argument has no effect](./spec/unit/realtime/channel_spec.rb#
|
1915
|
-
* [with no block argument unsubscribes all blocks for the event name argument](./spec/unit/realtime/channel_spec.rb#
|
2207
|
+
* [with no event name specified unsubscribes that block from all events](./spec/unit/realtime/channel_spec.rb#L213)
|
2208
|
+
* [with a single event name argument unsubscribes the provided block with the matching event name](./spec/unit/realtime/channel_spec.rb#L219)
|
2209
|
+
* [with multiple event name arguments unsubscribes each of those matching event names with the provided block](./spec/unit/realtime/channel_spec.rb#L225)
|
2210
|
+
* [with a non-matching event name argument has no effect](./spec/unit/realtime/channel_spec.rb#L231)
|
2211
|
+
* [with no block argument unsubscribes all blocks for the event name argument](./spec/unit/realtime/channel_spec.rb#L237)
|
1916
2212
|
|
1917
2213
|
### Ably::Realtime::Channels
|
1918
2214
|
_(see [spec/unit/realtime/channels_spec.rb](./spec/unit/realtime/channels_spec.rb))_
|
1919
2215
|
* creating channels
|
1920
|
-
* [
|
1921
|
-
*
|
1922
|
-
|
2216
|
+
* [[] creates a channel](./spec/unit/realtime/channels_spec.rb#L43)
|
2217
|
+
* #get
|
2218
|
+
* [creates a channel if it does not exist](./spec/unit/realtime/channels_spec.rb#L14)
|
2219
|
+
* when an existing channel exists
|
2220
|
+
* [will reuse a channel object if it exists](./spec/unit/realtime/channels_spec.rb#L20)
|
2221
|
+
* [will update the options on the channel if provided](./spec/unit/realtime/channels_spec.rb#L26)
|
2222
|
+
* [will leave the options intact on the channel if not provided](./spec/unit/realtime/channels_spec.rb#L34)
|
1923
2223
|
* #fetch
|
1924
|
-
* [retrieves a channel if it exists](./spec/unit/realtime/channels_spec.rb#
|
1925
|
-
* [calls the block if channel is missing](./spec/unit/realtime/channels_spec.rb#
|
2224
|
+
* [retrieves a channel if it exists](./spec/unit/realtime/channels_spec.rb#L50)
|
2225
|
+
* [calls the block if channel is missing](./spec/unit/realtime/channels_spec.rb#L55)
|
1926
2226
|
* destroying channels
|
1927
|
-
* [#release detaches and then releases the channel resources](./spec/unit/realtime/channels_spec.rb#
|
2227
|
+
* [#release detaches and then releases the channel resources](./spec/unit/realtime/channels_spec.rb#L63)
|
1928
2228
|
* is Enumerable
|
1929
|
-
* [allows enumeration](./spec/unit/realtime/channels_spec.rb#
|
1930
|
-
* [provides #length](./spec/unit/realtime/channels_spec.rb#
|
2229
|
+
* [allows enumeration](./spec/unit/realtime/channels_spec.rb#L80)
|
2230
|
+
* [provides #length](./spec/unit/realtime/channels_spec.rb#L96)
|
1931
2231
|
* #each
|
1932
|
-
* [returns an enumerator](./spec/unit/realtime/channels_spec.rb#
|
1933
|
-
* [yields each channel](./spec/unit/realtime/channels_spec.rb#
|
2232
|
+
* [returns an enumerator](./spec/unit/realtime/channels_spec.rb#L85)
|
2233
|
+
* [yields each channel](./spec/unit/realtime/channels_spec.rb#L89)
|
1934
2234
|
|
1935
2235
|
### Ably::Realtime::Client
|
1936
2236
|
_(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_
|
@@ -1953,37 +2253,49 @@ _(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_
|
|
1953
2253
|
* with valid arguments
|
1954
2254
|
* key only
|
1955
2255
|
* [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87)
|
2256
|
+
* [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L91)
|
1956
2257
|
* with a string key instead of options hash
|
1957
|
-
* [sets the key](./spec/shared/client_initializer_behaviour.rb#
|
1958
|
-
* [sets the key_name](./spec/shared/client_initializer_behaviour.rb#
|
1959
|
-
* [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#
|
2258
|
+
* [sets the key](./spec/shared/client_initializer_behaviour.rb#L107)
|
2259
|
+
* [sets the key_name](./spec/shared/client_initializer_behaviour.rb#L111)
|
2260
|
+
* [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L115)
|
2261
|
+
* [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L119)
|
1960
2262
|
* with a string token key instead of options hash
|
1961
|
-
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L119)
|
1962
|
-
* with token
|
1963
2263
|
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L127)
|
1964
|
-
* with
|
2264
|
+
* with token
|
1965
2265
|
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L135)
|
2266
|
+
* with token_details
|
2267
|
+
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L143)
|
2268
|
+
* with token_params
|
2269
|
+
* [configures the default token_params](./spec/shared/client_initializer_behaviour.rb#L151)
|
1966
2270
|
* endpoint
|
1967
|
-
* [defaults to production](./spec/shared/client_initializer_behaviour.rb#
|
2271
|
+
* [defaults to production](./spec/shared/client_initializer_behaviour.rb#L158)
|
1968
2272
|
* with environment option
|
1969
|
-
* [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#
|
2273
|
+
* [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L165)
|
2274
|
+
* with rest_host option
|
2275
|
+
* PENDING: *[uses an alternate endpoint for REST clients](./spec/shared/client_initializer_behaviour.rb#L173)*
|
2276
|
+
* with realtime_host option
|
2277
|
+
* [uses an alternate endpoint for Realtime clients](./spec/shared/client_initializer_behaviour.rb#L182)
|
2278
|
+
* with port option and non-TLS connections
|
2279
|
+
* [uses the custom port for non-TLS requests](./spec/shared/client_initializer_behaviour.rb#L191)
|
2280
|
+
* with tls_port option and a TLS connection
|
2281
|
+
* [uses the custom port for TLS requests](./spec/shared/client_initializer_behaviour.rb#L199)
|
1970
2282
|
* tls
|
1971
|
-
* [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#
|
2283
|
+
* [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L218)
|
1972
2284
|
* set to false
|
1973
|
-
* [uses plain text](./spec/shared/client_initializer_behaviour.rb#
|
1974
|
-
* [uses HTTP](./spec/shared/client_initializer_behaviour.rb#
|
2285
|
+
* [uses plain text](./spec/shared/client_initializer_behaviour.rb#L209)
|
2286
|
+
* [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L213)
|
1975
2287
|
* logger
|
1976
2288
|
* default
|
1977
|
-
* [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#
|
1978
|
-
* [specifies Logger::
|
2289
|
+
* [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L225)
|
2290
|
+
* [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L229)
|
1979
2291
|
* with log_level :none
|
1980
|
-
* [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#
|
2292
|
+
* [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L237)
|
1981
2293
|
* with custom logger and log_level
|
1982
|
-
* [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#
|
1983
|
-
* [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#
|
2294
|
+
* [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L255)
|
2295
|
+
* [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L259)
|
1984
2296
|
* delegators
|
1985
|
-
* [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#
|
1986
|
-
* [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#
|
2297
|
+
* [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L269)
|
2298
|
+
* [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L274)
|
1987
2299
|
* delegation to the REST Client
|
1988
2300
|
* [passes on the options to the initializer](./spec/unit/realtime/client_spec.rb#L15)
|
1989
2301
|
* for attribute
|
@@ -2088,8 +2400,6 @@ _(see [spec/unit/rest/channel_spec.rb](./spec/unit/rest/channel_spec.rb))_
|
|
2088
2400
|
* [is permitted](./spec/unit/rest/channel_spec.rb#L88)
|
2089
2401
|
* as Integer
|
2090
2402
|
* [raises an argument error](./spec/unit/rest/channel_spec.rb#L96)
|
2091
|
-
* as Nil
|
2092
|
-
* [raises an argument error](./spec/unit/rest/channel_spec.rb#L104)
|
2093
2403
|
|
2094
2404
|
### Ably::Rest::Channels
|
2095
2405
|
_(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_
|
@@ -2130,50 +2440,62 @@ _(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
|
|
2130
2440
|
* with valid arguments
|
2131
2441
|
* key only
|
2132
2442
|
* [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87)
|
2443
|
+
* [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L91)
|
2133
2444
|
* with a string key instead of options hash
|
2134
|
-
* [sets the key](./spec/shared/client_initializer_behaviour.rb#
|
2135
|
-
* [sets the key_name](./spec/shared/client_initializer_behaviour.rb#
|
2136
|
-
* [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#
|
2445
|
+
* [sets the key](./spec/shared/client_initializer_behaviour.rb#L107)
|
2446
|
+
* [sets the key_name](./spec/shared/client_initializer_behaviour.rb#L111)
|
2447
|
+
* [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L115)
|
2448
|
+
* [uses basic auth](./spec/shared/client_initializer_behaviour.rb#L119)
|
2137
2449
|
* with a string token key instead of options hash
|
2138
|
-
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L119)
|
2139
|
-
* with token
|
2140
2450
|
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L127)
|
2141
|
-
* with
|
2451
|
+
* with token
|
2142
2452
|
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L135)
|
2453
|
+
* with token_details
|
2454
|
+
* [sets the token](./spec/shared/client_initializer_behaviour.rb#L143)
|
2455
|
+
* with token_params
|
2456
|
+
* [configures the default token_params](./spec/shared/client_initializer_behaviour.rb#L151)
|
2143
2457
|
* endpoint
|
2144
|
-
* [defaults to production](./spec/shared/client_initializer_behaviour.rb#
|
2458
|
+
* [defaults to production](./spec/shared/client_initializer_behaviour.rb#L158)
|
2145
2459
|
* with environment option
|
2146
|
-
* [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#
|
2460
|
+
* [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L165)
|
2461
|
+
* with rest_host option
|
2462
|
+
* [uses an alternate endpoint for REST clients](./spec/shared/client_initializer_behaviour.rb#L173)
|
2463
|
+
* with realtime_host option
|
2464
|
+
* PENDING: *[uses an alternate endpoint for Realtime clients](./spec/shared/client_initializer_behaviour.rb#L182)*
|
2465
|
+
* with port option and non-TLS connections
|
2466
|
+
* [uses the custom port for non-TLS requests](./spec/shared/client_initializer_behaviour.rb#L191)
|
2467
|
+
* with tls_port option and a TLS connection
|
2468
|
+
* [uses the custom port for TLS requests](./spec/shared/client_initializer_behaviour.rb#L199)
|
2147
2469
|
* tls
|
2148
|
-
* [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#
|
2470
|
+
* [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L218)
|
2149
2471
|
* set to false
|
2150
|
-
* [uses plain text](./spec/shared/client_initializer_behaviour.rb#
|
2151
|
-
* [uses HTTP](./spec/shared/client_initializer_behaviour.rb#
|
2472
|
+
* [uses plain text](./spec/shared/client_initializer_behaviour.rb#L209)
|
2473
|
+
* [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L213)
|
2152
2474
|
* logger
|
2153
2475
|
* default
|
2154
|
-
* [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#
|
2155
|
-
* [specifies Logger::
|
2476
|
+
* [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L225)
|
2477
|
+
* [specifies Logger::WARN log level](./spec/shared/client_initializer_behaviour.rb#L229)
|
2156
2478
|
* with log_level :none
|
2157
|
-
* [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#
|
2479
|
+
* [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L237)
|
2158
2480
|
* with custom logger and log_level
|
2159
|
-
* [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#
|
2160
|
-
* [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#
|
2481
|
+
* [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L255)
|
2482
|
+
* [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L259)
|
2161
2483
|
* delegators
|
2162
|
-
* [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#
|
2163
|
-
* [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#
|
2484
|
+
* [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L269)
|
2485
|
+
* [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L274)
|
2164
2486
|
* initializer options
|
2165
2487
|
* TLS
|
2166
2488
|
* disabled
|
2167
2489
|
* [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/rest/client_spec.rb#L17)
|
2168
2490
|
* :use_token_auth
|
2169
2491
|
* set to false
|
2170
|
-
* with
|
2492
|
+
* with a key and :tls => false
|
2171
2493
|
* [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/rest/client_spec.rb#L28)
|
2172
|
-
* without
|
2173
|
-
* [fails as
|
2494
|
+
* without a key
|
2495
|
+
* [fails as a key is required if not using token auth](./spec/unit/rest/client_spec.rb#L36)
|
2174
2496
|
* set to true
|
2175
|
-
* without
|
2176
|
-
* [fails as
|
2497
|
+
* without a key or token
|
2498
|
+
* [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L46)
|
2177
2499
|
|
2178
2500
|
### Ably::Rest
|
2179
2501
|
_(see [spec/unit/rest/rest_spec.rb](./spec/unit/rest/rest_spec.rb))_
|
@@ -2214,6 +2536,6 @@ _(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_
|
|
2214
2536
|
|
2215
2537
|
## Test summary
|
2216
2538
|
|
2217
|
-
* Passing tests:
|
2218
|
-
* Pending tests:
|
2539
|
+
* Passing tests: 1244
|
2540
|
+
* Pending tests: 13
|
2219
2541
|
* Failing tests: 0
|