ably 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.ruby-version.old +1 -0
- data/.travis.yml +0 -2
- data/Rakefile +22 -4
- data/SPEC.md +1676 -0
- data/ably.gemspec +1 -1
- data/lib/ably.rb +0 -8
- data/lib/ably/auth.rb +54 -46
- data/lib/ably/exceptions.rb +19 -5
- data/lib/ably/logger.rb +1 -1
- data/lib/ably/models/error_info.rb +1 -1
- data/lib/ably/models/idiomatic_ruby_wrapper.rb +11 -9
- data/lib/ably/models/message.rb +15 -12
- data/lib/ably/models/message_encoders/base.rb +6 -5
- data/lib/ably/models/message_encoders/base64.rb +1 -0
- data/lib/ably/models/message_encoders/cipher.rb +6 -3
- data/lib/ably/models/message_encoders/json.rb +1 -0
- data/lib/ably/models/message_encoders/utf8.rb +2 -9
- data/lib/ably/models/nil_logger.rb +20 -0
- data/lib/ably/models/paginated_resource.rb +5 -2
- data/lib/ably/models/presence_message.rb +21 -12
- data/lib/ably/models/protocol_message.rb +22 -6
- data/lib/ably/modules/ably.rb +11 -0
- data/lib/ably/modules/async_wrapper.rb +2 -0
- data/lib/ably/modules/conversions.rb +23 -3
- data/lib/ably/modules/encodeable.rb +2 -1
- data/lib/ably/modules/enum.rb +2 -0
- data/lib/ably/modules/event_emitter.rb +7 -1
- data/lib/ably/modules/event_machine_helpers.rb +2 -0
- data/lib/ably/modules/http_helpers.rb +2 -0
- data/lib/ably/modules/model_common.rb +12 -2
- data/lib/ably/modules/state_emitter.rb +76 -0
- data/lib/ably/modules/state_machine.rb +53 -0
- data/lib/ably/modules/statesman_monkey_patch.rb +33 -0
- data/lib/ably/modules/uses_state_machine.rb +74 -0
- data/lib/ably/realtime.rb +4 -2
- data/lib/ably/realtime/channel.rb +51 -58
- data/lib/ably/realtime/channel/channel_manager.rb +91 -0
- data/lib/ably/realtime/channel/channel_state_machine.rb +68 -0
- data/lib/ably/realtime/client.rb +70 -26
- data/lib/ably/realtime/client/incoming_message_dispatcher.rb +31 -13
- data/lib/ably/realtime/client/outgoing_message_dispatcher.rb +1 -1
- data/lib/ably/realtime/connection.rb +135 -92
- data/lib/ably/realtime/connection/connection_manager.rb +216 -33
- data/lib/ably/realtime/connection/connection_state_machine.rb +30 -73
- data/lib/ably/realtime/models/nil_channel.rb +10 -1
- data/lib/ably/realtime/presence.rb +336 -92
- data/lib/ably/rest.rb +2 -2
- data/lib/ably/rest/channel.rb +13 -4
- data/lib/ably/rest/client.rb +138 -38
- data/lib/ably/rest/middleware/logger.rb +24 -3
- data/lib/ably/rest/presence.rb +12 -7
- data/lib/ably/version.rb +1 -1
- data/spec/acceptance/realtime/channel_history_spec.rb +101 -85
- data/spec/acceptance/realtime/channel_spec.rb +461 -120
- data/spec/acceptance/realtime/client_spec.rb +119 -0
- data/spec/acceptance/realtime/connection_failures_spec.rb +499 -0
- data/spec/acceptance/realtime/connection_spec.rb +571 -97
- data/spec/acceptance/realtime/message_spec.rb +347 -333
- data/spec/acceptance/realtime/presence_history_spec.rb +35 -40
- data/spec/acceptance/realtime/presence_spec.rb +769 -239
- data/spec/acceptance/realtime/stats_spec.rb +14 -22
- data/spec/acceptance/realtime/time_spec.rb +16 -20
- data/spec/acceptance/rest/auth_spec.rb +425 -364
- data/spec/acceptance/rest/base_spec.rb +108 -176
- data/spec/acceptance/rest/channel_spec.rb +89 -89
- data/spec/acceptance/rest/channels_spec.rb +30 -32
- data/spec/acceptance/rest/client_spec.rb +273 -0
- data/spec/acceptance/rest/encoders_spec.rb +185 -0
- data/spec/acceptance/rest/message_spec.rb +186 -163
- data/spec/acceptance/rest/presence_spec.rb +150 -111
- data/spec/acceptance/rest/stats_spec.rb +45 -40
- data/spec/acceptance/rest/time_spec.rb +8 -10
- data/spec/rspec_config.rb +10 -1
- data/spec/shared/client_initializer_behaviour.rb +212 -0
- data/spec/{support/model_helper.rb → shared/model_behaviour.rb} +6 -6
- data/spec/{support/protocol_msgbus_helper.rb → shared/protocol_msgbus_behaviour.rb} +1 -1
- data/spec/spec_helper.rb +9 -0
- data/spec/support/api_helper.rb +11 -0
- data/spec/support/event_machine_helper.rb +101 -3
- data/spec/support/markdown_spec_formatter.rb +90 -0
- data/spec/support/private_api_formatter.rb +36 -0
- data/spec/support/protocol_helper.rb +32 -0
- data/spec/support/random_helper.rb +15 -0
- data/spec/support/test_app.rb +4 -0
- data/spec/unit/auth_spec.rb +68 -0
- data/spec/unit/logger_spec.rb +77 -66
- data/spec/unit/models/error_info_spec.rb +1 -1
- data/spec/unit/models/idiomatic_ruby_wrapper_spec.rb +2 -3
- data/spec/unit/models/message_encoders/base64_spec.rb +2 -2
- data/spec/unit/models/message_encoders/cipher_spec.rb +2 -2
- data/spec/unit/models/message_encoders/utf8_spec.rb +2 -46
- data/spec/unit/models/message_spec.rb +160 -15
- data/spec/unit/models/paginated_resource_spec.rb +29 -27
- data/spec/unit/models/presence_message_spec.rb +163 -20
- data/spec/unit/models/protocol_message_spec.rb +43 -8
- data/spec/unit/modules/async_wrapper_spec.rb +2 -3
- data/spec/unit/modules/conversions_spec.rb +1 -1
- data/spec/unit/modules/enum_spec.rb +2 -3
- data/spec/unit/modules/event_emitter_spec.rb +62 -5
- data/spec/unit/modules/state_emitter_spec.rb +283 -0
- data/spec/unit/realtime/channel_spec.rb +107 -2
- data/spec/unit/realtime/channels_spec.rb +1 -0
- data/spec/unit/realtime/client_spec.rb +8 -48
- data/spec/unit/realtime/connection_spec.rb +3 -3
- data/spec/unit/realtime/incoming_message_dispatcher_spec.rb +2 -2
- data/spec/unit/realtime/presence_spec.rb +13 -4
- data/spec/unit/realtime/realtime_spec.rb +0 -11
- data/spec/unit/realtime/websocket_transport_spec.rb +2 -2
- data/spec/unit/rest/channel_spec.rb +109 -0
- data/spec/unit/rest/channels_spec.rb +4 -3
- data/spec/unit/rest/client_spec.rb +30 -125
- data/spec/unit/rest/rest_spec.rb +10 -0
- data/spec/unit/util/crypto_spec.rb +10 -5
- data/spec/unit/util/pub_sub_spec.rb +5 -5
- metadata +44 -12
- data/spec/integration/modules/state_emitter_spec.rb +0 -80
- data/spec/integration/rest/auth.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d67451b49c2ce07d90210a4b9fa4eeca6ca21c98
|
4
|
+
data.tar.gz: 00ea72c2989d322c2916c1421a585f162b10d882
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21b1a27c478ae7046ff3f6396eac474d7f906ca233b4e4b6dcdab32a0dfd49d8025016ef981bc04c9be59b4cb3abb8a2b7d6042d7238cecbd9bdb9934f0e4f7c
|
7
|
+
data.tar.gz: 76fcdc2d85e7086ac6a1b57bb3aeafaf1479150b0b0ec05e5380cfda5b470cbd8fcc0b49e8e06134c18a3cd382d50fc9ab8e1ac24b9c4232600ae699189b4d5e
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format documentation
|
data/.ruby-version.old
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p547
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -1,14 +1,32 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'json'
|
2
3
|
|
3
|
-
require
|
4
|
+
require 'yard'
|
4
5
|
YARD::Rake::YardocTask.new
|
5
6
|
|
6
7
|
begin
|
7
8
|
require 'rspec/core/rake_task'
|
8
9
|
|
9
|
-
RSpec::Core::RakeTask.new(:spec)
|
10
|
+
rspec_task = RSpec::Core::RakeTask.new(:spec)
|
10
11
|
|
11
12
|
task :default => :spec
|
13
|
+
|
14
|
+
namespace :doc do
|
15
|
+
desc 'Generate Markdown Specification from the RSpec public API tests'
|
16
|
+
task :spec do
|
17
|
+
ENV['TEST_LIMIT_PROTOCOLS'] = JSON.dump({ msgpack: 'JSON and MsgPack' })
|
18
|
+
|
19
|
+
rspec_task.rspec_opts = %w(
|
20
|
+
--require ./spec/support/markdown_spec_formatter
|
21
|
+
--order defined
|
22
|
+
--tag ~api_private
|
23
|
+
--format documentation
|
24
|
+
--format Ably::RSpec::MarkdownSpecFormatter
|
25
|
+
).join(' ')
|
26
|
+
|
27
|
+
Rake::Task[:spec].invoke
|
28
|
+
end
|
29
|
+
end
|
12
30
|
rescue LoadError
|
13
|
-
#
|
31
|
+
# RSpec not available
|
14
32
|
end
|
data/SPEC.md
ADDED
@@ -0,0 +1,1676 @@
|
|
1
|
+
# Ably Client Library 0.7.0 Specification
|
2
|
+
|
3
|
+
### Ably::Realtime::Channel#history
|
4
|
+
_(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_
|
5
|
+
* using JSON and MsgPack protocol
|
6
|
+
* [returns a Deferrable](./spec/acceptance/realtime/channel_history_spec.rb#L20)
|
7
|
+
* with a single client publishing and receiving
|
8
|
+
* [retrieves real-time history](./spec/acceptance/realtime/channel_history_spec.rb#L33)
|
9
|
+
* with two clients publishing messages on the same channel
|
10
|
+
* [retrieves real-time history on both channels](./spec/acceptance/realtime/channel_history_spec.rb#L45)
|
11
|
+
* with lots of messages published with a single client and channel
|
12
|
+
* as one ProtocolMessage
|
13
|
+
* [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L86)
|
14
|
+
* [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L95)
|
15
|
+
* in multiple ProtocolMessages
|
16
|
+
* [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L106)
|
17
|
+
* [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L117)
|
18
|
+
* and REST history
|
19
|
+
* [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L133)
|
20
|
+
|
21
|
+
### Ably::Realtime::Channel
|
22
|
+
_(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/channel_spec.rb))_
|
23
|
+
* using JSON and MsgPack protocol
|
24
|
+
* initialization
|
25
|
+
* with :connect_automatically option set to false on connection
|
26
|
+
* [remains initialized when accessing a channel](./spec/acceptance/realtime/channel_spec.rb#L21)
|
27
|
+
* [opens a connection implicitly on #attach](./spec/acceptance/realtime/channel_spec.rb#L29)
|
28
|
+
* [opens a connection implicitly when accessing #presence](./spec/acceptance/realtime/channel_spec.rb#L36)
|
29
|
+
* #attach
|
30
|
+
* [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L49)
|
31
|
+
* [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L59)
|
32
|
+
* [attaches to a channel](./spec/acceptance/realtime/channel_spec.rb#L72)
|
33
|
+
* [attaches to a channel and calls the provided block](./spec/acceptance/realtime/channel_spec.rb#L80)
|
34
|
+
* [returns a Deferrable](./spec/acceptance/realtime/channel_spec.rb#L87)
|
35
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L92)
|
36
|
+
* when state is :failed
|
37
|
+
* [reattaches](./spec/acceptance/realtime/channel_spec.rb#L103)
|
38
|
+
* when state is :detaching
|
39
|
+
* [moves straight to attaching and skips detached](./spec/acceptance/realtime/channel_spec.rb#L116)
|
40
|
+
* with many connections and many channels on each simultaneously
|
41
|
+
* [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L142)
|
42
|
+
* failure as a result of insufficient key permissions
|
43
|
+
* [triggers failed event](./spec/acceptance/realtime/channel_spec.rb#L165)
|
44
|
+
* [calls the errback of the returned Deferrable](./spec/acceptance/realtime/channel_spec.rb#L174)
|
45
|
+
* [triggers an error event](./spec/acceptance/realtime/channel_spec.rb#L182)
|
46
|
+
* [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L191)
|
47
|
+
* #detach
|
48
|
+
* [detaches from a channel](./spec/acceptance/realtime/channel_spec.rb#L202)
|
49
|
+
* [detaches from a channel and calls the provided block](./spec/acceptance/realtime/channel_spec.rb#L212)
|
50
|
+
* [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L221)
|
51
|
+
* [returns a Deferrable](./spec/acceptance/realtime/channel_spec.rb#L233)
|
52
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L238)
|
53
|
+
* when state is :failed
|
54
|
+
* [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L251)
|
55
|
+
* when state is :attaching
|
56
|
+
* [moves straight to :detaching state and skips :attached](./spec/acceptance/realtime/channel_spec.rb#L262)
|
57
|
+
* when state is :detaching
|
58
|
+
* [ignores subsequent #detach calls but calls the callback if provided](./spec/acceptance/realtime/channel_spec.rb#L280)
|
59
|
+
* channel recovery in :attaching state
|
60
|
+
* the transport is disconnected before the ATTACHED protocol message is received
|
61
|
+
* PENDING: *[attach times out and fails if not ATTACHED protocol message received](./spec/acceptance/realtime/channel_spec.rb#L299)*
|
62
|
+
* PENDING: *[channel is ATTACHED if ATTACHED protocol message is later received](./spec/acceptance/realtime/channel_spec.rb#L300)*
|
63
|
+
* PENDING: *[sends an ATTACH protocol message in response to a channel message being received on the attaching channel](./spec/acceptance/realtime/channel_spec.rb#L301)*
|
64
|
+
* #publish
|
65
|
+
* when attached
|
66
|
+
* [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L307)
|
67
|
+
* when not yet attached
|
68
|
+
* [publishes queued messages once attached](./spec/acceptance/realtime/channel_spec.rb#L319)
|
69
|
+
* [publishes queued messages within a single protocol message](./spec/acceptance/realtime/channel_spec.rb#L327)
|
70
|
+
* #subscribe
|
71
|
+
* with an event argument
|
72
|
+
* [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L350)
|
73
|
+
* with no event argument
|
74
|
+
* [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L360)
|
75
|
+
* many times with different event names
|
76
|
+
* [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L370)
|
77
|
+
* #unsubscribe
|
78
|
+
* with an event argument
|
79
|
+
* [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L393)
|
80
|
+
* with no event argument
|
81
|
+
* [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L406)
|
82
|
+
* when connection state changes to
|
83
|
+
* :failed
|
84
|
+
* an :attached channel
|
85
|
+
* [transitions state to :failed](./spec/acceptance/realtime/channel_spec.rb#L429)
|
86
|
+
* [triggers an error event on the channel](./spec/acceptance/realtime/channel_spec.rb#L439)
|
87
|
+
* [updates the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L449)
|
88
|
+
* a :detached channel
|
89
|
+
* [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L461)
|
90
|
+
* a :failed channel
|
91
|
+
* [remains in the :failed state and ignores the failure error](./spec/acceptance/realtime/channel_spec.rb#L481)
|
92
|
+
* :closed
|
93
|
+
* an :attached channel
|
94
|
+
* [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L504)
|
95
|
+
* a :detached channel
|
96
|
+
* [remains in the :detached state](./spec/acceptance/realtime/channel_spec.rb#L515)
|
97
|
+
* a :failed channel
|
98
|
+
* [remains in the :failed state and retains the error_reason](./spec/acceptance/realtime/channel_spec.rb#L536)
|
99
|
+
|
100
|
+
### Ably::Realtime::Client
|
101
|
+
_(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/client_spec.rb))_
|
102
|
+
* using JSON and MsgPack protocol
|
103
|
+
* initialization
|
104
|
+
* basic auth
|
105
|
+
* [is enabled by default with a provided :api_key option](./spec/acceptance/realtime/client_spec.rb#L18)
|
106
|
+
* :tls option
|
107
|
+
* set to false to forec a plain-text connection
|
108
|
+
* [fails to connect because a private key cannot be sent over a non-secure connection](./spec/acceptance/realtime/client_spec.rb#L31)
|
109
|
+
* token auth
|
110
|
+
* with TLS enabled
|
111
|
+
* and a pre-generated Token provided with the :token_id option
|
112
|
+
* [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L51)
|
113
|
+
* with valid :api_key and :use_token_auth option set to true
|
114
|
+
* [automatically authorises on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L64)
|
115
|
+
* with client_id
|
116
|
+
* [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L77)
|
117
|
+
* with TLS disabled
|
118
|
+
* and a pre-generated Token provided with the :token_id option
|
119
|
+
* [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L51)
|
120
|
+
* with valid :api_key and :use_token_auth option set to true
|
121
|
+
* [automatically authorises on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L64)
|
122
|
+
* with client_id
|
123
|
+
* [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L77)
|
124
|
+
* with token_request_block
|
125
|
+
* [calls the block](./spec/acceptance/realtime/client_spec.rb#L102)
|
126
|
+
* [uses the token request when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L109)
|
127
|
+
|
128
|
+
### Ably::Realtime::Connection failures
|
129
|
+
_(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/realtime/connection_failures_spec.rb))_
|
130
|
+
* using JSON and MsgPack protocol
|
131
|
+
* authentication failure
|
132
|
+
* when API key is invalid
|
133
|
+
* with invalid app part of the key
|
134
|
+
* [enters the failed state and returns a not found error](./spec/acceptance/realtime/connection_failures_spec.rb#L26)
|
135
|
+
* with invalid key ID part of the key
|
136
|
+
* [enters the failed state and returns an authorization error](./spec/acceptance/realtime/connection_failures_spec.rb#L40)
|
137
|
+
* automatic connection retry
|
138
|
+
* with invalid WebSocket host
|
139
|
+
* when disconnected
|
140
|
+
* [enters the suspended state after multiple attempts to connect](./spec/acceptance/realtime/connection_failures_spec.rb#L94)
|
141
|
+
* #close
|
142
|
+
* [transitions connection state to :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L111)
|
143
|
+
* when connection state is :suspended
|
144
|
+
* [enters the failed state after multiple attempts](./spec/acceptance/realtime/connection_failures_spec.rb#L130)
|
145
|
+
* #close
|
146
|
+
* [transitions connection state to :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L150)
|
147
|
+
* when connection state is :failed
|
148
|
+
* #close
|
149
|
+
* [will not transition state to :close and raises a StateChangeError exception](./spec/acceptance/realtime/connection_failures_spec.rb#L169)
|
150
|
+
* #error_reason
|
151
|
+
* [contains the error when state is disconnected](./spec/acceptance/realtime/connection_failures_spec.rb#L183)
|
152
|
+
* [contains the error when state is suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L183)
|
153
|
+
* [contains the error when state is failed](./spec/acceptance/realtime/connection_failures_spec.rb#L183)
|
154
|
+
* [is reset to nil when :connected](./spec/acceptance/realtime/connection_failures_spec.rb#L192)
|
155
|
+
* [is reset to nil when :closed](./spec/acceptance/realtime/connection_failures_spec.rb#L203)
|
156
|
+
* #connect
|
157
|
+
* connection opening times out
|
158
|
+
* [attempts to reconnect](./spec/acceptance/realtime/connection_failures_spec.rb#L230)
|
159
|
+
* [calls the errback of the returned Deferrable object when first connection attempt fails](./spec/acceptance/realtime/connection_failures_spec.rb#L243)
|
160
|
+
* when retry intervals are stubbed to attempt reconnection quickly
|
161
|
+
* [never calls the provided success block](./spec/acceptance/realtime/connection_failures_spec.rb#L262)
|
162
|
+
* connection resume
|
163
|
+
* when DISCONNECTED ProtocolMessage received from the server
|
164
|
+
* [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L291)
|
165
|
+
* when websocket transport is closed
|
166
|
+
* [reconnects automatically](./spec/acceptance/realtime/connection_failures_spec.rb#L309)
|
167
|
+
* after successfully reconnecting and resuming
|
168
|
+
* [retains connection_id and connection_key](./spec/acceptance/realtime/connection_failures_spec.rb#L326)
|
169
|
+
* [retains channel subscription state](./spec/acceptance/realtime/connection_failures_spec.rb#L343)
|
170
|
+
* when messages were published whilst the client was disconnected
|
171
|
+
* [receives the messages published whilst offline](./spec/acceptance/realtime/connection_failures_spec.rb#L363)
|
172
|
+
* fallback host feature
|
173
|
+
* with custom realtime websocket host option
|
174
|
+
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L419)
|
175
|
+
* with non-production environment
|
176
|
+
* [never uses a fallback host](./spec/acceptance/realtime/connection_failures_spec.rb#L436)
|
177
|
+
* with production environment
|
178
|
+
* [uses a fallback host on every subsequent disconnected attempt until suspended](./spec/acceptance/realtime/connection_failures_spec.rb#L459)
|
179
|
+
* [uses the primary host when suspended, and a fallback host on every subsequent suspended attempt](./spec/acceptance/realtime/connection_failures_spec.rb#L478)
|
180
|
+
|
181
|
+
### Ably::Realtime::Connection
|
182
|
+
_(see [spec/acceptance/realtime/connection_spec.rb](./spec/acceptance/realtime/connection_spec.rb))_
|
183
|
+
* using JSON and MsgPack protocol
|
184
|
+
* intialization
|
185
|
+
* [connects automatically](./spec/acceptance/realtime/connection_spec.rb#L22)
|
186
|
+
* with :connect_automatically option set to false
|
187
|
+
* [does not connect automatically](./spec/acceptance/realtime/connection_spec.rb#L34)
|
188
|
+
* [connects when method #connect is called](./spec/acceptance/realtime/connection_spec.rb#L42)
|
189
|
+
* with token auth
|
190
|
+
* for renewable tokens
|
191
|
+
* that are valid for the duration of the test
|
192
|
+
* with valid pre authorised token expiring in the future
|
193
|
+
* [uses the existing token created by Auth](./spec/acceptance/realtime/connection_spec.rb#L60)
|
194
|
+
* with implicit authorisation
|
195
|
+
* [uses the token created by the implicit authorisation](./spec/acceptance/realtime/connection_spec.rb#L72)
|
196
|
+
* that expire
|
197
|
+
* opening a new connection
|
198
|
+
* with recently expired token
|
199
|
+
* [renews the token on connect](./spec/acceptance/realtime/connection_spec.rb#L93)
|
200
|
+
* with immediately expiring token
|
201
|
+
* [renews the token on connect, and only makes one subsequent attempt to obtain a new token](./spec/acceptance/realtime/connection_spec.rb#L107)
|
202
|
+
* [uses the primary host for subsequent connection and auth requests](./spec/acceptance/realtime/connection_spec.rb#L117)
|
203
|
+
* when connected with a valid non-expired token
|
204
|
+
* that then expires following the connection being opened
|
205
|
+
* PENDING: *[retains connection state](./spec/acceptance/realtime/connection_spec.rb#L162)*
|
206
|
+
* PENDING: *[changes state to failed if a new token cannot be issued](./spec/acceptance/realtime/connection_spec.rb#L163)*
|
207
|
+
* the server
|
208
|
+
* [disconnects the client, and the client automatically renews the token and then reconnects](./spec/acceptance/realtime/connection_spec.rb#L141)
|
209
|
+
* for non-renewable tokens
|
210
|
+
* that are expired
|
211
|
+
* opening a new connection
|
212
|
+
* [transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L178)
|
213
|
+
* when connected
|
214
|
+
* PENDING: *[transitions state to failed](./spec/acceptance/realtime/connection_spec.rb#L191)*
|
215
|
+
* initialization state changes
|
216
|
+
* with implicit #connect
|
217
|
+
* [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L219)
|
218
|
+
* with explicit #connect
|
219
|
+
* [are triggered in order](./spec/acceptance/realtime/connection_spec.rb#L225)
|
220
|
+
* #connect
|
221
|
+
* [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L233)
|
222
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L238)
|
223
|
+
* when already connected
|
224
|
+
* [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L247)
|
225
|
+
* once connected
|
226
|
+
* connection#id
|
227
|
+
* [is a string](./spec/acceptance/realtime/connection_spec.rb#L264)
|
228
|
+
* [is unique from the connection#key](./spec/acceptance/realtime/connection_spec.rb#L271)
|
229
|
+
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L278)
|
230
|
+
* connection#key
|
231
|
+
* [is a string](./spec/acceptance/realtime/connection_spec.rb#L287)
|
232
|
+
* [is unique from the connection#id](./spec/acceptance/realtime/connection_spec.rb#L294)
|
233
|
+
* [is unique for every connection](./spec/acceptance/realtime/connection_spec.rb#L301)
|
234
|
+
* following a previous connection being opened and closed
|
235
|
+
* [reconnects and is provided with a new connection ID and connection key from the server](./spec/acceptance/realtime/connection_spec.rb#L311)
|
236
|
+
* #close
|
237
|
+
* [returns a Deferrable](./spec/acceptance/realtime/connection_spec.rb#L329)
|
238
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/connection_spec.rb#L336)
|
239
|
+
* when already closed
|
240
|
+
* [does nothing and no further state changes are emitted](./spec/acceptance/realtime/connection_spec.rb#L347)
|
241
|
+
* when connection state is
|
242
|
+
* :initialized
|
243
|
+
* [changes the connection state to :closing and then immediately :closed without sending a ProtocolMessage CLOSE](./spec/acceptance/realtime/connection_spec.rb#L375)
|
244
|
+
* :connected
|
245
|
+
* [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#L393)
|
246
|
+
* with an unresponsive connection
|
247
|
+
* [force closes the connection when a :closed ProtocolMessage response is not received](./spec/acceptance/realtime/connection_spec.rb#L423)
|
248
|
+
* #ping
|
249
|
+
* [echoes a heart beat](./spec/acceptance/realtime/connection_spec.rb#L446)
|
250
|
+
* when not connected
|
251
|
+
* [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L456)
|
252
|
+
* recovery
|
253
|
+
* #recovery_key
|
254
|
+
* [is composed of connection id and serial that is kept up to date with each message sent](./spec/acceptance/realtime/connection_spec.rb#L489)
|
255
|
+
* [is available when connection is in one of the states: connecting, connected, disconnected, suspended, failed](./spec/acceptance/realtime/connection_spec.rb#L510)
|
256
|
+
* [is nil when connection is explicitly CLOSED](./spec/acceptance/realtime/connection_spec.rb#L534)
|
257
|
+
* opening a new connection using a recently disconnected connection's #recovery_key
|
258
|
+
* connection#id and connection#key after recovery
|
259
|
+
* [remain the same](./spec/acceptance/realtime/connection_spec.rb#L548)
|
260
|
+
* when messages have been sent whilst the old connection is disconnected
|
261
|
+
* the new connection
|
262
|
+
* [recovers server-side queued messages](./spec/acceptance/realtime/connection_spec.rb#L573)
|
263
|
+
* with :recover option
|
264
|
+
* with invalid syntax
|
265
|
+
* [raises an exception](./spec/acceptance/realtime/connection_spec.rb#L598)
|
266
|
+
* with invalid value
|
267
|
+
* PENDING: *[triggers an error on the connection object, sets the #error_reason and connects anyway](./spec/acceptance/realtime/connection_spec.rb#L607)*
|
268
|
+
* with many connections simultaneously
|
269
|
+
* [opens each with a unique connection#id and connection#key](./spec/acceptance/realtime/connection_spec.rb#L624)
|
270
|
+
* when a state transition is unsupported
|
271
|
+
* [emits a StateChangeError](./spec/acceptance/realtime/connection_spec.rb#L644)
|
272
|
+
|
273
|
+
### Ably::Realtime::Channel Message
|
274
|
+
_(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/message_spec.rb))_
|
275
|
+
* using JSON and MsgPack protocol
|
276
|
+
* [sends a String data payload](./spec/acceptance/realtime/message_spec.rb#L25)
|
277
|
+
* with ASCII_8BIT message name
|
278
|
+
* [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L37)
|
279
|
+
* when the message publisher has a client_id
|
280
|
+
* [contains a #client_id attribute](./spec/acceptance/realtime/message_spec.rb#L53)
|
281
|
+
* #connection_id attribute
|
282
|
+
* over realtime
|
283
|
+
* [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L66)
|
284
|
+
* when retrieved over REST
|
285
|
+
* [matches the sender connection#id](./spec/acceptance/realtime/message_spec.rb#L78)
|
286
|
+
* local echo when published
|
287
|
+
* [is enabled by default](./spec/acceptance/realtime/message_spec.rb#L90)
|
288
|
+
* with :echo_messages option set to false
|
289
|
+
* [will not echo messages to the client but will still broadcast messages to other connected clients](./spec/acceptance/realtime/message_spec.rb#L106)
|
290
|
+
* publishing lots of messages across two connections
|
291
|
+
* [sends and receives the messages on both opened connections and calls the success callbacks for each message published](./spec/acceptance/realtime/message_spec.rb#L138)
|
292
|
+
* without suitable publishing permissions
|
293
|
+
* [calls the error callback](./spec/acceptance/realtime/message_spec.rb#L183)
|
294
|
+
* encoding and decoding encrypted messages
|
295
|
+
* with AES-128-CBC using crypto-data-128.json fixtures
|
296
|
+
* item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
|
297
|
+
* behaves like an Ably encrypter and decrypter
|
298
|
+
* with #publish and #subscribe
|
299
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
300
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
301
|
+
* item 1 with encrypted encoding cipher+aes-128-cbc/base64
|
302
|
+
* behaves like an Ably encrypter and decrypter
|
303
|
+
* with #publish and #subscribe
|
304
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
305
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
306
|
+
* item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
307
|
+
* behaves like an Ably encrypter and decrypter
|
308
|
+
* with #publish and #subscribe
|
309
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
310
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
311
|
+
* item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
312
|
+
* behaves like an Ably encrypter and decrypter
|
313
|
+
* with #publish and #subscribe
|
314
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
315
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
316
|
+
* with AES-256-CBC using crypto-data-256.json fixtures
|
317
|
+
* item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
|
318
|
+
* behaves like an Ably encrypter and decrypter
|
319
|
+
* with #publish and #subscribe
|
320
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
321
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
322
|
+
* item 1 with encrypted encoding cipher+aes-256-cbc/base64
|
323
|
+
* behaves like an Ably encrypter and decrypter
|
324
|
+
* with #publish and #subscribe
|
325
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
326
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
327
|
+
* item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
328
|
+
* behaves like an Ably encrypter and decrypter
|
329
|
+
* with #publish and #subscribe
|
330
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
331
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
332
|
+
* item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
333
|
+
* behaves like an Ably encrypter and decrypter
|
334
|
+
* with #publish and #subscribe
|
335
|
+
* [encrypts message automatically before they are pushed to the server](./spec/acceptance/realtime/message_spec.rb#L235)
|
336
|
+
* [sends and receives messages that are encrypted & decrypted by the Ably library](./spec/acceptance/realtime/message_spec.rb#L253)
|
337
|
+
* with multiple sends from one client to another
|
338
|
+
* [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L292)
|
339
|
+
* subscribing with a different transport protocol
|
340
|
+
* [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L335)
|
341
|
+
* [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L335)
|
342
|
+
* [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L335)
|
343
|
+
* publishing on an unencrypted channel and subscribing on an encrypted channel with another client
|
344
|
+
* [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L354)
|
345
|
+
* publishing on an encrypted channel and subscribing on an unencrypted channel with another client
|
346
|
+
* [delivers the message but still encrypted with a value in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L372)
|
347
|
+
* [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L381)
|
348
|
+
* publishing on an encrypted channel and subscribing with a different algorithm on another client
|
349
|
+
* [delivers the message but still encrypted with the cipher detials in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L403)
|
350
|
+
* [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L412)
|
351
|
+
* publishing on an encrypted channel and subscribing with a different key on another client
|
352
|
+
* [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L434)
|
353
|
+
* [triggers a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L443)
|
354
|
+
|
355
|
+
### Ably::Realtime::Presence history
|
356
|
+
_(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_
|
357
|
+
* using JSON and MsgPack protocol
|
358
|
+
* [provides up to the moment presence history](./spec/acceptance/realtime/presence_history_spec.rb#L21)
|
359
|
+
* [ensures REST presence history message IDs match ProtocolMessage wrapped message and connection IDs via Realtime](./spec/acceptance/realtime/presence_history_spec.rb#L41)
|
360
|
+
|
361
|
+
### Ably::Realtime::Presence
|
362
|
+
_(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/presence_spec.rb))_
|
363
|
+
* using JSON and MsgPack protocol
|
364
|
+
* PENDING: *[ensure connection_id is unique and updated on ENTER](./spec/acceptance/realtime/presence_spec.rb#L943)*
|
365
|
+
* PENDING: *[ensure connection_id for presence member matches the messages they publish on the channel](./spec/acceptance/realtime/presence_spec.rb#L944)*
|
366
|
+
* PENDING: *[stop a call to get when the channel has not been entered](./spec/acceptance/realtime/presence_spec.rb#L945)*
|
367
|
+
* PENDING: *[stop a call to get when the channel has been entered but the list is not up to date](./spec/acceptance/realtime/presence_spec.rb#L946)*
|
368
|
+
* PENDING: *[presence will resume sync if connection is dropped mid-way](./spec/acceptance/realtime/presence_spec.rb#L947)*
|
369
|
+
* when attached (but not present) on a presence channel with an anonymous client (no client ID)
|
370
|
+
* [maintains state as other clients enter and leave the channel](./spec/acceptance/realtime/presence_spec.rb#L24)
|
371
|
+
* #sync_complete?
|
372
|
+
* when attaching to a channel without any members present
|
373
|
+
* [is true and the presence channel is considered synced immediately](./spec/acceptance/realtime/presence_spec.rb#L53)
|
374
|
+
* when attaching to a channel with members present
|
375
|
+
* [is false and the presence channel will subsequently be synced](./spec/acceptance/realtime/presence_spec.rb#L62)
|
376
|
+
* when the SYNC of a presence channel spans multiple ProtocolMessage messages
|
377
|
+
* with 250 existing (present) members
|
378
|
+
* when a new client attaches to the presence channel
|
379
|
+
* [emits :present for each member](./spec/acceptance/realtime/presence_spec.rb#L83)
|
380
|
+
* #get
|
381
|
+
* [#waits until sync is complete](./spec/acceptance/realtime/presence_spec.rb#L102)
|
382
|
+
* automatic attachment of channel on access to presence object
|
383
|
+
* [is implicit if presence state is initalized](./spec/acceptance/realtime/presence_spec.rb#L122)
|
384
|
+
* [is disabled if presence state is not initialized](./spec/acceptance/realtime/presence_spec.rb#L130)
|
385
|
+
* state
|
386
|
+
* once opened
|
387
|
+
* [once opened, enters the :left state if the channel detaches](./spec/acceptance/realtime/presence_spec.rb#L147)
|
388
|
+
* #enter
|
389
|
+
* [allows client_id to be set on enter for anonymous clients](./spec/acceptance/realtime/presence_spec.rb#L170)
|
390
|
+
* [raises an exception if client_id is not set](./spec/acceptance/realtime/presence_spec.rb#L204)
|
391
|
+
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L209)
|
392
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L214)
|
393
|
+
* data attribute
|
394
|
+
* when provided as argument option to #enter
|
395
|
+
* [remains intact following #leave](./spec/acceptance/realtime/presence_spec.rb#L181)
|
396
|
+
* #update
|
397
|
+
* [without previous #enter automatically enters](./spec/acceptance/realtime/presence_spec.rb#L224)
|
398
|
+
* [updates the data if :data argument provided](./spec/acceptance/realtime/presence_spec.rb#L249)
|
399
|
+
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L259)
|
400
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L266)
|
401
|
+
* when ENTERED
|
402
|
+
* [has no effect on the state](./spec/acceptance/realtime/presence_spec.rb#L234)
|
403
|
+
* #leave
|
404
|
+
* [raises an exception if not entered](./spec/acceptance/realtime/presence_spec.rb#L321)
|
405
|
+
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L326)
|
406
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L333)
|
407
|
+
* :data option
|
408
|
+
* when set to a string
|
409
|
+
* [emits the new data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L282)
|
410
|
+
* when set to nil
|
411
|
+
* FAILED: ~~[emits nil data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L295)~~
|
412
|
+
* when not passed as an argument
|
413
|
+
* [emits the original data for the leave event](./spec/acceptance/realtime/presence_spec.rb#L308)
|
414
|
+
* :left event
|
415
|
+
* [emits the data defined in enter](./spec/acceptance/realtime/presence_spec.rb#L345)
|
416
|
+
* [emits the data defined in update](./spec/acceptance/realtime/presence_spec.rb#L356)
|
417
|
+
* entering/updating/leaving presence state on behalf of another client_id
|
418
|
+
* #enter_client
|
419
|
+
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L407)
|
420
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L412)
|
421
|
+
* multiple times on the same channel with different client_ids
|
422
|
+
* [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#L377)
|
423
|
+
* [enters a channel and sets the data based on the provided :data option](./spec/acceptance/realtime/presence_spec.rb#L391)
|
424
|
+
* #update_client
|
425
|
+
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L469)
|
426
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L474)
|
427
|
+
* multiple times on the same channel with different client_ids
|
428
|
+
* [updates the data attribute for the member when :data option provided](./spec/acceptance/realtime/presence_spec.rb#L422)
|
429
|
+
* [enters if not already entered](./spec/acceptance/realtime/presence_spec.rb#L446)
|
430
|
+
* #leave_client
|
431
|
+
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L572)
|
432
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L577)
|
433
|
+
* leaves a channel
|
434
|
+
* multiple times on the same channel with different client_ids
|
435
|
+
* [emits the :leave event for each client_id](./spec/acceptance/realtime/presence_spec.rb#L485)
|
436
|
+
* [succeeds if that client_id has not previously entered the channel](./spec/acceptance/realtime/presence_spec.rb#L509)
|
437
|
+
* with a new value in :data option
|
438
|
+
* [emits the leave event with the new data value](./spec/acceptance/realtime/presence_spec.rb#L533)
|
439
|
+
* with a nil value in :data option
|
440
|
+
* FAILED: ~~[emits the leave event with a nil value](./spec/acceptance/realtime/presence_spec.rb#L546)~~
|
441
|
+
* with no :data option
|
442
|
+
* [emits the leave event with the previous data value](./spec/acceptance/realtime/presence_spec.rb#L559)
|
443
|
+
* #get
|
444
|
+
* [returns a Deferrable](./spec/acceptance/realtime/presence_spec.rb#L587)
|
445
|
+
* [calls the Deferrable callback on success](./spec/acceptance/realtime/presence_spec.rb#L592)
|
446
|
+
* [returns the current members on the channel](./spec/acceptance/realtime/presence_spec.rb#L599)
|
447
|
+
* [filters by connection_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L614)
|
448
|
+
* [filters by client_id option if provided](./spec/acceptance/realtime/presence_spec.rb#L629)
|
449
|
+
* [does not wait for SYNC to complete if :wait_for_sync option is false](./spec/acceptance/realtime/presence_spec.rb#L646)
|
450
|
+
* [returns both members on both simultaneously connected clients](./spec/acceptance/realtime/presence_spec.rb#L668)
|
451
|
+
* when a member enters and then leaves
|
452
|
+
* [has no members](./spec/acceptance/realtime/presence_spec.rb#L656)
|
453
|
+
* #subscribe
|
454
|
+
* with no arguments
|
455
|
+
* [calls the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L694)
|
456
|
+
* #unsubscribe
|
457
|
+
* with no arguments
|
458
|
+
* [removes the callback for all presence events](./spec/acceptance/realtime/presence_spec.rb#L714)
|
459
|
+
* REST #get
|
460
|
+
* [returns current members](./spec/acceptance/realtime/presence_spec.rb#L733)
|
461
|
+
* [returns no members once left](./spec/acceptance/realtime/presence_spec.rb#L746)
|
462
|
+
* client_id with ASCII_8BIT
|
463
|
+
* in connection set up
|
464
|
+
* [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L763)
|
465
|
+
* in channel options
|
466
|
+
* [is converted into UTF_8](./spec/acceptance/realtime/presence_spec.rb#L776)
|
467
|
+
* encoding and decoding of presence message data
|
468
|
+
* [encrypts presence message data](./spec/acceptance/realtime/presence_spec.rb#L800)
|
469
|
+
* #subscribe
|
470
|
+
* [emits decrypted enter events](./spec/acceptance/realtime/presence_spec.rb#L819)
|
471
|
+
* [emits decrypted update events](./spec/acceptance/realtime/presence_spec.rb#L831)
|
472
|
+
* [emits previously set data for leave events](./spec/acceptance/realtime/presence_spec.rb#L845)
|
473
|
+
* #get
|
474
|
+
* [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L861)
|
475
|
+
* REST #get
|
476
|
+
* [returns a list of members with decrypted data](./spec/acceptance/realtime/presence_spec.rb#L874)
|
477
|
+
* when cipher settings do not match publisher
|
478
|
+
* [delivers an unencoded presence message left with encoding value](./spec/acceptance/realtime/presence_spec.rb#L889)
|
479
|
+
* [emits an error when cipher does not match and presence data cannot be decoded](./spec/acceptance/realtime/presence_spec.rb#L902)
|
480
|
+
* leaving
|
481
|
+
* [expect :left event once underlying connection is closed](./spec/acceptance/realtime/presence_spec.rb#L919)
|
482
|
+
* [expect :left event with client data from enter event](./spec/acceptance/realtime/presence_spec.rb#L929)
|
483
|
+
|
484
|
+
### Ably::Realtime::Client#stats
|
485
|
+
_(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_
|
486
|
+
* using JSON and MsgPack protocol
|
487
|
+
* fetching stats
|
488
|
+
* [should return a Hash](./spec/acceptance/realtime/stats_spec.rb#L10)
|
489
|
+
* [should return a Deferrable object](./spec/acceptance/realtime/stats_spec.rb#L17)
|
490
|
+
|
491
|
+
### Ably::Realtime::Client#time
|
492
|
+
_(see [spec/acceptance/realtime/time_spec.rb](./spec/acceptance/realtime/time_spec.rb))_
|
493
|
+
* using JSON and MsgPack protocol
|
494
|
+
* fetching the service time
|
495
|
+
* [should return the service time as a Time object](./spec/acceptance/realtime/time_spec.rb#L10)
|
496
|
+
* [should return a deferrable object](./spec/acceptance/realtime/time_spec.rb#L19)
|
497
|
+
|
498
|
+
### Ably::Auth
|
499
|
+
_(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
|
500
|
+
* using JSON and MsgPack protocol
|
501
|
+
* [has immutable options](./spec/acceptance/rest/auth_spec.rb#L52)
|
502
|
+
* #request_token
|
503
|
+
* [returns the requested token](./spec/acceptance/rest/auth_spec.rb#L60)
|
504
|
+
* option :client_id
|
505
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
|
506
|
+
* option :capability
|
507
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
|
508
|
+
* option :nonce
|
509
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
|
510
|
+
* option :timestamp
|
511
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
|
512
|
+
* option :ttl
|
513
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L91)
|
514
|
+
* with :key_id & :key_secret options
|
515
|
+
* [key_id is used in request and signing uses key_secret](./spec/acceptance/rest/auth_spec.rb#L120)
|
516
|
+
* with :query_time option
|
517
|
+
* [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L128)
|
518
|
+
* without :query_time option
|
519
|
+
* [queries the server for the time](./spec/acceptance/rest/auth_spec.rb#L137)
|
520
|
+
* with :auth_url option
|
521
|
+
* when response is valid
|
522
|
+
* [requests a token from :auth_url using an HTTP GET request](./spec/acceptance/rest/auth_spec.rb#L184)
|
523
|
+
* with :query_params
|
524
|
+
* [requests a token from :auth_url with the :query_params](./spec/acceptance/rest/auth_spec.rb#L192)
|
525
|
+
* with :headers
|
526
|
+
* [requests a token from :auth_url with the HTTP headers set](./spec/acceptance/rest/auth_spec.rb#L200)
|
527
|
+
* with POST
|
528
|
+
* [requests a token from :auth_url using an HTTP POST instead of the default GET](./spec/acceptance/rest/auth_spec.rb#L208)
|
529
|
+
* when response is invalid
|
530
|
+
* 500
|
531
|
+
* [raises ServerError](./spec/acceptance/rest/auth_spec.rb#L221)
|
532
|
+
* XML
|
533
|
+
* [raises InvalidResponseBody](./spec/acceptance/rest/auth_spec.rb#L232)
|
534
|
+
* with token_request_block
|
535
|
+
* [calls the block when authenticating to obtain the request token](./spec/acceptance/rest/auth_spec.rb#L250)
|
536
|
+
* [uses the token request from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L255)
|
537
|
+
* before #authorise has been called
|
538
|
+
* [has no current_token](./spec/acceptance/rest/auth_spec.rb#L262)
|
539
|
+
* #authorise
|
540
|
+
* [updates the persisted auth options thare are then used for subsequent authorise requests](./spec/acceptance/rest/auth_spec.rb#L309)
|
541
|
+
* when called for the first time since the client has been instantiated
|
542
|
+
* [passes all options to #request_token](./spec/acceptance/rest/auth_spec.rb#L273)
|
543
|
+
* [returns a valid token](./spec/acceptance/rest/auth_spec.rb#L278)
|
544
|
+
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L282)
|
545
|
+
* with previous authorisation
|
546
|
+
* [does not request a token if current_token has not expired](./spec/acceptance/rest/auth_spec.rb#L293)
|
547
|
+
* [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L298)
|
548
|
+
* [issues a new token if option :force => true](./spec/acceptance/rest/auth_spec.rb#L304)
|
549
|
+
* with token_request_block
|
550
|
+
* [calls the block](./spec/acceptance/rest/auth_spec.rb#L325)
|
551
|
+
* [uses the token request returned from the block when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L329)
|
552
|
+
* for every subsequent #request_token
|
553
|
+
* without a provided block
|
554
|
+
* [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L335)
|
555
|
+
* with a provided block
|
556
|
+
* [does not call the originally provided block and calls the new #request_token block](./spec/acceptance/rest/auth_spec.rb#L342)
|
557
|
+
* #create_token_request
|
558
|
+
* [uses the key ID from the client](./spec/acceptance/rest/auth_spec.rb#L358)
|
559
|
+
* [uses the default TTL](./spec/acceptance/rest/auth_spec.rb#L362)
|
560
|
+
* [uses the default capability](./spec/acceptance/rest/auth_spec.rb#L366)
|
561
|
+
* the nonce
|
562
|
+
* [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L371)
|
563
|
+
* [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L376)
|
564
|
+
* with option :ttl
|
565
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
|
566
|
+
* with option :capability
|
567
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
|
568
|
+
* with option :nonce
|
569
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
|
570
|
+
* with option :timestamp
|
571
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
|
572
|
+
* with option :client_id
|
573
|
+
* [overrides default](./spec/acceptance/rest/auth_spec.rb#L387)
|
574
|
+
* with additional invalid attributes
|
575
|
+
* [are ignored](./spec/acceptance/rest/auth_spec.rb#L395)
|
576
|
+
* when required fields are missing
|
577
|
+
* [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L405)
|
578
|
+
* [should raise an exception if key id is missing](./spec/acceptance/rest/auth_spec.rb#L409)
|
579
|
+
* with :query_time option
|
580
|
+
* [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L418)
|
581
|
+
* with :timestamp option
|
582
|
+
* [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L428)
|
583
|
+
* signing
|
584
|
+
* [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L445)
|
585
|
+
* using token authentication
|
586
|
+
* with :token_id option
|
587
|
+
* [authenticates successfully using the provided :token_id](./spec/acceptance/rest/auth_spec.rb#L468)
|
588
|
+
* [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L472)
|
589
|
+
* [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L480)
|
590
|
+
* [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L488)
|
591
|
+
* when implicit as a result of using :client id
|
592
|
+
* and requests to the Ably server are mocked
|
593
|
+
* [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L518)
|
594
|
+
* a token is created
|
595
|
+
* [before a request is made](./spec/acceptance/rest/auth_spec.rb#L527)
|
596
|
+
* [when a message is published](./spec/acceptance/rest/auth_spec.rb#L531)
|
597
|
+
* [with capability and TTL defaults](./spec/acceptance/rest/auth_spec.rb#L535)
|
598
|
+
* when using an :api_key and basic auth
|
599
|
+
* [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L550)
|
600
|
+
* [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L554)
|
601
|
+
|
602
|
+
### Ably::Rest
|
603
|
+
_(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
|
604
|
+
* transport protocol
|
605
|
+
* when protocol is not defined it defaults to :msgpack
|
606
|
+
* [uses MsgPack](./spec/acceptance/rest/base_spec.rb#L27)
|
607
|
+
* when option {:protocol=>:json} is used
|
608
|
+
* [uses JSON](./spec/acceptance/rest/base_spec.rb#L43)
|
609
|
+
* when option {:use_binary_protocol=>false} is used
|
610
|
+
* [uses JSON](./spec/acceptance/rest/base_spec.rb#L43)
|
611
|
+
* when option {:protocol=>:msgpack} is used
|
612
|
+
* [uses MsgPack](./spec/acceptance/rest/base_spec.rb#L60)
|
613
|
+
* when option {:use_binary_protocol=>true} is used
|
614
|
+
* [uses MsgPack](./spec/acceptance/rest/base_spec.rb#L60)
|
615
|
+
* using JSON and MsgPack protocol
|
616
|
+
* failed requests
|
617
|
+
* due to invalid Auth
|
618
|
+
* [should raise an InvalidRequest exception with a valid error message and code](./spec/acceptance/rest/base_spec.rb#L75)
|
619
|
+
* server error with JSON error response body
|
620
|
+
* [should raise a ServerError exception](./spec/acceptance/rest/base_spec.rb#L94)
|
621
|
+
* 500 server error without a valid JSON response body
|
622
|
+
* [should raise a ServerError exception](./spec/acceptance/rest/base_spec.rb#L105)
|
623
|
+
* token authentication failures
|
624
|
+
* when auth#token_renewable?
|
625
|
+
* [should automatically reissue a token](./spec/acceptance/rest/base_spec.rb#L143)
|
626
|
+
* when NOT auth#token_renewable?
|
627
|
+
* [should raise an InvalidToken exception](./spec/acceptance/rest/base_spec.rb#L156)
|
628
|
+
|
629
|
+
### Ably::Rest::Channel
|
630
|
+
_(see [spec/acceptance/rest/channel_spec.rb](./spec/acceptance/rest/channel_spec.rb))_
|
631
|
+
* using JSON and MsgPack protocol
|
632
|
+
* #publish
|
633
|
+
* [should publish the message adn return true indicating success](./spec/acceptance/rest/channel_spec.rb#L17)
|
634
|
+
* #history
|
635
|
+
* [should return the current message history for the channel](./spec/acceptance/rest/channel_spec.rb#L39)
|
636
|
+
* [should return paged history using the PaginatedResource model](./spec/acceptance/rest/channel_spec.rb#L67)
|
637
|
+
* message timestamps
|
638
|
+
* [should all be after the messages were published](./spec/acceptance/rest/channel_spec.rb#L52)
|
639
|
+
* message IDs
|
640
|
+
* [should be unique](./spec/acceptance/rest/channel_spec.rb#L60)
|
641
|
+
* #history option
|
642
|
+
* :start
|
643
|
+
* with milliseconds since epoch value
|
644
|
+
* [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L116)
|
645
|
+
* with a Time object value
|
646
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L126)
|
647
|
+
* :end
|
648
|
+
* with milliseconds since epoch value
|
649
|
+
* [uses this value in the history request](./spec/acceptance/rest/channel_spec.rb#L116)
|
650
|
+
* with a Time object value
|
651
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/channel_spec.rb#L126)
|
652
|
+
|
653
|
+
### Ably::Rest::Channels
|
654
|
+
_(see [spec/acceptance/rest/channels_spec.rb](./spec/acceptance/rest/channels_spec.rb))_
|
655
|
+
* using JSON and MsgPack protocol
|
656
|
+
* using shortcut method #channel on the client object
|
657
|
+
* behaves like a channel
|
658
|
+
* [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6)
|
659
|
+
* [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11)
|
660
|
+
* using #get method on client#channels
|
661
|
+
* behaves like a channel
|
662
|
+
* [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6)
|
663
|
+
* [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11)
|
664
|
+
* using undocumented array accessor [] method on client#channels
|
665
|
+
* behaves like a channel
|
666
|
+
* [returns a channel object](./spec/acceptance/rest/channels_spec.rb#L6)
|
667
|
+
* [returns channel object and passes the provided options](./spec/acceptance/rest/channels_spec.rb#L11)
|
668
|
+
|
669
|
+
### Ably::Rest::Client
|
670
|
+
_(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.rb))_
|
671
|
+
* using JSON and MsgPack protocol
|
672
|
+
* #initialize
|
673
|
+
* with an auth block
|
674
|
+
* [calls the block to get a new token](./spec/acceptance/rest/client_spec.rb#L20)
|
675
|
+
* with an auth URL
|
676
|
+
* [sends an HTTP request to the provided URL to get a new token](./spec/acceptance/rest/client_spec.rb#L34)
|
677
|
+
* using tokens
|
678
|
+
* when expired
|
679
|
+
* [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#L55)
|
680
|
+
* when token has not expired
|
681
|
+
* [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L69)
|
682
|
+
* connection transport
|
683
|
+
* for default host
|
684
|
+
* [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L85)
|
685
|
+
* [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L89)
|
686
|
+
* for the fallback hosts
|
687
|
+
* [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L95)
|
688
|
+
* [is configured to timeout connection requests in 15 seconds](./spec/acceptance/rest/client_spec.rb#L99)
|
689
|
+
* fallback hosts
|
690
|
+
* configured
|
691
|
+
* [should make connection attempts to A.ably-realtime.com, B.ably-realtime.com, C.ably-realtime.com, D.ably-realtime.com, E.ably-realtime.com](./spec/acceptance/rest/client_spec.rb#L112)
|
692
|
+
* when environment is NOT production
|
693
|
+
* [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L129)
|
694
|
+
* when environment is production
|
695
|
+
* and connection times out
|
696
|
+
* [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L169)
|
697
|
+
* and the total request time exeeds 10 seconds
|
698
|
+
* [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L184)
|
699
|
+
* and connection fails
|
700
|
+
* [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L200)
|
701
|
+
* with a custom host
|
702
|
+
* that does not exist
|
703
|
+
* [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L216)
|
704
|
+
* fallback hosts
|
705
|
+
* [are never used](./spec/acceptance/rest/client_spec.rb#L237)
|
706
|
+
* that times out
|
707
|
+
* [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L252)
|
708
|
+
* fallback hosts
|
709
|
+
* [are never used](./spec/acceptance/rest/client_spec.rb#L265)
|
710
|
+
|
711
|
+
### Ably::Models::MessageEncoders
|
712
|
+
_(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_
|
713
|
+
* with binary transport protocol
|
714
|
+
* without encryption
|
715
|
+
* with UTF-8 data
|
716
|
+
* [does not apply any encoding](./spec/acceptance/rest/encoders_spec.rb#L41)
|
717
|
+
* with binary data
|
718
|
+
* [does not apply any encoding](./spec/acceptance/rest/encoders_spec.rb#L52)
|
719
|
+
* with JSON data
|
720
|
+
* [stringifies the JSON and sets the json encoding type](./spec/acceptance/rest/encoders_spec.rb#L63)
|
721
|
+
* with encryption
|
722
|
+
* with UTF-8 data
|
723
|
+
* [applies utf-8 and cipher encoding](./spec/acceptance/rest/encoders_spec.rb#L78)
|
724
|
+
* with binary data
|
725
|
+
* [applies cipher encoding](./spec/acceptance/rest/encoders_spec.rb#L89)
|
726
|
+
* with JSON data
|
727
|
+
* [applies json, utf-8 and cipher encoding](./spec/acceptance/rest/encoders_spec.rb#L100)
|
728
|
+
* with text transport protocol
|
729
|
+
* without encryption
|
730
|
+
* with UTF-8 data
|
731
|
+
* [does not apply any encoding](./spec/acceptance/rest/encoders_spec.rb#L117)
|
732
|
+
* with binary data
|
733
|
+
* [applies a base64 encoding](./spec/acceptance/rest/encoders_spec.rb#L128)
|
734
|
+
* with JSON data
|
735
|
+
* [stringifies the JSON and sets the json encoding type](./spec/acceptance/rest/encoders_spec.rb#L139)
|
736
|
+
* with encryption
|
737
|
+
* with UTF-8 data
|
738
|
+
* [applies utf-8, cipher and base64 encodings](./spec/acceptance/rest/encoders_spec.rb#L154)
|
739
|
+
* with binary data
|
740
|
+
* [applies cipher and base64 encoding](./spec/acceptance/rest/encoders_spec.rb#L165)
|
741
|
+
* with JSON data
|
742
|
+
* [applies json, utf-8, cipher and base64 encoding](./spec/acceptance/rest/encoders_spec.rb#L176)
|
743
|
+
|
744
|
+
### Ably::Rest::Channel messages
|
745
|
+
_(see [spec/acceptance/rest/message_spec.rb](./spec/acceptance/rest/message_spec.rb))_
|
746
|
+
* using JSON and MsgPack protocol
|
747
|
+
* publishing with an ASCII_8BIT message name
|
748
|
+
* [is converted into UTF_8](./spec/acceptance/rest/message_spec.rb#L18)
|
749
|
+
* encryption and encoding
|
750
|
+
* with #publish and #history
|
751
|
+
* with AES-128-CBC using crypto-data-128.json fixtures
|
752
|
+
* item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
|
753
|
+
* behaves like an Ably encrypter and decrypter
|
754
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
755
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
756
|
+
* item 1 with encrypted encoding cipher+aes-128-cbc/base64
|
757
|
+
* behaves like an Ably encrypter and decrypter
|
758
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
759
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
760
|
+
* item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
761
|
+
* behaves like an Ably encrypter and decrypter
|
762
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
763
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
764
|
+
* item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
765
|
+
* behaves like an Ably encrypter and decrypter
|
766
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
767
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
768
|
+
* with AES-256-CBC using crypto-data-256.json fixtures
|
769
|
+
* item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
|
770
|
+
* behaves like an Ably encrypter and decrypter
|
771
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
772
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
773
|
+
* item 1 with encrypted encoding cipher+aes-256-cbc/base64
|
774
|
+
* behaves like an Ably encrypter and decrypter
|
775
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
776
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
777
|
+
* item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
778
|
+
* behaves like an Ably encrypter and decrypter
|
779
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
780
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
781
|
+
* item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
782
|
+
* behaves like an Ably encrypter and decrypter
|
783
|
+
* [encrypts message automatically when published](./spec/acceptance/rest/message_spec.rb#L65)
|
784
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./spec/acceptance/rest/message_spec.rb#L80)
|
785
|
+
* when publishing lots of messages
|
786
|
+
* [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L113)
|
787
|
+
* when retrieving #history with a different protocol
|
788
|
+
* [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L140)
|
789
|
+
* [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L140)
|
790
|
+
* [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L140)
|
791
|
+
* when publishing on an unencrypted channel and retrieving with #history on an encrypted channel
|
792
|
+
* [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L156)
|
793
|
+
* when publishing on an encrypted channel and retrieving with #history on an unencrypted channel
|
794
|
+
* [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L177)
|
795
|
+
* [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L183)
|
796
|
+
* publishing on an encrypted channel and retrieving #history with a different algorithm on another client
|
797
|
+
* [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L204)
|
798
|
+
* [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L210)
|
799
|
+
* publishing on an encrypted channel and subscribing with a different key on another client
|
800
|
+
* [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L231)
|
801
|
+
* [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L237)
|
802
|
+
|
803
|
+
### Ably::Rest::Presence
|
804
|
+
_(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_
|
805
|
+
* using JSON and MsgPack protocol
|
806
|
+
* tested against presence fixture data set up in test app
|
807
|
+
* #get
|
808
|
+
* [returns current members on the channel with their action set to :present](./spec/acceptance/rest/presence_spec.rb#L31)
|
809
|
+
* with :limit option
|
810
|
+
* [returns a paged response limiting number of members per page](./spec/acceptance/rest/presence_spec.rb#L45)
|
811
|
+
* #history
|
812
|
+
* [returns recent presence activity](./spec/acceptance/rest/presence_spec.rb#L58)
|
813
|
+
* with options
|
814
|
+
* direction: :forwards
|
815
|
+
* [returns recent presence activity forwards with most recent history last](./spec/acceptance/rest/presence_spec.rb#L74)
|
816
|
+
* direction: :backwards
|
817
|
+
* [returns recent presence activity backwards with most recent history first](./spec/acceptance/rest/presence_spec.rb#L89)
|
818
|
+
* #history
|
819
|
+
* with time range options
|
820
|
+
* :start
|
821
|
+
* with milliseconds since epoch value
|
822
|
+
* [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L134)
|
823
|
+
* with Time object value
|
824
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L144)
|
825
|
+
* :end
|
826
|
+
* with milliseconds since epoch value
|
827
|
+
* [uses this value in the history request](./spec/acceptance/rest/presence_spec.rb#L134)
|
828
|
+
* with Time object value
|
829
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./spec/acceptance/rest/presence_spec.rb#L144)
|
830
|
+
* decoding
|
831
|
+
* valid decodeable content
|
832
|
+
* #get
|
833
|
+
* [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L202)
|
834
|
+
* #history
|
835
|
+
* [automaticaly decodes presence messages](./spec/acceptance/rest/presence_spec.rb#L219)
|
836
|
+
* invalid data
|
837
|
+
* #get
|
838
|
+
* [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L250)
|
839
|
+
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L254)
|
840
|
+
* #history
|
841
|
+
* [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L274)
|
842
|
+
* [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L278)
|
843
|
+
|
844
|
+
### Ably::Rest::Client#stats
|
845
|
+
_(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_
|
846
|
+
* using JSON and MsgPack protocol
|
847
|
+
* fetching application stats
|
848
|
+
* by minute
|
849
|
+
* [should return all the stats for the application](./spec/acceptance/rest/stats_spec.rb#L49)
|
850
|
+
* by hour
|
851
|
+
* [should return all the stats for the application](./spec/acceptance/rest/stats_spec.rb#L49)
|
852
|
+
* by day
|
853
|
+
* [should return all the stats for the application](./spec/acceptance/rest/stats_spec.rb#L49)
|
854
|
+
* by month
|
855
|
+
* [should return all the stats for the application](./spec/acceptance/rest/stats_spec.rb#L49)
|
856
|
+
|
857
|
+
### Ably::Rest::Client#time
|
858
|
+
_(see [spec/acceptance/rest/time_spec.rb](./spec/acceptance/rest/time_spec.rb))_
|
859
|
+
* using JSON and MsgPack protocol
|
860
|
+
* fetching the service time
|
861
|
+
* [should return the service time as a Time object](./spec/acceptance/rest/time_spec.rb#L10)
|
862
|
+
|
863
|
+
### Ably::Auth
|
864
|
+
_(see [spec/unit/auth_spec.rb](./spec/unit/auth_spec.rb))_
|
865
|
+
* client_id option
|
866
|
+
* with nil value
|
867
|
+
* [is permitted](./spec/unit/auth_spec.rb#L19)
|
868
|
+
* as UTF_8 string
|
869
|
+
* [is permitted](./spec/unit/auth_spec.rb#L27)
|
870
|
+
* [remains as UTF-8](./spec/unit/auth_spec.rb#L31)
|
871
|
+
* as SHIFT_JIS string
|
872
|
+
* [gets converted to UTF-8](./spec/unit/auth_spec.rb#L39)
|
873
|
+
* [is compatible with original encoding](./spec/unit/auth_spec.rb#L43)
|
874
|
+
* as ASCII_8BIT string
|
875
|
+
* [gets converted to UTF-8](./spec/unit/auth_spec.rb#L51)
|
876
|
+
* [is compatible with original encoding](./spec/unit/auth_spec.rb#L55)
|
877
|
+
* as Integer
|
878
|
+
* [raises an argument error](./spec/unit/auth_spec.rb#L63)
|
879
|
+
|
880
|
+
### Ably::Logger
|
881
|
+
_(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_
|
882
|
+
* [uses the language provided Logger by default](./spec/unit/logger_spec.rb#L15)
|
883
|
+
* with a custom Logger
|
884
|
+
* with an invalid interface
|
885
|
+
* [raises an exception](./spec/unit/logger_spec.rb#L116)
|
886
|
+
* with a valid interface
|
887
|
+
* [is used](./spec/unit/logger_spec.rb#L135)
|
888
|
+
|
889
|
+
### Ably::Models::ErrorInfo
|
890
|
+
_(see [spec/unit/models/error_info_spec.rb](./spec/unit/models/error_info_spec.rb))_
|
891
|
+
* behaves like a model
|
892
|
+
* attributes
|
893
|
+
* #code
|
894
|
+
* [retrieves attribute :code](./spec/shared/model_behaviour.rb#L15)
|
895
|
+
* #status_code
|
896
|
+
* [retrieves attribute :status_code](./spec/shared/model_behaviour.rb#L15)
|
897
|
+
* #message
|
898
|
+
* [retrieves attribute :message](./spec/shared/model_behaviour.rb#L15)
|
899
|
+
* #==
|
900
|
+
* [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
|
901
|
+
* [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
|
902
|
+
* [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
|
903
|
+
* is immutable
|
904
|
+
* [prevents changes](./spec/shared/model_behaviour.rb#L76)
|
905
|
+
* [dups options](./spec/shared/model_behaviour.rb#L80)
|
906
|
+
* #status
|
907
|
+
* [is an alias for #status_code](./spec/unit/models/error_info_spec.rb#L13)
|
908
|
+
|
909
|
+
### Ably::Models::MessageEncoders::Base64
|
910
|
+
_(see [spec/unit/models/message_encoders/base64_spec.rb](./spec/unit/models/message_encoders/base64_spec.rb))_
|
911
|
+
* #decode
|
912
|
+
* message with base64 payload
|
913
|
+
* [decodes base64](./spec/unit/models/message_encoders/base64_spec.rb#L24)
|
914
|
+
* [strips the encoding](./spec/unit/models/message_encoders/base64_spec.rb#L28)
|
915
|
+
* message with base64 payload before other payloads
|
916
|
+
* [decodes base64](./spec/unit/models/message_encoders/base64_spec.rb#L36)
|
917
|
+
* [strips the encoding](./spec/unit/models/message_encoders/base64_spec.rb#L40)
|
918
|
+
* message with another payload
|
919
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/base64_spec.rb#L48)
|
920
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L52)
|
921
|
+
* #encode
|
922
|
+
* over binary transport
|
923
|
+
* message with binary payload
|
924
|
+
* [leaves the message data intact as Base64 encoding is not necessary](./spec/unit/models/message_encoders/base64_spec.rb#L68)
|
925
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L72)
|
926
|
+
* already encoded message with binary payload
|
927
|
+
* [leaves the message data intact as Base64 encoding is not necessary](./spec/unit/models/message_encoders/base64_spec.rb#L80)
|
928
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L84)
|
929
|
+
* message with UTF-8 payload
|
930
|
+
* [leaves the data intact](./spec/unit/models/message_encoders/base64_spec.rb#L92)
|
931
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L96)
|
932
|
+
* message with nil payload
|
933
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/base64_spec.rb#L104)
|
934
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L108)
|
935
|
+
* message with empty binary string payload
|
936
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/base64_spec.rb#L116)
|
937
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L120)
|
938
|
+
* over text transport
|
939
|
+
* message with binary payload
|
940
|
+
* [encodes binary data as base64](./spec/unit/models/message_encoders/base64_spec.rb#L135)
|
941
|
+
* [adds the encoding](./spec/unit/models/message_encoders/base64_spec.rb#L139)
|
942
|
+
* already encoded message with binary payload
|
943
|
+
* [encodes binary data as base64](./spec/unit/models/message_encoders/base64_spec.rb#L147)
|
944
|
+
* [adds the encoding](./spec/unit/models/message_encoders/base64_spec.rb#L151)
|
945
|
+
* message with UTF-8 payload
|
946
|
+
* [leaves the data intact](./spec/unit/models/message_encoders/base64_spec.rb#L159)
|
947
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L163)
|
948
|
+
* message with nil payload
|
949
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/base64_spec.rb#L171)
|
950
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/base64_spec.rb#L175)
|
951
|
+
|
952
|
+
### Ably::Models::MessageEncoders::Cipher
|
953
|
+
_(see [spec/unit/models/message_encoders/cipher_spec.rb](./spec/unit/models/message_encoders/cipher_spec.rb))_
|
954
|
+
* #decode
|
955
|
+
* with channel set up for AES-128-CBC
|
956
|
+
* valid cipher data
|
957
|
+
* message with cipher payload
|
958
|
+
* [decodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L32)
|
959
|
+
* [strips the encoding](./spec/unit/models/message_encoders/cipher_spec.rb#L36)
|
960
|
+
* message with cipher payload before other payloads
|
961
|
+
* [decodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L44)
|
962
|
+
* [strips the encoding](./spec/unit/models/message_encoders/cipher_spec.rb#L48)
|
963
|
+
* message with binary payload
|
964
|
+
* [decodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L56)
|
965
|
+
* [strips the encoding](./spec/unit/models/message_encoders/cipher_spec.rb#L60)
|
966
|
+
* [returns ASCII_8BIT encoded binary data](./spec/unit/models/message_encoders/cipher_spec.rb#L64)
|
967
|
+
* message with another payload
|
968
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/cipher_spec.rb#L72)
|
969
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/cipher_spec.rb#L76)
|
970
|
+
* with invalid channel_option cipher params
|
971
|
+
* [raise an exception](./spec/unit/models/message_encoders/cipher_spec.rb#L87)
|
972
|
+
* without any configured encryption
|
973
|
+
* [raise an exception](./spec/unit/models/message_encoders/cipher_spec.rb#L97)
|
974
|
+
* with invalid cipher data
|
975
|
+
* [raise an exception](./spec/unit/models/message_encoders/cipher_spec.rb#L106)
|
976
|
+
* with AES-256-CBC
|
977
|
+
* message with cipher payload
|
978
|
+
* [decodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L122)
|
979
|
+
* [strips the encoding](./spec/unit/models/message_encoders/cipher_spec.rb#L126)
|
980
|
+
* #encode
|
981
|
+
* with channel set up for AES-128-CBC
|
982
|
+
* with encrypted set to true
|
983
|
+
* message with string payload
|
984
|
+
* [encodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L146)
|
985
|
+
* [adds the encoding with utf-8](./spec/unit/models/message_encoders/cipher_spec.rb#L151)
|
986
|
+
* message with binary payload
|
987
|
+
* [encodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L159)
|
988
|
+
* [adds the encoding without utf-8 prefixed](./spec/unit/models/message_encoders/cipher_spec.rb#L164)
|
989
|
+
* [returns ASCII_8BIT encoded binary data](./spec/unit/models/message_encoders/cipher_spec.rb#L168)
|
990
|
+
* message with json payload
|
991
|
+
* [encodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L176)
|
992
|
+
* [adds the encoding with utf-8](./spec/unit/models/message_encoders/cipher_spec.rb#L181)
|
993
|
+
* message with existing cipher encoding before
|
994
|
+
* [leaves message intact as it is already encrypted](./spec/unit/models/message_encoders/cipher_spec.rb#L189)
|
995
|
+
* [leaves encoding intact](./spec/unit/models/message_encoders/cipher_spec.rb#L193)
|
996
|
+
* with encryption set to to false
|
997
|
+
* [leaves message intact as encryption is not enable](./spec/unit/models/message_encoders/cipher_spec.rb#L202)
|
998
|
+
* [leaves encoding intact](./spec/unit/models/message_encoders/cipher_spec.rb#L206)
|
999
|
+
* channel_option cipher params
|
1000
|
+
* have invalid key length
|
1001
|
+
* [raise an exception](./spec/unit/models/message_encoders/cipher_spec.rb#L218)
|
1002
|
+
* have invalid algorithm
|
1003
|
+
* [raise an exception](./spec/unit/models/message_encoders/cipher_spec.rb#L225)
|
1004
|
+
* have missing key
|
1005
|
+
* [raise an exception](./spec/unit/models/message_encoders/cipher_spec.rb#L232)
|
1006
|
+
* with AES-256-CBC
|
1007
|
+
* message with cipher payload
|
1008
|
+
* [decodes cipher](./spec/unit/models/message_encoders/cipher_spec.rb#L249)
|
1009
|
+
* [strips the encoding](./spec/unit/models/message_encoders/cipher_spec.rb#L254)
|
1010
|
+
|
1011
|
+
### Ably::Models::MessageEncoders::Json
|
1012
|
+
_(see [spec/unit/models/message_encoders/json_spec.rb](./spec/unit/models/message_encoders/json_spec.rb))_
|
1013
|
+
* #decode
|
1014
|
+
* message with json payload
|
1015
|
+
* [decodes json](./spec/unit/models/message_encoders/json_spec.rb#L24)
|
1016
|
+
* [strips the encoding](./spec/unit/models/message_encoders/json_spec.rb#L28)
|
1017
|
+
* message with json payload before other payloads
|
1018
|
+
* [decodes json](./spec/unit/models/message_encoders/json_spec.rb#L36)
|
1019
|
+
* [strips the encoding](./spec/unit/models/message_encoders/json_spec.rb#L40)
|
1020
|
+
* message with another payload
|
1021
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/json_spec.rb#L48)
|
1022
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/json_spec.rb#L52)
|
1023
|
+
* #encode
|
1024
|
+
* message with hash payload
|
1025
|
+
* [encodes hash payload data as json](./spec/unit/models/message_encoders/json_spec.rb#L66)
|
1026
|
+
* [adds the encoding](./spec/unit/models/message_encoders/json_spec.rb#L70)
|
1027
|
+
* already encoded message with hash payload
|
1028
|
+
* [encodes hash payload data as json](./spec/unit/models/message_encoders/json_spec.rb#L78)
|
1029
|
+
* [adds the encoding](./spec/unit/models/message_encoders/json_spec.rb#L82)
|
1030
|
+
* message with Array payload
|
1031
|
+
* [encodes Array payload data as json](./spec/unit/models/message_encoders/json_spec.rb#L90)
|
1032
|
+
* [adds the encoding](./spec/unit/models/message_encoders/json_spec.rb#L94)
|
1033
|
+
* message with UTF-8 payload
|
1034
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/json_spec.rb#L102)
|
1035
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/json_spec.rb#L106)
|
1036
|
+
* message with nil payload
|
1037
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/json_spec.rb#L114)
|
1038
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/json_spec.rb#L118)
|
1039
|
+
* message with no data payload
|
1040
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/json_spec.rb#L126)
|
1041
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/json_spec.rb#L130)
|
1042
|
+
|
1043
|
+
### Ably::Models::MessageEncoders::Utf8
|
1044
|
+
_(see [spec/unit/models/message_encoders/utf8_spec.rb](./spec/unit/models/message_encoders/utf8_spec.rb))_
|
1045
|
+
* #decode
|
1046
|
+
* message with utf8 payload
|
1047
|
+
* [sets the encoding](./spec/unit/models/message_encoders/utf8_spec.rb#L21)
|
1048
|
+
* [strips the encoding](./spec/unit/models/message_encoders/utf8_spec.rb#L26)
|
1049
|
+
* message with utf8 payload before other payloads
|
1050
|
+
* [sets the encoding](./spec/unit/models/message_encoders/utf8_spec.rb#L34)
|
1051
|
+
* [strips the encoding](./spec/unit/models/message_encoders/utf8_spec.rb#L39)
|
1052
|
+
* message with another payload
|
1053
|
+
* [leaves the message data intact](./spec/unit/models/message_encoders/utf8_spec.rb#L47)
|
1054
|
+
* [leaves the encoding intact](./spec/unit/models/message_encoders/utf8_spec.rb#L51)
|
1055
|
+
|
1056
|
+
### Ably::Models::Message
|
1057
|
+
_(see [spec/unit/models/message_spec.rb](./spec/unit/models/message_spec.rb))_
|
1058
|
+
* behaves like a model
|
1059
|
+
* attributes
|
1060
|
+
* #name
|
1061
|
+
* [retrieves attribute :name](./spec/shared/model_behaviour.rb#L15)
|
1062
|
+
* #client_id
|
1063
|
+
* [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15)
|
1064
|
+
* #data
|
1065
|
+
* [retrieves attribute :data](./spec/shared/model_behaviour.rb#L15)
|
1066
|
+
* #encoding
|
1067
|
+
* [retrieves attribute :encoding](./spec/shared/model_behaviour.rb#L15)
|
1068
|
+
* #==
|
1069
|
+
* [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
|
1070
|
+
* [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
|
1071
|
+
* [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
|
1072
|
+
* is immutable
|
1073
|
+
* [prevents changes](./spec/shared/model_behaviour.rb#L76)
|
1074
|
+
* [dups options](./spec/shared/model_behaviour.rb#L80)
|
1075
|
+
* #timestamp
|
1076
|
+
* [retrieves attribute :timestamp as Time object from ProtocolMessage](./spec/unit/models/message_spec.rb#L21)
|
1077
|
+
* #connection_id attribute
|
1078
|
+
* when this model has a connectionId attribute
|
1079
|
+
* but no protocol message
|
1080
|
+
* [uses the model value](./spec/unit/models/message_spec.rb#L36)
|
1081
|
+
* with a protocol message with a different connectionId
|
1082
|
+
* [uses the model value](./spec/unit/models/message_spec.rb#L44)
|
1083
|
+
* when this model has no connectionId attribute
|
1084
|
+
* and no protocol message
|
1085
|
+
* [uses the model value](./spec/unit/models/message_spec.rb#L54)
|
1086
|
+
* with a protocol message with a connectionId
|
1087
|
+
* [uses the model value](./spec/unit/models/message_spec.rb#L62)
|
1088
|
+
* initialized with
|
1089
|
+
* :name
|
1090
|
+
* as UTF_8 string
|
1091
|
+
* [is permitted](./spec/unit/models/message_spec.rb#L89)
|
1092
|
+
* [remains as UTF-8](./spec/unit/models/message_spec.rb#L93)
|
1093
|
+
* as SHIFT_JIS string
|
1094
|
+
* [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L101)
|
1095
|
+
* [is compatible with original encoding](./spec/unit/models/message_spec.rb#L105)
|
1096
|
+
* as ASCII_8BIT string
|
1097
|
+
* [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L113)
|
1098
|
+
* [is compatible with original encoding](./spec/unit/models/message_spec.rb#L117)
|
1099
|
+
* as Integer
|
1100
|
+
* [raises an argument error](./spec/unit/models/message_spec.rb#L125)
|
1101
|
+
* as Nil
|
1102
|
+
* [is permitted](./spec/unit/models/message_spec.rb#L133)
|
1103
|
+
* :client_id
|
1104
|
+
* as UTF_8 string
|
1105
|
+
* [is permitted](./spec/unit/models/message_spec.rb#L89)
|
1106
|
+
* [remains as UTF-8](./spec/unit/models/message_spec.rb#L93)
|
1107
|
+
* as SHIFT_JIS string
|
1108
|
+
* [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L101)
|
1109
|
+
* [is compatible with original encoding](./spec/unit/models/message_spec.rb#L105)
|
1110
|
+
* as ASCII_8BIT string
|
1111
|
+
* [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L113)
|
1112
|
+
* [is compatible with original encoding](./spec/unit/models/message_spec.rb#L117)
|
1113
|
+
* as Integer
|
1114
|
+
* [raises an argument error](./spec/unit/models/message_spec.rb#L125)
|
1115
|
+
* as Nil
|
1116
|
+
* [is permitted](./spec/unit/models/message_spec.rb#L133)
|
1117
|
+
* :encoding
|
1118
|
+
* as UTF_8 string
|
1119
|
+
* [is permitted](./spec/unit/models/message_spec.rb#L89)
|
1120
|
+
* [remains as UTF-8](./spec/unit/models/message_spec.rb#L93)
|
1121
|
+
* as SHIFT_JIS string
|
1122
|
+
* [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L101)
|
1123
|
+
* [is compatible with original encoding](./spec/unit/models/message_spec.rb#L105)
|
1124
|
+
* as ASCII_8BIT string
|
1125
|
+
* [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L113)
|
1126
|
+
* [is compatible with original encoding](./spec/unit/models/message_spec.rb#L117)
|
1127
|
+
* as Integer
|
1128
|
+
* [raises an argument error](./spec/unit/models/message_spec.rb#L125)
|
1129
|
+
* as Nil
|
1130
|
+
* [is permitted](./spec/unit/models/message_spec.rb#L133)
|
1131
|
+
|
1132
|
+
### Ably::Models::PaginatedResource
|
1133
|
+
_(see [spec/unit/models/paginated_resource_spec.rb](./spec/unit/models/paginated_resource_spec.rb))_
|
1134
|
+
* [returns correct length from body](./spec/unit/models/paginated_resource_spec.rb#L30)
|
1135
|
+
* [supports alias methods for length](./spec/unit/models/paginated_resource_spec.rb#L34)
|
1136
|
+
* [is Enumerable](./spec/unit/models/paginated_resource_spec.rb#L39)
|
1137
|
+
* [is iterable](./spec/unit/models/paginated_resource_spec.rb#L43)
|
1138
|
+
* [provides [] accessor method](./spec/unit/models/paginated_resource_spec.rb#L47)
|
1139
|
+
* [#first gets the first item in page](./spec/unit/models/paginated_resource_spec.rb#L53)
|
1140
|
+
* [#last gets the last item in page](./spec/unit/models/paginated_resource_spec.rb#L57)
|
1141
|
+
* with non paged http response
|
1142
|
+
* [is the first page](./spec/unit/models/paginated_resource_spec.rb#L161)
|
1143
|
+
* [is the last page](./spec/unit/models/paginated_resource_spec.rb#L165)
|
1144
|
+
* [does not support pagination](./spec/unit/models/paginated_resource_spec.rb#L169)
|
1145
|
+
* [raises an exception when accessing next page](./spec/unit/models/paginated_resource_spec.rb#L173)
|
1146
|
+
* [raises an exception when accessing first page](./spec/unit/models/paginated_resource_spec.rb#L177)
|
1147
|
+
* with paged http response
|
1148
|
+
* [is the first page](./spec/unit/models/paginated_resource_spec.rb#L195)
|
1149
|
+
* [is not the last page](./spec/unit/models/paginated_resource_spec.rb#L199)
|
1150
|
+
* [supports pagination](./spec/unit/models/paginated_resource_spec.rb#L203)
|
1151
|
+
* accessing next page
|
1152
|
+
* [returns another PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L231)
|
1153
|
+
* [retrieves the next page of results](./spec/unit/models/paginated_resource_spec.rb#L235)
|
1154
|
+
* [is not the first page](./spec/unit/models/paginated_resource_spec.rb#L240)
|
1155
|
+
* [is the last page](./spec/unit/models/paginated_resource_spec.rb#L244)
|
1156
|
+
* [raises an exception if trying to access the last page when it is the last page](./spec/unit/models/paginated_resource_spec.rb#L248)
|
1157
|
+
* and then first page
|
1158
|
+
* [returns a PaginatedResource](./spec/unit/models/paginated_resource_spec.rb#L259)
|
1159
|
+
* [retrieves the first page of results](./spec/unit/models/paginated_resource_spec.rb#L263)
|
1160
|
+
* [is the first page](./spec/unit/models/paginated_resource_spec.rb#L267)
|
1161
|
+
|
1162
|
+
### Ably::Models::PresenceMessage
|
1163
|
+
_(see [spec/unit/models/presence_message_spec.rb](./spec/unit/models/presence_message_spec.rb))_
|
1164
|
+
* behaves like a model
|
1165
|
+
* attributes
|
1166
|
+
* #client_id
|
1167
|
+
* [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15)
|
1168
|
+
* #data
|
1169
|
+
* [retrieves attribute :data](./spec/shared/model_behaviour.rb#L15)
|
1170
|
+
* #encoding
|
1171
|
+
* [retrieves attribute :encoding](./spec/shared/model_behaviour.rb#L15)
|
1172
|
+
* #==
|
1173
|
+
* [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
|
1174
|
+
* [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
|
1175
|
+
* [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
|
1176
|
+
* is immutable
|
1177
|
+
* [prevents changes](./spec/shared/model_behaviour.rb#L76)
|
1178
|
+
* [dups options](./spec/shared/model_behaviour.rb#L80)
|
1179
|
+
* #connection_id attribute
|
1180
|
+
* when this model has a connectionId attribute
|
1181
|
+
* but no protocol message
|
1182
|
+
* [uses the model value](./spec/unit/models/presence_message_spec.rb#L25)
|
1183
|
+
* with a protocol message with a different connectionId
|
1184
|
+
* [uses the model value](./spec/unit/models/presence_message_spec.rb#L33)
|
1185
|
+
* when this model has no connectionId attribute
|
1186
|
+
* and no protocol message
|
1187
|
+
* [uses the model value](./spec/unit/models/presence_message_spec.rb#L43)
|
1188
|
+
* with a protocol message with a connectionId
|
1189
|
+
* [uses the model value](./spec/unit/models/presence_message_spec.rb#L51)
|
1190
|
+
* #member_key attribute
|
1191
|
+
* [is string in format connection_id:client_id](./spec/unit/models/presence_message_spec.rb#L61)
|
1192
|
+
* with the same client id across multiple connections
|
1193
|
+
* [is unique](./spec/unit/models/presence_message_spec.rb#L69)
|
1194
|
+
* with a single connection and different client_ids
|
1195
|
+
* [is unique](./spec/unit/models/presence_message_spec.rb#L78)
|
1196
|
+
* #timestamp
|
1197
|
+
* [retrieves attribute :timestamp as a Time object from ProtocolMessage](./spec/unit/models/presence_message_spec.rb#L86)
|
1198
|
+
* initialized with
|
1199
|
+
* :client_id
|
1200
|
+
* as UTF_8 string
|
1201
|
+
* [is permitted](./spec/unit/models/presence_message_spec.rb#L138)
|
1202
|
+
* [remains as UTF-8](./spec/unit/models/presence_message_spec.rb#L142)
|
1203
|
+
* as SHIFT_JIS string
|
1204
|
+
* [gets converted to UTF-8](./spec/unit/models/presence_message_spec.rb#L150)
|
1205
|
+
* [is compatible with original encoding](./spec/unit/models/presence_message_spec.rb#L154)
|
1206
|
+
* as ASCII_8BIT string
|
1207
|
+
* [gets converted to UTF-8](./spec/unit/models/presence_message_spec.rb#L162)
|
1208
|
+
* [is compatible with original encoding](./spec/unit/models/presence_message_spec.rb#L166)
|
1209
|
+
* as Integer
|
1210
|
+
* [raises an argument error](./spec/unit/models/presence_message_spec.rb#L174)
|
1211
|
+
* as Nil
|
1212
|
+
* [is permitted](./spec/unit/models/presence_message_spec.rb#L182)
|
1213
|
+
* :connection_id
|
1214
|
+
* as UTF_8 string
|
1215
|
+
* [is permitted](./spec/unit/models/presence_message_spec.rb#L138)
|
1216
|
+
* [remains as UTF-8](./spec/unit/models/presence_message_spec.rb#L142)
|
1217
|
+
* as SHIFT_JIS string
|
1218
|
+
* [gets converted to UTF-8](./spec/unit/models/presence_message_spec.rb#L150)
|
1219
|
+
* [is compatible with original encoding](./spec/unit/models/presence_message_spec.rb#L154)
|
1220
|
+
* as ASCII_8BIT string
|
1221
|
+
* [gets converted to UTF-8](./spec/unit/models/presence_message_spec.rb#L162)
|
1222
|
+
* [is compatible with original encoding](./spec/unit/models/presence_message_spec.rb#L166)
|
1223
|
+
* as Integer
|
1224
|
+
* [raises an argument error](./spec/unit/models/presence_message_spec.rb#L174)
|
1225
|
+
* as Nil
|
1226
|
+
* [is permitted](./spec/unit/models/presence_message_spec.rb#L182)
|
1227
|
+
* :encoding
|
1228
|
+
* as UTF_8 string
|
1229
|
+
* [is permitted](./spec/unit/models/presence_message_spec.rb#L138)
|
1230
|
+
* [remains as UTF-8](./spec/unit/models/presence_message_spec.rb#L142)
|
1231
|
+
* as SHIFT_JIS string
|
1232
|
+
* [gets converted to UTF-8](./spec/unit/models/presence_message_spec.rb#L150)
|
1233
|
+
* [is compatible with original encoding](./spec/unit/models/presence_message_spec.rb#L154)
|
1234
|
+
* as ASCII_8BIT string
|
1235
|
+
* [gets converted to UTF-8](./spec/unit/models/presence_message_spec.rb#L162)
|
1236
|
+
* [is compatible with original encoding](./spec/unit/models/presence_message_spec.rb#L166)
|
1237
|
+
* as Integer
|
1238
|
+
* [raises an argument error](./spec/unit/models/presence_message_spec.rb#L174)
|
1239
|
+
* as Nil
|
1240
|
+
* [is permitted](./spec/unit/models/presence_message_spec.rb#L182)
|
1241
|
+
|
1242
|
+
### Ably::Models::ProtocolMessage
|
1243
|
+
_(see [spec/unit/models/protocol_message_spec.rb](./spec/unit/models/protocol_message_spec.rb))_
|
1244
|
+
* behaves like a model
|
1245
|
+
* attributes
|
1246
|
+
* #id
|
1247
|
+
* [retrieves attribute :id](./spec/shared/model_behaviour.rb#L15)
|
1248
|
+
* #channel
|
1249
|
+
* [retrieves attribute :channel](./spec/shared/model_behaviour.rb#L15)
|
1250
|
+
* #channel_serial
|
1251
|
+
* [retrieves attribute :channel_serial](./spec/shared/model_behaviour.rb#L15)
|
1252
|
+
* #connection_id
|
1253
|
+
* [retrieves attribute :connection_id](./spec/shared/model_behaviour.rb#L15)
|
1254
|
+
* #==
|
1255
|
+
* [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
|
1256
|
+
* [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
|
1257
|
+
* [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
|
1258
|
+
* is immutable
|
1259
|
+
* [prevents changes](./spec/shared/model_behaviour.rb#L76)
|
1260
|
+
* [dups options](./spec/shared/model_behaviour.rb#L80)
|
1261
|
+
* attributes
|
1262
|
+
* #timestamp
|
1263
|
+
* [retrieves attribute :timestamp as Time object](./spec/unit/models/protocol_message_spec.rb#L74)
|
1264
|
+
* #count
|
1265
|
+
* when missing
|
1266
|
+
* [is 1](./spec/unit/models/protocol_message_spec.rb#L83)
|
1267
|
+
* when non numeric
|
1268
|
+
* [is 1](./spec/unit/models/protocol_message_spec.rb#L90)
|
1269
|
+
* when greater than 1
|
1270
|
+
* [is the value of count](./spec/unit/models/protocol_message_spec.rb#L97)
|
1271
|
+
* #message_serial
|
1272
|
+
* [converts :msg_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L105)
|
1273
|
+
* #has_message_serial?
|
1274
|
+
* without msg_serial
|
1275
|
+
* [returns false](./spec/unit/models/protocol_message_spec.rb#L115)
|
1276
|
+
* with msg_serial
|
1277
|
+
* [returns true](./spec/unit/models/protocol_message_spec.rb#L123)
|
1278
|
+
* #connection_serial
|
1279
|
+
* [converts :connection_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L131)
|
1280
|
+
* #flags
|
1281
|
+
* when nil
|
1282
|
+
* [is zero](./spec/unit/models/protocol_message_spec.rb#L141)
|
1283
|
+
* when numeric
|
1284
|
+
* [is an Integer](./spec/unit/models/protocol_message_spec.rb#L149)
|
1285
|
+
* when has_presence
|
1286
|
+
* [#has_presence_flag? is true](./spec/unit/models/protocol_message_spec.rb#L157)
|
1287
|
+
* when has another future flag
|
1288
|
+
* [#has_presence_flag? is false](./spec/unit/models/protocol_message_spec.rb#L165)
|
1289
|
+
* #has_connection_serial?
|
1290
|
+
* without connection_serial
|
1291
|
+
* [returns false](./spec/unit/models/protocol_message_spec.rb#L175)
|
1292
|
+
* with connection_serial
|
1293
|
+
* [returns true](./spec/unit/models/protocol_message_spec.rb#L183)
|
1294
|
+
* #serial
|
1295
|
+
* with underlying msg_serial
|
1296
|
+
* [converts :msg_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L192)
|
1297
|
+
* with underlying connection_serial
|
1298
|
+
* [converts :connection_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L200)
|
1299
|
+
* with underlying connection_serial and msg_serial
|
1300
|
+
* [prefers connection_serial and converts :connection_serial to an Integer](./spec/unit/models/protocol_message_spec.rb#L208)
|
1301
|
+
* #has_serial?
|
1302
|
+
* without msg_serial or connection_serial
|
1303
|
+
* [returns false](./spec/unit/models/protocol_message_spec.rb#L219)
|
1304
|
+
* with msg_serial
|
1305
|
+
* [returns true](./spec/unit/models/protocol_message_spec.rb#L227)
|
1306
|
+
* with connection_serial
|
1307
|
+
* [returns true](./spec/unit/models/protocol_message_spec.rb#L235)
|
1308
|
+
* #error
|
1309
|
+
* with no error attribute
|
1310
|
+
* [returns nil](./spec/unit/models/protocol_message_spec.rb#L245)
|
1311
|
+
* with nil error
|
1312
|
+
* [returns nil](./spec/unit/models/protocol_message_spec.rb#L253)
|
1313
|
+
* with error
|
1314
|
+
* [returns a valid ErrorInfo object](./spec/unit/models/protocol_message_spec.rb#L261)
|
1315
|
+
|
1316
|
+
### Ably::Models::Token
|
1317
|
+
_(see [spec/unit/models/token_spec.rb](./spec/unit/models/token_spec.rb))_
|
1318
|
+
* behaves like a model
|
1319
|
+
* attributes
|
1320
|
+
* #id
|
1321
|
+
* [retrieves attribute :id](./spec/shared/model_behaviour.rb#L15)
|
1322
|
+
* #capability
|
1323
|
+
* [retrieves attribute :capability](./spec/shared/model_behaviour.rb#L15)
|
1324
|
+
* #client_id
|
1325
|
+
* [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15)
|
1326
|
+
* #nonce
|
1327
|
+
* [retrieves attribute :nonce](./spec/shared/model_behaviour.rb#L15)
|
1328
|
+
* #==
|
1329
|
+
* [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
|
1330
|
+
* [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
|
1331
|
+
* [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
|
1332
|
+
* is immutable
|
1333
|
+
* [prevents changes](./spec/shared/model_behaviour.rb#L76)
|
1334
|
+
* [dups options](./spec/shared/model_behaviour.rb#L80)
|
1335
|
+
* defaults
|
1336
|
+
* [should default TTL to 1 hour](./spec/unit/models/token_spec.rb#L14)
|
1337
|
+
* [should default capability to all](./spec/unit/models/token_spec.rb#L18)
|
1338
|
+
* [should only have defaults for :ttl and :capability](./spec/unit/models/token_spec.rb#L22)
|
1339
|
+
* attributes
|
1340
|
+
* #key_id
|
1341
|
+
* [retrieves attribute :key](./spec/unit/models/token_spec.rb#L32)
|
1342
|
+
* #issued_at
|
1343
|
+
* [retrieves attribute :issued_at as Time](./spec/unit/models/token_spec.rb#L42)
|
1344
|
+
* #expires_at
|
1345
|
+
* [retrieves attribute :expires as Time](./spec/unit/models/token_spec.rb#L42)
|
1346
|
+
* #expired?
|
1347
|
+
* once grace period buffer has passed
|
1348
|
+
* [is true](./spec/unit/models/token_spec.rb#L55)
|
1349
|
+
* within grace period buffer
|
1350
|
+
* [is false](./spec/unit/models/token_spec.rb#L63)
|
1351
|
+
* ==
|
1352
|
+
* [is true when attributes are the same](./spec/unit/models/token_spec.rb#L73)
|
1353
|
+
* [is false when attributes are not the same](./spec/unit/models/token_spec.rb#L78)
|
1354
|
+
* [is false when class type differs](./spec/unit/models/token_spec.rb#L82)
|
1355
|
+
|
1356
|
+
### Ably::Modules::EventEmitter
|
1357
|
+
_(see [spec/unit/modules/event_emitter_spec.rb](./spec/unit/modules/event_emitter_spec.rb))_
|
1358
|
+
* #trigger event fan out
|
1359
|
+
* [should emit an event for any number of subscribers](./spec/unit/modules/event_emitter_spec.rb#L18)
|
1360
|
+
* [sends only messages to matching event names](./spec/unit/modules/event_emitter_spec.rb#L27)
|
1361
|
+
* #on subscribe to multiple events
|
1362
|
+
* [with the same block](./spec/unit/modules/event_emitter_spec.rb#L59)
|
1363
|
+
* event callback changes within the callback block
|
1364
|
+
* when new event callbacks are added
|
1365
|
+
* [is unaffected and processes the prior event callbacks once](./spec/unit/modules/event_emitter_spec.rb#L83)
|
1366
|
+
* [adds them for the next emitted event](./spec/unit/modules/event_emitter_spec.rb#L89)
|
1367
|
+
* when callbacks are removed
|
1368
|
+
* [is unaffected and processes the prior event callbacks once](./spec/unit/modules/event_emitter_spec.rb#L110)
|
1369
|
+
* [removes them for the next emitted event](./spec/unit/modules/event_emitter_spec.rb#L115)
|
1370
|
+
* #once
|
1371
|
+
* [calls the block the first time an event is emitted only](./spec/unit/modules/event_emitter_spec.rb#L128)
|
1372
|
+
* [does not remove other blocks after it is called](./spec/unit/modules/event_emitter_spec.rb#L135)
|
1373
|
+
* #off
|
1374
|
+
* with event names as arguments
|
1375
|
+
* [deletes matching callbacks](./spec/unit/modules/event_emitter_spec.rb#L156)
|
1376
|
+
* [deletes all callbacks if not block given](./spec/unit/modules/event_emitter_spec.rb#L161)
|
1377
|
+
* [continues if the block does not exist](./spec/unit/modules/event_emitter_spec.rb#L166)
|
1378
|
+
* without any event names
|
1379
|
+
* [deletes all matching callbacks](./spec/unit/modules/event_emitter_spec.rb#L173)
|
1380
|
+
* [deletes all callbacks if not block given](./spec/unit/modules/event_emitter_spec.rb#L178)
|
1381
|
+
|
1382
|
+
### Ably::Modules::StateEmitter
|
1383
|
+
_(see [spec/unit/modules/state_emitter_spec.rb](./spec/unit/modules/state_emitter_spec.rb))_
|
1384
|
+
* [#state returns current state](./spec/unit/modules/state_emitter_spec.rb#L25)
|
1385
|
+
* [#state= sets current state](./spec/unit/modules/state_emitter_spec.rb#L29)
|
1386
|
+
* [#change_state sets current state](./spec/unit/modules/state_emitter_spec.rb#L33)
|
1387
|
+
* #change_state with arguments
|
1388
|
+
* [passes the arguments through to the triggered callback](./spec/unit/modules/state_emitter_spec.rb#L41)
|
1389
|
+
* #state?
|
1390
|
+
* [returns true if state matches](./spec/unit/modules/state_emitter_spec.rb#L52)
|
1391
|
+
* [returns false if state does not match](./spec/unit/modules/state_emitter_spec.rb#L56)
|
1392
|
+
* and convenience predicates for states
|
1393
|
+
* [returns true for #initializing? if state matches](./spec/unit/modules/state_emitter_spec.rb#L61)
|
1394
|
+
* [returns false for #connecting? if state does not match](./spec/unit/modules/state_emitter_spec.rb#L65)
|
1395
|
+
|
1396
|
+
### Ably::Realtime::Channel
|
1397
|
+
_(see [spec/unit/realtime/channel_spec.rb](./spec/unit/realtime/channel_spec.rb))_
|
1398
|
+
* #initializer
|
1399
|
+
* as UTF_8 string
|
1400
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L19)
|
1401
|
+
* [remains as UTF-8](./spec/unit/realtime/channel_spec.rb#L23)
|
1402
|
+
* as SHIFT_JIS string
|
1403
|
+
* [gets converted to UTF-8](./spec/unit/realtime/channel_spec.rb#L31)
|
1404
|
+
* [is compatible with original encoding](./spec/unit/realtime/channel_spec.rb#L35)
|
1405
|
+
* as ASCII_8BIT string
|
1406
|
+
* [gets converted to UTF-8](./spec/unit/realtime/channel_spec.rb#L43)
|
1407
|
+
* [is compatible with original encoding](./spec/unit/realtime/channel_spec.rb#L47)
|
1408
|
+
* as Integer
|
1409
|
+
* [raises an argument error](./spec/unit/realtime/channel_spec.rb#L55)
|
1410
|
+
* as Nil
|
1411
|
+
* [raises an argument error](./spec/unit/realtime/channel_spec.rb#L63)
|
1412
|
+
* #publish name argument
|
1413
|
+
* as UTF_8 string
|
1414
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L79)
|
1415
|
+
* as SHIFT_JIS string
|
1416
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L87)
|
1417
|
+
* as ASCII_8BIT string
|
1418
|
+
* [is permitted](./spec/unit/realtime/channel_spec.rb#L95)
|
1419
|
+
* as Integer
|
1420
|
+
* [raises an argument error](./spec/unit/realtime/channel_spec.rb#L103)
|
1421
|
+
* as Nil
|
1422
|
+
* [raises an argument error](./spec/unit/realtime/channel_spec.rb#L111)
|
1423
|
+
* callbacks
|
1424
|
+
* [are supported for valid STATE events](./spec/unit/realtime/channel_spec.rb#L118)
|
1425
|
+
* [fail with unacceptable STATE event names](./spec/unit/realtime/channel_spec.rb#L124)
|
1426
|
+
* subscriptions
|
1427
|
+
* #subscribe
|
1428
|
+
* [to all events](./spec/unit/realtime/channel_spec.rb#L159)
|
1429
|
+
* [to specific events](./spec/unit/realtime/channel_spec.rb#L165)
|
1430
|
+
* #unsubscribe
|
1431
|
+
* [to all events](./spec/unit/realtime/channel_spec.rb#L181)
|
1432
|
+
* [to specific events](./spec/unit/realtime/channel_spec.rb#L187)
|
1433
|
+
* [to specific non-matching events](./spec/unit/realtime/channel_spec.rb#L193)
|
1434
|
+
* [all callbacks by not providing a callback](./spec/unit/realtime/channel_spec.rb#L199)
|
1435
|
+
|
1436
|
+
### Ably::Realtime::Channels
|
1437
|
+
_(see [spec/unit/realtime/channels_spec.rb](./spec/unit/realtime/channels_spec.rb))_
|
1438
|
+
* creating channels
|
1439
|
+
* [#get creates a channel](./spec/unit/realtime/channels_spec.rb#L13)
|
1440
|
+
* [#get will reuse the channel object](./spec/unit/realtime/channels_spec.rb#L18)
|
1441
|
+
* [[] creates a channel](./spec/unit/realtime/channels_spec.rb#L24)
|
1442
|
+
* #fetch
|
1443
|
+
* [retrieves a channel if it exists](./spec/unit/realtime/channels_spec.rb#L31)
|
1444
|
+
* [calls the block if channel is missing](./spec/unit/realtime/channels_spec.rb#L36)
|
1445
|
+
* destroying channels
|
1446
|
+
* [#release detatches and then releases the channel resoures](./spec/unit/realtime/channels_spec.rb#L44)
|
1447
|
+
|
1448
|
+
### Ably::Realtime::Client
|
1449
|
+
_(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_
|
1450
|
+
* behaves like a client initializer
|
1451
|
+
* with invalid arguments
|
1452
|
+
* empty hash
|
1453
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L28)
|
1454
|
+
* nil
|
1455
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L36)
|
1456
|
+
* api_key: "invalid"
|
1457
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44)
|
1458
|
+
* api_key: "invalid:asdad"
|
1459
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52)
|
1460
|
+
* api_key and key_id
|
1461
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60)
|
1462
|
+
* api_key and key_secret
|
1463
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L68)
|
1464
|
+
* client_id as only option
|
1465
|
+
* [requires a valid key](./spec/shared/client_initializer_behaviour.rb#L76)
|
1466
|
+
* with valid arguments
|
1467
|
+
* api_key only
|
1468
|
+
* [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87)
|
1469
|
+
* key_id and key_secret
|
1470
|
+
* [constructs an api_key](./spec/shared/client_initializer_behaviour.rb#L95)
|
1471
|
+
* with a string key instead of options hash
|
1472
|
+
* [sets the api_key](./spec/shared/client_initializer_behaviour.rb#L103)
|
1473
|
+
* [sets the key_id](./spec/shared/client_initializer_behaviour.rb#L107)
|
1474
|
+
* [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L111)
|
1475
|
+
* with token
|
1476
|
+
* [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L119)
|
1477
|
+
* endpoint
|
1478
|
+
* [defaults to production](./spec/shared/client_initializer_behaviour.rb#L125)
|
1479
|
+
* with environment option
|
1480
|
+
* [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L132)
|
1481
|
+
* tls
|
1482
|
+
* [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L151)
|
1483
|
+
* set to false
|
1484
|
+
* [uses plain text](./spec/shared/client_initializer_behaviour.rb#L142)
|
1485
|
+
* [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L146)
|
1486
|
+
* logger
|
1487
|
+
* default
|
1488
|
+
* [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L158)
|
1489
|
+
* [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L162)
|
1490
|
+
* with log_level :none
|
1491
|
+
* [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L170)
|
1492
|
+
* with custom logger and log_level
|
1493
|
+
* [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L188)
|
1494
|
+
* [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L192)
|
1495
|
+
* delegators
|
1496
|
+
* [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L202)
|
1497
|
+
* [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L207)
|
1498
|
+
* delegation to the REST Client
|
1499
|
+
* [passes on the options to the initializer](./spec/unit/realtime/client_spec.rb#L15)
|
1500
|
+
* for attribute
|
1501
|
+
* [#environment](./spec/unit/realtime/client_spec.rb#L23)
|
1502
|
+
* [#use_tls?](./spec/unit/realtime/client_spec.rb#L23)
|
1503
|
+
* [#log_level](./spec/unit/realtime/client_spec.rb#L23)
|
1504
|
+
* [#custom_host](./spec/unit/realtime/client_spec.rb#L23)
|
1505
|
+
|
1506
|
+
### Ably::Realtime::Connection
|
1507
|
+
_(see [spec/unit/realtime/connection_spec.rb](./spec/unit/realtime/connection_spec.rb))_
|
1508
|
+
* callbacks
|
1509
|
+
* [are supported for valid STATE events](./spec/unit/realtime/connection_spec.rb#L18)
|
1510
|
+
* [fail with unacceptable STATE event names](./spec/unit/realtime/connection_spec.rb#L24)
|
1511
|
+
|
1512
|
+
### Ably::Realtime::Presence
|
1513
|
+
_(see [spec/unit/realtime/presence_spec.rb](./spec/unit/realtime/presence_spec.rb))_
|
1514
|
+
* callbacks
|
1515
|
+
* [are supported for valid STATE events](./spec/unit/realtime/presence_spec.rb#L13)
|
1516
|
+
* [fail with unacceptable STATE event names](./spec/unit/realtime/presence_spec.rb#L19)
|
1517
|
+
* subscriptions
|
1518
|
+
* #subscribe
|
1519
|
+
* [to all presence state actions](./spec/unit/realtime/presence_spec.rb#L60)
|
1520
|
+
* [to specific presence state actions](./spec/unit/realtime/presence_spec.rb#L66)
|
1521
|
+
* #unsubscribe
|
1522
|
+
* [to all presence state actions](./spec/unit/realtime/presence_spec.rb#L86)
|
1523
|
+
* [to specific presence state actions](./spec/unit/realtime/presence_spec.rb#L92)
|
1524
|
+
* [to specific non-matching presence state actions](./spec/unit/realtime/presence_spec.rb#L98)
|
1525
|
+
* [all callbacks by not providing a callback](./spec/unit/realtime/presence_spec.rb#L104)
|
1526
|
+
|
1527
|
+
### Ably::Realtime
|
1528
|
+
_(see [spec/unit/realtime/realtime_spec.rb](./spec/unit/realtime/realtime_spec.rb))_
|
1529
|
+
* [constructor returns an Ably::Realtime::Client](./spec/unit/realtime/realtime_spec.rb#L6)
|
1530
|
+
|
1531
|
+
### Ably::Rest::Channels
|
1532
|
+
_(see [spec/unit/rest/channel_spec.rb](./spec/unit/rest/channel_spec.rb))_
|
1533
|
+
* #initializer
|
1534
|
+
* as UTF_8 string
|
1535
|
+
* [is permitted](./spec/unit/rest/channel_spec.rb#L16)
|
1536
|
+
* [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L20)
|
1537
|
+
* as SHIFT_JIS string
|
1538
|
+
* [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L28)
|
1539
|
+
* [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L32)
|
1540
|
+
* as ASCII_8BIT string
|
1541
|
+
* [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L40)
|
1542
|
+
* [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L44)
|
1543
|
+
* as Integer
|
1544
|
+
* [raises an argument error](./spec/unit/rest/channel_spec.rb#L52)
|
1545
|
+
* as Nil
|
1546
|
+
* [raises an argument error](./spec/unit/rest/channel_spec.rb#L60)
|
1547
|
+
* #publish name argument
|
1548
|
+
* as UTF_8 string
|
1549
|
+
* [is permitted](./spec/unit/rest/channel_spec.rb#L72)
|
1550
|
+
* as SHIFT_JIS string
|
1551
|
+
* [is permitted](./spec/unit/rest/channel_spec.rb#L80)
|
1552
|
+
* as ASCII_8BIT string
|
1553
|
+
* [is permitted](./spec/unit/rest/channel_spec.rb#L88)
|
1554
|
+
* as Integer
|
1555
|
+
* [raises an argument error](./spec/unit/rest/channel_spec.rb#L96)
|
1556
|
+
* as Nil
|
1557
|
+
* [raises an argument error](./spec/unit/rest/channel_spec.rb#L104)
|
1558
|
+
|
1559
|
+
### Ably::Rest::Channels
|
1560
|
+
_(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_
|
1561
|
+
* creating channels
|
1562
|
+
* [#get creates a channel](./spec/unit/rest/channels_spec.rb#L12)
|
1563
|
+
* [#get will reuse the channel object](./spec/unit/rest/channels_spec.rb#L17)
|
1564
|
+
* [[] creates a channel](./spec/unit/rest/channels_spec.rb#L23)
|
1565
|
+
* #fetch
|
1566
|
+
* [retrieves a channel if it exists](./spec/unit/rest/channels_spec.rb#L30)
|
1567
|
+
* [calls the block if channel is missing](./spec/unit/rest/channels_spec.rb#L35)
|
1568
|
+
* destroying channels
|
1569
|
+
* [#release releases the channel resoures](./spec/unit/rest/channels_spec.rb#L43)
|
1570
|
+
|
1571
|
+
### Ably::Rest::Client
|
1572
|
+
_(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
|
1573
|
+
* behaves like a client initializer
|
1574
|
+
* with invalid arguments
|
1575
|
+
* empty hash
|
1576
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L28)
|
1577
|
+
* nil
|
1578
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L36)
|
1579
|
+
* api_key: "invalid"
|
1580
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L44)
|
1581
|
+
* api_key: "invalid:asdad"
|
1582
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L52)
|
1583
|
+
* api_key and key_id
|
1584
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L60)
|
1585
|
+
* api_key and key_secret
|
1586
|
+
* [raises an exception](./spec/shared/client_initializer_behaviour.rb#L68)
|
1587
|
+
* client_id as only option
|
1588
|
+
* [requires a valid key](./spec/shared/client_initializer_behaviour.rb#L76)
|
1589
|
+
* with valid arguments
|
1590
|
+
* api_key only
|
1591
|
+
* [connects to the Ably service](./spec/shared/client_initializer_behaviour.rb#L87)
|
1592
|
+
* key_id and key_secret
|
1593
|
+
* [constructs an api_key](./spec/shared/client_initializer_behaviour.rb#L95)
|
1594
|
+
* with a string key instead of options hash
|
1595
|
+
* [sets the api_key](./spec/shared/client_initializer_behaviour.rb#L103)
|
1596
|
+
* [sets the key_id](./spec/shared/client_initializer_behaviour.rb#L107)
|
1597
|
+
* [sets the key_secret](./spec/shared/client_initializer_behaviour.rb#L111)
|
1598
|
+
* with token
|
1599
|
+
* [sets the token_id](./spec/shared/client_initializer_behaviour.rb#L119)
|
1600
|
+
* endpoint
|
1601
|
+
* [defaults to production](./spec/shared/client_initializer_behaviour.rb#L125)
|
1602
|
+
* with environment option
|
1603
|
+
* [uses an alternate endpoint](./spec/shared/client_initializer_behaviour.rb#L132)
|
1604
|
+
* tls
|
1605
|
+
* [defaults to TLS](./spec/shared/client_initializer_behaviour.rb#L151)
|
1606
|
+
* set to false
|
1607
|
+
* [uses plain text](./spec/shared/client_initializer_behaviour.rb#L142)
|
1608
|
+
* [uses HTTP](./spec/shared/client_initializer_behaviour.rb#L146)
|
1609
|
+
* logger
|
1610
|
+
* default
|
1611
|
+
* [uses Ruby Logger](./spec/shared/client_initializer_behaviour.rb#L158)
|
1612
|
+
* [specifies Logger::ERROR log level](./spec/shared/client_initializer_behaviour.rb#L162)
|
1613
|
+
* with log_level :none
|
1614
|
+
* [silences all logging with a NilLogger](./spec/shared/client_initializer_behaviour.rb#L170)
|
1615
|
+
* with custom logger and log_level
|
1616
|
+
* [uses the custom logger](./spec/shared/client_initializer_behaviour.rb#L188)
|
1617
|
+
* [sets the custom log level](./spec/shared/client_initializer_behaviour.rb#L192)
|
1618
|
+
* delegators
|
1619
|
+
* [delegates :client_id to .auth](./spec/shared/client_initializer_behaviour.rb#L202)
|
1620
|
+
* [delegates :auth_options to .auth](./spec/shared/client_initializer_behaviour.rb#L207)
|
1621
|
+
* initializer options
|
1622
|
+
* TLS
|
1623
|
+
* disabled
|
1624
|
+
* [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)
|
1625
|
+
* :use_token_auth
|
1626
|
+
* set to false
|
1627
|
+
* with an api_key with :tls => false
|
1628
|
+
* [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)
|
1629
|
+
* without an api_key
|
1630
|
+
* [fails as an api_key is required if not using token auth](./spec/unit/rest/client_spec.rb#L36)
|
1631
|
+
* set to true
|
1632
|
+
* without an api_key or token_id
|
1633
|
+
* [fails as an api_key is required to issue tokens](./spec/unit/rest/client_spec.rb#L46)
|
1634
|
+
|
1635
|
+
### Ably::Rest
|
1636
|
+
_(see [spec/unit/rest/rest_spec.rb](./spec/unit/rest/rest_spec.rb))_
|
1637
|
+
* [constructor returns an Ably::Rest::Client](./spec/unit/rest/rest_spec.rb#L7)
|
1638
|
+
|
1639
|
+
### Ably::Util::Crypto
|
1640
|
+
_(see [spec/unit/util/crypto_spec.rb](./spec/unit/util/crypto_spec.rb))_
|
1641
|
+
* defaults
|
1642
|
+
* [match other client libraries](./spec/unit/util/crypto_spec.rb#L18)
|
1643
|
+
* encrypts & decrypt
|
1644
|
+
* [#encrypt encrypts a string](./spec/unit/util/crypto_spec.rb#L28)
|
1645
|
+
* [#decrypt decrypts a string](./spec/unit/util/crypto_spec.rb#L33)
|
1646
|
+
* encrypting an empty string
|
1647
|
+
* [raises an ArgumentError](./spec/unit/util/crypto_spec.rb#L42)
|
1648
|
+
* using shared client lib fixture data
|
1649
|
+
* with AES-128-CBC
|
1650
|
+
* behaves like an Ably encrypter and decrypter
|
1651
|
+
* text payload
|
1652
|
+
* [encrypts exactly the same binary data as other client libraries](./spec/unit/util/crypto_spec.rb#L65)
|
1653
|
+
* [decrypts exactly the same binary data as other client libraries](./spec/unit/util/crypto_spec.rb#L69)
|
1654
|
+
* with AES-256-CBC
|
1655
|
+
* behaves like an Ably encrypter and decrypter
|
1656
|
+
* text payload
|
1657
|
+
* [encrypts exactly the same binary data as other client libraries](./spec/unit/util/crypto_spec.rb#L65)
|
1658
|
+
* [decrypts exactly the same binary data as other client libraries](./spec/unit/util/crypto_spec.rb#L69)
|
1659
|
+
|
1660
|
+
### Ably::Util::PubSub
|
1661
|
+
_(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_
|
1662
|
+
* event fan out
|
1663
|
+
* [#publish allows publishing to more than on subscriber](./spec/unit/util/pub_sub_spec.rb#L11)
|
1664
|
+
* [#publish sends only messages to #subscribe callbacks matching event names](./spec/unit/util/pub_sub_spec.rb#L19)
|
1665
|
+
* #unsubscribe
|
1666
|
+
* [deletes matching callbacks](./spec/unit/util/pub_sub_spec.rb#L71)
|
1667
|
+
* [deletes all callbacks if not block given](./spec/unit/util/pub_sub_spec.rb#L76)
|
1668
|
+
* [continues if the block does not exist](./spec/unit/util/pub_sub_spec.rb#L81)
|
1669
|
+
|
1670
|
+
-------
|
1671
|
+
|
1672
|
+
## Test summary
|
1673
|
+
|
1674
|
+
* Passing tests: 786
|
1675
|
+
* Pending tests: 12
|
1676
|
+
* Failing tests: 2
|