ably-rest 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -4
- data/Rakefile +24 -4
- data/SPEC.md +858 -0
- data/lib/ably-rest.rb +1 -1
- data/spec/spec_helper.rb +5 -6
- data/spec/unit/modules_spec.rb +1 -1
- data/spec/unit/util_spec.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a727f923a067f8d9391c50c1dde992fc866162
|
4
|
+
data.tar.gz: 9886c7bba136da444d531e11bc23b33e99d83e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cd6a4f599a2def5ec886cf679bb01d8cc0357ee0ae4bd28369456a3c77497f4ad1b6b988e9b558c130b0a8f5ee1a61f28826f276f1450d52b151753633d01ed
|
7
|
+
data.tar.gz: 0a51a727f2533c3f2c11ce8e0c60c47e0e31ad344e510e7f0caac03e92733d199337b207d400398c06d55ebda1ce875f4ad5024f6d7a5a38ab5d667b4a675290
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -1,14 +1,34 @@
|
|
1
|
-
require
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'json'
|
2
5
|
|
3
|
-
require
|
6
|
+
require 'yard'
|
4
7
|
YARD::Rake::YardocTask.new
|
5
8
|
|
6
9
|
begin
|
7
10
|
require 'rspec/core/rake_task'
|
8
11
|
|
9
|
-
RSpec::Core::RakeTask.new(:spec)
|
12
|
+
rspec_task = RSpec::Core::RakeTask.new(:spec)
|
10
13
|
|
11
14
|
task :default => :spec
|
15
|
+
|
16
|
+
namespace :doc do
|
17
|
+
desc 'Generate Markdown Specification from the RSpec public API tests'
|
18
|
+
task :spec do
|
19
|
+
ENV['TEST_LIMIT_PROTOCOLS'] = JSON.dump({ msgpack: 'JSON and MsgPack' })
|
20
|
+
|
21
|
+
rspec_task.rspec_opts = %w(
|
22
|
+
--require ./lib/submodules/ably-ruby/spec/support/markdown_spec_formatter
|
23
|
+
--order defined
|
24
|
+
--tag ~api_private
|
25
|
+
--format documentation
|
26
|
+
--format Ably::RSpec::MarkdownSpecFormatter
|
27
|
+
).join(' ')
|
28
|
+
|
29
|
+
Rake::Task[:spec].invoke
|
30
|
+
end
|
31
|
+
end
|
12
32
|
rescue LoadError
|
13
|
-
#
|
33
|
+
# RSpec not available
|
14
34
|
end
|
data/SPEC.md
ADDED
@@ -0,0 +1,858 @@
|
|
1
|
+
# Ably REST Client Library 0.7.1 Specification
|
2
|
+
|
3
|
+
### Ably::Auth
|
4
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb))_
|
5
|
+
* using JSON and MsgPack protocol
|
6
|
+
* [has immutable options](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L54)
|
7
|
+
* #request_token
|
8
|
+
* [returns the requested token](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L62)
|
9
|
+
* with option :client_id
|
10
|
+
* [overrides default and uses camelCase notation for all attributes](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L93)
|
11
|
+
* with option :capability
|
12
|
+
* [overrides default and uses camelCase notation for all attributes](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L93)
|
13
|
+
* with option :nonce
|
14
|
+
* [overrides default and uses camelCase notation for all attributes](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L93)
|
15
|
+
* with option :timestamp
|
16
|
+
* [overrides default and uses camelCase notation for all attributes](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L93)
|
17
|
+
* with option :ttl
|
18
|
+
* [overrides default and uses camelCase notation for all attributes](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L93)
|
19
|
+
* with :key_id & :key_secret options
|
20
|
+
* [key_id is used in request and signing uses key_secret](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L122)
|
21
|
+
* with :query_time option
|
22
|
+
* [queries the server for the time](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L130)
|
23
|
+
* without :query_time option
|
24
|
+
* [does not query the server for the time](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L139)
|
25
|
+
* with :auth_url option
|
26
|
+
* when response is valid
|
27
|
+
* [requests a token from :auth_url using an HTTP GET request](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L186)
|
28
|
+
* with :query_params
|
29
|
+
* [requests a token from :auth_url with the :query_params](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L194)
|
30
|
+
* with :headers
|
31
|
+
* [requests a token from :auth_url with the HTTP headers set](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L202)
|
32
|
+
* with POST
|
33
|
+
* [requests a token from :auth_url using an HTTP POST instead of the default GET](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L210)
|
34
|
+
* when response is invalid
|
35
|
+
* 500
|
36
|
+
* [raises ServerError](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L223)
|
37
|
+
* XML
|
38
|
+
* [raises InvalidResponseBody](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L234)
|
39
|
+
* with token_request_block
|
40
|
+
* [calls the block when authenticating to obtain the request token](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L252)
|
41
|
+
* [uses the token request from the block when requesting a new token](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L257)
|
42
|
+
* before #authorise has been called
|
43
|
+
* [has no current_token](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L264)
|
44
|
+
* #authorise
|
45
|
+
* [updates the persisted auth options thare are then used for subsequent authorise requests](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L311)
|
46
|
+
* when called for the first time since the client has been instantiated
|
47
|
+
* [passes all options to #request_token](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L275)
|
48
|
+
* [returns a valid token](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L280)
|
49
|
+
* [issues a new token if option :force => true](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L284)
|
50
|
+
* with previous authorisation
|
51
|
+
* [does not request a token if current_token has not expired](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L295)
|
52
|
+
* [requests a new token if token is expired](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L300)
|
53
|
+
* [issues a new token if option :force => true](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L306)
|
54
|
+
* with token_request_block
|
55
|
+
* [calls the block](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L327)
|
56
|
+
* [uses the token request returned from the block when requesting a new token](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L331)
|
57
|
+
* for every subsequent #request_token
|
58
|
+
* without a provided block
|
59
|
+
* [calls the originally provided block](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L337)
|
60
|
+
* with a provided block
|
61
|
+
* [does not call the originally provided block and calls the new #request_token block](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L344)
|
62
|
+
* #create_token_request
|
63
|
+
* [uses the key ID from the client](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L360)
|
64
|
+
* [uses the default TTL](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L364)
|
65
|
+
* [uses the default capability](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L368)
|
66
|
+
* the nonce
|
67
|
+
* [is unique for every request](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L373)
|
68
|
+
* [is at least 16 characters](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L378)
|
69
|
+
* with option :ttl
|
70
|
+
* [overrides default](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L389)
|
71
|
+
* with option :capability
|
72
|
+
* [overrides default](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L389)
|
73
|
+
* with option :nonce
|
74
|
+
* [overrides default](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L389)
|
75
|
+
* with option :timestamp
|
76
|
+
* [overrides default](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L389)
|
77
|
+
* with option :client_id
|
78
|
+
* [overrides default](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L389)
|
79
|
+
* with additional invalid attributes
|
80
|
+
* [are ignored](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L397)
|
81
|
+
* when required fields are missing
|
82
|
+
* [should raise an exception if key secret is missing](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L408)
|
83
|
+
* [should raise an exception if key id is missing](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L412)
|
84
|
+
* with :query_time option
|
85
|
+
* [queries the server for the timestamp](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L421)
|
86
|
+
* with :timestamp option
|
87
|
+
* [uses the provided timestamp in the token request](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L431)
|
88
|
+
* signing
|
89
|
+
* [generates a valid HMAC](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L448)
|
90
|
+
* using token authentication
|
91
|
+
* with :token_id option
|
92
|
+
* [authenticates successfully using the provided :token_id](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L471)
|
93
|
+
* [disallows publishing on unspecified capability channels](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L475)
|
94
|
+
* [fails if timestamp is invalid](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L483)
|
95
|
+
* [cannot be renewed automatically](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L491)
|
96
|
+
* when implicit as a result of using :client id
|
97
|
+
* and requests to the Ably server are mocked
|
98
|
+
* [will send a token request to the server](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L521)
|
99
|
+
* a token is created
|
100
|
+
* [before a request is made](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L530)
|
101
|
+
* [when a message is published](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L534)
|
102
|
+
* [with capability and TTL defaults](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L538)
|
103
|
+
* when using an :api_key and basic auth
|
104
|
+
* [#using_token_auth? is false](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L553)
|
105
|
+
* [#using_basic_auth? is true](./lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb#L557)
|
106
|
+
|
107
|
+
### Ably::Rest
|
108
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb))_
|
109
|
+
* transport protocol
|
110
|
+
* when protocol is not defined it defaults to :msgpack
|
111
|
+
* [uses MsgPack](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L27)
|
112
|
+
* when option {:protocol=>:json} is used
|
113
|
+
* [uses JSON](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L43)
|
114
|
+
* when option {:use_binary_protocol=>false} is used
|
115
|
+
* [uses JSON](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L43)
|
116
|
+
* when option {:protocol=>:msgpack} is used
|
117
|
+
* [uses MsgPack](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L60)
|
118
|
+
* when option {:use_binary_protocol=>true} is used
|
119
|
+
* [uses MsgPack](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L60)
|
120
|
+
* using JSON and MsgPack protocol
|
121
|
+
* failed requests
|
122
|
+
* due to invalid Auth
|
123
|
+
* [should raise an InvalidRequest exception with a valid error message and code](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L75)
|
124
|
+
* server error with JSON error response body
|
125
|
+
* [should raise a ServerError exception](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L94)
|
126
|
+
* 500 server error without a valid JSON response body
|
127
|
+
* [should raise a ServerError exception](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L105)
|
128
|
+
* token authentication failures
|
129
|
+
* when auth#token_renewable?
|
130
|
+
* [should automatically reissue a token](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L143)
|
131
|
+
* when NOT auth#token_renewable?
|
132
|
+
* [should raise an InvalidToken exception](./lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb#L156)
|
133
|
+
|
134
|
+
### Ably::Rest::Channel
|
135
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb))_
|
136
|
+
* using JSON and MsgPack protocol
|
137
|
+
* #publish
|
138
|
+
* [should publish the message adn return true indicating success](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L17)
|
139
|
+
* #history
|
140
|
+
* [should return the current message history for the channel](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L39)
|
141
|
+
* [should return paged history using the PaginatedResource model](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L67)
|
142
|
+
* message timestamps
|
143
|
+
* [should all be after the messages were published](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L52)
|
144
|
+
* message IDs
|
145
|
+
* [should be unique](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L60)
|
146
|
+
* #history option
|
147
|
+
* :start
|
148
|
+
* with milliseconds since epoch value
|
149
|
+
* [uses this value in the history request](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L116)
|
150
|
+
* with a Time object value
|
151
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L126)
|
152
|
+
* :end
|
153
|
+
* with milliseconds since epoch value
|
154
|
+
* [uses this value in the history request](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L116)
|
155
|
+
* with a Time object value
|
156
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb#L126)
|
157
|
+
|
158
|
+
### Ably::Rest::Channels
|
159
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb))_
|
160
|
+
* using JSON and MsgPack protocol
|
161
|
+
* using shortcut method #channel on the client object
|
162
|
+
* behaves like a channel
|
163
|
+
* [returns a channel object](./lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb#L6)
|
164
|
+
* [returns channel object and passes the provided options](./lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb#L11)
|
165
|
+
* using #get method on client#channels
|
166
|
+
* behaves like a channel
|
167
|
+
* [returns a channel object](./lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb#L6)
|
168
|
+
* [returns channel object and passes the provided options](./lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb#L11)
|
169
|
+
* using undocumented array accessor [] method on client#channels
|
170
|
+
* behaves like a channel
|
171
|
+
* [returns a channel object](./lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb#L6)
|
172
|
+
* [returns channel object and passes the provided options](./lib/submodules/ably-ruby/spec/acceptance/rest/channels_spec.rb#L11)
|
173
|
+
|
174
|
+
### Ably::Rest::Client
|
175
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb))_
|
176
|
+
* using JSON and MsgPack protocol
|
177
|
+
* #initialize
|
178
|
+
* with an auth block
|
179
|
+
* [calls the block to get a new token](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L20)
|
180
|
+
* with an auth URL
|
181
|
+
* [sends an HTTP request to the provided URL to get a new token](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L34)
|
182
|
+
* using tokens
|
183
|
+
* when expired
|
184
|
+
* [creates a new token automatically when the old token expires](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L55)
|
185
|
+
* when token has not expired
|
186
|
+
* [reuses the existing token for every request](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L69)
|
187
|
+
* connection transport
|
188
|
+
* for default host
|
189
|
+
* [is configured to timeout connection opening in 4 seconds](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L85)
|
190
|
+
* [is configured to timeout connection requests in 15 seconds](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L89)
|
191
|
+
* for the fallback hosts
|
192
|
+
* [is configured to timeout connection opening in 4 seconds](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L95)
|
193
|
+
* [is configured to timeout connection requests in 15 seconds](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L99)
|
194
|
+
* fallback hosts
|
195
|
+
* configured
|
196
|
+
* [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](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L112)
|
197
|
+
* when environment is NOT production
|
198
|
+
* [does not retry failed requests with fallback hosts when there is a connection error](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L129)
|
199
|
+
* when environment is production
|
200
|
+
* and connection times out
|
201
|
+
* [tries fallback hosts 3 times](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L169)
|
202
|
+
* and the total request time exeeds 10 seconds
|
203
|
+
* [makes no further attempts to any fallback hosts](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L184)
|
204
|
+
* and connection fails
|
205
|
+
* [tries fallback hosts 3 times](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L200)
|
206
|
+
* with a custom host
|
207
|
+
* that does not exist
|
208
|
+
* [fails immediately and raises a Faraday Error](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L216)
|
209
|
+
* fallback hosts
|
210
|
+
* [are never used](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L237)
|
211
|
+
* that times out
|
212
|
+
* [fails immediately and raises a Faraday Error](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L252)
|
213
|
+
* fallback hosts
|
214
|
+
* [are never used](./lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb#L265)
|
215
|
+
|
216
|
+
### Ably::Models::MessageEncoders
|
217
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb))_
|
218
|
+
* with binary transport protocol
|
219
|
+
* without encryption
|
220
|
+
* with UTF-8 data
|
221
|
+
* [does not apply any encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L41)
|
222
|
+
* with binary data
|
223
|
+
* [does not apply any encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L52)
|
224
|
+
* with JSON data
|
225
|
+
* [stringifies the JSON and sets the json encoding type](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L63)
|
226
|
+
* with encryption
|
227
|
+
* with UTF-8 data
|
228
|
+
* [applies utf-8 and cipher encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L78)
|
229
|
+
* with binary data
|
230
|
+
* [applies cipher encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L89)
|
231
|
+
* with JSON data
|
232
|
+
* [applies json, utf-8 and cipher encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L100)
|
233
|
+
* with text transport protocol
|
234
|
+
* without encryption
|
235
|
+
* with UTF-8 data
|
236
|
+
* [does not apply any encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L117)
|
237
|
+
* with binary data
|
238
|
+
* [applies a base64 encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L128)
|
239
|
+
* with JSON data
|
240
|
+
* [stringifies the JSON and sets the json encoding type](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L139)
|
241
|
+
* with encryption
|
242
|
+
* with UTF-8 data
|
243
|
+
* [applies utf-8, cipher and base64 encodings](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L154)
|
244
|
+
* with binary data
|
245
|
+
* [applies cipher and base64 encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L165)
|
246
|
+
* with JSON data
|
247
|
+
* [applies json, utf-8, cipher and base64 encoding](./lib/submodules/ably-ruby/spec/acceptance/rest/encoders_spec.rb#L176)
|
248
|
+
|
249
|
+
### Ably::Rest::Channel messages
|
250
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb))_
|
251
|
+
* using JSON and MsgPack protocol
|
252
|
+
* publishing with an ASCII_8BIT message name
|
253
|
+
* [is converted into UTF_8](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L18)
|
254
|
+
* encryption and encoding
|
255
|
+
* with #publish and #history
|
256
|
+
* with AES-128-CBC using crypto-data-128.json fixtures
|
257
|
+
* item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
|
258
|
+
* behaves like an Ably encrypter and decrypter
|
259
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
260
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
261
|
+
* item 1 with encrypted encoding cipher+aes-128-cbc/base64
|
262
|
+
* behaves like an Ably encrypter and decrypter
|
263
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
264
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
265
|
+
* item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
266
|
+
* behaves like an Ably encrypter and decrypter
|
267
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
268
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
269
|
+
* item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
|
270
|
+
* behaves like an Ably encrypter and decrypter
|
271
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
272
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
273
|
+
* with AES-256-CBC using crypto-data-256.json fixtures
|
274
|
+
* item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
|
275
|
+
* behaves like an Ably encrypter and decrypter
|
276
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
277
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
278
|
+
* item 1 with encrypted encoding cipher+aes-256-cbc/base64
|
279
|
+
* behaves like an Ably encrypter and decrypter
|
280
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
281
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
282
|
+
* item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
283
|
+
* behaves like an Ably encrypter and decrypter
|
284
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
285
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
286
|
+
* item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
|
287
|
+
* behaves like an Ably encrypter and decrypter
|
288
|
+
* [encrypts message automatically when published](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L65)
|
289
|
+
* [sends and retrieves messages that are encrypted & decrypted by the Ably library](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L80)
|
290
|
+
* when publishing lots of messages
|
291
|
+
* [encrypts on #publish and decrypts on #history](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L113)
|
292
|
+
* when retrieving #history with a different protocol
|
293
|
+
* [delivers a String ASCII-8BIT payload to the receiver](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L140)
|
294
|
+
* [delivers a String UTF-8 payload to the receiver](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L140)
|
295
|
+
* [delivers a Hash payload to the receiver](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L140)
|
296
|
+
* when publishing on an unencrypted channel and retrieving with #history on an encrypted channel
|
297
|
+
* [does not attempt to decrypt the message](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L156)
|
298
|
+
* when publishing on an encrypted channel and retrieving with #history on an unencrypted channel
|
299
|
+
* [retrieves the message that remains encrypted with an encrypted encoding attribute](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L177)
|
300
|
+
* [logs a Cipher exception](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L183)
|
301
|
+
* publishing on an encrypted channel and retrieving #history with a different algorithm on another client
|
302
|
+
* [retrieves the message that remains encrypted with an encrypted encoding attribute](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L204)
|
303
|
+
* [logs a Cipher exception](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L210)
|
304
|
+
* publishing on an encrypted channel and subscribing with a different key on another client
|
305
|
+
* [retrieves the message that remains encrypted with an encrypted encoding attribute](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L231)
|
306
|
+
* [logs a Cipher exception](./lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb#L237)
|
307
|
+
|
308
|
+
### Ably::Rest::Presence
|
309
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb))_
|
310
|
+
* using JSON and MsgPack protocol
|
311
|
+
* tested against presence fixture data set up in test app
|
312
|
+
* #get
|
313
|
+
* [returns current members on the channel with their action set to :present](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L31)
|
314
|
+
* with :limit option
|
315
|
+
* [returns a paged response limiting number of members per page](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L45)
|
316
|
+
* #history
|
317
|
+
* [returns recent presence activity](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L58)
|
318
|
+
* with options
|
319
|
+
* direction: :forwards
|
320
|
+
* [returns recent presence activity forwards with most recent history last](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L74)
|
321
|
+
* direction: :backwards
|
322
|
+
* [returns recent presence activity backwards with most recent history first](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L89)
|
323
|
+
* #history
|
324
|
+
* with time range options
|
325
|
+
* :start
|
326
|
+
* with milliseconds since epoch value
|
327
|
+
* [uses this value in the history request](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L134)
|
328
|
+
* with Time object value
|
329
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L144)
|
330
|
+
* :end
|
331
|
+
* with milliseconds since epoch value
|
332
|
+
* [uses this value in the history request](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L134)
|
333
|
+
* with Time object value
|
334
|
+
* [converts the value to milliseconds since epoch in the hisotry request](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L144)
|
335
|
+
* decoding
|
336
|
+
* valid decodeable content
|
337
|
+
* #get
|
338
|
+
* [automaticaly decodes presence messages](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L202)
|
339
|
+
* #history
|
340
|
+
* [automaticaly decodes presence messages](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L219)
|
341
|
+
* invalid data
|
342
|
+
* #get
|
343
|
+
* [returns the messages still encoded](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L250)
|
344
|
+
* [logs a cipher error](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L254)
|
345
|
+
* #history
|
346
|
+
* [returns the messages still encoded](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L274)
|
347
|
+
* [logs a cipher error](./lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb#L278)
|
348
|
+
|
349
|
+
### Ably::Rest::Client#stats
|
350
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/stats_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/stats_spec.rb))_
|
351
|
+
* using JSON and MsgPack protocol
|
352
|
+
* fetching application stats
|
353
|
+
* by minute
|
354
|
+
* [should return all the stats for the application](./lib/submodules/ably-ruby/spec/acceptance/rest/stats_spec.rb#L49)
|
355
|
+
* by hour
|
356
|
+
* [should return all the stats for the application](./lib/submodules/ably-ruby/spec/acceptance/rest/stats_spec.rb#L49)
|
357
|
+
* by day
|
358
|
+
* [should return all the stats for the application](./lib/submodules/ably-ruby/spec/acceptance/rest/stats_spec.rb#L49)
|
359
|
+
* by month
|
360
|
+
* [should return all the stats for the application](./lib/submodules/ably-ruby/spec/acceptance/rest/stats_spec.rb#L49)
|
361
|
+
|
362
|
+
### Ably::Rest::Client#time
|
363
|
+
_(see [lib/submodules/ably-ruby/spec/acceptance/rest/time_spec.rb](./lib/submodules/ably-ruby/spec/acceptance/rest/time_spec.rb))_
|
364
|
+
* using JSON and MsgPack protocol
|
365
|
+
* fetching the service time
|
366
|
+
* [should return the service time as a Time object](./lib/submodules/ably-ruby/spec/acceptance/rest/time_spec.rb#L10)
|
367
|
+
|
368
|
+
### Ably::Auth
|
369
|
+
_(see [lib/submodules/ably-ruby/spec/unit/auth_spec.rb](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb))_
|
370
|
+
* client_id option
|
371
|
+
* with nil value
|
372
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L19)
|
373
|
+
* as UTF_8 string
|
374
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L27)
|
375
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L31)
|
376
|
+
* as SHIFT_JIS string
|
377
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L39)
|
378
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L43)
|
379
|
+
* as ASCII_8BIT string
|
380
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L51)
|
381
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L55)
|
382
|
+
* as Integer
|
383
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/auth_spec.rb#L63)
|
384
|
+
|
385
|
+
### Ably::Logger
|
386
|
+
_(see [lib/submodules/ably-ruby/spec/unit/logger_spec.rb](./lib/submodules/ably-ruby/spec/unit/logger_spec.rb))_
|
387
|
+
* [uses the language provided Logger by default](./lib/submodules/ably-ruby/spec/unit/logger_spec.rb#L15)
|
388
|
+
* with a custom Logger
|
389
|
+
* with an invalid interface
|
390
|
+
* [raises an exception](./lib/submodules/ably-ruby/spec/unit/logger_spec.rb#L116)
|
391
|
+
* with a valid interface
|
392
|
+
* [is used](./lib/submodules/ably-ruby/spec/unit/logger_spec.rb#L135)
|
393
|
+
|
394
|
+
### Ably::Models::ErrorInfo
|
395
|
+
_(see [lib/submodules/ably-ruby/spec/unit/models/error_info_spec.rb](./lib/submodules/ably-ruby/spec/unit/models/error_info_spec.rb))_
|
396
|
+
* behaves like a model
|
397
|
+
* attributes
|
398
|
+
* #code
|
399
|
+
* [retrieves attribute :code](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
400
|
+
* #status_code
|
401
|
+
* [retrieves attribute :status_code](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
402
|
+
* #message
|
403
|
+
* [retrieves attribute :message](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
404
|
+
* #==
|
405
|
+
* [is true when attributes are the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L41)
|
406
|
+
* [is false when attributes are not the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L46)
|
407
|
+
* [is false when class type differs](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L50)
|
408
|
+
* is immutable
|
409
|
+
* [prevents changes](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L76)
|
410
|
+
* [dups options](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L80)
|
411
|
+
* #status
|
412
|
+
* [is an alias for #status_code](./lib/submodules/ably-ruby/spec/unit/models/error_info_spec.rb#L13)
|
413
|
+
|
414
|
+
### Ably::Models::Message
|
415
|
+
_(see [lib/submodules/ably-ruby/spec/unit/models/message_spec.rb](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb))_
|
416
|
+
* behaves like a model
|
417
|
+
* attributes
|
418
|
+
* #name
|
419
|
+
* [retrieves attribute :name](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
420
|
+
* #client_id
|
421
|
+
* [retrieves attribute :client_id](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
422
|
+
* #data
|
423
|
+
* [retrieves attribute :data](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
424
|
+
* #encoding
|
425
|
+
* [retrieves attribute :encoding](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
426
|
+
* #==
|
427
|
+
* [is true when attributes are the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L41)
|
428
|
+
* [is false when attributes are not the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L46)
|
429
|
+
* [is false when class type differs](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L50)
|
430
|
+
* is immutable
|
431
|
+
* [prevents changes](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L76)
|
432
|
+
* [dups options](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L80)
|
433
|
+
* #timestamp
|
434
|
+
* [retrieves attribute :timestamp as Time object from ProtocolMessage](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L21)
|
435
|
+
* #connection_id attribute
|
436
|
+
* when this model has a connectionId attribute
|
437
|
+
* but no protocol message
|
438
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L36)
|
439
|
+
* with a protocol message with a different connectionId
|
440
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L44)
|
441
|
+
* when this model has no connectionId attribute
|
442
|
+
* and no protocol message
|
443
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L54)
|
444
|
+
* with a protocol message with a connectionId
|
445
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L62)
|
446
|
+
* initialized with
|
447
|
+
* :name
|
448
|
+
* as UTF_8 string
|
449
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L89)
|
450
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L93)
|
451
|
+
* as SHIFT_JIS string
|
452
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L101)
|
453
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L105)
|
454
|
+
* as ASCII_8BIT string
|
455
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L113)
|
456
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L117)
|
457
|
+
* as Integer
|
458
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L125)
|
459
|
+
* as Nil
|
460
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L133)
|
461
|
+
* :client_id
|
462
|
+
* as UTF_8 string
|
463
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L89)
|
464
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L93)
|
465
|
+
* as SHIFT_JIS string
|
466
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L101)
|
467
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L105)
|
468
|
+
* as ASCII_8BIT string
|
469
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L113)
|
470
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L117)
|
471
|
+
* as Integer
|
472
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L125)
|
473
|
+
* as Nil
|
474
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L133)
|
475
|
+
* :encoding
|
476
|
+
* as UTF_8 string
|
477
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L89)
|
478
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L93)
|
479
|
+
* as SHIFT_JIS string
|
480
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L101)
|
481
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L105)
|
482
|
+
* as ASCII_8BIT string
|
483
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L113)
|
484
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L117)
|
485
|
+
* as Integer
|
486
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L125)
|
487
|
+
* as Nil
|
488
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/message_spec.rb#L133)
|
489
|
+
|
490
|
+
### Ably::Models::PaginatedResource
|
491
|
+
_(see [lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb))_
|
492
|
+
* [returns correct length from body](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L30)
|
493
|
+
* [supports alias methods for length](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L34)
|
494
|
+
* [is Enumerable](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L39)
|
495
|
+
* [is iterable](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L43)
|
496
|
+
* [provides [] accessor method](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L61)
|
497
|
+
* [#first gets the first item in page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L67)
|
498
|
+
* [#last gets the last item in page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L71)
|
499
|
+
* #each
|
500
|
+
* [returns an enumerator](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L48)
|
501
|
+
* [yields each item](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L52)
|
502
|
+
* with non paged http response
|
503
|
+
* [is the first page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L175)
|
504
|
+
* [is the last page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L179)
|
505
|
+
* [does not support pagination](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L183)
|
506
|
+
* [raises an exception when accessing next page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L187)
|
507
|
+
* [raises an exception when accessing first page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L191)
|
508
|
+
* with paged http response
|
509
|
+
* [is the first page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L209)
|
510
|
+
* [is not the last page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L213)
|
511
|
+
* [supports pagination](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L217)
|
512
|
+
* accessing next page
|
513
|
+
* [returns another PaginatedResource](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L245)
|
514
|
+
* [retrieves the next page of results](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L249)
|
515
|
+
* [is not the first page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L254)
|
516
|
+
* [is the last page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L258)
|
517
|
+
* [raises an exception if trying to access the last page when it is the last page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L262)
|
518
|
+
* and then first page
|
519
|
+
* [returns a PaginatedResource](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L273)
|
520
|
+
* [retrieves the first page of results](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L277)
|
521
|
+
* [is the first page](./lib/submodules/ably-ruby/spec/unit/models/paginated_resource_spec.rb#L281)
|
522
|
+
|
523
|
+
### Ably::Models::PresenceMessage
|
524
|
+
_(see [lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb))_
|
525
|
+
* behaves like a model
|
526
|
+
* attributes
|
527
|
+
* #client_id
|
528
|
+
* [retrieves attribute :client_id](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
529
|
+
* #data
|
530
|
+
* [retrieves attribute :data](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
531
|
+
* #encoding
|
532
|
+
* [retrieves attribute :encoding](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
533
|
+
* #==
|
534
|
+
* [is true when attributes are the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L41)
|
535
|
+
* [is false when attributes are not the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L46)
|
536
|
+
* [is false when class type differs](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L50)
|
537
|
+
* is immutable
|
538
|
+
* [prevents changes](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L76)
|
539
|
+
* [dups options](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L80)
|
540
|
+
* #connection_id attribute
|
541
|
+
* when this model has a connectionId attribute
|
542
|
+
* but no protocol message
|
543
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L25)
|
544
|
+
* with a protocol message with a different connectionId
|
545
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L33)
|
546
|
+
* when this model has no connectionId attribute
|
547
|
+
* and no protocol message
|
548
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L43)
|
549
|
+
* with a protocol message with a connectionId
|
550
|
+
* [uses the model value](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L51)
|
551
|
+
* #member_key attribute
|
552
|
+
* [is string in format connection_id:client_id](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L61)
|
553
|
+
* with the same client id across multiple connections
|
554
|
+
* [is unique](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L69)
|
555
|
+
* with a single connection and different client_ids
|
556
|
+
* [is unique](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L78)
|
557
|
+
* #timestamp
|
558
|
+
* [retrieves attribute :timestamp as a Time object from ProtocolMessage](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L86)
|
559
|
+
* initialized with
|
560
|
+
* :client_id
|
561
|
+
* as UTF_8 string
|
562
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L138)
|
563
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L142)
|
564
|
+
* as SHIFT_JIS string
|
565
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L150)
|
566
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L154)
|
567
|
+
* as ASCII_8BIT string
|
568
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L162)
|
569
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L166)
|
570
|
+
* as Integer
|
571
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L174)
|
572
|
+
* as Nil
|
573
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L182)
|
574
|
+
* :connection_id
|
575
|
+
* as UTF_8 string
|
576
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L138)
|
577
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L142)
|
578
|
+
* as SHIFT_JIS string
|
579
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L150)
|
580
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L154)
|
581
|
+
* as ASCII_8BIT string
|
582
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L162)
|
583
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L166)
|
584
|
+
* as Integer
|
585
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L174)
|
586
|
+
* as Nil
|
587
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L182)
|
588
|
+
* :encoding
|
589
|
+
* as UTF_8 string
|
590
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L138)
|
591
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L142)
|
592
|
+
* as SHIFT_JIS string
|
593
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L150)
|
594
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L154)
|
595
|
+
* as ASCII_8BIT string
|
596
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L162)
|
597
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L166)
|
598
|
+
* as Integer
|
599
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L174)
|
600
|
+
* as Nil
|
601
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb#L182)
|
602
|
+
|
603
|
+
### Ably::Models::ProtocolMessage
|
604
|
+
_(see [lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb))_
|
605
|
+
* behaves like a model
|
606
|
+
* attributes
|
607
|
+
* #id
|
608
|
+
* [retrieves attribute :id](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
609
|
+
* #channel
|
610
|
+
* [retrieves attribute :channel](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
611
|
+
* #channel_serial
|
612
|
+
* [retrieves attribute :channel_serial](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
613
|
+
* #connection_id
|
614
|
+
* [retrieves attribute :connection_id](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
615
|
+
* #==
|
616
|
+
* [is true when attributes are the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L41)
|
617
|
+
* [is false when attributes are not the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L46)
|
618
|
+
* [is false when class type differs](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L50)
|
619
|
+
* is immutable
|
620
|
+
* [prevents changes](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L76)
|
621
|
+
* [dups options](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L80)
|
622
|
+
* attributes
|
623
|
+
* #timestamp
|
624
|
+
* [retrieves attribute :timestamp as Time object](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L74)
|
625
|
+
* #count
|
626
|
+
* when missing
|
627
|
+
* [is 1](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L83)
|
628
|
+
* when non numeric
|
629
|
+
* [is 1](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L90)
|
630
|
+
* when greater than 1
|
631
|
+
* [is the value of count](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L97)
|
632
|
+
* #message_serial
|
633
|
+
* [converts :msg_serial to an Integer](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L105)
|
634
|
+
* #has_message_serial?
|
635
|
+
* without msg_serial
|
636
|
+
* [returns false](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L115)
|
637
|
+
* with msg_serial
|
638
|
+
* [returns true](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L123)
|
639
|
+
* #connection_serial
|
640
|
+
* [converts :connection_serial to an Integer](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L131)
|
641
|
+
* #flags
|
642
|
+
* when nil
|
643
|
+
* [is zero](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L141)
|
644
|
+
* when numeric
|
645
|
+
* [is an Integer](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L149)
|
646
|
+
* when has_presence
|
647
|
+
* [#has_presence_flag? is true](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L157)
|
648
|
+
* when has another future flag
|
649
|
+
* [#has_presence_flag? is false](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L165)
|
650
|
+
* #has_connection_serial?
|
651
|
+
* without connection_serial
|
652
|
+
* [returns false](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L175)
|
653
|
+
* with connection_serial
|
654
|
+
* [returns true](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L183)
|
655
|
+
* #serial
|
656
|
+
* with underlying msg_serial
|
657
|
+
* [converts :msg_serial to an Integer](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L192)
|
658
|
+
* with underlying connection_serial
|
659
|
+
* [converts :connection_serial to an Integer](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L200)
|
660
|
+
* with underlying connection_serial and msg_serial
|
661
|
+
* [prefers connection_serial and converts :connection_serial to an Integer](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L208)
|
662
|
+
* #has_serial?
|
663
|
+
* without msg_serial or connection_serial
|
664
|
+
* [returns false](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L219)
|
665
|
+
* with msg_serial
|
666
|
+
* [returns true](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L227)
|
667
|
+
* with connection_serial
|
668
|
+
* [returns true](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L235)
|
669
|
+
* #error
|
670
|
+
* with no error attribute
|
671
|
+
* [returns nil](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L245)
|
672
|
+
* with nil error
|
673
|
+
* [returns nil](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L253)
|
674
|
+
* with error
|
675
|
+
* [returns a valid ErrorInfo object](./lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb#L261)
|
676
|
+
|
677
|
+
### Ably::Models::Token
|
678
|
+
_(see [lib/submodules/ably-ruby/spec/unit/models/token_spec.rb](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb))_
|
679
|
+
* behaves like a model
|
680
|
+
* attributes
|
681
|
+
* #id
|
682
|
+
* [retrieves attribute :id](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
683
|
+
* #capability
|
684
|
+
* [retrieves attribute :capability](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
685
|
+
* #client_id
|
686
|
+
* [retrieves attribute :client_id](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
687
|
+
* #nonce
|
688
|
+
* [retrieves attribute :nonce](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L15)
|
689
|
+
* #==
|
690
|
+
* [is true when attributes are the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L41)
|
691
|
+
* [is false when attributes are not the same](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L46)
|
692
|
+
* [is false when class type differs](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L50)
|
693
|
+
* is immutable
|
694
|
+
* [prevents changes](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L76)
|
695
|
+
* [dups options](./lib/submodules/ably-ruby/spec/shared/model_behaviour.rb#L80)
|
696
|
+
* defaults
|
697
|
+
* [should default TTL to 1 hour](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L14)
|
698
|
+
* [should default capability to all](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L18)
|
699
|
+
* [should only have defaults for :ttl and :capability](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L22)
|
700
|
+
* attributes
|
701
|
+
* #key_id
|
702
|
+
* [retrieves attribute :key](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L32)
|
703
|
+
* #issued_at
|
704
|
+
* [retrieves attribute :issued_at as Time](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L42)
|
705
|
+
* #expires_at
|
706
|
+
* [retrieves attribute :expires as Time](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L42)
|
707
|
+
* #expired?
|
708
|
+
* once grace period buffer has passed
|
709
|
+
* [is true](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L55)
|
710
|
+
* within grace period buffer
|
711
|
+
* [is false](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L63)
|
712
|
+
* ==
|
713
|
+
* [is true when attributes are the same](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L73)
|
714
|
+
* [is false when attributes are not the same](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L78)
|
715
|
+
* [is false when class type differs](./lib/submodules/ably-ruby/spec/unit/models/token_spec.rb#L82)
|
716
|
+
|
717
|
+
### Ably::Rest::Channels
|
718
|
+
_(see [lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb))_
|
719
|
+
* #initializer
|
720
|
+
* as UTF_8 string
|
721
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L16)
|
722
|
+
* [remains as UTF-8](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L20)
|
723
|
+
* as SHIFT_JIS string
|
724
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L28)
|
725
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L32)
|
726
|
+
* as ASCII_8BIT string
|
727
|
+
* [gets converted to UTF-8](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L40)
|
728
|
+
* [is compatible with original encoding](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L44)
|
729
|
+
* as Integer
|
730
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L52)
|
731
|
+
* as Nil
|
732
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L60)
|
733
|
+
* #publish name argument
|
734
|
+
* as UTF_8 string
|
735
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L72)
|
736
|
+
* as SHIFT_JIS string
|
737
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L80)
|
738
|
+
* as ASCII_8BIT string
|
739
|
+
* [is permitted](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L88)
|
740
|
+
* as Integer
|
741
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L96)
|
742
|
+
* as Nil
|
743
|
+
* [raises an argument error](./lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb#L104)
|
744
|
+
|
745
|
+
### Ably::Rest::Channels
|
746
|
+
_(see [lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb))_
|
747
|
+
* creating channels
|
748
|
+
* [#get creates a channel](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L12)
|
749
|
+
* [#get will reuse the channel object](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L17)
|
750
|
+
* [[] creates a channel](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L23)
|
751
|
+
* #fetch
|
752
|
+
* [retrieves a channel if it exists](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L30)
|
753
|
+
* [calls the block if channel is missing](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L35)
|
754
|
+
* destroying channels
|
755
|
+
* [#release releases the channel resoures](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L43)
|
756
|
+
* is Enumerable
|
757
|
+
* [allows enumeration](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L59)
|
758
|
+
* [provides #length](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L75)
|
759
|
+
* #each
|
760
|
+
* [returns an enumerator](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L64)
|
761
|
+
* [yields each channel](./lib/submodules/ably-ruby/spec/unit/rest/channels_spec.rb#L68)
|
762
|
+
|
763
|
+
### Ably::Rest::Client
|
764
|
+
_(see [lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb](./lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb))_
|
765
|
+
* behaves like a client initializer
|
766
|
+
* with invalid arguments
|
767
|
+
* empty hash
|
768
|
+
* [raises an exception](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L28)
|
769
|
+
* nil
|
770
|
+
* [raises an exception](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L36)
|
771
|
+
* api_key: "invalid"
|
772
|
+
* [raises an exception](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L44)
|
773
|
+
* api_key: "invalid:asdad"
|
774
|
+
* [raises an exception](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L52)
|
775
|
+
* api_key and key_id
|
776
|
+
* [raises an exception](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L60)
|
777
|
+
* api_key and key_secret
|
778
|
+
* [raises an exception](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L68)
|
779
|
+
* client_id as only option
|
780
|
+
* [requires a valid key](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L76)
|
781
|
+
* with valid arguments
|
782
|
+
* api_key only
|
783
|
+
* [connects to the Ably service](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L87)
|
784
|
+
* key_id and key_secret
|
785
|
+
* [constructs an api_key](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L95)
|
786
|
+
* with a string key instead of options hash
|
787
|
+
* [sets the api_key](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L103)
|
788
|
+
* [sets the key_id](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L107)
|
789
|
+
* [sets the key_secret](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L111)
|
790
|
+
* with token
|
791
|
+
* [sets the token_id](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L119)
|
792
|
+
* endpoint
|
793
|
+
* [defaults to production](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L125)
|
794
|
+
* with environment option
|
795
|
+
* [uses an alternate endpoint](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L132)
|
796
|
+
* tls
|
797
|
+
* [defaults to TLS](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L151)
|
798
|
+
* set to false
|
799
|
+
* [uses plain text](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L142)
|
800
|
+
* [uses HTTP](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L146)
|
801
|
+
* logger
|
802
|
+
* default
|
803
|
+
* [uses Ruby Logger](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L158)
|
804
|
+
* [specifies Logger::ERROR log level](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L162)
|
805
|
+
* with log_level :none
|
806
|
+
* [silences all logging with a NilLogger](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L170)
|
807
|
+
* with custom logger and log_level
|
808
|
+
* [uses the custom logger](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L188)
|
809
|
+
* [sets the custom log level](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L192)
|
810
|
+
* delegators
|
811
|
+
* [delegates :client_id to .auth](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L202)
|
812
|
+
* [delegates :auth_options to .auth](./lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb#L207)
|
813
|
+
* initializer options
|
814
|
+
* TLS
|
815
|
+
* disabled
|
816
|
+
* [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb#L17)
|
817
|
+
* :use_token_auth
|
818
|
+
* set to false
|
819
|
+
* with an api_key with :tls => false
|
820
|
+
* [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb#L28)
|
821
|
+
* without an api_key
|
822
|
+
* [fails as an api_key is required if not using token auth](./lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb#L36)
|
823
|
+
* set to true
|
824
|
+
* without an api_key or token_id
|
825
|
+
* [fails as an api_key is required to issue tokens](./lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb#L46)
|
826
|
+
|
827
|
+
### Ably::Rest
|
828
|
+
_(see [lib/submodules/ably-ruby/spec/unit/rest/rest_spec.rb](./lib/submodules/ably-ruby/spec/unit/rest/rest_spec.rb))_
|
829
|
+
* [constructor returns an Ably::Rest::Client](./lib/submodules/ably-ruby/spec/unit/rest/rest_spec.rb#L7)
|
830
|
+
|
831
|
+
### Ably::Util::Crypto
|
832
|
+
_(see [lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb))_
|
833
|
+
* defaults
|
834
|
+
* [match other client libraries](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L18)
|
835
|
+
* encrypts & decrypt
|
836
|
+
* [#encrypt encrypts a string](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L28)
|
837
|
+
* [#decrypt decrypts a string](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L33)
|
838
|
+
* encrypting an empty string
|
839
|
+
* [raises an ArgumentError](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L42)
|
840
|
+
* using shared client lib fixture data
|
841
|
+
* with AES-128-CBC
|
842
|
+
* behaves like an Ably encrypter and decrypter
|
843
|
+
* text payload
|
844
|
+
* [encrypts exactly the same binary data as other client libraries](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L65)
|
845
|
+
* [decrypts exactly the same binary data as other client libraries](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L69)
|
846
|
+
* with AES-256-CBC
|
847
|
+
* behaves like an Ably encrypter and decrypter
|
848
|
+
* text payload
|
849
|
+
* [encrypts exactly the same binary data as other client libraries](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L65)
|
850
|
+
* [decrypts exactly the same binary data as other client libraries](./lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb#L69)
|
851
|
+
|
852
|
+
-------
|
853
|
+
|
854
|
+
## Test summary
|
855
|
+
|
856
|
+
* Passing tests: 394
|
857
|
+
* Pending tests: 0
|
858
|
+
* Failing tests: 0
|
data/lib/ably-rest.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
1
|
+
# Output the message to the console
|
2
|
+
# Useful for debugging as clearly visible, and name is not used anywhere else in library as opposed to debug or puts
|
3
|
+
def console(message)
|
4
|
+
puts "\033[31m[#{Time.now.strftime('%H:%M:%S.%L')}]\033[0m \033[33m#{message}\033[0m"
|
5
|
+
end
|
7
6
|
|
8
7
|
require 'webmock/rspec'
|
9
8
|
|
data/spec/unit/modules_spec.rb
CHANGED
data/spec/unit/util_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ably-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew O'Riordan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- LICENSE.txt
|
153
153
|
- README.md
|
154
154
|
- Rakefile
|
155
|
+
- SPEC.md
|
155
156
|
- ably-rest.gemspec
|
156
157
|
- lib/ably-rest.rb
|
157
158
|
- lib/ably-rest/modules/eventmachine_deferrable.rb
|