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