rack-client 0.3.1.pre.c → 0.3.1.pre.d
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack/client/adapter/base.rb +0 -1
- data/lib/rack/client/adapter/simple.rb +13 -4
- data/lib/rack/client/version.rb +1 -1
- metadata +80 -108
- data/spec/core/headers_spec.rb +0 -47
- data/spec/core/headers_spec.rbc +0 -1674
- data/spec/core/response_spec.rb +0 -78
- data/spec/core/response_spec.rbc +0 -2244
- data/spec/handler/em_http_spec.rb +0 -7
- data/spec/handler/em_http_spec.rbc +0 -224
- data/spec/handler/excon_spec.rb +0 -7
- data/spec/handler/excon_spec.rbc +0 -224
- data/spec/handler/net_http_spec.rb +0 -11
- data/spec/handler/net_http_spec.rbc +0 -307
- data/spec/handler/typhoeus_spec.rb +0 -11
- data/spec/handler/typhoeus_spec.rbc +0 -307
- data/spec/helpers/async_helper.rb +0 -31
- data/spec/helpers/async_helper.rbc +0 -843
- data/spec/helpers/em_http_helper.rb +0 -24
- data/spec/helpers/em_http_helper.rbc +0 -663
- data/spec/helpers/excon_helper.rb +0 -13
- data/spec/helpers/excon_helper.rbc +0 -461
- data/spec/helpers/handler_helper.rb +0 -68
- data/spec/helpers/handler_helper.rbc +0 -1769
- data/spec/helpers/net_http_helper.rb +0 -26
- data/spec/helpers/net_http_helper.rbc +0 -806
- data/spec/helpers/sync_helper.rb +0 -9
- data/spec/helpers/sync_helper.rbc +0 -311
- data/spec/helpers/typhoeus_helper.rb +0 -32
- data/spec/helpers/typhoeus_helper.rbc +0 -936
- data/spec/middleware/cache_spec.rb +0 -25
- data/spec/middleware/cache_spec.rbc +0 -712
- data/spec/middleware/cookie_jar_spec.rb +0 -19
- data/spec/middleware/cookie_jar_spec.rbc +0 -614
- data/spec/middleware/etag_spec.rb +0 -10
- data/spec/middleware/etag_spec.rbc +0 -438
- data/spec/middleware/follow_redirects_spec.rb +0 -12
- data/spec/middleware/follow_redirects_spec.rbc +0 -402
- data/spec/middleware/lint_spec.rb +0 -10
- data/spec/middleware/lint_spec.rbc +0 -392
- data/spec/shared/handler_api.rb +0 -33
- data/spec/shared/handler_api.rbc +0 -1340
- data/spec/shared/streamed_response_api.rb +0 -14
- data/spec/shared/streamed_response_api.rbc +0 -508
- data/spec/spec_apps/cache.ru +0 -14
- data/spec/spec_apps/cookie.ru +0 -12
- data/spec/spec_apps/delete.ru +0 -10
- data/spec/spec_apps/get.ru +0 -13
- data/spec/spec_apps/head.ru +0 -10
- data/spec/spec_apps/hello_world.ru +0 -1
- data/spec/spec_apps/redirect.ru +0 -13
- data/spec/spec_apps/stream.ru +0 -9
- data/spec/spec_config.ru +0 -10
- data/spec/spec_helper.rb +0 -22
@@ -1,307 +0,0 @@
|
|
1
|
-
!RBIX
|
2
|
-
0
|
3
|
-
x
|
4
|
-
M
|
5
|
-
1
|
6
|
-
n
|
7
|
-
n
|
8
|
-
x
|
9
|
-
10
|
10
|
-
__script__
|
11
|
-
i
|
12
|
-
28
|
13
|
-
5
|
14
|
-
7
|
15
|
-
0
|
16
|
-
64
|
17
|
-
47
|
18
|
-
49
|
19
|
-
1
|
20
|
-
1
|
21
|
-
15
|
22
|
-
5
|
23
|
-
45
|
24
|
-
2
|
25
|
-
3
|
26
|
-
43
|
27
|
-
4
|
28
|
-
43
|
29
|
-
5
|
30
|
-
43
|
31
|
-
6
|
32
|
-
56
|
33
|
-
7
|
34
|
-
47
|
35
|
-
50
|
36
|
-
8
|
37
|
-
1
|
38
|
-
15
|
39
|
-
2
|
40
|
-
11
|
41
|
-
I
|
42
|
-
3
|
43
|
-
I
|
44
|
-
0
|
45
|
-
I
|
46
|
-
0
|
47
|
-
I
|
48
|
-
0
|
49
|
-
n
|
50
|
-
p
|
51
|
-
9
|
52
|
-
s
|
53
|
-
11
|
54
|
-
spec_helper
|
55
|
-
x
|
56
|
-
7
|
57
|
-
require
|
58
|
-
x
|
59
|
-
4
|
60
|
-
Rack
|
61
|
-
n
|
62
|
-
x
|
63
|
-
6
|
64
|
-
Client
|
65
|
-
x
|
66
|
-
7
|
67
|
-
Handler
|
68
|
-
x
|
69
|
-
7
|
70
|
-
NetHTTP
|
71
|
-
M
|
72
|
-
1
|
73
|
-
p
|
74
|
-
2
|
75
|
-
x
|
76
|
-
9
|
77
|
-
for_block
|
78
|
-
t
|
79
|
-
n
|
80
|
-
x
|
81
|
-
9
|
82
|
-
__block__
|
83
|
-
i
|
84
|
-
34
|
85
|
-
5
|
86
|
-
45
|
87
|
-
0
|
88
|
-
1
|
89
|
-
43
|
90
|
-
2
|
91
|
-
43
|
92
|
-
3
|
93
|
-
43
|
94
|
-
4
|
95
|
-
56
|
96
|
-
5
|
97
|
-
47
|
98
|
-
50
|
99
|
-
6
|
100
|
-
1
|
101
|
-
15
|
102
|
-
5
|
103
|
-
45
|
104
|
-
0
|
105
|
-
7
|
106
|
-
43
|
107
|
-
2
|
108
|
-
43
|
109
|
-
3
|
110
|
-
43
|
111
|
-
4
|
112
|
-
56
|
113
|
-
8
|
114
|
-
47
|
115
|
-
50
|
116
|
-
9
|
117
|
-
1
|
118
|
-
11
|
119
|
-
I
|
120
|
-
4
|
121
|
-
I
|
122
|
-
0
|
123
|
-
I
|
124
|
-
0
|
125
|
-
I
|
126
|
-
0
|
127
|
-
I
|
128
|
-
-2
|
129
|
-
p
|
130
|
-
10
|
131
|
-
x
|
132
|
-
4
|
133
|
-
Rack
|
134
|
-
n
|
135
|
-
x
|
136
|
-
6
|
137
|
-
Client
|
138
|
-
x
|
139
|
-
7
|
140
|
-
Handler
|
141
|
-
x
|
142
|
-
7
|
143
|
-
NetHTTP
|
144
|
-
M
|
145
|
-
1
|
146
|
-
p
|
147
|
-
2
|
148
|
-
x
|
149
|
-
9
|
150
|
-
for_block
|
151
|
-
t
|
152
|
-
n
|
153
|
-
x
|
154
|
-
9
|
155
|
-
__block__
|
156
|
-
i
|
157
|
-
9
|
158
|
-
5
|
159
|
-
7
|
160
|
-
0
|
161
|
-
64
|
162
|
-
47
|
163
|
-
49
|
164
|
-
1
|
165
|
-
1
|
166
|
-
11
|
167
|
-
I
|
168
|
-
3
|
169
|
-
I
|
170
|
-
0
|
171
|
-
I
|
172
|
-
0
|
173
|
-
I
|
174
|
-
0
|
175
|
-
I
|
176
|
-
-2
|
177
|
-
p
|
178
|
-
2
|
179
|
-
s
|
180
|
-
11
|
181
|
-
Handler API
|
182
|
-
x
|
183
|
-
21
|
184
|
-
it_should_behave_like
|
185
|
-
p
|
186
|
-
5
|
187
|
-
I
|
188
|
-
0
|
189
|
-
I
|
190
|
-
4
|
191
|
-
I
|
192
|
-
0
|
193
|
-
I
|
194
|
-
5
|
195
|
-
I
|
196
|
-
9
|
197
|
-
x
|
198
|
-
57
|
199
|
-
/Users/ben/code/rack-client/spec/handler/net_http_spec.rb
|
200
|
-
p
|
201
|
-
0
|
202
|
-
x
|
203
|
-
21
|
204
|
-
async_handler_context
|
205
|
-
n
|
206
|
-
M
|
207
|
-
1
|
208
|
-
p
|
209
|
-
2
|
210
|
-
x
|
211
|
-
9
|
212
|
-
for_block
|
213
|
-
t
|
214
|
-
n
|
215
|
-
x
|
216
|
-
9
|
217
|
-
__block__
|
218
|
-
i
|
219
|
-
9
|
220
|
-
5
|
221
|
-
7
|
222
|
-
0
|
223
|
-
64
|
224
|
-
47
|
225
|
-
49
|
226
|
-
1
|
227
|
-
1
|
228
|
-
11
|
229
|
-
I
|
230
|
-
3
|
231
|
-
I
|
232
|
-
0
|
233
|
-
I
|
234
|
-
0
|
235
|
-
I
|
236
|
-
0
|
237
|
-
I
|
238
|
-
-2
|
239
|
-
p
|
240
|
-
2
|
241
|
-
s
|
242
|
-
11
|
243
|
-
Handler API
|
244
|
-
x
|
245
|
-
21
|
246
|
-
it_should_behave_like
|
247
|
-
p
|
248
|
-
5
|
249
|
-
I
|
250
|
-
0
|
251
|
-
I
|
252
|
-
8
|
253
|
-
I
|
254
|
-
0
|
255
|
-
I
|
256
|
-
9
|
257
|
-
I
|
258
|
-
9
|
259
|
-
x
|
260
|
-
57
|
261
|
-
/Users/ben/code/rack-client/spec/handler/net_http_spec.rb
|
262
|
-
p
|
263
|
-
0
|
264
|
-
x
|
265
|
-
20
|
266
|
-
sync_handler_context
|
267
|
-
p
|
268
|
-
7
|
269
|
-
I
|
270
|
-
0
|
271
|
-
I
|
272
|
-
3
|
273
|
-
I
|
274
|
-
0
|
275
|
-
I
|
276
|
-
4
|
277
|
-
I
|
278
|
-
11
|
279
|
-
I
|
280
|
-
8
|
281
|
-
I
|
282
|
-
22
|
283
|
-
x
|
284
|
-
57
|
285
|
-
/Users/ben/code/rack-client/spec/handler/net_http_spec.rb
|
286
|
-
p
|
287
|
-
0
|
288
|
-
x
|
289
|
-
8
|
290
|
-
describe
|
291
|
-
p
|
292
|
-
5
|
293
|
-
I
|
294
|
-
0
|
295
|
-
I
|
296
|
-
1
|
297
|
-
I
|
298
|
-
9
|
299
|
-
I
|
300
|
-
3
|
301
|
-
I
|
302
|
-
1c
|
303
|
-
x
|
304
|
-
57
|
305
|
-
/Users/ben/code/rack-client/spec/handler/net_http_spec.rb
|
306
|
-
p
|
307
|
-
0
|
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Rack::Client::Handler::Typhoeus do
|
4
|
-
async_handler_context(Rack::Client::Handler::Typhoeus) do
|
5
|
-
it_should_behave_like "Handler API"
|
6
|
-
end
|
7
|
-
|
8
|
-
sync_handler_context(Rack::Client::Handler::Typhoeus) do
|
9
|
-
it_should_behave_like "Handler API"
|
10
|
-
end
|
11
|
-
end
|
@@ -1,307 +0,0 @@
|
|
1
|
-
!RBIX
|
2
|
-
0
|
3
|
-
x
|
4
|
-
M
|
5
|
-
1
|
6
|
-
n
|
7
|
-
n
|
8
|
-
x
|
9
|
-
10
|
10
|
-
__script__
|
11
|
-
i
|
12
|
-
28
|
13
|
-
5
|
14
|
-
7
|
15
|
-
0
|
16
|
-
64
|
17
|
-
47
|
18
|
-
49
|
19
|
-
1
|
20
|
-
1
|
21
|
-
15
|
22
|
-
5
|
23
|
-
45
|
24
|
-
2
|
25
|
-
3
|
26
|
-
43
|
27
|
-
4
|
28
|
-
43
|
29
|
-
5
|
30
|
-
43
|
31
|
-
6
|
32
|
-
56
|
33
|
-
7
|
34
|
-
47
|
35
|
-
50
|
36
|
-
8
|
37
|
-
1
|
38
|
-
15
|
39
|
-
2
|
40
|
-
11
|
41
|
-
I
|
42
|
-
3
|
43
|
-
I
|
44
|
-
0
|
45
|
-
I
|
46
|
-
0
|
47
|
-
I
|
48
|
-
0
|
49
|
-
n
|
50
|
-
p
|
51
|
-
9
|
52
|
-
s
|
53
|
-
11
|
54
|
-
spec_helper
|
55
|
-
x
|
56
|
-
7
|
57
|
-
require
|
58
|
-
x
|
59
|
-
4
|
60
|
-
Rack
|
61
|
-
n
|
62
|
-
x
|
63
|
-
6
|
64
|
-
Client
|
65
|
-
x
|
66
|
-
7
|
67
|
-
Handler
|
68
|
-
x
|
69
|
-
8
|
70
|
-
Typhoeus
|
71
|
-
M
|
72
|
-
1
|
73
|
-
p
|
74
|
-
2
|
75
|
-
x
|
76
|
-
9
|
77
|
-
for_block
|
78
|
-
t
|
79
|
-
n
|
80
|
-
x
|
81
|
-
9
|
82
|
-
__block__
|
83
|
-
i
|
84
|
-
34
|
85
|
-
5
|
86
|
-
45
|
87
|
-
0
|
88
|
-
1
|
89
|
-
43
|
90
|
-
2
|
91
|
-
43
|
92
|
-
3
|
93
|
-
43
|
94
|
-
4
|
95
|
-
56
|
96
|
-
5
|
97
|
-
47
|
98
|
-
50
|
99
|
-
6
|
100
|
-
1
|
101
|
-
15
|
102
|
-
5
|
103
|
-
45
|
104
|
-
0
|
105
|
-
7
|
106
|
-
43
|
107
|
-
2
|
108
|
-
43
|
109
|
-
3
|
110
|
-
43
|
111
|
-
4
|
112
|
-
56
|
113
|
-
8
|
114
|
-
47
|
115
|
-
50
|
116
|
-
9
|
117
|
-
1
|
118
|
-
11
|
119
|
-
I
|
120
|
-
4
|
121
|
-
I
|
122
|
-
0
|
123
|
-
I
|
124
|
-
0
|
125
|
-
I
|
126
|
-
0
|
127
|
-
I
|
128
|
-
-2
|
129
|
-
p
|
130
|
-
10
|
131
|
-
x
|
132
|
-
4
|
133
|
-
Rack
|
134
|
-
n
|
135
|
-
x
|
136
|
-
6
|
137
|
-
Client
|
138
|
-
x
|
139
|
-
7
|
140
|
-
Handler
|
141
|
-
x
|
142
|
-
8
|
143
|
-
Typhoeus
|
144
|
-
M
|
145
|
-
1
|
146
|
-
p
|
147
|
-
2
|
148
|
-
x
|
149
|
-
9
|
150
|
-
for_block
|
151
|
-
t
|
152
|
-
n
|
153
|
-
x
|
154
|
-
9
|
155
|
-
__block__
|
156
|
-
i
|
157
|
-
9
|
158
|
-
5
|
159
|
-
7
|
160
|
-
0
|
161
|
-
64
|
162
|
-
47
|
163
|
-
49
|
164
|
-
1
|
165
|
-
1
|
166
|
-
11
|
167
|
-
I
|
168
|
-
3
|
169
|
-
I
|
170
|
-
0
|
171
|
-
I
|
172
|
-
0
|
173
|
-
I
|
174
|
-
0
|
175
|
-
I
|
176
|
-
-2
|
177
|
-
p
|
178
|
-
2
|
179
|
-
s
|
180
|
-
11
|
181
|
-
Handler API
|
182
|
-
x
|
183
|
-
21
|
184
|
-
it_should_behave_like
|
185
|
-
p
|
186
|
-
5
|
187
|
-
I
|
188
|
-
0
|
189
|
-
I
|
190
|
-
4
|
191
|
-
I
|
192
|
-
0
|
193
|
-
I
|
194
|
-
5
|
195
|
-
I
|
196
|
-
9
|
197
|
-
x
|
198
|
-
57
|
199
|
-
/Users/ben/code/rack-client/spec/handler/typhoeus_spec.rb
|
200
|
-
p
|
201
|
-
0
|
202
|
-
x
|
203
|
-
21
|
204
|
-
async_handler_context
|
205
|
-
n
|
206
|
-
M
|
207
|
-
1
|
208
|
-
p
|
209
|
-
2
|
210
|
-
x
|
211
|
-
9
|
212
|
-
for_block
|
213
|
-
t
|
214
|
-
n
|
215
|
-
x
|
216
|
-
9
|
217
|
-
__block__
|
218
|
-
i
|
219
|
-
9
|
220
|
-
5
|
221
|
-
7
|
222
|
-
0
|
223
|
-
64
|
224
|
-
47
|
225
|
-
49
|
226
|
-
1
|
227
|
-
1
|
228
|
-
11
|
229
|
-
I
|
230
|
-
3
|
231
|
-
I
|
232
|
-
0
|
233
|
-
I
|
234
|
-
0
|
235
|
-
I
|
236
|
-
0
|
237
|
-
I
|
238
|
-
-2
|
239
|
-
p
|
240
|
-
2
|
241
|
-
s
|
242
|
-
11
|
243
|
-
Handler API
|
244
|
-
x
|
245
|
-
21
|
246
|
-
it_should_behave_like
|
247
|
-
p
|
248
|
-
5
|
249
|
-
I
|
250
|
-
0
|
251
|
-
I
|
252
|
-
8
|
253
|
-
I
|
254
|
-
0
|
255
|
-
I
|
256
|
-
9
|
257
|
-
I
|
258
|
-
9
|
259
|
-
x
|
260
|
-
57
|
261
|
-
/Users/ben/code/rack-client/spec/handler/typhoeus_spec.rb
|
262
|
-
p
|
263
|
-
0
|
264
|
-
x
|
265
|
-
20
|
266
|
-
sync_handler_context
|
267
|
-
p
|
268
|
-
7
|
269
|
-
I
|
270
|
-
0
|
271
|
-
I
|
272
|
-
3
|
273
|
-
I
|
274
|
-
0
|
275
|
-
I
|
276
|
-
4
|
277
|
-
I
|
278
|
-
11
|
279
|
-
I
|
280
|
-
8
|
281
|
-
I
|
282
|
-
22
|
283
|
-
x
|
284
|
-
57
|
285
|
-
/Users/ben/code/rack-client/spec/handler/typhoeus_spec.rb
|
286
|
-
p
|
287
|
-
0
|
288
|
-
x
|
289
|
-
8
|
290
|
-
describe
|
291
|
-
p
|
292
|
-
5
|
293
|
-
I
|
294
|
-
0
|
295
|
-
I
|
296
|
-
1
|
297
|
-
I
|
298
|
-
9
|
299
|
-
I
|
300
|
-
3
|
301
|
-
I
|
302
|
-
1c
|
303
|
-
x
|
304
|
-
57
|
305
|
-
/Users/ben/code/rack-client/spec/handler/typhoeus_spec.rb
|
306
|
-
p
|
307
|
-
0
|
@@ -1,31 +0,0 @@
|
|
1
|
-
module AsyncHelper
|
2
|
-
class AsyncProxy < Struct.new(:subject, :callback)
|
3
|
-
def method_missing(*a)
|
4
|
-
subject.send(*a, &callback)
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
def request(&b)
|
9
|
-
@_request_block = b
|
10
|
-
end
|
11
|
-
|
12
|
-
def response(&b)
|
13
|
-
@_response_block = b
|
14
|
-
run
|
15
|
-
end
|
16
|
-
|
17
|
-
def run
|
18
|
-
proxy = AsyncProxy.new(subject, method(:callback))
|
19
|
-
proxy.instance_eval(&@_request_block)
|
20
|
-
end
|
21
|
-
|
22
|
-
def callback(response)
|
23
|
-
response.instance_eval(&@_response_block)
|
24
|
-
ensure
|
25
|
-
finish
|
26
|
-
end
|
27
|
-
|
28
|
-
def finish
|
29
|
-
#noop
|
30
|
-
end
|
31
|
-
end
|