ably 0.7.5 → 0.7.6
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 +5 -13
- data/.gitignore +1 -0
- data/.gitmodules +3 -0
- data/README.md +46 -22
- data/SPEC.md +345 -240
- data/ably.gemspec +4 -2
- data/lib/ably/auth.rb +18 -14
- data/lib/ably/models/message.rb +1 -1
- data/lib/ably/models/paginated_resource.rb +31 -44
- data/lib/ably/models/presence_message.rb +1 -1
- data/lib/ably/models/stat.rb +67 -24
- data/lib/ably/models/stats_types.rb +131 -0
- data/lib/ably/modules/async_wrapper.rb +3 -2
- data/lib/ably/modules/message_emitter.rb +2 -2
- data/lib/ably/realtime.rb +1 -1
- data/lib/ably/realtime/channel.rb +24 -3
- data/lib/ably/realtime/channel/channel_manager.rb +1 -0
- data/lib/ably/realtime/client.rb +2 -2
- data/lib/ably/realtime/connection.rb +1 -1
- data/lib/ably/realtime/presence.rb +12 -1
- data/lib/ably/rest.rb +1 -1
- data/lib/ably/rest/channel.rb +4 -5
- data/lib/ably/rest/client.rb +5 -5
- data/lib/ably/rest/presence.rb +2 -2
- data/lib/ably/version.rb +1 -1
- data/spec/acceptance/realtime/channel_history_spec.rb +74 -23
- data/spec/acceptance/realtime/channel_spec.rb +3 -3
- data/spec/acceptance/realtime/client_spec.rb +3 -3
- data/spec/acceptance/realtime/connection_failures_spec.rb +2 -2
- data/spec/acceptance/realtime/connection_spec.rb +4 -4
- data/spec/acceptance/realtime/message_spec.rb +5 -5
- data/spec/acceptance/realtime/presence_history_spec.rb +56 -13
- data/spec/acceptance/realtime/presence_spec.rb +8 -8
- data/spec/acceptance/realtime/stats_spec.rb +1 -1
- data/spec/acceptance/realtime/time_spec.rb +1 -1
- data/spec/acceptance/rest/auth_spec.rb +31 -4
- data/spec/acceptance/rest/base_spec.rb +3 -3
- data/spec/acceptance/rest/channel_spec.rb +19 -19
- data/spec/acceptance/rest/channels_spec.rb +1 -1
- data/spec/acceptance/rest/client_spec.rb +9 -6
- data/spec/acceptance/rest/encoders_spec.rb +1 -1
- data/spec/acceptance/rest/message_spec.rb +10 -10
- data/spec/acceptance/rest/presence_spec.rb +81 -51
- data/spec/acceptance/rest/stats_spec.rb +46 -41
- data/spec/acceptance/rest/time_spec.rb +1 -1
- data/spec/shared/client_initializer_behaviour.rb +30 -19
- data/spec/spec_helper.rb +3 -0
- data/spec/support/markdown_spec_formatter.rb +1 -1
- data/spec/support/test_app.rb +11 -24
- data/spec/unit/auth_spec.rb +1 -1
- data/spec/unit/models/paginated_resource_spec.rb +81 -72
- data/spec/unit/models/stats_spec.rb +289 -0
- data/spec/unit/modules/async_wrapper_spec.rb +1 -1
- data/spec/unit/realtime/client_spec.rb +1 -1
- data/spec/unit/realtime/realtime_spec.rb +1 -1
- data/spec/unit/rest/channel_spec.rb +1 -1
- data/spec/unit/rest/client_spec.rb +8 -8
- data/spec/unit/rest/rest_spec.rb +1 -1
- data/spec/unit/util/crypto_spec.rb +1 -1
- metadata +55 -43
- data/spec/resources/crypto-data-128.json +0 -56
- data/spec/resources/crypto-data-256.json +0 -56
- data/spec/unit/models/stat_spec.rb +0 -113
@@ -0,0 +1,289 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'shared/model_behaviour'
|
4
|
+
|
5
|
+
describe Ably::Models::Stats do
|
6
|
+
include Ably::Modules::Conversions
|
7
|
+
|
8
|
+
subject { Ably::Models::Stats }
|
9
|
+
|
10
|
+
%w(all persisted).each do |attribute|
|
11
|
+
context "##{attribute} stats" do
|
12
|
+
let(:data) do
|
13
|
+
{ attribute.to_sym => { messages: { count: 5 }, all: { data: 10 } } }
|
14
|
+
end
|
15
|
+
subject { Ably::Models::Stats.new(data.merge(interval_id: '2004-02')).public_send(attribute) }
|
16
|
+
|
17
|
+
it 'returns a MessageTypes object' do
|
18
|
+
expect(subject).to be_a(Ably::Models::Stats::MessageTypes)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'returns value for message counts' do
|
22
|
+
expect(subject.messages.count).to eql(5)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'returns value for all data transferred' do
|
26
|
+
expect(subject.all.data).to eql(10)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'returns zero for empty values' do
|
30
|
+
expect(subject.presence.count).to eql(0)
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'raises an exception for unknown attributes' do
|
34
|
+
expect { subject.unknown }.to raise_error NoMethodError
|
35
|
+
end
|
36
|
+
|
37
|
+
%w(all presence messages).each do |type|
|
38
|
+
context "##{type}" do
|
39
|
+
it 'is a MessageCount object' do
|
40
|
+
expect(subject.public_send(type)).to be_a(Ably::Models::Stats::MessageCount)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
%w(inbound outbound).each do |direction|
|
48
|
+
context "##{direction} stats" do
|
49
|
+
let(:data) do
|
50
|
+
{
|
51
|
+
direction.to_sym => {
|
52
|
+
realtime: { messages: { count: 5 }, presence: { data: 10 } },
|
53
|
+
all: { messages: { count: 25 }, presence: { data: 210 } }
|
54
|
+
}
|
55
|
+
}
|
56
|
+
end
|
57
|
+
subject { Ably::Models::Stats.new(data.merge(interval_id: '2004-02')).public_send(direction) }
|
58
|
+
|
59
|
+
it 'returns a MessageTraffic object' do
|
60
|
+
expect(subject).to be_a(Ably::Models::Stats::MessageTraffic)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'returns value for realtime message counts' do
|
64
|
+
expect(subject.realtime.messages.count).to eql(5)
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'returns value for all presence data' do
|
68
|
+
expect(subject.all.presence.data).to eql(210)
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'raises an exception for unknown attributes' do
|
72
|
+
expect { subject.unknown }.to raise_error NoMethodError
|
73
|
+
end
|
74
|
+
|
75
|
+
%w(realtime rest webhook all).each do |type|
|
76
|
+
context "##{type}" do
|
77
|
+
it 'is a MessageTypes object' do
|
78
|
+
expect(subject.public_send(type)).to be_a(Ably::Models::Stats::MessageTypes)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
context '#connections stats' do
|
86
|
+
let(:data) do
|
87
|
+
{ connections: { tls: { opened: 5 }, all: { peak: 10 } } }
|
88
|
+
end
|
89
|
+
subject { Ably::Models::Stats.new(data.merge(interval_id: '2004-02')).connections }
|
90
|
+
|
91
|
+
it 'returns a ConnectionTypes object' do
|
92
|
+
expect(subject).to be_a(Ably::Models::Stats::ConnectionTypes)
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'returns value for tls opened counts' do
|
96
|
+
expect(subject.tls.opened).to eql(5)
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'returns value for all peak connections' do
|
100
|
+
expect(subject.all.peak).to eql(10)
|
101
|
+
end
|
102
|
+
|
103
|
+
it 'returns zero for empty values' do
|
104
|
+
expect(subject.all.refused).to eql(0)
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'raises an exception for unknown attributes' do
|
108
|
+
expect { subject.unknown }.to raise_error NoMethodError
|
109
|
+
end
|
110
|
+
|
111
|
+
%w(tls plain all).each do |type|
|
112
|
+
context "##{type}" do
|
113
|
+
it 'is a ResourceCount object' do
|
114
|
+
expect(subject.public_send(type)).to be_a(Ably::Models::Stats::ResourceCount)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
context '#channels stats' do
|
121
|
+
let(:data) do
|
122
|
+
{ channels: { opened: 5, peak: 10 } }
|
123
|
+
end
|
124
|
+
subject { Ably::Models::Stats.new(data.merge(interval_id: '2004-02')).channels }
|
125
|
+
|
126
|
+
it 'returns a ResourceCount object' do
|
127
|
+
expect(subject).to be_a(Ably::Models::Stats::ResourceCount)
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'returns value for opened counts' do
|
131
|
+
expect(subject.opened).to eql(5)
|
132
|
+
end
|
133
|
+
|
134
|
+
it 'returns value for peak channels' do
|
135
|
+
expect(subject.peak).to eql(10)
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'returns zero for empty values' do
|
139
|
+
expect(subject.refused).to eql(0)
|
140
|
+
end
|
141
|
+
|
142
|
+
it 'raises an exception for unknown attributes' do
|
143
|
+
expect { subject.unknown }.to raise_error NoMethodError
|
144
|
+
end
|
145
|
+
|
146
|
+
%w(opened peak mean min refused).each do |type|
|
147
|
+
context "##{type}" do
|
148
|
+
it 'is a Integer object' do
|
149
|
+
expect(subject.public_send(type)).to be_a(Integer)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
%w(api_requests token_requests).each do |request_type|
|
156
|
+
context "##{request_type} stats" do
|
157
|
+
let(:data) do
|
158
|
+
{
|
159
|
+
request_type.to_sym => { succeeded: 5, failed: 10 }
|
160
|
+
}
|
161
|
+
end
|
162
|
+
subject { Ably::Models::Stats.new(data.merge(interval_id: '2004-02')).public_send(request_type) }
|
163
|
+
|
164
|
+
it 'returns a RequestCount object' do
|
165
|
+
expect(subject).to be_a(Ably::Models::Stats::RequestCount)
|
166
|
+
end
|
167
|
+
|
168
|
+
it 'returns value for succeeded' do
|
169
|
+
expect(subject.succeeded).to eql(5)
|
170
|
+
end
|
171
|
+
|
172
|
+
it 'returns value for failed' do
|
173
|
+
expect(subject.failed).to eql(10)
|
174
|
+
end
|
175
|
+
|
176
|
+
it 'raises an exception for unknown attributes' do
|
177
|
+
expect { subject.unknown }.to raise_error NoMethodError
|
178
|
+
end
|
179
|
+
|
180
|
+
%w(succeeded failed refused).each do |type|
|
181
|
+
context "##{type}" do
|
182
|
+
it 'is a Integer object' do
|
183
|
+
expect(subject.public_send(type)).to be_a(Integer)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
describe '#interval_granularity' do
|
191
|
+
subject { Ably::Models::Stats.new(interval_id: '2004-02') }
|
192
|
+
|
193
|
+
it 'returns the granularity of the interval_id' do
|
194
|
+
expect(subject.interval_granularity).to eq(:month)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
describe '#interval_time' do
|
199
|
+
subject { Ably::Models::Stats.new(interval_id: '2004-02-01:05:06') }
|
200
|
+
|
201
|
+
it 'returns a Time object representing the start of the interval' do
|
202
|
+
expect(subject.interval_time.to_i).to eql(Time.new(2004, 02, 01, 05, 06, 00, '+00:00').to_i)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
context 'class methods' do
|
207
|
+
describe '#to_interval_id' do
|
208
|
+
context 'when time zone of time argument is UTC' do
|
209
|
+
it 'converts time 2014-02-03:05:06 with granularity :month into 2014-02' do
|
210
|
+
expect(subject.to_interval_id(Time.new(2014, 2, 1, 0, 0, 0, '+00:00'), :month)).to eql('2014-02')
|
211
|
+
end
|
212
|
+
|
213
|
+
it 'converts time 2014-02-03:05:06 with granularity :day into 2014-02-03' do
|
214
|
+
expect(subject.to_interval_id(Time.new(2014, 2, 3, 0, 0, 0, '+00:00'), :day)).to eql('2014-02-03')
|
215
|
+
end
|
216
|
+
|
217
|
+
it 'converts time 2014-02-03:05:06 with granularity :hour into 2014-02-03:05' do
|
218
|
+
expect(subject.to_interval_id(Time.new(2014, 2, 3, 5, 0, 0, '+00:00'), :hour)).to eql('2014-02-03:05')
|
219
|
+
end
|
220
|
+
|
221
|
+
it 'converts time 2014-02-03:05:06 with granularity :minute into 2014-02-03:05:06' do
|
222
|
+
expect(subject.to_interval_id(Time.new(2014, 2, 3, 5, 6, 0, '+00:00'), :minute)).to eql('2014-02-03:05:06')
|
223
|
+
end
|
224
|
+
|
225
|
+
it 'fails with invalid granularity' do
|
226
|
+
expect { subject.to_interval_id(Time.now, :invalid) }.to raise_error KeyError
|
227
|
+
end
|
228
|
+
|
229
|
+
it 'fails with invalid time' do
|
230
|
+
expect { subject.to_interval_id(nil, :month) }.to raise_error ArgumentError
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
context 'when time zone of time argument is +02:00' do
|
235
|
+
it 'converts time 2014-02-03:06 with granularity :hour into 2014-02-03:04 at UTC +00:00' do
|
236
|
+
expect(subject.to_interval_id(Time.new(2014, 2, 3, 6, 0, 0, '+02:00'), :hour)).to eql('2014-02-03:04')
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
describe '#from_interval_id' do
|
242
|
+
it 'converts a month interval_id 2014-02 into a Time object in UTC 0' do
|
243
|
+
expect(subject.from_interval_id('2014-02')).to eql(Time.gm(2014, 2))
|
244
|
+
expect(subject.from_interval_id('2014-02').utc_offset).to eql(0)
|
245
|
+
end
|
246
|
+
|
247
|
+
it 'converts a day interval_id 2014-02-03 into a Time object in UTC 0' do
|
248
|
+
expect(subject.from_interval_id('2014-02-03')).to eql(Time.gm(2014, 2, 3))
|
249
|
+
expect(subject.from_interval_id('2014-02-03').utc_offset).to eql(0)
|
250
|
+
end
|
251
|
+
|
252
|
+
it 'converts an hour interval_id 2014-02-03:05 into a Time object in UTC 0' do
|
253
|
+
expect(subject.from_interval_id('2014-02-03:05')).to eql(Time.gm(2014, 2, 3, 5))
|
254
|
+
expect(subject.from_interval_id('2014-02-03:05').utc_offset).to eql(0)
|
255
|
+
end
|
256
|
+
|
257
|
+
it 'converts a minute interval_id 2014-02-03:05:06 into a Time object in UTC 0' do
|
258
|
+
expect(subject.from_interval_id('2014-02-03:05:06')).to eql(Time.gm(2014, 2, 3, 5, 6))
|
259
|
+
expect(subject.from_interval_id('2014-02-03:05:06').utc_offset).to eql(0)
|
260
|
+
end
|
261
|
+
|
262
|
+
it 'fails with an invalid interval_id 14-20' do
|
263
|
+
expect { subject.from_interval_id('14-20') }.to raise_error ArgumentError
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
describe '#granularity_from_interval_id' do
|
268
|
+
it 'returns a :month interval_id for 2014-02' do
|
269
|
+
expect(subject.granularity_from_interval_id('2014-02')).to eq(:month)
|
270
|
+
end
|
271
|
+
|
272
|
+
it 'returns a :day interval_id for 2014-02-03' do
|
273
|
+
expect(subject.granularity_from_interval_id('2014-02-03')).to eq(:day)
|
274
|
+
end
|
275
|
+
|
276
|
+
it 'returns a :hour interval_id for 2014-02-03:05' do
|
277
|
+
expect(subject.granularity_from_interval_id('2014-02-03:05')).to eq(:hour)
|
278
|
+
end
|
279
|
+
|
280
|
+
it 'returns a :minute interval_id for 2014-02-03:05:06' do
|
281
|
+
expect(subject.granularity_from_interval_id('2014-02-03:05:06')).to eq(:minute)
|
282
|
+
end
|
283
|
+
|
284
|
+
it 'fails with an invalid interval_id 14-20' do
|
285
|
+
expect { subject.granularity_from_interval_id('14-20') }.to raise_error ArgumentError
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
@@ -10,7 +10,7 @@ describe Ably::Realtime::Client do
|
|
10
10
|
it_behaves_like 'a client initializer'
|
11
11
|
|
12
12
|
context 'delegation to the REST Client' do
|
13
|
-
let(:client_options) { {
|
13
|
+
let(:client_options) { { key: 'appid.keyuid:keysecret' } }
|
14
14
|
|
15
15
|
it 'passes on the options to the initializer' do
|
16
16
|
rest_client = instance_double('Ably::Rest::Client', auth: instance_double('Ably::Auth'), options: client_options)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Ably::Realtime do
|
4
|
-
let(:options) { {
|
4
|
+
let(:options) { { key: 'app.key:secret' } }
|
5
5
|
|
6
6
|
specify 'constructor returns an Ably::Realtime::Client' do
|
7
7
|
expect(Ably::Realtime.new(options)).to be_instance_of(Ably::Realtime::Client)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
|
-
describe Ably::Rest::
|
4
|
+
describe Ably::Rest::Channel do
|
5
5
|
let(:client) { instance_double('Ably::Rest::Client', encoders: [], post: instance_double('Faraday::Response', status: 201)) }
|
6
6
|
let(:channel_name) { 'unique' }
|
7
7
|
|
@@ -12,7 +12,7 @@ describe Ably::Rest::Client do
|
|
12
12
|
context 'initializer options' do
|
13
13
|
context 'TLS' do
|
14
14
|
context 'disabled' do
|
15
|
-
let(:client_options) { {
|
15
|
+
let(:client_options) { { key: 'appid.keyuid:keysecret', tls: false } }
|
16
16
|
|
17
17
|
it 'fails for any operation with basic auth and attempting to send an API key over a non-secure connection' do
|
18
18
|
expect { subject.channel('a').publish('event', 'message') }.to raise_error(Ably::Exceptions::InsecureRequestError)
|
@@ -22,28 +22,28 @@ describe Ably::Rest::Client do
|
|
22
22
|
|
23
23
|
context ':use_token_auth' do
|
24
24
|
context 'set to false' do
|
25
|
-
context 'with an
|
26
|
-
let(:client_options) { { use_token_auth: false,
|
25
|
+
context 'with an key with :tls => false' do
|
26
|
+
let(:client_options) { { use_token_auth: false, key: 'appid.keyuid:keysecret', tls: false } }
|
27
27
|
|
28
28
|
it 'fails for any operation with basic auth and attempting to send an API key over a non-secure connection' do
|
29
29
|
expect { subject.channel('a').publish('event', 'message') }.to raise_error(Ably::Exceptions::InsecureRequestError)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
context 'without an
|
33
|
+
context 'without an key' do
|
34
34
|
let(:client_options) { { use_token_auth: false } }
|
35
35
|
|
36
|
-
it 'fails as an
|
36
|
+
it 'fails as an key is required if not using token auth' do
|
37
37
|
expect { subject.channel('a').publish('event', 'message') }.to raise_error(ArgumentError)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
42
|
context 'set to true' do
|
43
|
-
context 'without an
|
44
|
-
let(:client_options) { { use_token_auth: true,
|
43
|
+
context 'without an key or token_id' do
|
44
|
+
let(:client_options) { { use_token_auth: true, key: true } }
|
45
45
|
|
46
|
-
it 'fails as an
|
46
|
+
it 'fails as an key is required to issue tokens' do
|
47
47
|
expect { subject.channel('a').publish('event', 'message') }.to raise_error(ArgumentError)
|
48
48
|
end
|
49
49
|
end
|
data/spec/unit/rest/rest_spec.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe Ably::Rest do
|
5
|
-
let(:options) { {
|
5
|
+
let(:options) { { key: 'app.key:secret' } }
|
6
6
|
|
7
7
|
specify 'constructor returns an Ably::Rest::Client' do
|
8
8
|
expect(Ably::Rest.new(options)).to be_instance_of(Ably::Rest::Client)
|
@@ -45,7 +45,7 @@ describe Ably::Util::Crypto do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
context 'using shared client lib fixture data' do
|
48
|
-
let(:resources_root) { File.expand_path('
|
48
|
+
let(:resources_root) { File.expand_path('../../../../lib/submodules/ably-common/test-resources', __FILE__) }
|
49
49
|
let(:encryption_data_128) { JSON.parse(File.read(File.join(resources_root, 'crypto-data-128.json'))) }
|
50
50
|
let(:encryption_data_256) { JSON.parse(File.read(File.join(resources_root, 'crypto-data-256.json'))) }
|
51
51
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ably
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lewis Marshall
|
@@ -9,205 +9,219 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: em-http-request
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.1'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.1'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: statesman
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 1.0.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 1.0.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: faraday
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0.9'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0.9'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: json
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: websocket-driver
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0.3'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0.3'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: msgpack-ably
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - ~>
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: 0.5.10
|
105
105
|
type: :runtime
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - ~>
|
109
|
+
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: 0.5.10
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: bundler
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - ~>
|
116
|
+
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '1.3'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - ~>
|
123
|
+
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '1.3'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: rake
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: redcarpet
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- -
|
144
|
+
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: rspec
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- - ~>
|
158
|
+
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: 3.1.0
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- - ~>
|
165
|
+
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: 3.1.0
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: rspec-retry
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- -
|
172
|
+
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
type: :development
|
176
176
|
prerelease: false
|
177
177
|
version_requirements: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- -
|
179
|
+
- - ">="
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
- !ruby/object:Gem::Dependency
|
183
183
|
name: yard
|
184
184
|
requirement: !ruby/object:Gem::Requirement
|
185
185
|
requirements:
|
186
|
-
- -
|
186
|
+
- - ">="
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
type: :development
|
190
190
|
prerelease: false
|
191
191
|
version_requirements: !ruby/object:Gem::Requirement
|
192
192
|
requirements:
|
193
|
-
- -
|
193
|
+
- - ">="
|
194
194
|
- !ruby/object:Gem::Version
|
195
195
|
version: '0'
|
196
196
|
- !ruby/object:Gem::Dependency
|
197
197
|
name: webmock
|
198
198
|
requirement: !ruby/object:Gem::Requirement
|
199
199
|
requirements:
|
200
|
-
- -
|
200
|
+
- - ">="
|
201
201
|
- !ruby/object:Gem::Version
|
202
202
|
version: '0'
|
203
203
|
type: :development
|
204
204
|
prerelease: false
|
205
205
|
version_requirements: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
|
-
- -
|
207
|
+
- - ">="
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
|
-
|
210
|
+
- !ruby/object:Gem::Dependency
|
211
|
+
name: coveralls
|
212
|
+
requirement: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - ">="
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '0'
|
217
|
+
type: :development
|
218
|
+
prerelease: false
|
219
|
+
version_requirements: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - ">="
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '0'
|
224
|
+
description: A Ruby client library for ably.io, the realtime messaging service
|
211
225
|
email:
|
212
226
|
- lewis@lmars.net
|
213
227
|
- matt@ably.io
|
@@ -215,9 +229,10 @@ executables: []
|
|
215
229
|
extensions: []
|
216
230
|
extra_rdoc_files: []
|
217
231
|
files:
|
218
|
-
- .gitignore
|
219
|
-
- .
|
220
|
-
- .
|
232
|
+
- ".gitignore"
|
233
|
+
- ".gitmodules"
|
234
|
+
- ".rspec"
|
235
|
+
- ".travis.yml"
|
221
236
|
- Gemfile
|
222
237
|
- LICENSE.txt
|
223
238
|
- README.md
|
@@ -241,6 +256,7 @@ files:
|
|
241
256
|
- lib/ably/models/presence_message.rb
|
242
257
|
- lib/ably/models/protocol_message.rb
|
243
258
|
- lib/ably/models/stat.rb
|
259
|
+
- lib/ably/models/stats_types.rb
|
244
260
|
- lib/ably/models/token.rb
|
245
261
|
- lib/ably/modules/ably.rb
|
246
262
|
- lib/ably/modules/async_wrapper.rb
|
@@ -313,8 +329,6 @@ files:
|
|
313
329
|
- spec/acceptance/rest/presence_spec.rb
|
314
330
|
- spec/acceptance/rest/stats_spec.rb
|
315
331
|
- spec/acceptance/rest/time_spec.rb
|
316
|
-
- spec/resources/crypto-data-128.json
|
317
|
-
- spec/resources/crypto-data-256.json
|
318
332
|
- spec/rspec_config.rb
|
319
333
|
- spec/shared/client_initializer_behaviour.rb
|
320
334
|
- spec/shared/model_behaviour.rb
|
@@ -341,7 +355,7 @@ files:
|
|
341
355
|
- spec/unit/models/paginated_resource_spec.rb
|
342
356
|
- spec/unit/models/presence_message_spec.rb
|
343
357
|
- spec/unit/models/protocol_message_spec.rb
|
344
|
-
- spec/unit/models/
|
358
|
+
- spec/unit/models/stats_spec.rb
|
345
359
|
- spec/unit/models/token_spec.rb
|
346
360
|
- spec/unit/modules/async_wrapper_spec.rb
|
347
361
|
- spec/unit/modules/conversions_spec.rb
|
@@ -373,12 +387,12 @@ require_paths:
|
|
373
387
|
- lib
|
374
388
|
required_ruby_version: !ruby/object:Gem::Requirement
|
375
389
|
requirements:
|
376
|
-
- -
|
390
|
+
- - ">="
|
377
391
|
- !ruby/object:Gem::Version
|
378
392
|
version: '0'
|
379
393
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
380
394
|
requirements:
|
381
|
-
- -
|
395
|
+
- - ">="
|
382
396
|
- !ruby/object:Gem::Version
|
383
397
|
version: '0'
|
384
398
|
requirements: []
|
@@ -386,7 +400,7 @@ rubyforge_project:
|
|
386
400
|
rubygems_version: 2.4.6
|
387
401
|
signing_key:
|
388
402
|
specification_version: 4
|
389
|
-
summary: A Ruby client library for ably.io, the
|
403
|
+
summary: A Ruby client library for ably.io, the realtime messaging service
|
390
404
|
test_files:
|
391
405
|
- spec/acceptance/realtime/channel_history_spec.rb
|
392
406
|
- spec/acceptance/realtime/channel_spec.rb
|
@@ -408,8 +422,6 @@ test_files:
|
|
408
422
|
- spec/acceptance/rest/presence_spec.rb
|
409
423
|
- spec/acceptance/rest/stats_spec.rb
|
410
424
|
- spec/acceptance/rest/time_spec.rb
|
411
|
-
- spec/resources/crypto-data-128.json
|
412
|
-
- spec/resources/crypto-data-256.json
|
413
425
|
- spec/rspec_config.rb
|
414
426
|
- spec/shared/client_initializer_behaviour.rb
|
415
427
|
- spec/shared/model_behaviour.rb
|
@@ -436,7 +448,7 @@ test_files:
|
|
436
448
|
- spec/unit/models/paginated_resource_spec.rb
|
437
449
|
- spec/unit/models/presence_message_spec.rb
|
438
450
|
- spec/unit/models/protocol_message_spec.rb
|
439
|
-
- spec/unit/models/
|
451
|
+
- spec/unit/models/stats_spec.rb
|
440
452
|
- spec/unit/models/token_spec.rb
|
441
453
|
- spec/unit/modules/async_wrapper_spec.rb
|
442
454
|
- spec/unit/modules/conversions_spec.rb
|