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,225 @@
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
+ 24
127
+ 5
128
+ 66
129
+ 5
130
+ 7
131
+ 0
132
+ 7
133
+ 1
134
+ 64
135
+ 47
136
+ 49
137
+ 2
138
+ 2
139
+ 15
140
+ 5
141
+ 7
142
+ 3
143
+ 7
144
+ 4
145
+ 64
146
+ 47
147
+ 49
148
+ 2
149
+ 2
150
+ 11
151
+ I
152
+ 3
153
+ I
154
+ 0
155
+ I
156
+ 0
157
+ I
158
+ 0
159
+ n
160
+ p
161
+ 5
162
+ x
163
+ 4
164
+ Base
165
+ s
166
+ 24
167
+ rack/client/adapter/base
168
+ x
169
+ 8
170
+ autoload
171
+ x
172
+ 6
173
+ Simple
174
+ s
175
+ 26
176
+ rack/client/adapter/simple
177
+ p
178
+ 5
179
+ I
180
+ 2
181
+ I
182
+ 3
183
+ I
184
+ d
185
+ I
186
+ 4
187
+ I
188
+ 18
189
+ x
190
+ 54
191
+ /Users/ben/code/rack-client/lib/rack/client/adapter.rb
192
+ p
193
+ 0
194
+ x
195
+ 13
196
+ attach_method
197
+ p
198
+ 3
199
+ I
200
+ 2
201
+ I
202
+ 2
203
+ I
204
+ 1c
205
+ x
206
+ 54
207
+ /Users/ben/code/rack-client/lib/rack/client/adapter.rb
208
+ p
209
+ 0
210
+ x
211
+ 13
212
+ attach_method
213
+ p
214
+ 3
215
+ I
216
+ 0
217
+ I
218
+ 1
219
+ I
220
+ 1c
221
+ x
222
+ 54
223
+ /Users/ben/code/rack-client/lib/rack/client/adapter.rb
224
+ p
225
+ 0
File without changes
@@ -0,0 +1,380 @@
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
+ 28
127
+ 5
128
+ 66
129
+ 99
130
+ 7
131
+ 0
132
+ 65
133
+ 49
134
+ 1
135
+ 2
136
+ 13
137
+ 99
138
+ 12
139
+ 7
140
+ 2
141
+ 12
142
+ 7
143
+ 3
144
+ 12
145
+ 65
146
+ 12
147
+ 49
148
+ 4
149
+ 4
150
+ 15
151
+ 49
152
+ 2
153
+ 0
154
+ 11
155
+ I
156
+ 6
157
+ I
158
+ 0
159
+ I
160
+ 0
161
+ I
162
+ 0
163
+ n
164
+ p
165
+ 5
166
+ x
167
+ 8
168
+ DualBand
169
+ x
170
+ 11
171
+ open_module
172
+ x
173
+ 15
174
+ __module_init__
175
+ M
176
+ 1
177
+ n
178
+ n
179
+ x
180
+ 8
181
+ DualBand
182
+ i
183
+ 16
184
+ 5
185
+ 66
186
+ 99
187
+ 7
188
+ 0
189
+ 7
190
+ 1
191
+ 65
192
+ 67
193
+ 49
194
+ 2
195
+ 0
196
+ 49
197
+ 3
198
+ 4
199
+ 11
200
+ I
201
+ 5
202
+ I
203
+ 0
204
+ I
205
+ 0
206
+ I
207
+ 0
208
+ n
209
+ p
210
+ 4
211
+ x
212
+ 4
213
+ call
214
+ M
215
+ 1
216
+ n
217
+ n
218
+ x
219
+ 4
220
+ call
221
+ i
222
+ 37
223
+ 95
224
+ 19
225
+ 1
226
+ 15
227
+ 94
228
+ 9
229
+ 29
230
+ 5
231
+ 20
232
+ 0
233
+ 20
234
+ 1
235
+ 13
236
+ 70
237
+ 10
238
+ 23
239
+ 44
240
+ 43
241
+ 0
242
+ 12
243
+ 49
244
+ 1
245
+ 1
246
+ 47
247
+ 50
248
+ 2
249
+ 1
250
+ 8
251
+ 36
252
+ 5
253
+ 20
254
+ 0
255
+ 47
256
+ 49
257
+ 3
258
+ 1
259
+ 11
260
+ I
261
+ 6
262
+ I
263
+ 2
264
+ I
265
+ 1
266
+ I
267
+ 1
268
+ n
269
+ p
270
+ 4
271
+ x
272
+ 4
273
+ Proc
274
+ x
275
+ 14
276
+ __from_block__
277
+ x
278
+ 10
279
+ async_call
280
+ x
281
+ 9
282
+ sync_call
283
+ p
284
+ 9
285
+ I
286
+ 0
287
+ I
288
+ 4
289
+ I
290
+ 4
291
+ I
292
+ 5
293
+ I
294
+ 7
295
+ I
296
+ 6
297
+ I
298
+ 1d
299
+ I
300
+ 8
301
+ I
302
+ 25
303
+ x
304
+ 61
305
+ /Users/ben/code/rack-client/lib/rack/client/core/dual_band.rb
306
+ p
307
+ 2
308
+ x
309
+ 3
310
+ env
311
+ x
312
+ 5
313
+ block
314
+ x
315
+ 17
316
+ method_visibility
317
+ x
318
+ 15
319
+ add_defn_method
320
+ p
321
+ 3
322
+ I
323
+ 2
324
+ I
325
+ 4
326
+ I
327
+ 10
328
+ x
329
+ 61
330
+ /Users/ben/code/rack-client/lib/rack/client/core/dual_band.rb
331
+ p
332
+ 0
333
+ x
334
+ 13
335
+ attach_method
336
+ p
337
+ 3
338
+ I
339
+ 2
340
+ I
341
+ 3
342
+ I
343
+ 1c
344
+ x
345
+ 61
346
+ /Users/ben/code/rack-client/lib/rack/client/core/dual_band.rb
347
+ p
348
+ 0
349
+ x
350
+ 13
351
+ attach_method
352
+ p
353
+ 3
354
+ I
355
+ 2
356
+ I
357
+ 2
358
+ I
359
+ 1c
360
+ x
361
+ 61
362
+ /Users/ben/code/rack-client/lib/rack/client/core/dual_band.rb
363
+ p
364
+ 0
365
+ x
366
+ 13
367
+ attach_method
368
+ p
369
+ 3
370
+ I
371
+ 0
372
+ I
373
+ 1
374
+ I
375
+ 1c
376
+ x
377
+ 61
378
+ /Users/ben/code/rack-client/lib/rack/client/core/dual_band.rb
379
+ p
380
+ 0
@@ -6,7 +6,7 @@ module Rack
6
6
  end
7
7
 
8
8
  def initialize(headers = {})
9
- super
9
+ super()
10
10
  merge!(headers)
11
11
  end
12
12