rack-client 0.3.0 → 0.3.1.pre.a
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +12 -14
- data/lib/rack/client/adapter/base.rb +23 -14
- data/lib/rack/client/adapter/base.rbc +1802 -0
- data/lib/rack/client/adapter/simple.rb +53 -21
- data/lib/rack/client/adapter/simple.rbc +2063 -0
- data/lib/rack/client/adapter.rbc +225 -0
- data/lib/rack/client/{dual_band.rb → core/dual_band.rb} +0 -0
- data/lib/rack/client/core/dual_band.rbc +380 -0
- data/lib/rack/client/{headers.rb → core/headers.rb} +1 -1
- data/lib/rack/client/core/headers.rbc +1811 -0
- data/lib/rack/client/core/response.rb +50 -0
- data/lib/rack/client/core/response.rbc +1105 -0
- data/lib/rack/client/core.rb +3 -0
- data/lib/rack/client/core.rbc +85 -0
- data/lib/rack/client/handler/em-http.rb +3 -7
- data/lib/rack/client/handler/em-http.rbc +1648 -0
- data/lib/rack/client/handler/excon.rb +6 -14
- data/lib/rack/client/handler/excon.rbc +1270 -0
- data/lib/rack/client/handler/net_http.rb +7 -4
- data/lib/rack/client/handler/net_http.rbc +2400 -0
- data/lib/rack/client/handler/typhoeus.rb +12 -5
- data/lib/rack/client/handler/typhoeus.rbc +1885 -0
- data/lib/rack/client/handler.rbc +340 -0
- data/lib/rack/client/{auth → middleware/auth}/abstract/challenge.rb +0 -0
- data/lib/rack/client/middleware/auth/abstract/challenge.rbc +1453 -0
- data/lib/rack/client/{auth → middleware/auth}/basic.rb +0 -0
- data/lib/rack/client/middleware/auth/basic.rbc +1566 -0
- data/lib/rack/client/{auth → middleware/auth}/digest/challenge.rb +0 -0
- data/lib/rack/client/middleware/auth/digest/challenge.rbc +1124 -0
- data/lib/rack/client/{auth → middleware/auth}/digest/md5.rb +0 -0
- data/lib/rack/client/middleware/auth/digest/md5.rbc +2241 -0
- data/lib/rack/client/{auth → middleware/auth}/digest/params.rb +0 -0
- data/lib/rack/client/middleware/auth/digest/params.rbc +365 -0
- data/lib/rack/client/middleware/auth.rb +5 -0
- data/lib/rack/client/middleware/auth.rbc +117 -0
- data/lib/rack/client/{cache → middleware/cache}/cachecontrol.rb +0 -0
- data/lib/rack/client/middleware/cache/cachecontrol.rbc +1610 -0
- data/lib/rack/client/{cache → middleware/cache}/context.rb +12 -3
- data/lib/rack/client/middleware/cache/context.rbc +2074 -0
- data/lib/rack/client/{cache → middleware/cache}/entitystore.rb +0 -0
- data/lib/rack/client/middleware/cache/entitystore.rbc +1619 -0
- data/lib/rack/client/{cache → middleware/cache}/key.rb +0 -0
- data/lib/rack/client/middleware/cache/key.rbc +1217 -0
- data/lib/rack/client/{cache → middleware/cache}/metastore.rb +0 -0
- data/lib/rack/client/middleware/cache/metastore.rbc +2754 -0
- data/lib/rack/client/{cache → middleware/cache}/options.rb +0 -0
- data/lib/rack/client/middleware/cache/options.rbc +1844 -0
- data/lib/rack/client/{cache → middleware/cache}/request.rb +0 -0
- data/lib/rack/client/middleware/cache/request.rbc +1020 -0
- data/lib/rack/client/{cache → middleware/cache}/response.rb +19 -0
- data/lib/rack/client/middleware/cache/response.rbc +1540 -0
- data/lib/rack/client/{cache → middleware/cache}/storage.rb +0 -0
- data/lib/rack/client/middleware/cache/storage.rbc +1106 -0
- data/lib/rack/client/middleware/cache.rb +19 -0
- data/lib/rack/client/middleware/cache.rbc +528 -0
- data/lib/rack/client/{cookie_jar → middleware/cookie_jar}/context.rb +0 -0
- data/lib/rack/client/middleware/cookie_jar/context.rbc +1576 -0
- data/lib/rack/client/{cookie_jar → middleware/cookie_jar}/cookie.rb +0 -0
- data/lib/rack/client/middleware/cookie_jar/cookie.rbc +2393 -0
- data/lib/rack/client/{cookie_jar → middleware/cookie_jar}/cookiestore.rb +0 -0
- data/lib/rack/client/middleware/cookie_jar/cookiestore.rbc +1209 -0
- data/lib/rack/client/{cookie_jar → middleware/cookie_jar}/options.rb +0 -0
- data/lib/rack/client/middleware/cookie_jar/options.rbc +1305 -0
- data/lib/rack/client/{cookie_jar → middleware/cookie_jar}/request.rb +0 -0
- data/lib/rack/client/middleware/cookie_jar/request.rbc +568 -0
- data/lib/rack/client/{cookie_jar → middleware/cookie_jar}/response.rb +0 -0
- data/lib/rack/client/middleware/cookie_jar/response.rbc +616 -0
- data/lib/rack/client/{cookie_jar → middleware/cookie_jar}/storage.rb +0 -0
- data/lib/rack/client/middleware/cookie_jar/storage.rbc +894 -0
- data/lib/rack/client/middleware/cookie_jar.rb +17 -0
- data/lib/rack/client/middleware/cookie_jar.rbc +471 -0
- data/lib/rack/client/{follow_redirects.rb → middleware/follow_redirects.rb} +0 -0
- data/lib/rack/client/middleware/follow_redirects.rbc +1344 -0
- data/lib/rack/client/middleware.rb +4 -0
- data/lib/rack/client/middleware.rbc +101 -0
- data/lib/rack/client/parser/base.rbc +898 -0
- data/lib/rack/client/parser/body_collection.rbc +1220 -0
- data/lib/rack/client/parser/context.rbc +540 -0
- data/lib/rack/client/parser/request.rbc +631 -0
- data/lib/rack/client/parser/response.rbc +663 -0
- data/lib/rack/client/parser.rbc +484 -0
- data/lib/rack/client/version.rb +1 -1
- data/lib/rack/client/version.rbc +203 -0
- data/lib/rack/client.rb +3 -13
- data/lib/rack/client.rbc +701 -0
- data/spec/core/headers_spec.rb +47 -0
- data/spec/core/headers_spec.rbc +1674 -0
- data/spec/core/response_spec.rb +78 -0
- data/spec/core/response_spec.rbc +2244 -0
- data/spec/handler/em_http_spec.rb +4 -19
- data/spec/handler/em_http_spec.rbc +224 -0
- data/spec/handler/excon_spec.rb +4 -4
- data/spec/handler/excon_spec.rbc +224 -0
- data/spec/handler/net_http_spec.rb +7 -4
- data/spec/handler/net_http_spec.rbc +307 -0
- data/spec/handler/typhoeus_spec.rb +6 -17
- data/spec/handler/typhoeus_spec.rbc +307 -0
- data/spec/helpers/async_helper.rb +31 -0
- data/spec/helpers/async_helper.rbc +843 -0
- data/spec/helpers/em_http_helper.rb +24 -0
- data/spec/helpers/em_http_helper.rbc +663 -0
- data/spec/helpers/excon_helper.rb +13 -0
- data/spec/helpers/excon_helper.rbc +461 -0
- data/spec/helpers/handler_helper.rb +68 -0
- data/spec/helpers/handler_helper.rbc +1769 -0
- data/spec/helpers/net_http_helper.rb +26 -0
- data/spec/helpers/net_http_helper.rbc +806 -0
- data/spec/helpers/sync_helper.rb +9 -0
- data/spec/helpers/sync_helper.rbc +311 -0
- data/spec/helpers/typhoeus_helper.rb +32 -0
- data/spec/helpers/typhoeus_helper.rbc +936 -0
- data/spec/middleware/cache_spec.rb +25 -0
- data/spec/middleware/cache_spec.rbc +712 -0
- data/spec/middleware/cookie_jar_spec.rb +19 -0
- data/spec/middleware/cookie_jar_spec.rbc +614 -0
- data/spec/middleware/etag_spec.rb +10 -0
- data/spec/middleware/etag_spec.rbc +438 -0
- data/spec/middleware/follow_redirects_spec.rb +12 -0
- data/spec/middleware/follow_redirects_spec.rbc +402 -0
- data/spec/middleware/lint_spec.rb +10 -0
- data/spec/middleware/lint_spec.rbc +392 -0
- data/spec/shared/handler_api.rb +33 -0
- data/spec/shared/handler_api.rbc +1340 -0
- data/spec/shared/streamed_response_api.rb +14 -0
- data/spec/shared/streamed_response_api.rbc +508 -0
- data/spec/spec_apps/cache.ru +14 -0
- data/spec/spec_apps/cookie.ru +12 -0
- data/spec/spec_apps/delete.ru +10 -0
- data/spec/spec_apps/get.ru +13 -0
- data/spec/spec_apps/head.ru +10 -0
- data/spec/spec_apps/hello_world.ru +1 -0
- data/spec/spec_apps/redirect.ru +13 -0
- data/spec/spec_apps/stream.ru +9 -0
- data/spec/spec_config.ru +10 -0
- data/spec/spec_helper.rb +14 -12
- metadata +190 -64
- data/lib/rack/client/cache.rb +0 -19
- data/lib/rack/client/cookie_jar.rb +0 -17
- data/lib/rack/client/response.rb +0 -9
- data/spec/apps/example.org.ru +0 -128
- data/spec/auth/basic_spec.rb +0 -69
- data/spec/auth/digest/md5_spec.rb +0 -69
- data/spec/cache_spec.rb +0 -40
- data/spec/cookie_jar_spec.rb +0 -37
- data/spec/endpoint_spec.rb +0 -30
- data/spec/follow_redirect_spec.rb +0 -27
- data/spec/handler/async_api_spec.rb +0 -69
- data/spec/handler/sync_api_spec.rb +0 -55
- data/spec/middleware_helper.rb +0 -37
- data/spec/middleware_spec.rb +0 -53
- data/spec/parser/json_spec.rb +0 -22
- data/spec/parser/yaml_spec.rb +0 -22
- data/spec/server_helper.rb +0 -72
@@ -0,0 +1,17 @@
|
|
1
|
+
module Rack
|
2
|
+
module Client
|
3
|
+
module CookieJar
|
4
|
+
def self.new(app, &b)
|
5
|
+
Context.new(app, &b)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'rack/client/middleware/cookie_jar/options'
|
12
|
+
require 'rack/client/middleware/cookie_jar/cookie'
|
13
|
+
require 'rack/client/middleware/cookie_jar/cookiestore'
|
14
|
+
require 'rack/client/middleware/cookie_jar/context'
|
15
|
+
require 'rack/client/middleware/cookie_jar/request'
|
16
|
+
require 'rack/client/middleware/cookie_jar/response'
|
17
|
+
require 'rack/client/middleware/cookie_jar/storage'
|
@@ -0,0 +1,471 @@
|
|
1
|
+
!RBIX
|
2
|
+
0
|
3
|
+
x
|
4
|
+
M
|
5
|
+
1
|
6
|
+
n
|
7
|
+
n
|
8
|
+
x
|
9
|
+
10
|
10
|
+
__script__
|
11
|
+
i
|
12
|
+
91
|
13
|
+
99
|
14
|
+
7
|
15
|
+
0
|
16
|
+
65
|
17
|
+
49
|
18
|
+
1
|
19
|
+
2
|
20
|
+
13
|
21
|
+
99
|
22
|
+
12
|
23
|
+
7
|
24
|
+
2
|
25
|
+
12
|
26
|
+
7
|
27
|
+
3
|
28
|
+
12
|
29
|
+
65
|
30
|
+
12
|
31
|
+
49
|
32
|
+
4
|
33
|
+
4
|
34
|
+
15
|
35
|
+
49
|
36
|
+
2
|
37
|
+
0
|
38
|
+
15
|
39
|
+
5
|
40
|
+
7
|
41
|
+
5
|
42
|
+
64
|
43
|
+
47
|
44
|
+
49
|
45
|
+
6
|
46
|
+
1
|
47
|
+
15
|
48
|
+
5
|
49
|
+
7
|
50
|
+
7
|
51
|
+
64
|
52
|
+
47
|
53
|
+
49
|
54
|
+
6
|
55
|
+
1
|
56
|
+
15
|
57
|
+
5
|
58
|
+
7
|
59
|
+
8
|
60
|
+
64
|
61
|
+
47
|
62
|
+
49
|
63
|
+
6
|
64
|
+
1
|
65
|
+
15
|
66
|
+
5
|
67
|
+
7
|
68
|
+
9
|
69
|
+
64
|
70
|
+
47
|
71
|
+
49
|
72
|
+
6
|
73
|
+
1
|
74
|
+
15
|
75
|
+
5
|
76
|
+
7
|
77
|
+
10
|
78
|
+
64
|
79
|
+
47
|
80
|
+
49
|
81
|
+
6
|
82
|
+
1
|
83
|
+
15
|
84
|
+
5
|
85
|
+
7
|
86
|
+
11
|
87
|
+
64
|
88
|
+
47
|
89
|
+
49
|
90
|
+
6
|
91
|
+
1
|
92
|
+
15
|
93
|
+
5
|
94
|
+
7
|
95
|
+
12
|
96
|
+
64
|
97
|
+
47
|
98
|
+
49
|
99
|
+
6
|
100
|
+
1
|
101
|
+
15
|
102
|
+
2
|
103
|
+
11
|
104
|
+
I
|
105
|
+
6
|
106
|
+
I
|
107
|
+
0
|
108
|
+
I
|
109
|
+
0
|
110
|
+
I
|
111
|
+
0
|
112
|
+
n
|
113
|
+
p
|
114
|
+
13
|
115
|
+
x
|
116
|
+
4
|
117
|
+
Rack
|
118
|
+
x
|
119
|
+
11
|
120
|
+
open_module
|
121
|
+
x
|
122
|
+
15
|
123
|
+
__module_init__
|
124
|
+
M
|
125
|
+
1
|
126
|
+
n
|
127
|
+
n
|
128
|
+
x
|
129
|
+
4
|
130
|
+
Rack
|
131
|
+
i
|
132
|
+
28
|
133
|
+
5
|
134
|
+
66
|
135
|
+
99
|
136
|
+
7
|
137
|
+
0
|
138
|
+
65
|
139
|
+
49
|
140
|
+
1
|
141
|
+
2
|
142
|
+
13
|
143
|
+
99
|
144
|
+
12
|
145
|
+
7
|
146
|
+
2
|
147
|
+
12
|
148
|
+
7
|
149
|
+
3
|
150
|
+
12
|
151
|
+
65
|
152
|
+
12
|
153
|
+
49
|
154
|
+
4
|
155
|
+
4
|
156
|
+
15
|
157
|
+
49
|
158
|
+
2
|
159
|
+
0
|
160
|
+
11
|
161
|
+
I
|
162
|
+
6
|
163
|
+
I
|
164
|
+
0
|
165
|
+
I
|
166
|
+
0
|
167
|
+
I
|
168
|
+
0
|
169
|
+
n
|
170
|
+
p
|
171
|
+
5
|
172
|
+
x
|
173
|
+
6
|
174
|
+
Client
|
175
|
+
x
|
176
|
+
11
|
177
|
+
open_module
|
178
|
+
x
|
179
|
+
15
|
180
|
+
__module_init__
|
181
|
+
M
|
182
|
+
1
|
183
|
+
n
|
184
|
+
n
|
185
|
+
x
|
186
|
+
6
|
187
|
+
Client
|
188
|
+
i
|
189
|
+
28
|
190
|
+
5
|
191
|
+
66
|
192
|
+
99
|
193
|
+
7
|
194
|
+
0
|
195
|
+
65
|
196
|
+
49
|
197
|
+
1
|
198
|
+
2
|
199
|
+
13
|
200
|
+
99
|
201
|
+
12
|
202
|
+
7
|
203
|
+
2
|
204
|
+
12
|
205
|
+
7
|
206
|
+
3
|
207
|
+
12
|
208
|
+
65
|
209
|
+
12
|
210
|
+
49
|
211
|
+
4
|
212
|
+
4
|
213
|
+
15
|
214
|
+
49
|
215
|
+
2
|
216
|
+
0
|
217
|
+
11
|
218
|
+
I
|
219
|
+
6
|
220
|
+
I
|
221
|
+
0
|
222
|
+
I
|
223
|
+
0
|
224
|
+
I
|
225
|
+
0
|
226
|
+
n
|
227
|
+
p
|
228
|
+
5
|
229
|
+
x
|
230
|
+
9
|
231
|
+
CookieJar
|
232
|
+
x
|
233
|
+
11
|
234
|
+
open_module
|
235
|
+
x
|
236
|
+
15
|
237
|
+
__module_init__
|
238
|
+
M
|
239
|
+
1
|
240
|
+
n
|
241
|
+
n
|
242
|
+
x
|
243
|
+
9
|
244
|
+
CookieJar
|
245
|
+
i
|
246
|
+
13
|
247
|
+
5
|
248
|
+
66
|
249
|
+
99
|
250
|
+
7
|
251
|
+
0
|
252
|
+
7
|
253
|
+
1
|
254
|
+
65
|
255
|
+
5
|
256
|
+
49
|
257
|
+
2
|
258
|
+
4
|
259
|
+
11
|
260
|
+
I
|
261
|
+
5
|
262
|
+
I
|
263
|
+
0
|
264
|
+
I
|
265
|
+
0
|
266
|
+
I
|
267
|
+
0
|
268
|
+
n
|
269
|
+
p
|
270
|
+
3
|
271
|
+
x
|
272
|
+
3
|
273
|
+
new
|
274
|
+
M
|
275
|
+
1
|
276
|
+
n
|
277
|
+
n
|
278
|
+
x
|
279
|
+
3
|
280
|
+
new
|
281
|
+
i
|
282
|
+
26
|
283
|
+
95
|
284
|
+
19
|
285
|
+
1
|
286
|
+
15
|
287
|
+
45
|
288
|
+
0
|
289
|
+
1
|
290
|
+
20
|
291
|
+
0
|
292
|
+
20
|
293
|
+
1
|
294
|
+
13
|
295
|
+
70
|
296
|
+
10
|
297
|
+
22
|
298
|
+
44
|
299
|
+
43
|
300
|
+
2
|
301
|
+
12
|
302
|
+
49
|
303
|
+
3
|
304
|
+
1
|
305
|
+
50
|
306
|
+
4
|
307
|
+
1
|
308
|
+
11
|
309
|
+
I
|
310
|
+
6
|
311
|
+
I
|
312
|
+
2
|
313
|
+
I
|
314
|
+
1
|
315
|
+
I
|
316
|
+
1
|
317
|
+
n
|
318
|
+
p
|
319
|
+
5
|
320
|
+
x
|
321
|
+
7
|
322
|
+
Context
|
323
|
+
n
|
324
|
+
x
|
325
|
+
4
|
326
|
+
Proc
|
327
|
+
x
|
328
|
+
14
|
329
|
+
__from_block__
|
330
|
+
x
|
331
|
+
3
|
332
|
+
new
|
333
|
+
p
|
334
|
+
5
|
335
|
+
I
|
336
|
+
0
|
337
|
+
I
|
338
|
+
4
|
339
|
+
I
|
340
|
+
4
|
341
|
+
I
|
342
|
+
5
|
343
|
+
I
|
344
|
+
1a
|
345
|
+
x
|
346
|
+
68
|
347
|
+
/Users/ben/code/rack-client/lib/rack/client/middleware/cookie_jar.rb
|
348
|
+
p
|
349
|
+
2
|
350
|
+
x
|
351
|
+
3
|
352
|
+
app
|
353
|
+
x
|
354
|
+
1
|
355
|
+
b
|
356
|
+
x
|
357
|
+
13
|
358
|
+
attach_method
|
359
|
+
p
|
360
|
+
3
|
361
|
+
I
|
362
|
+
2
|
363
|
+
I
|
364
|
+
4
|
365
|
+
I
|
366
|
+
d
|
367
|
+
x
|
368
|
+
68
|
369
|
+
/Users/ben/code/rack-client/lib/rack/client/middleware/cookie_jar.rb
|
370
|
+
p
|
371
|
+
0
|
372
|
+
x
|
373
|
+
13
|
374
|
+
attach_method
|
375
|
+
p
|
376
|
+
3
|
377
|
+
I
|
378
|
+
2
|
379
|
+
I
|
380
|
+
3
|
381
|
+
I
|
382
|
+
1c
|
383
|
+
x
|
384
|
+
68
|
385
|
+
/Users/ben/code/rack-client/lib/rack/client/middleware/cookie_jar.rb
|
386
|
+
p
|
387
|
+
0
|
388
|
+
x
|
389
|
+
13
|
390
|
+
attach_method
|
391
|
+
p
|
392
|
+
3
|
393
|
+
I
|
394
|
+
2
|
395
|
+
I
|
396
|
+
2
|
397
|
+
I
|
398
|
+
1c
|
399
|
+
x
|
400
|
+
68
|
401
|
+
/Users/ben/code/rack-client/lib/rack/client/middleware/cookie_jar.rb
|
402
|
+
p
|
403
|
+
0
|
404
|
+
x
|
405
|
+
13
|
406
|
+
attach_method
|
407
|
+
s
|
408
|
+
41
|
409
|
+
rack/client/middleware/cookie_jar/options
|
410
|
+
x
|
411
|
+
7
|
412
|
+
require
|
413
|
+
s
|
414
|
+
40
|
415
|
+
rack/client/middleware/cookie_jar/cookie
|
416
|
+
s
|
417
|
+
45
|
418
|
+
rack/client/middleware/cookie_jar/cookiestore
|
419
|
+
s
|
420
|
+
41
|
421
|
+
rack/client/middleware/cookie_jar/context
|
422
|
+
s
|
423
|
+
41
|
424
|
+
rack/client/middleware/cookie_jar/request
|
425
|
+
s
|
426
|
+
42
|
427
|
+
rack/client/middleware/cookie_jar/response
|
428
|
+
s
|
429
|
+
41
|
430
|
+
rack/client/middleware/cookie_jar/storage
|
431
|
+
p
|
432
|
+
17
|
433
|
+
I
|
434
|
+
0
|
435
|
+
I
|
436
|
+
1
|
437
|
+
I
|
438
|
+
1a
|
439
|
+
I
|
440
|
+
b
|
441
|
+
I
|
442
|
+
23
|
443
|
+
I
|
444
|
+
c
|
445
|
+
I
|
446
|
+
2c
|
447
|
+
I
|
448
|
+
d
|
449
|
+
I
|
450
|
+
35
|
451
|
+
I
|
452
|
+
e
|
453
|
+
I
|
454
|
+
3e
|
455
|
+
I
|
456
|
+
f
|
457
|
+
I
|
458
|
+
47
|
459
|
+
I
|
460
|
+
10
|
461
|
+
I
|
462
|
+
50
|
463
|
+
I
|
464
|
+
11
|
465
|
+
I
|
466
|
+
5b
|
467
|
+
x
|
468
|
+
68
|
469
|
+
/Users/ben/code/rack-client/lib/rack/client/middleware/cookie_jar.rb
|
470
|
+
p
|
471
|
+
0
|
File without changes
|