wrest 1.0.0.beta1 → 1.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +14 -2
- data/LICENCE +7 -0
- data/README.rdoc +15 -69
- data/lib/wrest/components/container/alias_accessors.rb +1 -1
- data/lib/wrest/components/container/alias_accessors.rbc +905 -0
- data/lib/wrest/components/container/typecaster.rb +5 -5
- data/lib/wrest/components/container/typecaster.rbc +1985 -0
- data/lib/wrest/components/container.rb +11 -12
- data/lib/wrest/components/container.rbc +2466 -0
- data/lib/wrest/components/mutators/base.rbc +702 -0
- data/lib/wrest/components/mutators/camel_to_snake_case.rbc +360 -0
- data/lib/wrest/components/mutators/xml_mini_type_caster.rbc +679 -0
- data/lib/wrest/components/mutators/xml_simple_type_caster.rbc +559 -0
- data/lib/wrest/components/mutators.rbc +650 -0
- data/lib/wrest/components/translators/content_types.rbc +339 -0
- data/lib/wrest/components/translators/json.rbc +462 -0
- data/lib/wrest/components/translators/xml.rbc +457 -0
- data/lib/wrest/components/translators.rbc +517 -0
- data/lib/wrest/components.rbc +217 -0
- data/lib/wrest/core_ext/hash/conversions.rbc +501 -0
- data/lib/wrest/core_ext/hash.rbc +182 -0
- data/lib/wrest/core_ext/string/conversions.rbc +471 -0
- data/lib/wrest/core_ext/string.rbc +182 -0
- data/lib/wrest/curl/response.rb +8 -0
- data/lib/wrest/curl.rbc +704 -0
- data/lib/wrest/exceptions.rbc +312 -0
- data/lib/wrest/http_shared/headers.rb +0 -7
- data/lib/wrest/http_shared/headers.rbc +353 -0
- data/lib/wrest/http_shared/standard_headers.rbc +336 -0
- data/lib/wrest/http_shared/standard_tokens.rbc +316 -0
- data/lib/wrest/http_shared.rbc +279 -0
- data/lib/wrest/native/connection_factory.rbc +445 -0
- data/lib/wrest/native/delete.rbc +371 -0
- data/lib/wrest/native/get.rb +26 -0
- data/lib/wrest/native/get.rbc +855 -0
- data/lib/wrest/native/options.rbc +347 -0
- data/lib/wrest/native/post.rbc +388 -0
- data/lib/wrest/native/put.rbc +388 -0
- data/lib/wrest/native/redirection.rbc +520 -0
- data/lib/wrest/native/request.rb +4 -2
- data/lib/wrest/native/request.rbc +1675 -0
- data/lib/wrest/native/response.rb +53 -2
- data/lib/wrest/native/response.rbc +2150 -0
- data/lib/wrest/native/session.rbc +1372 -0
- data/lib/wrest/native.rbc +513 -0
- data/lib/wrest/resource/base.rbc +2115 -0
- data/lib/wrest/resource.rbc +163 -0
- data/lib/wrest/uri.rbc +2599 -0
- data/lib/wrest/uri_template.rbc +505 -0
- data/lib/wrest/version.rb +1 -1
- data/lib/wrest/version.rbc +372 -0
- data/lib/wrest.rb +1 -1
- data/lib/wrest.rbc +1900 -0
- metadata +99 -102
- data/Rakefile +0 -495
- data/VERSION.yml +0 -5
- data/bin/jwrest +0 -3
- data/examples/delicious.rb +0 -72
- data/examples/facebook.rb +0 -101
- data/examples/imgur_multipart.rb +0 -24
- data/examples/keep_alive.rb +0 -37
- data/examples/redirection.rb +0 -27
- data/examples/twitter.rb +0 -78
- data/examples/twitter_public_timeline.rb +0 -32
- data/examples/wow_realm_status.rb +0 -67
- data/init.rb +0 -0
- data/spec/custom_matchers/custom_matchers.rb +0 -2
- data/spec/rcov.opts +0 -4
- data/spec/spec.opts.disable +0 -6
- data/spec/unit/spec_helper.rb +0 -35
- data/spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb +0 -49
- data/spec/unit/wrest/components/attributes_container/typecaster_spec.rb +0 -83
- data/spec/unit/wrest/components/attributes_container_spec.rb +0 -254
- data/spec/unit/wrest/components/mutators/base_spec.rb +0 -42
- data/spec/unit/wrest/components/mutators/camel_to_snake_spec.rb +0 -22
- data/spec/unit/wrest/components/mutators/xml_mini_type_caster_spec.rb +0 -75
- data/spec/unit/wrest/components/mutators/xml_simple_type_caster_spec.rb +0 -47
- data/spec/unit/wrest/components/mutators_spec.rb +0 -21
- data/spec/unit/wrest/components/translators/xml_spec.rb +0 -16
- data/spec/unit/wrest/components/translators_spec.rb +0 -18
- data/spec/unit/wrest/core_ext/hash/conversions_spec.rb +0 -22
- data/spec/unit/wrest/core_ext/string/conversions_spec.rb +0 -39
- data/spec/unit/wrest/curl/request_spec.rb +0 -19
- data/spec/unit/wrest/curl/response_spec.rb +0 -16
- data/spec/unit/wrest/http/response_spec.rb +0 -24
- data/spec/unit/wrest/native/redirection_spec.rb +0 -42
- data/spec/unit/wrest/native/request_spec.rb +0 -71
- data/spec/unit/wrest/native/response_spec.rb +0 -72
- data/spec/unit/wrest/native/session_spec.rb +0 -74
- data/spec/unit/wrest/resource/base_spec.rb +0 -274
- data/spec/unit/wrest/uri_spec.rb +0 -273
- data/spec/unit/wrest/uri_template_spec.rb +0 -38
- data/wrest.gemspec +0 -168
@@ -0,0 +1,312 @@
|
|
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
|
+
5
|
54
|
+
Wrest
|
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
|
+
5
|
67
|
+
Wrest
|
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
|
+
10
|
111
|
+
Exceptions
|
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
|
+
10
|
124
|
+
Exceptions
|
125
|
+
i
|
126
|
+
80
|
127
|
+
5
|
128
|
+
66
|
129
|
+
99
|
130
|
+
7
|
131
|
+
0
|
132
|
+
45
|
133
|
+
1
|
134
|
+
2
|
135
|
+
65
|
136
|
+
49
|
137
|
+
3
|
138
|
+
3
|
139
|
+
15
|
140
|
+
1
|
141
|
+
15
|
142
|
+
99
|
143
|
+
7
|
144
|
+
4
|
145
|
+
45
|
146
|
+
1
|
147
|
+
5
|
148
|
+
65
|
149
|
+
49
|
150
|
+
3
|
151
|
+
3
|
152
|
+
15
|
153
|
+
1
|
154
|
+
15
|
155
|
+
99
|
156
|
+
7
|
157
|
+
6
|
158
|
+
45
|
159
|
+
1
|
160
|
+
7
|
161
|
+
65
|
162
|
+
49
|
163
|
+
3
|
164
|
+
3
|
165
|
+
15
|
166
|
+
1
|
167
|
+
15
|
168
|
+
99
|
169
|
+
7
|
170
|
+
8
|
171
|
+
45
|
172
|
+
1
|
173
|
+
9
|
174
|
+
65
|
175
|
+
49
|
176
|
+
3
|
177
|
+
3
|
178
|
+
15
|
179
|
+
1
|
180
|
+
15
|
181
|
+
99
|
182
|
+
7
|
183
|
+
10
|
184
|
+
45
|
185
|
+
1
|
186
|
+
11
|
187
|
+
65
|
188
|
+
49
|
189
|
+
3
|
190
|
+
3
|
191
|
+
15
|
192
|
+
1
|
193
|
+
15
|
194
|
+
99
|
195
|
+
7
|
196
|
+
12
|
197
|
+
45
|
198
|
+
1
|
199
|
+
13
|
200
|
+
65
|
201
|
+
49
|
202
|
+
3
|
203
|
+
3
|
204
|
+
15
|
205
|
+
1
|
206
|
+
11
|
207
|
+
I
|
208
|
+
4
|
209
|
+
I
|
210
|
+
0
|
211
|
+
I
|
212
|
+
0
|
213
|
+
I
|
214
|
+
0
|
215
|
+
n
|
216
|
+
p
|
217
|
+
14
|
218
|
+
x
|
219
|
+
19
|
220
|
+
MethodNotOverridden
|
221
|
+
x
|
222
|
+
13
|
223
|
+
StandardError
|
224
|
+
n
|
225
|
+
x
|
226
|
+
10
|
227
|
+
open_class
|
228
|
+
x
|
229
|
+
22
|
230
|
+
UnsupportedContentType
|
231
|
+
n
|
232
|
+
x
|
233
|
+
25
|
234
|
+
AutoRedirectLimitExceeded
|
235
|
+
n
|
236
|
+
x
|
237
|
+
31
|
238
|
+
RealRequestMadeInTestEnvironmet
|
239
|
+
n
|
240
|
+
x
|
241
|
+
7
|
242
|
+
Timeout
|
243
|
+
n
|
244
|
+
x
|
245
|
+
19
|
246
|
+
UnsupportedHttpVerb
|
247
|
+
n
|
248
|
+
p
|
249
|
+
13
|
250
|
+
I
|
251
|
+
2
|
252
|
+
I
|
253
|
+
5
|
254
|
+
I
|
255
|
+
f
|
256
|
+
I
|
257
|
+
a
|
258
|
+
I
|
259
|
+
1c
|
260
|
+
I
|
261
|
+
f
|
262
|
+
I
|
263
|
+
29
|
264
|
+
I
|
265
|
+
17
|
266
|
+
I
|
267
|
+
36
|
268
|
+
I
|
269
|
+
1b
|
270
|
+
I
|
271
|
+
43
|
272
|
+
I
|
273
|
+
1e
|
274
|
+
I
|
275
|
+
50
|
276
|
+
x
|
277
|
+
46
|
278
|
+
/Users/sidu/Work/wrest/lib/wrest/exceptions.rb
|
279
|
+
p
|
280
|
+
0
|
281
|
+
x
|
282
|
+
13
|
283
|
+
attach_method
|
284
|
+
p
|
285
|
+
3
|
286
|
+
I
|
287
|
+
2
|
288
|
+
I
|
289
|
+
2
|
290
|
+
I
|
291
|
+
1c
|
292
|
+
x
|
293
|
+
46
|
294
|
+
/Users/sidu/Work/wrest/lib/wrest/exceptions.rb
|
295
|
+
p
|
296
|
+
0
|
297
|
+
x
|
298
|
+
13
|
299
|
+
attach_method
|
300
|
+
p
|
301
|
+
3
|
302
|
+
I
|
303
|
+
0
|
304
|
+
I
|
305
|
+
1
|
306
|
+
I
|
307
|
+
1c
|
308
|
+
x
|
309
|
+
46
|
310
|
+
/Users/sidu/Work/wrest/lib/wrest/exceptions.rb
|
311
|
+
p
|
312
|
+
0
|
@@ -10,13 +10,6 @@
|
|
10
10
|
module Wrest
|
11
11
|
module HttpShared
|
12
12
|
module Headers
|
13
|
-
|
14
|
-
def initialize_http_header
|
15
|
-
headers.each do |key, value|
|
16
|
-
headers[key.downcase] = value.strip
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
13
|
# Returns the header field corresponding to the case-insensitive key.
|
21
14
|
# For example, a key of "Content-Type" might return "text/html"
|
22
15
|
def [](key)
|
@@ -0,0 +1,353 @@
|
|
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
|
+
5
|
54
|
+
Wrest
|
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
|
+
5
|
67
|
+
Wrest
|
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
|
+
10
|
111
|
+
HttpShared
|
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
|
+
10
|
124
|
+
HttpShared
|
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
|
+
7
|
168
|
+
Headers
|
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
|
+
7
|
181
|
+
Headers
|
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
|
+
2
|
213
|
+
[]
|
214
|
+
M
|
215
|
+
1
|
216
|
+
n
|
217
|
+
n
|
218
|
+
x
|
219
|
+
2
|
220
|
+
[]
|
221
|
+
i
|
222
|
+
24
|
223
|
+
5
|
224
|
+
48
|
225
|
+
0
|
226
|
+
20
|
227
|
+
0
|
228
|
+
49
|
229
|
+
1
|
230
|
+
1
|
231
|
+
13
|
232
|
+
10
|
233
|
+
23
|
234
|
+
15
|
235
|
+
5
|
236
|
+
48
|
237
|
+
0
|
238
|
+
20
|
239
|
+
0
|
240
|
+
49
|
241
|
+
2
|
242
|
+
0
|
243
|
+
49
|
244
|
+
1
|
245
|
+
1
|
246
|
+
11
|
247
|
+
I
|
248
|
+
3
|
249
|
+
I
|
250
|
+
1
|
251
|
+
I
|
252
|
+
1
|
253
|
+
I
|
254
|
+
1
|
255
|
+
n
|
256
|
+
p
|
257
|
+
3
|
258
|
+
x
|
259
|
+
7
|
260
|
+
headers
|
261
|
+
x
|
262
|
+
2
|
263
|
+
[]
|
264
|
+
x
|
265
|
+
8
|
266
|
+
downcase
|
267
|
+
p
|
268
|
+
5
|
269
|
+
I
|
270
|
+
0
|
271
|
+
I
|
272
|
+
f
|
273
|
+
I
|
274
|
+
0
|
275
|
+
I
|
276
|
+
10
|
277
|
+
I
|
278
|
+
18
|
279
|
+
x
|
280
|
+
55
|
281
|
+
/Users/sidu/Work/wrest/lib/wrest/http_shared/headers.rb
|
282
|
+
p
|
283
|
+
1
|
284
|
+
x
|
285
|
+
3
|
286
|
+
key
|
287
|
+
x
|
288
|
+
17
|
289
|
+
method_visibility
|
290
|
+
x
|
291
|
+
15
|
292
|
+
add_defn_method
|
293
|
+
p
|
294
|
+
3
|
295
|
+
I
|
296
|
+
2
|
297
|
+
I
|
298
|
+
f
|
299
|
+
I
|
300
|
+
10
|
301
|
+
x
|
302
|
+
55
|
303
|
+
/Users/sidu/Work/wrest/lib/wrest/http_shared/headers.rb
|
304
|
+
p
|
305
|
+
0
|
306
|
+
x
|
307
|
+
13
|
308
|
+
attach_method
|
309
|
+
p
|
310
|
+
3
|
311
|
+
I
|
312
|
+
2
|
313
|
+
I
|
314
|
+
c
|
315
|
+
I
|
316
|
+
1c
|
317
|
+
x
|
318
|
+
55
|
319
|
+
/Users/sidu/Work/wrest/lib/wrest/http_shared/headers.rb
|
320
|
+
p
|
321
|
+
0
|
322
|
+
x
|
323
|
+
13
|
324
|
+
attach_method
|
325
|
+
p
|
326
|
+
3
|
327
|
+
I
|
328
|
+
2
|
329
|
+
I
|
330
|
+
b
|
331
|
+
I
|
332
|
+
1c
|
333
|
+
x
|
334
|
+
55
|
335
|
+
/Users/sidu/Work/wrest/lib/wrest/http_shared/headers.rb
|
336
|
+
p
|
337
|
+
0
|
338
|
+
x
|
339
|
+
13
|
340
|
+
attach_method
|
341
|
+
p
|
342
|
+
3
|
343
|
+
I
|
344
|
+
0
|
345
|
+
I
|
346
|
+
a
|
347
|
+
I
|
348
|
+
1c
|
349
|
+
x
|
350
|
+
55
|
351
|
+
/Users/sidu/Work/wrest/lib/wrest/http_shared/headers.rb
|
352
|
+
p
|
353
|
+
0
|