wrest 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +34 -0
- data/README.rdoc +16 -10
- data/Rakefile +361 -123
- data/VERSION.yml +2 -2
- data/examples/delicious.rb +17 -7
- data/examples/facebook.rb +101 -0
- data/examples/keep_alive.rb +37 -0
- data/examples/twitter.rb +3 -3
- data/examples/twitter_public_timeline.rb +11 -4
- data/examples/wow_realm_status.rb +8 -2
- data/{spec/functional/sample_rails_app/public/favicon.ico → init.rb} +0 -0
- data/lib/wrest/components/{attributes_container → container}/alias_accessors.rb +4 -4
- data/lib/wrest/components/{attributes_container → container}/typecaster.rb +1 -1
- data/lib/wrest/components/{attributes_container.rb → container.rb} +46 -16
- data/lib/wrest/components/mutators.rb +4 -4
- data/lib/wrest/components/translators/json.rb +2 -2
- data/lib/wrest/components/translators/xml.rb +3 -2
- data/lib/wrest/components/translators.rb +3 -3
- data/lib/wrest/components.rb +3 -3
- data/lib/wrest/core_ext/hash.rb +1 -1
- data/lib/wrest/core_ext/string.rb +1 -1
- data/lib/wrest/curl/delete.rb +23 -0
- data/lib/wrest/curl/get.rb +23 -0
- data/lib/wrest/curl/options.rb +16 -0
- data/lib/wrest/curl/post.rb +23 -0
- data/lib/wrest/curl/put.rb +23 -0
- data/lib/wrest/curl/request.rb +95 -0
- data/lib/wrest/curl/response.rb +63 -0
- data/lib/wrest/curl/session.rb +57 -0
- data/lib/wrest/curl.rb +49 -0
- data/lib/wrest/exceptions.rb +16 -1
- data/lib/wrest/http_shared/headers.rb +350 -0
- data/lib/wrest/http_shared/standard_headers.rb +21 -0
- data/lib/wrest/http_shared/standard_tokens.rb +18 -0
- data/lib/wrest/http_shared.rb +24 -0
- data/lib/wrest/native/connection_factory.rb +23 -0
- data/lib/wrest/{http → native}/delete.rb +1 -1
- data/lib/wrest/{http → native}/get.rb +1 -1
- data/lib/wrest/{http → native}/options.rb +1 -1
- data/lib/wrest/{http → native}/post.rb +1 -1
- data/lib/wrest/{http → native}/put.rb +1 -1
- data/lib/wrest/{http → native}/redirection.rb +4 -1
- data/lib/wrest/{http → native}/request.rb +32 -20
- data/lib/wrest/{http → native}/response.rb +12 -4
- data/lib/wrest/native/session.rb +57 -0
- data/lib/wrest/native.rb +32 -0
- data/lib/wrest/resource/base.rb +1 -1
- data/lib/wrest/resource.rb +1 -1
- data/lib/wrest/test/request_patches.rb +5 -0
- data/lib/wrest/test.rb +1 -0
- data/lib/wrest/uri.rb +31 -3
- data/lib/wrest/version.rb +2 -2
- data/lib/wrest.rb +52 -16
- data/spec/unit/spec_helper.rb +12 -3
- data/spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb +2 -2
- data/spec/unit/wrest/components/attributes_container/typecaster_spec.rb +6 -6
- data/spec/unit/wrest/components/attributes_container_spec.rb +44 -12
- data/spec/unit/wrest/components/translators/xml_spec.rb +7 -3
- data/spec/unit/wrest/curl/request_spec.rb +19 -0
- data/spec/unit/wrest/curl/response_spec.rb +16 -0
- data/spec/unit/wrest/http/response_spec.rb +17 -38
- data/spec/unit/wrest/{http → native}/redirection_spec.rb +5 -5
- data/spec/unit/wrest/{http → native}/request_spec.rb +15 -14
- data/spec/unit/wrest/native/response_spec.rb +72 -0
- data/spec/unit/wrest/native/session_spec.rb +74 -0
- data/spec/unit/wrest/resource/base_spec.rb +2 -2
- data/spec/unit/wrest/uri_spec.rb +51 -11
- data/wrest.gemspec +164 -0
- metadata +51 -165
- data/lib/wrest/http.rb +0 -25
- data/spec/functional/sample_rails_app/README +0 -3
- data/spec/functional/sample_rails_app/Rakefile +0 -10
- data/spec/functional/sample_rails_app/app/controllers/application_controller.rb +0 -10
- data/spec/functional/sample_rails_app/app/controllers/lead_bottles_controller.rb +0 -7
- data/spec/functional/sample_rails_app/app/helpers/application_helper.rb +0 -3
- data/spec/functional/sample_rails_app/app/models/bottle.rb +0 -3
- data/spec/functional/sample_rails_app/app/models/glass_bottle.rb +0 -3
- data/spec/functional/sample_rails_app/app/models/lead_bottle.rb +0 -3
- data/spec/functional/sample_rails_app/config/boot.rb +0 -110
- data/spec/functional/sample_rails_app/config/database.yml +0 -16
- data/spec/functional/sample_rails_app/config/environment.rb +0 -42
- data/spec/functional/sample_rails_app/config/environments/development.rb +0 -17
- data/spec/functional/sample_rails_app/config/environments/production.rb +0 -28
- data/spec/functional/sample_rails_app/config/environments/test.rb +0 -28
- data/spec/functional/sample_rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/functional/sample_rails_app/config/initializers/inflections.rb +0 -10
- data/spec/functional/sample_rails_app/config/initializers/mime_types.rb +0 -5
- data/spec/functional/sample_rails_app/config/initializers/new_rails_defaults.rb +0 -19
- data/spec/functional/sample_rails_app/config/initializers/session_store.rb +0 -15
- data/spec/functional/sample_rails_app/config/locales/en.yml +0 -5
- data/spec/functional/sample_rails_app/config/routes.rb +0 -3
- data/spec/functional/sample_rails_app/db/development.sqlite3 +0 -0
- data/spec/functional/sample_rails_app/db/migrate/20090319115628_create_bottle.rb +0 -13
- data/spec/functional/sample_rails_app/db/schema.rb +0 -20
- data/spec/functional/sample_rails_app/db/test.sqlite3 +0 -0
- data/spec/functional/sample_rails_app/log/development.log +0 -1
- data/spec/functional/sample_rails_app/public/404.html +0 -30
- data/spec/functional/sample_rails_app/public/422.html +0 -30
- data/spec/functional/sample_rails_app/public/500.html +0 -30
- data/spec/functional/sample_rails_app/public/images/rails.png +0 -0
- data/spec/functional/sample_rails_app/public/index.html +0 -275
- data/spec/functional/sample_rails_app/public/robots.txt +0 -5
- data/spec/functional/sample_rails_app/script/about +0 -4
- data/spec/functional/sample_rails_app/script/autospec +0 -6
- data/spec/functional/sample_rails_app/script/console +0 -3
- data/spec/functional/sample_rails_app/script/dbconsole +0 -3
- data/spec/functional/sample_rails_app/script/destroy +0 -3
- data/spec/functional/sample_rails_app/script/generate +0 -3
- data/spec/functional/sample_rails_app/script/performance/benchmarker +0 -3
- data/spec/functional/sample_rails_app/script/performance/profiler +0 -3
- data/spec/functional/sample_rails_app/script/plugin +0 -3
- data/spec/functional/sample_rails_app/script/runner +0 -3
- data/spec/functional/sample_rails_app/script/server +0 -3
- data/spec/functional/sample_rails_app/script/spec +0 -10
- data/spec/functional/sample_rails_app/script/spec_server +0 -9
- data/spec/functional/sample_rails_app/test/performance/browsing_test.rb +0 -9
- data/spec/functional/sample_rails_app/test/test_helper.rb +0 -38
- data/spec/functional/sample_rails_app/tmtags +0 -2559
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/MIT-LICENSE +0 -20
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/README.rdoc +0 -100
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/Rakefile +0 -18
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/init.rb +0 -5
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/install.rb +0 -1
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/base.rb +0 -140
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources.rb +0 -16
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources_controller.rb +0 -26
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/routes_controller.rb +0 -16
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/api.rb +0 -26
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/exception.rb +0 -23
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/from_json.rb +0 -15
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/dispatch.rb +0 -235
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/models/resourced_route.rb +0 -84
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/query.rb +0 -337
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/html.rb +0 -50
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/json.rb +0 -75
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/xml.rb +0 -65
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render.rb +0 -63
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/retrieve.rb +0 -74
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/version.rb +0 -9
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full.rb +0 -14
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/base_spec.rb +0 -88
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/controllers/resources_spec.rb +0 -29
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/dispatch_spec.rb +0 -262
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/models/resourced_route_spec.rb +0 -62
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query/parameter_spec.rb +0 -57
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query_spec.rb +0 -462
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/html_spec.rb +0 -4
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/json_spec.rb +0 -107
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/xml_spec.rb +0 -98
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render_spec.rb +0 -5
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/retrieve_spec.rb +0 -173
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/spec_helper.rb +0 -98
- data/spec/functional/sample_rails_app/vendor/plugins/resource_full/uninstall.rb +0 -1
- data/spec/functional/spec_helper.rb +0 -0
data/wrest.gemspec
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{wrest}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Sidu Ponnappa"]
|
12
|
+
s.date = %q{2009-12-21}
|
13
|
+
s.description = %q{Wrest is a HTTP and REST client library which allows you to quickly build well encapsulated, object oriented wrappers around any web service.}
|
14
|
+
s.email = %q{ckponnappa@gmail.com}
|
15
|
+
s.executables = ["wrest", "jwrest"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"CHANGELOG",
|
21
|
+
"README.rdoc",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION.yml",
|
24
|
+
"bin/jwrest",
|
25
|
+
"bin/wrest",
|
26
|
+
"bin/wrest_shell.rb",
|
27
|
+
"examples/delicious.rb",
|
28
|
+
"examples/facebook.rb",
|
29
|
+
"examples/keep_alive.rb",
|
30
|
+
"examples/redirection.rb",
|
31
|
+
"examples/twitter.rb",
|
32
|
+
"examples/twitter_public_timeline.rb",
|
33
|
+
"examples/wow_realm_status.rb",
|
34
|
+
"init.rb",
|
35
|
+
"lib/wrest.rb",
|
36
|
+
"lib/wrest/components.rb",
|
37
|
+
"lib/wrest/components/container.rb",
|
38
|
+
"lib/wrest/components/container/alias_accessors.rb",
|
39
|
+
"lib/wrest/components/container/typecaster.rb",
|
40
|
+
"lib/wrest/components/mutators.rb",
|
41
|
+
"lib/wrest/components/mutators/base.rb",
|
42
|
+
"lib/wrest/components/mutators/camel_to_snake_case.rb",
|
43
|
+
"lib/wrest/components/mutators/xml_mini_type_caster.rb",
|
44
|
+
"lib/wrest/components/mutators/xml_simple_type_caster.rb",
|
45
|
+
"lib/wrest/components/translators.rb",
|
46
|
+
"lib/wrest/components/translators/content_types.rb",
|
47
|
+
"lib/wrest/components/translators/json.rb",
|
48
|
+
"lib/wrest/components/translators/xml.rb",
|
49
|
+
"lib/wrest/core_ext/hash.rb",
|
50
|
+
"lib/wrest/core_ext/hash/conversions.rb",
|
51
|
+
"lib/wrest/core_ext/string.rb",
|
52
|
+
"lib/wrest/core_ext/string/conversions.rb",
|
53
|
+
"lib/wrest/curl.rb",
|
54
|
+
"lib/wrest/curl/delete.rb",
|
55
|
+
"lib/wrest/curl/get.rb",
|
56
|
+
"lib/wrest/curl/options.rb",
|
57
|
+
"lib/wrest/curl/post.rb",
|
58
|
+
"lib/wrest/curl/put.rb",
|
59
|
+
"lib/wrest/curl/request.rb",
|
60
|
+
"lib/wrest/curl/response.rb",
|
61
|
+
"lib/wrest/curl/session.rb",
|
62
|
+
"lib/wrest/exceptions.rb",
|
63
|
+
"lib/wrest/http_shared.rb",
|
64
|
+
"lib/wrest/http_shared/headers.rb",
|
65
|
+
"lib/wrest/http_shared/standard_headers.rb",
|
66
|
+
"lib/wrest/http_shared/standard_tokens.rb",
|
67
|
+
"lib/wrest/native.rb",
|
68
|
+
"lib/wrest/native/connection_factory.rb",
|
69
|
+
"lib/wrest/native/delete.rb",
|
70
|
+
"lib/wrest/native/get.rb",
|
71
|
+
"lib/wrest/native/options.rb",
|
72
|
+
"lib/wrest/native/post.rb",
|
73
|
+
"lib/wrest/native/put.rb",
|
74
|
+
"lib/wrest/native/redirection.rb",
|
75
|
+
"lib/wrest/native/request.rb",
|
76
|
+
"lib/wrest/native/response.rb",
|
77
|
+
"lib/wrest/native/session.rb",
|
78
|
+
"lib/wrest/resource.rb",
|
79
|
+
"lib/wrest/resource/base.rb",
|
80
|
+
"lib/wrest/resource/collection.rb",
|
81
|
+
"lib/wrest/resource/state.rb",
|
82
|
+
"lib/wrest/test.rb",
|
83
|
+
"lib/wrest/test/request_patches.rb",
|
84
|
+
"lib/wrest/uri.rb",
|
85
|
+
"lib/wrest/uri_template.rb",
|
86
|
+
"lib/wrest/version.rb",
|
87
|
+
"spec/custom_matchers/custom_matchers.rb",
|
88
|
+
"spec/rcov.opts",
|
89
|
+
"spec/spec.opts",
|
90
|
+
"spec/unit/spec_helper.rb",
|
91
|
+
"spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb",
|
92
|
+
"spec/unit/wrest/components/attributes_container/typecaster_spec.rb",
|
93
|
+
"spec/unit/wrest/components/attributes_container_spec.rb",
|
94
|
+
"spec/unit/wrest/components/mutators/base_spec.rb",
|
95
|
+
"spec/unit/wrest/components/mutators/camel_to_snake_spec.rb",
|
96
|
+
"spec/unit/wrest/components/mutators/xml_mini_type_caster_spec.rb",
|
97
|
+
"spec/unit/wrest/components/mutators/xml_simple_type_caster_spec.rb",
|
98
|
+
"spec/unit/wrest/components/mutators_spec.rb",
|
99
|
+
"spec/unit/wrest/components/translators/xml_spec.rb",
|
100
|
+
"spec/unit/wrest/components/translators_spec.rb",
|
101
|
+
"spec/unit/wrest/core_ext/hash/conversions_spec.rb",
|
102
|
+
"spec/unit/wrest/core_ext/string/conversions_spec.rb",
|
103
|
+
"spec/unit/wrest/curl/request_spec.rb",
|
104
|
+
"spec/unit/wrest/curl/response_spec.rb",
|
105
|
+
"spec/unit/wrest/http/response_spec.rb",
|
106
|
+
"spec/unit/wrest/native/redirection_spec.rb",
|
107
|
+
"spec/unit/wrest/native/request_spec.rb",
|
108
|
+
"spec/unit/wrest/native/response_spec.rb",
|
109
|
+
"spec/unit/wrest/native/session_spec.rb",
|
110
|
+
"spec/unit/wrest/resource/base_spec.rb",
|
111
|
+
"spec/unit/wrest/uri_spec.rb",
|
112
|
+
"spec/unit/wrest/uri_template_spec.rb",
|
113
|
+
"wrest.gemspec"
|
114
|
+
]
|
115
|
+
s.homepage = %q{http://github.com/kaiwren/wrest}
|
116
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
117
|
+
s.require_paths = ["lib"]
|
118
|
+
s.rubyforge_project = %q{wrest}
|
119
|
+
s.rubygems_version = %q{1.3.5}
|
120
|
+
s.summary = %q{REST client library for Ruby.}
|
121
|
+
s.test_files = [
|
122
|
+
"spec/custom_matchers/custom_matchers.rb",
|
123
|
+
"spec/unit/spec_helper.rb",
|
124
|
+
"spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb",
|
125
|
+
"spec/unit/wrest/components/attributes_container/typecaster_spec.rb",
|
126
|
+
"spec/unit/wrest/components/attributes_container_spec.rb",
|
127
|
+
"spec/unit/wrest/components/mutators/base_spec.rb",
|
128
|
+
"spec/unit/wrest/components/mutators/camel_to_snake_spec.rb",
|
129
|
+
"spec/unit/wrest/components/mutators/xml_mini_type_caster_spec.rb",
|
130
|
+
"spec/unit/wrest/components/mutators/xml_simple_type_caster_spec.rb",
|
131
|
+
"spec/unit/wrest/components/mutators_spec.rb",
|
132
|
+
"spec/unit/wrest/components/translators/xml_spec.rb",
|
133
|
+
"spec/unit/wrest/components/translators_spec.rb",
|
134
|
+
"spec/unit/wrest/core_ext/hash/conversions_spec.rb",
|
135
|
+
"spec/unit/wrest/core_ext/string/conversions_spec.rb",
|
136
|
+
"spec/unit/wrest/curl/request_spec.rb",
|
137
|
+
"spec/unit/wrest/curl/response_spec.rb",
|
138
|
+
"spec/unit/wrest/http/response_spec.rb",
|
139
|
+
"spec/unit/wrest/native/redirection_spec.rb",
|
140
|
+
"spec/unit/wrest/native/request_spec.rb",
|
141
|
+
"spec/unit/wrest/native/response_spec.rb",
|
142
|
+
"spec/unit/wrest/native/session_spec.rb",
|
143
|
+
"spec/unit/wrest/resource/base_spec.rb",
|
144
|
+
"spec/unit/wrest/uri_spec.rb",
|
145
|
+
"spec/unit/wrest/uri_template_spec.rb"
|
146
|
+
]
|
147
|
+
|
148
|
+
if s.respond_to? :specification_version then
|
149
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
150
|
+
s.specification_version = 3
|
151
|
+
|
152
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
153
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
|
154
|
+
s.add_runtime_dependency(%q<json>, [">= 1.1.3"])
|
155
|
+
else
|
156
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
157
|
+
s.add_dependency(%q<json>, [">= 1.1.3"])
|
158
|
+
end
|
159
|
+
else
|
160
|
+
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
161
|
+
s.add_dependency(%q<json>, [">= 1.1.3"])
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sidu Ponnappa
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-21 00:00:00 +05:30
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.3.
|
23
|
+
version: 2.3.5
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.1.3
|
34
34
|
version:
|
35
|
-
description: Wrest is a REST client library which allows you to quickly build object oriented wrappers around any web service.
|
35
|
+
description: Wrest is a HTTP and REST client library which allows you to quickly build well encapsulated, object oriented wrappers around any web service.
|
36
36
|
email: ckponnappa@gmail.com
|
37
37
|
executables:
|
38
38
|
- wrest
|
@@ -42,6 +42,7 @@ extensions: []
|
|
42
42
|
extra_rdoc_files:
|
43
43
|
- README.rdoc
|
44
44
|
files:
|
45
|
+
- CHANGELOG
|
45
46
|
- README.rdoc
|
46
47
|
- Rakefile
|
47
48
|
- VERSION.yml
|
@@ -49,15 +50,18 @@ files:
|
|
49
50
|
- bin/wrest
|
50
51
|
- bin/wrest_shell.rb
|
51
52
|
- examples/delicious.rb
|
53
|
+
- examples/facebook.rb
|
54
|
+
- examples/keep_alive.rb
|
52
55
|
- examples/redirection.rb
|
53
56
|
- examples/twitter.rb
|
54
57
|
- examples/twitter_public_timeline.rb
|
55
58
|
- examples/wow_realm_status.rb
|
59
|
+
- init.rb
|
56
60
|
- lib/wrest.rb
|
57
61
|
- lib/wrest/components.rb
|
58
|
-
- lib/wrest/components/
|
59
|
-
- lib/wrest/components/
|
60
|
-
- lib/wrest/components/
|
62
|
+
- lib/wrest/components/container.rb
|
63
|
+
- lib/wrest/components/container/alias_accessors.rb
|
64
|
+
- lib/wrest/components/container/typecaster.rb
|
61
65
|
- lib/wrest/components/mutators.rb
|
62
66
|
- lib/wrest/components/mutators/base.rb
|
63
67
|
- lib/wrest/components/mutators/camel_to_snake_case.rb
|
@@ -71,109 +75,41 @@ files:
|
|
71
75
|
- lib/wrest/core_ext/hash/conversions.rb
|
72
76
|
- lib/wrest/core_ext/string.rb
|
73
77
|
- lib/wrest/core_ext/string/conversions.rb
|
78
|
+
- lib/wrest/curl.rb
|
79
|
+
- lib/wrest/curl/delete.rb
|
80
|
+
- lib/wrest/curl/get.rb
|
81
|
+
- lib/wrest/curl/options.rb
|
82
|
+
- lib/wrest/curl/post.rb
|
83
|
+
- lib/wrest/curl/put.rb
|
84
|
+
- lib/wrest/curl/request.rb
|
85
|
+
- lib/wrest/curl/response.rb
|
86
|
+
- lib/wrest/curl/session.rb
|
74
87
|
- lib/wrest/exceptions.rb
|
75
|
-
- lib/wrest/
|
76
|
-
- lib/wrest/
|
77
|
-
- lib/wrest/
|
78
|
-
- lib/wrest/
|
79
|
-
- lib/wrest/
|
80
|
-
- lib/wrest/
|
81
|
-
- lib/wrest/
|
82
|
-
- lib/wrest/
|
83
|
-
- lib/wrest/
|
88
|
+
- lib/wrest/http_shared.rb
|
89
|
+
- lib/wrest/http_shared/headers.rb
|
90
|
+
- lib/wrest/http_shared/standard_headers.rb
|
91
|
+
- lib/wrest/http_shared/standard_tokens.rb
|
92
|
+
- lib/wrest/native.rb
|
93
|
+
- lib/wrest/native/connection_factory.rb
|
94
|
+
- lib/wrest/native/delete.rb
|
95
|
+
- lib/wrest/native/get.rb
|
96
|
+
- lib/wrest/native/options.rb
|
97
|
+
- lib/wrest/native/post.rb
|
98
|
+
- lib/wrest/native/put.rb
|
99
|
+
- lib/wrest/native/redirection.rb
|
100
|
+
- lib/wrest/native/request.rb
|
101
|
+
- lib/wrest/native/response.rb
|
102
|
+
- lib/wrest/native/session.rb
|
84
103
|
- lib/wrest/resource.rb
|
85
104
|
- lib/wrest/resource/base.rb
|
86
105
|
- lib/wrest/resource/collection.rb
|
87
106
|
- lib/wrest/resource/state.rb
|
107
|
+
- lib/wrest/test.rb
|
108
|
+
- lib/wrest/test/request_patches.rb
|
88
109
|
- lib/wrest/uri.rb
|
89
110
|
- lib/wrest/uri_template.rb
|
90
111
|
- lib/wrest/version.rb
|
91
112
|
- spec/custom_matchers/custom_matchers.rb
|
92
|
-
- spec/functional/sample_rails_app/README
|
93
|
-
- spec/functional/sample_rails_app/Rakefile
|
94
|
-
- spec/functional/sample_rails_app/app/controllers/application_controller.rb
|
95
|
-
- spec/functional/sample_rails_app/app/controllers/lead_bottles_controller.rb
|
96
|
-
- spec/functional/sample_rails_app/app/helpers/application_helper.rb
|
97
|
-
- spec/functional/sample_rails_app/app/models/bottle.rb
|
98
|
-
- spec/functional/sample_rails_app/app/models/glass_bottle.rb
|
99
|
-
- spec/functional/sample_rails_app/app/models/lead_bottle.rb
|
100
|
-
- spec/functional/sample_rails_app/config/boot.rb
|
101
|
-
- spec/functional/sample_rails_app/config/database.yml
|
102
|
-
- spec/functional/sample_rails_app/config/environment.rb
|
103
|
-
- spec/functional/sample_rails_app/config/environments/development.rb
|
104
|
-
- spec/functional/sample_rails_app/config/environments/production.rb
|
105
|
-
- spec/functional/sample_rails_app/config/environments/test.rb
|
106
|
-
- spec/functional/sample_rails_app/config/initializers/backtrace_silencers.rb
|
107
|
-
- spec/functional/sample_rails_app/config/initializers/inflections.rb
|
108
|
-
- spec/functional/sample_rails_app/config/initializers/mime_types.rb
|
109
|
-
- spec/functional/sample_rails_app/config/initializers/new_rails_defaults.rb
|
110
|
-
- spec/functional/sample_rails_app/config/initializers/session_store.rb
|
111
|
-
- spec/functional/sample_rails_app/config/locales/en.yml
|
112
|
-
- spec/functional/sample_rails_app/config/routes.rb
|
113
|
-
- spec/functional/sample_rails_app/db/development.sqlite3
|
114
|
-
- spec/functional/sample_rails_app/db/migrate/20090319115628_create_bottle.rb
|
115
|
-
- spec/functional/sample_rails_app/db/schema.rb
|
116
|
-
- spec/functional/sample_rails_app/db/test.sqlite3
|
117
|
-
- spec/functional/sample_rails_app/log/development.log
|
118
|
-
- spec/functional/sample_rails_app/public/404.html
|
119
|
-
- spec/functional/sample_rails_app/public/422.html
|
120
|
-
- spec/functional/sample_rails_app/public/500.html
|
121
|
-
- spec/functional/sample_rails_app/public/favicon.ico
|
122
|
-
- spec/functional/sample_rails_app/public/images/rails.png
|
123
|
-
- spec/functional/sample_rails_app/public/index.html
|
124
|
-
- spec/functional/sample_rails_app/public/robots.txt
|
125
|
-
- spec/functional/sample_rails_app/script/about
|
126
|
-
- spec/functional/sample_rails_app/script/autospec
|
127
|
-
- spec/functional/sample_rails_app/script/console
|
128
|
-
- spec/functional/sample_rails_app/script/dbconsole
|
129
|
-
- spec/functional/sample_rails_app/script/destroy
|
130
|
-
- spec/functional/sample_rails_app/script/generate
|
131
|
-
- spec/functional/sample_rails_app/script/performance/benchmarker
|
132
|
-
- spec/functional/sample_rails_app/script/performance/profiler
|
133
|
-
- spec/functional/sample_rails_app/script/plugin
|
134
|
-
- spec/functional/sample_rails_app/script/runner
|
135
|
-
- spec/functional/sample_rails_app/script/server
|
136
|
-
- spec/functional/sample_rails_app/script/spec
|
137
|
-
- spec/functional/sample_rails_app/script/spec_server
|
138
|
-
- spec/functional/sample_rails_app/test/performance/browsing_test.rb
|
139
|
-
- spec/functional/sample_rails_app/test/test_helper.rb
|
140
|
-
- spec/functional/sample_rails_app/tmtags
|
141
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/MIT-LICENSE
|
142
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/README.rdoc
|
143
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/Rakefile
|
144
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/init.rb
|
145
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/install.rb
|
146
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full.rb
|
147
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/base.rb
|
148
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources.rb
|
149
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources_controller.rb
|
150
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/routes_controller.rb
|
151
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/api.rb
|
152
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/exception.rb
|
153
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/from_json.rb
|
154
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/dispatch.rb
|
155
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/models/resourced_route.rb
|
156
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/query.rb
|
157
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render.rb
|
158
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/html.rb
|
159
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/json.rb
|
160
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/xml.rb
|
161
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/retrieve.rb
|
162
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/version.rb
|
163
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/base_spec.rb
|
164
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/controllers/resources_spec.rb
|
165
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/dispatch_spec.rb
|
166
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/models/resourced_route_spec.rb
|
167
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query/parameter_spec.rb
|
168
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query_spec.rb
|
169
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/html_spec.rb
|
170
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/json_spec.rb
|
171
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/xml_spec.rb
|
172
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render_spec.rb
|
173
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/retrieve_spec.rb
|
174
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/spec_helper.rb
|
175
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/uninstall.rb
|
176
|
-
- spec/functional/spec_helper.rb
|
177
113
|
- spec/rcov.opts
|
178
114
|
- spec/spec.opts
|
179
115
|
- spec/unit/spec_helper.rb
|
@@ -189,12 +125,17 @@ files:
|
|
189
125
|
- spec/unit/wrest/components/translators_spec.rb
|
190
126
|
- spec/unit/wrest/core_ext/hash/conversions_spec.rb
|
191
127
|
- spec/unit/wrest/core_ext/string/conversions_spec.rb
|
192
|
-
- spec/unit/wrest/
|
193
|
-
- spec/unit/wrest/
|
128
|
+
- spec/unit/wrest/curl/request_spec.rb
|
129
|
+
- spec/unit/wrest/curl/response_spec.rb
|
194
130
|
- spec/unit/wrest/http/response_spec.rb
|
131
|
+
- spec/unit/wrest/native/redirection_spec.rb
|
132
|
+
- spec/unit/wrest/native/request_spec.rb
|
133
|
+
- spec/unit/wrest/native/response_spec.rb
|
134
|
+
- spec/unit/wrest/native/session_spec.rb
|
195
135
|
- spec/unit/wrest/resource/base_spec.rb
|
196
136
|
- spec/unit/wrest/uri_spec.rb
|
197
137
|
- spec/unit/wrest/uri_template_spec.rb
|
138
|
+
- wrest.gemspec
|
198
139
|
has_rdoc: true
|
199
140
|
homepage: http://github.com/kaiwren/wrest
|
200
141
|
licenses: []
|
@@ -219,66 +160,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
160
|
requirements: []
|
220
161
|
|
221
162
|
rubyforge_project: wrest
|
222
|
-
rubygems_version: 1.3.
|
163
|
+
rubygems_version: 1.3.5
|
223
164
|
signing_key:
|
224
165
|
specification_version: 3
|
225
166
|
summary: REST client library for Ruby.
|
226
167
|
test_files:
|
227
168
|
- spec/custom_matchers/custom_matchers.rb
|
228
|
-
- spec/functional/sample_rails_app/app/controllers/application_controller.rb
|
229
|
-
- spec/functional/sample_rails_app/app/controllers/lead_bottles_controller.rb
|
230
|
-
- spec/functional/sample_rails_app/app/helpers/application_helper.rb
|
231
|
-
- spec/functional/sample_rails_app/app/models/bottle.rb
|
232
|
-
- spec/functional/sample_rails_app/app/models/glass_bottle.rb
|
233
|
-
- spec/functional/sample_rails_app/app/models/lead_bottle.rb
|
234
|
-
- spec/functional/sample_rails_app/config/boot.rb
|
235
|
-
- spec/functional/sample_rails_app/config/environment.rb
|
236
|
-
- spec/functional/sample_rails_app/config/environments/development.rb
|
237
|
-
- spec/functional/sample_rails_app/config/environments/production.rb
|
238
|
-
- spec/functional/sample_rails_app/config/environments/test.rb
|
239
|
-
- spec/functional/sample_rails_app/config/initializers/backtrace_silencers.rb
|
240
|
-
- spec/functional/sample_rails_app/config/initializers/inflections.rb
|
241
|
-
- spec/functional/sample_rails_app/config/initializers/mime_types.rb
|
242
|
-
- spec/functional/sample_rails_app/config/initializers/new_rails_defaults.rb
|
243
|
-
- spec/functional/sample_rails_app/config/initializers/session_store.rb
|
244
|
-
- spec/functional/sample_rails_app/config/routes.rb
|
245
|
-
- spec/functional/sample_rails_app/db/migrate/20090319115628_create_bottle.rb
|
246
|
-
- spec/functional/sample_rails_app/db/schema.rb
|
247
|
-
- spec/functional/sample_rails_app/test/performance/browsing_test.rb
|
248
|
-
- spec/functional/sample_rails_app/test/test_helper.rb
|
249
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/init.rb
|
250
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/install.rb
|
251
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/base.rb
|
252
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources.rb
|
253
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/resources_controller.rb
|
254
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/controllers/routes_controller.rb
|
255
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/api.rb
|
256
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/exception.rb
|
257
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/core_extensions/from_json.rb
|
258
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/dispatch.rb
|
259
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/models/resourced_route.rb
|
260
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/query.rb
|
261
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/html.rb
|
262
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/json.rb
|
263
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render/xml.rb
|
264
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/render.rb
|
265
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/retrieve.rb
|
266
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full/version.rb
|
267
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/lib/resource_full.rb
|
268
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/base_spec.rb
|
269
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/controllers/resources_spec.rb
|
270
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/dispatch_spec.rb
|
271
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/models/resourced_route_spec.rb
|
272
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query/parameter_spec.rb
|
273
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/query_spec.rb
|
274
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/html_spec.rb
|
275
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/json_spec.rb
|
276
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render/xml_spec.rb
|
277
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/render_spec.rb
|
278
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/resource_full/retrieve_spec.rb
|
279
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/spec/spec_helper.rb
|
280
|
-
- spec/functional/sample_rails_app/vendor/plugins/resource_full/uninstall.rb
|
281
|
-
- spec/functional/spec_helper.rb
|
282
169
|
- spec/unit/spec_helper.rb
|
283
170
|
- spec/unit/wrest/components/attributes_container/alias_accessors_spec.rb
|
284
171
|
- spec/unit/wrest/components/attributes_container/typecaster_spec.rb
|
@@ -292,14 +179,13 @@ test_files:
|
|
292
179
|
- spec/unit/wrest/components/translators_spec.rb
|
293
180
|
- spec/unit/wrest/core_ext/hash/conversions_spec.rb
|
294
181
|
- spec/unit/wrest/core_ext/string/conversions_spec.rb
|
295
|
-
- spec/unit/wrest/
|
296
|
-
- spec/unit/wrest/
|
182
|
+
- spec/unit/wrest/curl/request_spec.rb
|
183
|
+
- spec/unit/wrest/curl/response_spec.rb
|
297
184
|
- spec/unit/wrest/http/response_spec.rb
|
185
|
+
- spec/unit/wrest/native/redirection_spec.rb
|
186
|
+
- spec/unit/wrest/native/request_spec.rb
|
187
|
+
- spec/unit/wrest/native/response_spec.rb
|
188
|
+
- spec/unit/wrest/native/session_spec.rb
|
298
189
|
- spec/unit/wrest/resource/base_spec.rb
|
299
190
|
- spec/unit/wrest/uri_spec.rb
|
300
191
|
- spec/unit/wrest/uri_template_spec.rb
|
301
|
-
- examples/delicious.rb
|
302
|
-
- examples/redirection.rb
|
303
|
-
- examples/twitter.rb
|
304
|
-
- examples/twitter_public_timeline.rb
|
305
|
-
- examples/wow_realm_status.rb
|
data/lib/wrest/http.rb
DELETED
@@ -1,25 +0,0 @@
|
|
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 #:nodoc:
|
11
|
-
|
12
|
-
# Contains all HTTP protocol related classes such as
|
13
|
-
# Get, Post, Request, Response etc.
|
14
|
-
module Http
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
require "#{WREST_ROOT}/wrest/http/response"
|
19
|
-
require "#{WREST_ROOT}/wrest/http/redirection"
|
20
|
-
require "#{WREST_ROOT}/wrest/http/request"
|
21
|
-
require "#{WREST_ROOT}/wrest/http/get"
|
22
|
-
require "#{WREST_ROOT}/wrest/http/put"
|
23
|
-
require "#{WREST_ROOT}/wrest/http/post"
|
24
|
-
require "#{WREST_ROOT}/wrest/http/delete"
|
25
|
-
require "#{WREST_ROOT}/wrest/http/options"
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
-
|
4
|
-
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
5
|
-
|
6
|
-
require 'rake'
|
7
|
-
require 'rake/testtask'
|
8
|
-
require 'rake/rdoctask'
|
9
|
-
|
10
|
-
require 'tasks/rails'
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Filters added to this controller apply to all controllers in the application.
|
2
|
-
# Likewise, all the methods added will be available for all controllers.
|
3
|
-
|
4
|
-
class ApplicationController < ActionController::Base
|
5
|
-
helper :all # include all helpers, all the time
|
6
|
-
# protect_from_forgery # See ActionController::RequestForgeryProtection for details
|
7
|
-
# session :off
|
8
|
-
# Scrub sensitive parameters from your log
|
9
|
-
# filter_parameter_logging :password
|
10
|
-
end
|