wrest 1.0.0.beta2-universal-java-1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/CHANGELOG +59 -0
  2. data/LICENCE +7 -0
  3. data/README.rdoc +127 -0
  4. data/bin/wrest +3 -0
  5. data/bin/wrest_shell.rb +21 -0
  6. data/lib/wrest.rb +101 -0
  7. data/lib/wrest.rbc +1900 -0
  8. data/lib/wrest/components.rb +20 -0
  9. data/lib/wrest/components.rbc +217 -0
  10. data/lib/wrest/components/container.rb +185 -0
  11. data/lib/wrest/components/container.rbc +2466 -0
  12. data/lib/wrest/components/container/alias_accessors.rb +66 -0
  13. data/lib/wrest/components/container/alias_accessors.rbc +905 -0
  14. data/lib/wrest/components/container/typecaster.rb +127 -0
  15. data/lib/wrest/components/container/typecaster.rbc +1985 -0
  16. data/lib/wrest/components/mutators.rb +39 -0
  17. data/lib/wrest/components/mutators.rbc +650 -0
  18. data/lib/wrest/components/mutators/base.rb +56 -0
  19. data/lib/wrest/components/mutators/base.rbc +702 -0
  20. data/lib/wrest/components/mutators/camel_to_snake_case.rb +22 -0
  21. data/lib/wrest/components/mutators/camel_to_snake_case.rbc +360 -0
  22. data/lib/wrest/components/mutators/xml_mini_type_caster.rb +43 -0
  23. data/lib/wrest/components/mutators/xml_mini_type_caster.rbc +679 -0
  24. data/lib/wrest/components/mutators/xml_simple_type_caster.rb +37 -0
  25. data/lib/wrest/components/mutators/xml_simple_type_caster.rbc +559 -0
  26. data/lib/wrest/components/translators.rb +28 -0
  27. data/lib/wrest/components/translators.rbc +517 -0
  28. data/lib/wrest/components/translators/content_types.rb +20 -0
  29. data/lib/wrest/components/translators/content_types.rbc +339 -0
  30. data/lib/wrest/components/translators/json.rb +25 -0
  31. data/lib/wrest/components/translators/json.rbc +462 -0
  32. data/lib/wrest/components/translators/xml.rb +24 -0
  33. data/lib/wrest/components/translators/xml.rbc +457 -0
  34. data/lib/wrest/core_ext/hash.rb +5 -0
  35. data/lib/wrest/core_ext/hash.rbc +182 -0
  36. data/lib/wrest/core_ext/hash/conversions.rb +44 -0
  37. data/lib/wrest/core_ext/hash/conversions.rbc +501 -0
  38. data/lib/wrest/core_ext/string.rb +5 -0
  39. data/lib/wrest/core_ext/string.rbc +182 -0
  40. data/lib/wrest/core_ext/string/conversions.rb +23 -0
  41. data/lib/wrest/core_ext/string/conversions.rbc +471 -0
  42. data/lib/wrest/curl.rb +49 -0
  43. data/lib/wrest/curl.rbc +704 -0
  44. data/lib/wrest/curl/delete.rb +23 -0
  45. data/lib/wrest/curl/get.rb +23 -0
  46. data/lib/wrest/curl/options.rb +16 -0
  47. data/lib/wrest/curl/post.rb +23 -0
  48. data/lib/wrest/curl/put.rb +23 -0
  49. data/lib/wrest/curl/request.rb +97 -0
  50. data/lib/wrest/curl/response.rb +71 -0
  51. data/lib/wrest/curl/session.rb +57 -0
  52. data/lib/wrest/exceptions.rb +33 -0
  53. data/lib/wrest/exceptions.rbc +312 -0
  54. data/lib/wrest/http_shared.rb +23 -0
  55. data/lib/wrest/http_shared.rbc +279 -0
  56. data/lib/wrest/http_shared/headers.rb +343 -0
  57. data/lib/wrest/http_shared/headers.rbc +353 -0
  58. data/lib/wrest/http_shared/standard_headers.rb +21 -0
  59. data/lib/wrest/http_shared/standard_headers.rbc +336 -0
  60. data/lib/wrest/http_shared/standard_tokens.rb +18 -0
  61. data/lib/wrest/http_shared/standard_tokens.rbc +316 -0
  62. data/lib/wrest/multipart.rb +52 -0
  63. data/lib/wrest/native.rb +33 -0
  64. data/lib/wrest/native.rbc +513 -0
  65. data/lib/wrest/native/connection_factory.rb +23 -0
  66. data/lib/wrest/native/connection_factory.rbc +445 -0
  67. data/lib/wrest/native/delete.rb +23 -0
  68. data/lib/wrest/native/delete.rbc +371 -0
  69. data/lib/wrest/native/get.rb +51 -0
  70. data/lib/wrest/native/get.rbc +855 -0
  71. data/lib/wrest/native/options.rb +23 -0
  72. data/lib/wrest/native/options.rbc +347 -0
  73. data/lib/wrest/native/post.rb +23 -0
  74. data/lib/wrest/native/post.rbc +388 -0
  75. data/lib/wrest/native/post_multipart.rb +32 -0
  76. data/lib/wrest/native/put.rb +23 -0
  77. data/lib/wrest/native/put.rbc +388 -0
  78. data/lib/wrest/native/put_multipart.rb +32 -0
  79. data/lib/wrest/native/redirection.rb +38 -0
  80. data/lib/wrest/native/redirection.rbc +520 -0
  81. data/lib/wrest/native/request.rb +94 -0
  82. data/lib/wrest/native/request.rbc +1675 -0
  83. data/lib/wrest/native/response.rb +120 -0
  84. data/lib/wrest/native/response.rbc +2150 -0
  85. data/lib/wrest/native/session.rb +57 -0
  86. data/lib/wrest/native/session.rbc +1372 -0
  87. data/lib/wrest/resource.rb +18 -0
  88. data/lib/wrest/resource.rbc +163 -0
  89. data/lib/wrest/resource/base.rb +99 -0
  90. data/lib/wrest/resource/base.rbc +2115 -0
  91. data/lib/wrest/resource/collection.rb +12 -0
  92. data/lib/wrest/resource/state.rb +6 -0
  93. data/lib/wrest/test.rb +1 -0
  94. data/lib/wrest/test/request_patches.rb +5 -0
  95. data/lib/wrest/uri.rb +160 -0
  96. data/lib/wrest/uri.rbc +2599 -0
  97. data/lib/wrest/uri_template.rb +49 -0
  98. data/lib/wrest/uri_template.rbc +505 -0
  99. data/lib/wrest/version.rb +23 -0
  100. data/lib/wrest/version.rbc +372 -0
  101. metadata +231 -0
@@ -0,0 +1,23 @@
1
+ # Copyright 2009 Sidu Ponnappa
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software distributed under the License
7
+ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
+ # See the License for the specific language governing permissions and limitations under the License.
9
+
10
+ module Wrest::Native
11
+ class Options < Request
12
+ def initialize(wrest_uri, options = {})
13
+ super(
14
+ wrest_uri,
15
+ Net::HTTP::Options,
16
+ {},
17
+ nil,
18
+ {},
19
+ options
20
+ )
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,347 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 30
13
+ 99
14
+ 7
15
+ 0
16
+ 45
17
+ 1
18
+ 2
19
+ 49
20
+ 3
21
+ 2
22
+ 13
23
+ 99
24
+ 12
25
+ 7
26
+ 4
27
+ 12
28
+ 7
29
+ 5
30
+ 12
31
+ 65
32
+ 12
33
+ 49
34
+ 6
35
+ 4
36
+ 15
37
+ 49
38
+ 4
39
+ 0
40
+ 15
41
+ 2
42
+ 11
43
+ I
44
+ 6
45
+ I
46
+ 0
47
+ I
48
+ 0
49
+ I
50
+ 0
51
+ n
52
+ p
53
+ 7
54
+ x
55
+ 6
56
+ Native
57
+ x
58
+ 5
59
+ Wrest
60
+ n
61
+ x
62
+ 17
63
+ open_module_under
64
+ x
65
+ 15
66
+ __module_init__
67
+ M
68
+ 1
69
+ n
70
+ n
71
+ x
72
+ 6
73
+ Native
74
+ i
75
+ 31
76
+ 5
77
+ 66
78
+ 99
79
+ 7
80
+ 0
81
+ 45
82
+ 1
83
+ 2
84
+ 65
85
+ 49
86
+ 3
87
+ 3
88
+ 13
89
+ 99
90
+ 12
91
+ 7
92
+ 4
93
+ 12
94
+ 7
95
+ 5
96
+ 12
97
+ 65
98
+ 12
99
+ 49
100
+ 6
101
+ 4
102
+ 15
103
+ 49
104
+ 4
105
+ 0
106
+ 11
107
+ I
108
+ 6
109
+ I
110
+ 0
111
+ I
112
+ 0
113
+ I
114
+ 0
115
+ n
116
+ p
117
+ 7
118
+ x
119
+ 7
120
+ Options
121
+ x
122
+ 7
123
+ Request
124
+ n
125
+ x
126
+ 10
127
+ open_class
128
+ x
129
+ 14
130
+ __class_init__
131
+ M
132
+ 1
133
+ n
134
+ n
135
+ x
136
+ 7
137
+ Options
138
+ i
139
+ 16
140
+ 5
141
+ 66
142
+ 99
143
+ 7
144
+ 0
145
+ 7
146
+ 1
147
+ 65
148
+ 67
149
+ 49
150
+ 2
151
+ 0
152
+ 49
153
+ 3
154
+ 4
155
+ 11
156
+ I
157
+ 5
158
+ I
159
+ 0
160
+ I
161
+ 0
162
+ I
163
+ 0
164
+ n
165
+ p
166
+ 4
167
+ x
168
+ 10
169
+ initialize
170
+ M
171
+ 1
172
+ n
173
+ n
174
+ x
175
+ 10
176
+ initialize
177
+ i
178
+ 45
179
+ 23
180
+ 1
181
+ 10
182
+ 14
183
+ 44
184
+ 43
185
+ 0
186
+ 78
187
+ 49
188
+ 1
189
+ 1
190
+ 19
191
+ 1
192
+ 15
193
+ 20
194
+ 0
195
+ 45
196
+ 2
197
+ 3
198
+ 43
199
+ 4
200
+ 43
201
+ 5
202
+ 44
203
+ 43
204
+ 0
205
+ 78
206
+ 49
207
+ 1
208
+ 1
209
+ 1
210
+ 44
211
+ 43
212
+ 0
213
+ 78
214
+ 49
215
+ 1
216
+ 1
217
+ 20
218
+ 1
219
+ 54
220
+ 52
221
+ 6
222
+ 6
223
+ 11
224
+ I
225
+ 9
226
+ I
227
+ 2
228
+ I
229
+ 1
230
+ I
231
+ 2
232
+ n
233
+ p
234
+ 7
235
+ x
236
+ 4
237
+ Hash
238
+ x
239
+ 16
240
+ new_from_literal
241
+ x
242
+ 3
243
+ Net
244
+ n
245
+ x
246
+ 4
247
+ HTTP
248
+ x
249
+ 7
250
+ Options
251
+ x
252
+ 10
253
+ initialize
254
+ p
255
+ 15
256
+ I
257
+ 0
258
+ I
259
+ c
260
+ I
261
+ e
262
+ I
263
+ e
264
+ I
265
+ 10
266
+ I
267
+ f
268
+ I
269
+ 17
270
+ I
271
+ 10
272
+ I
273
+ 1e
274
+ I
275
+ 11
276
+ I
277
+ 1f
278
+ I
279
+ 12
280
+ I
281
+ 26
282
+ I
283
+ 13
284
+ I
285
+ 2d
286
+ x
287
+ 50
288
+ /Users/sidu/Work/wrest/lib/wrest/native/options.rb
289
+ p
290
+ 2
291
+ x
292
+ 9
293
+ wrest_uri
294
+ x
295
+ 7
296
+ options
297
+ x
298
+ 17
299
+ method_visibility
300
+ x
301
+ 15
302
+ add_defn_method
303
+ p
304
+ 3
305
+ I
306
+ 2
307
+ I
308
+ c
309
+ I
310
+ 10
311
+ x
312
+ 50
313
+ /Users/sidu/Work/wrest/lib/wrest/native/options.rb
314
+ p
315
+ 0
316
+ x
317
+ 13
318
+ attach_method
319
+ p
320
+ 3
321
+ I
322
+ 2
323
+ I
324
+ b
325
+ I
326
+ 1f
327
+ x
328
+ 50
329
+ /Users/sidu/Work/wrest/lib/wrest/native/options.rb
330
+ p
331
+ 0
332
+ x
333
+ 13
334
+ attach_method
335
+ p
336
+ 3
337
+ I
338
+ 0
339
+ I
340
+ a
341
+ I
342
+ 1e
343
+ x
344
+ 50
345
+ /Users/sidu/Work/wrest/lib/wrest/native/options.rb
346
+ p
347
+ 0
@@ -0,0 +1,23 @@
1
+ # Copyright 2009 Sidu Ponnappa
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software distributed under the License
7
+ # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
+ # See the License for the specific language governing permissions and limitations under the License.
9
+
10
+ module Wrest::Native
11
+ class Post < Request
12
+ def initialize(wrest_uri, body = '', headers = {}, parameters = {}, options = {})
13
+ super(
14
+ wrest_uri,
15
+ Net::HTTP::Post,
16
+ parameters,
17
+ body,
18
+ headers,
19
+ options
20
+ )
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,388 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 30
13
+ 99
14
+ 7
15
+ 0
16
+ 45
17
+ 1
18
+ 2
19
+ 49
20
+ 3
21
+ 2
22
+ 13
23
+ 99
24
+ 12
25
+ 7
26
+ 4
27
+ 12
28
+ 7
29
+ 5
30
+ 12
31
+ 65
32
+ 12
33
+ 49
34
+ 6
35
+ 4
36
+ 15
37
+ 49
38
+ 4
39
+ 0
40
+ 15
41
+ 2
42
+ 11
43
+ I
44
+ 6
45
+ I
46
+ 0
47
+ I
48
+ 0
49
+ I
50
+ 0
51
+ n
52
+ p
53
+ 7
54
+ x
55
+ 6
56
+ Native
57
+ x
58
+ 5
59
+ Wrest
60
+ n
61
+ x
62
+ 17
63
+ open_module_under
64
+ x
65
+ 15
66
+ __module_init__
67
+ M
68
+ 1
69
+ n
70
+ n
71
+ x
72
+ 6
73
+ Native
74
+ i
75
+ 31
76
+ 5
77
+ 66
78
+ 99
79
+ 7
80
+ 0
81
+ 45
82
+ 1
83
+ 2
84
+ 65
85
+ 49
86
+ 3
87
+ 3
88
+ 13
89
+ 99
90
+ 12
91
+ 7
92
+ 4
93
+ 12
94
+ 7
95
+ 5
96
+ 12
97
+ 65
98
+ 12
99
+ 49
100
+ 6
101
+ 4
102
+ 15
103
+ 49
104
+ 4
105
+ 0
106
+ 11
107
+ I
108
+ 6
109
+ I
110
+ 0
111
+ I
112
+ 0
113
+ I
114
+ 0
115
+ n
116
+ p
117
+ 7
118
+ x
119
+ 4
120
+ Post
121
+ x
122
+ 7
123
+ Request
124
+ n
125
+ x
126
+ 10
127
+ open_class
128
+ x
129
+ 14
130
+ __class_init__
131
+ M
132
+ 1
133
+ n
134
+ n
135
+ x
136
+ 4
137
+ Post
138
+ i
139
+ 16
140
+ 5
141
+ 66
142
+ 99
143
+ 7
144
+ 0
145
+ 7
146
+ 1
147
+ 65
148
+ 67
149
+ 49
150
+ 2
151
+ 0
152
+ 49
153
+ 3
154
+ 4
155
+ 11
156
+ I
157
+ 5
158
+ I
159
+ 0
160
+ I
161
+ 0
162
+ I
163
+ 0
164
+ n
165
+ p
166
+ 4
167
+ x
168
+ 10
169
+ initialize
170
+ M
171
+ 1
172
+ n
173
+ n
174
+ x
175
+ 10
176
+ initialize
177
+ i
178
+ 74
179
+ 23
180
+ 1
181
+ 10
182
+ 10
183
+ 7
184
+ 0
185
+ 64
186
+ 19
187
+ 1
188
+ 15
189
+ 23
190
+ 2
191
+ 10
192
+ 24
193
+ 44
194
+ 43
195
+ 1
196
+ 78
197
+ 49
198
+ 2
199
+ 1
200
+ 19
201
+ 2
202
+ 15
203
+ 23
204
+ 3
205
+ 10
206
+ 38
207
+ 44
208
+ 43
209
+ 1
210
+ 78
211
+ 49
212
+ 2
213
+ 1
214
+ 19
215
+ 3
216
+ 15
217
+ 23
218
+ 4
219
+ 10
220
+ 52
221
+ 44
222
+ 43
223
+ 1
224
+ 78
225
+ 49
226
+ 2
227
+ 1
228
+ 19
229
+ 4
230
+ 15
231
+ 20
232
+ 0
233
+ 45
234
+ 3
235
+ 4
236
+ 43
237
+ 5
238
+ 43
239
+ 6
240
+ 20
241
+ 3
242
+ 20
243
+ 1
244
+ 20
245
+ 2
246
+ 20
247
+ 4
248
+ 54
249
+ 52
250
+ 7
251
+ 6
252
+ 11
253
+ I
254
+ c
255
+ I
256
+ 5
257
+ I
258
+ 1
259
+ I
260
+ 5
261
+ n
262
+ p
263
+ 8
264
+ s
265
+ 0
266
+
267
+ x
268
+ 4
269
+ Hash
270
+ x
271
+ 16
272
+ new_from_literal
273
+ x
274
+ 3
275
+ Net
276
+ n
277
+ x
278
+ 4
279
+ HTTP
280
+ x
281
+ 4
282
+ Post
283
+ x
284
+ 10
285
+ initialize
286
+ p
287
+ 15
288
+ I
289
+ 0
290
+ I
291
+ c
292
+ I
293
+ 34
294
+ I
295
+ e
296
+ I
297
+ 36
298
+ I
299
+ f
300
+ I
301
+ 3d
302
+ I
303
+ 10
304
+ I
305
+ 3f
306
+ I
307
+ 11
308
+ I
309
+ 41
310
+ I
311
+ 12
312
+ I
313
+ 43
314
+ I
315
+ 13
316
+ I
317
+ 4a
318
+ x
319
+ 47
320
+ /Users/sidu/Work/wrest/lib/wrest/native/post.rb
321
+ p
322
+ 5
323
+ x
324
+ 9
325
+ wrest_uri
326
+ x
327
+ 4
328
+ body
329
+ x
330
+ 7
331
+ headers
332
+ x
333
+ 10
334
+ parameters
335
+ x
336
+ 7
337
+ options
338
+ x
339
+ 17
340
+ method_visibility
341
+ x
342
+ 15
343
+ add_defn_method
344
+ p
345
+ 3
346
+ I
347
+ 2
348
+ I
349
+ c
350
+ I
351
+ 10
352
+ x
353
+ 47
354
+ /Users/sidu/Work/wrest/lib/wrest/native/post.rb
355
+ p
356
+ 0
357
+ x
358
+ 13
359
+ attach_method
360
+ p
361
+ 3
362
+ I
363
+ 2
364
+ I
365
+ b
366
+ I
367
+ 1f
368
+ x
369
+ 47
370
+ /Users/sidu/Work/wrest/lib/wrest/native/post.rb
371
+ p
372
+ 0
373
+ x
374
+ 13
375
+ attach_method
376
+ p
377
+ 3
378
+ I
379
+ 0
380
+ I
381
+ a
382
+ I
383
+ 1e
384
+ x
385
+ 47
386
+ /Users/sidu/Work/wrest/lib/wrest/native/post.rb
387
+ p
388
+ 0