wrest 1.4.2-universal-java-1.6 → 1.5.0-universal-java-1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +19 -0
- data/README.rdoc +24 -5
- data/bin/rdoc +16 -0
- data/lib/wrest/async_request/event_machine_backend.rb +2 -2
- data/lib/wrest/async_request/thread_backend.rb +2 -2
- data/lib/wrest/async_request.rb +1 -1
- data/lib/wrest/caching.rb +1 -1
- data/lib/wrest/components/container.rb +2 -2
- data/lib/wrest/components/mutators.rb +5 -5
- data/lib/wrest/components/translators/content_types.rb +2 -1
- data/lib/wrest/components/translators/json.rb +9 -1
- data/lib/wrest/components/translators/txt.rb +31 -0
- data/lib/wrest/components/translators/xml.rb +8 -0
- data/lib/wrest/components/translators.rb +4 -3
- data/lib/wrest/components.rb +2 -2
- data/lib/wrest/core_ext/hash.rb +1 -1
- data/lib/wrest/core_ext/string.rb +1 -1
- data/lib/wrest/curl/response.rb +11 -3
- data/lib/wrest/curl.rb +12 -12
- data/lib/wrest/http_shared/standard_headers.rb +1 -0
- data/lib/wrest/http_shared/standard_tokens.rb +1 -0
- data/lib/wrest/http_shared.rb +3 -3
- data/lib/wrest/multipart.rb +0 -2
- data/lib/wrest/native/response.rb +9 -1
- data/lib/wrest/native.rb +10 -10
- data/lib/wrest/test.rb +1 -1
- data/lib/wrest/uri/builders.rb +42 -0
- data/lib/wrest/uri.rb +63 -63
- data/lib/wrest/version.rb +1 -1
- data/lib/wrest/xml_mini.rb +0 -2
- data/lib/wrest.rb +22 -30
- metadata +39 -48
- data/bin/wrest.compiled.rbc +0 -78
- data/bin/wrest_shell.rbc +0 -642
data/lib/wrest/uri.rb
CHANGED
@@ -22,22 +22,38 @@ module Wrest #:nodoc:
|
|
22
22
|
#
|
23
23
|
# You can find examples that use real APIs (like delicious) under the wrest/examples directory.
|
24
24
|
class Uri
|
25
|
-
attr_reader :uri, :username, :password, :uri_string, :uri_path, :query
|
26
|
-
|
27
|
-
#
|
25
|
+
attr_reader :uri, :username, :password, :uri_string, :uri_path, :query, :default_headers
|
26
|
+
|
27
|
+
# Valid tuples for the options are:
|
28
|
+
# :asynchronous_backend => Can currently be set to either Wrest::AsyncRequest::EventMachineBackend.new
|
29
|
+
# or Wrest::AsyncRequest::ThreadBackend.new. Easier to do using Uri#using_em and
|
30
|
+
# Uri#using_threads.
|
31
|
+
# :callback => Accepts a hash where the keys are response codes or ranges of response codes and
|
32
|
+
# the values are the corresponding blocks that will be invoked should the response
|
33
|
+
# code match the key.
|
34
|
+
# :default_headers => Accepts a hash containing a set of default request headers with which the headers
|
35
|
+
# passed to Uri#get, Uri#post etc. are merged. Incoming headers will override the
|
36
|
+
# defaults if there are any clashes. Use this to set cookies or use OAuth2 Authorize
|
37
|
+
# headers. When extending or cloning a Uri, passing in a new set of default_headers
|
38
|
+
# will result in the old set being overridden.
|
39
|
+
# See Wrest::Native::Request for other available options and their default values.
|
28
40
|
def initialize(uri_string, options = {})
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
41
|
+
@options = options.clone
|
42
|
+
@uri_string = uri_string.to_s
|
43
|
+
@uri = URI.parse(@uri_string)
|
44
|
+
uri_scheme = URI.split(@uri_string)
|
45
|
+
@uri_path = uri_scheme[-4].split('?').first || ''
|
46
|
+
@uri_path = (@uri_path.empty? ? '/' : @uri_path)
|
47
|
+
@query = uri_scheme[-2] || ''
|
48
|
+
@username = (@options[:username] ||= @uri.user)
|
49
|
+
@password = (@options[:password] ||= @uri.password)
|
50
|
+
@asynchronous_backend = @options[:asynchronous_backend] || Wrest::AsyncRequest.default_backend
|
51
|
+
@options[:callback] = Callback.new(@options[:callback]) if @options[:callback]
|
52
|
+
@default_headers = @options[:default_headers] || {}
|
39
53
|
end
|
40
54
|
|
55
|
+
# Builds a Wrest::UriTemplate by extending the current URI
|
56
|
+
# with the pattern passed to it.
|
41
57
|
def to_template(pattern)
|
42
58
|
template_pattern = URI.join(uri_string,pattern).to_s
|
43
59
|
UriTemplate.new(template_pattern, @options)
|
@@ -65,7 +81,9 @@ module Wrest #:nodoc:
|
|
65
81
|
# Clones a Uri, building a new instance with exactly the same uri string.
|
66
82
|
# You can however change the Uri options or add new ones.
|
67
83
|
def clone(opts = {})
|
68
|
-
|
84
|
+
merged_options = @options.merge(opts)
|
85
|
+
merged_options[:default_headers] = opts[:default_headers] ? @default_headers.merge(opts[:default_headers]) : {}
|
86
|
+
Uri.new(@uri_string, merged_options)
|
69
87
|
end
|
70
88
|
|
71
89
|
def eql?(other)
|
@@ -88,49 +106,39 @@ module Wrest #:nodoc:
|
|
88
106
|
uri_string
|
89
107
|
end
|
90
108
|
|
91
|
-
|
92
|
-
def
|
93
|
-
options
|
94
|
-
options[:asynchronous_backend] = Wrest::AsyncRequest::ThreadBackend.new
|
95
|
-
Uri.new(uri_string, options)
|
109
|
+
#:nodoc:
|
110
|
+
def build_get(parameters = {}, headers = {}, &block)
|
111
|
+
Http::Get.new(self, parameters, default_headers.merge(headers), block ? @options.merge(:callback_block => block) : @options)
|
96
112
|
end
|
97
|
-
|
98
|
-
|
99
|
-
def
|
100
|
-
options
|
101
|
-
Wrest::AsyncRequest.enable_em
|
102
|
-
options[:asynchronous_backend] = Wrest::AsyncRequest::EventMachineBackend.new
|
103
|
-
Uri.new(uri_string, options)
|
113
|
+
|
114
|
+
#:nodoc:
|
115
|
+
def build_put(body = '', headers = {}, parameters = {}, &block)
|
116
|
+
Http::Put.new(self, body.to_s, default_headers.merge(headers), parameters, block ? @options.merge(:callback_block => block) : @options)
|
104
117
|
end
|
105
|
-
|
106
|
-
|
107
|
-
def
|
108
|
-
options
|
109
|
-
options[:cache_store] = Hash.new
|
110
|
-
Uri.new(uri_string, options)
|
118
|
+
|
119
|
+
#:nodoc:
|
120
|
+
def build_post(body = '', headers = {}, parameters = {}, &block)
|
121
|
+
Http::Post.new(self, body.to_s, default_headers.merge(headers), parameters, block ? @options.merge(:callback_block => block) : @options)
|
111
122
|
end
|
112
123
|
|
113
|
-
|
114
|
-
def
|
115
|
-
|
116
|
-
|
117
|
-
options
|
118
|
-
Uri.new(uri_string, options)
|
124
|
+
#:nodoc:
|
125
|
+
def build_post_form(parameters ={}, headers = {}, &block)
|
126
|
+
headers = default_headers.merge(headers).merge(Wrest::H::ContentType => Wrest::T::FormEncoded)
|
127
|
+
body = parameters.to_query
|
128
|
+
Http::Post.new(self, body, headers, {}, block ? @options.merge(:callback_block => block) : @options)
|
119
129
|
end
|
120
130
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
options[:disable_cache] = true
|
125
|
-
Uri.new(uri_string, options)
|
131
|
+
#:nodoc:
|
132
|
+
def build_delete(parameters = {}, headers = {}, &block)
|
133
|
+
Http::Delete.new(self, parameters, default_headers.merge(headers), block ? @options.merge(:callback_block => block) : @options)
|
126
134
|
end
|
127
|
-
|
135
|
+
|
128
136
|
# Make a GET request to this URI. This is a convenience API
|
129
137
|
# that creates a Wrest::Native::Get, executes it and returns a Wrest::Native::Response.
|
130
138
|
#
|
131
139
|
# Remember to escape all parameter strings if necessary, using URI.escape
|
132
140
|
def get(parameters = {}, headers = {}, &block)
|
133
|
-
|
141
|
+
build_get(parameters, headers, &block).invoke
|
134
142
|
end
|
135
143
|
|
136
144
|
# Make a GET request to this URI. This is a convenience API
|
@@ -141,8 +149,7 @@ module Wrest #:nodoc:
|
|
141
149
|
# Note: get_async does not return a response and the response should be accessed through callbacks.
|
142
150
|
# This implementation of asynchronous get is currently in alpha. Hence, it should not be used in production.
|
143
151
|
def get_async(parameters = {}, headers = {}, &block)
|
144
|
-
|
145
|
-
nil
|
152
|
+
@asynchronous_backend.execute(build_get(parameters, headers, &block))
|
146
153
|
end
|
147
154
|
|
148
155
|
# Make a PUT request to this URI. This is a convenience API
|
@@ -150,7 +157,7 @@ module Wrest #:nodoc:
|
|
150
157
|
#
|
151
158
|
# Remember to escape all parameter strings if necessary, using URI.escape
|
152
159
|
def put(body = '', headers = {}, parameters = {}, &block)
|
153
|
-
|
160
|
+
build_put(body, headers, parameters, &block).invoke
|
154
161
|
end
|
155
162
|
|
156
163
|
# Make a PUT request to this URI. This is a convenience API
|
@@ -161,8 +168,7 @@ module Wrest #:nodoc:
|
|
161
168
|
# Note: put_async does not return a response and the response should be accessed through callbacks.
|
162
169
|
# This implementation of asynchronous put is currently in alpha. Hence, it should not be used in production.
|
163
170
|
def put_async(body = '', headers = {}, parameters = {}, &block)
|
164
|
-
|
165
|
-
nil
|
171
|
+
@asynchronous_backend.execute(build_put(body, headers, parameters, &block))
|
166
172
|
end
|
167
173
|
|
168
174
|
# Makes a POST request to this URI. This is a convenience API
|
@@ -171,7 +177,7 @@ module Wrest #:nodoc:
|
|
171
177
|
#
|
172
178
|
# Remember to escape all parameter strings if necessary, using URI.escape
|
173
179
|
def post(body = '', headers = {}, parameters = {}, &block)
|
174
|
-
|
180
|
+
build_post(body, headers, parameters, &block).invoke
|
175
181
|
end
|
176
182
|
|
177
183
|
# Makes a POST request to this URI. This is a convenience API
|
@@ -183,8 +189,7 @@ module Wrest #:nodoc:
|
|
183
189
|
# Note: post_async does not return a response and the response should be accessed through callbacks.
|
184
190
|
# This implementation of asynchronous post is currently in alpha. Hence, it should not be used in production.
|
185
191
|
def post_async(body = '', headers = {}, parameters = {}, &block)
|
186
|
-
|
187
|
-
nil
|
192
|
+
@asynchronous_backend.execute(build_post(body, headers, parameters, &block))
|
188
193
|
end
|
189
194
|
|
190
195
|
# Makes a POST request to this URI. This is a convenience API
|
@@ -195,9 +200,7 @@ module Wrest #:nodoc:
|
|
195
200
|
# in the body, as well as setting the Content-Type header to
|
196
201
|
# application/x-www-form-urlencoded
|
197
202
|
def post_form(parameters = {}, headers = {}, &block)
|
198
|
-
|
199
|
-
body = parameters.to_query
|
200
|
-
Http::Post.new(self, body, headers, {}, block ? @options.merge(:callback_block => block) : @options).invoke
|
203
|
+
build_post_form(parameters, headers, &block).invoke
|
201
204
|
end
|
202
205
|
|
203
206
|
# Makes a POST request to this URI. This is a convenience API
|
@@ -211,10 +214,7 @@ module Wrest #:nodoc:
|
|
211
214
|
# Note: post_form_async does not return a response and the response should be accessed through callbacks.
|
212
215
|
# This implementation of asynchronous post_form is currently in alpha. Hence, it should not be used in production.
|
213
216
|
def post_form_async(parameters = {}, headers = {}, &block)
|
214
|
-
|
215
|
-
body = parameters.to_query
|
216
|
-
(@options[:asynchronous_backend] || Wrest::AsyncRequest.default_backend).execute(Http::Post.new(self, body, headers, {}, block ? @options.merge(:callback_block => block) : @options))
|
217
|
-
nil
|
217
|
+
@asynchronous_backend.execute(build_post_form(parameters, headers, &block))
|
218
218
|
end
|
219
219
|
|
220
220
|
# Makes a DELETE request to this URI. This is a convenience API
|
@@ -222,7 +222,7 @@ module Wrest #:nodoc:
|
|
222
222
|
#
|
223
223
|
# Remember to escape all parameter strings if necessary, using URI.escape
|
224
224
|
def delete(parameters = {}, headers = {}, &block)
|
225
|
-
|
225
|
+
build_delete(parameters, headers, &block).invoke
|
226
226
|
end
|
227
227
|
|
228
228
|
# Makes a DELETE request to this URI. This is a convenience API
|
@@ -233,8 +233,7 @@ module Wrest #:nodoc:
|
|
233
233
|
# Note: delete_async does not return a response and the response should be accessed through callbacks.
|
234
234
|
# This implementation of asynchronous delete is currently in alpha. Hence, it should not be used in production.
|
235
235
|
def delete_async(parameters = {}, headers = {}, &block)
|
236
|
-
|
237
|
-
nil
|
236
|
+
@asynchronous_backend.execute(build_delete(parameters, headers, &block))
|
238
237
|
end
|
239
238
|
|
240
239
|
# Makes an OPTIONS request to this URI. This is a convenience API
|
@@ -269,5 +268,6 @@ module Wrest #:nodoc:
|
|
269
268
|
end
|
270
269
|
|
271
270
|
include Http::ConnectionFactory
|
271
|
+
include Uri::Builders
|
272
272
|
end
|
273
273
|
end
|
data/lib/wrest/version.rb
CHANGED
data/lib/wrest/xml_mini.rb
CHANGED
data/lib/wrest.rb
CHANGED
@@ -6,9 +6,6 @@
|
|
6
6
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
7
|
# See the License for the specific language governing permissions and limitations under the License.
|
8
8
|
|
9
|
-
require 'rubygems'
|
10
|
-
gem 'activesupport', '~> 3.0'
|
11
|
-
|
12
9
|
require 'net/http'
|
13
10
|
require 'net/https'
|
14
11
|
require 'forwardable'
|
@@ -17,6 +14,7 @@ require 'cgi'
|
|
17
14
|
require 'base64'
|
18
15
|
require 'logger'
|
19
16
|
require 'benchmark'
|
17
|
+
require 'multi_json'
|
20
18
|
require 'active_support'
|
21
19
|
require 'active_support/core_ext/string'
|
22
20
|
require 'active_support/core_ext/hash'
|
@@ -37,7 +35,7 @@ module Wrest
|
|
37
35
|
end
|
38
36
|
|
39
37
|
def self.enable_evented_requests!
|
40
|
-
require "
|
38
|
+
require "wrest/event_machine_backend"
|
41
39
|
end
|
42
40
|
|
43
41
|
# Switch Wrest to using Net::HTTP.
|
@@ -47,7 +45,7 @@ module Wrest
|
|
47
45
|
|
48
46
|
# Switch Wrest to using libcurl.
|
49
47
|
def self.use_curl!
|
50
|
-
require "
|
48
|
+
require "wrest/curl"
|
51
49
|
silence_warnings{ Wrest.const_set('Http', Wrest::Curl) }
|
52
50
|
end
|
53
51
|
end
|
@@ -55,38 +53,32 @@ end
|
|
55
53
|
Wrest.logger = ActiveSupport::BufferedLogger.new(STDOUT)
|
56
54
|
Wrest.logger.level = Logger::DEBUG
|
57
55
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
require "#{Wrest::Root}/wrest/core_ext/string"
|
62
|
-
require "#{Wrest::Root}/wrest/hash_with_case_insensitive_access"
|
56
|
+
require "wrest/core_ext/string"
|
57
|
+
require "wrest/hash_with_case_insensitive_access"
|
63
58
|
|
64
59
|
# Load XmlMini Extensions
|
65
|
-
require "
|
60
|
+
require "wrest/xml_mini"
|
66
61
|
|
67
62
|
# Load Wrest Core
|
68
|
-
require "
|
69
|
-
require "
|
70
|
-
require "
|
71
|
-
require "
|
72
|
-
require "
|
73
|
-
require "
|
74
|
-
|
75
|
-
require "
|
76
|
-
require "
|
63
|
+
require "wrest/version"
|
64
|
+
require "wrest/cache_proxy"
|
65
|
+
require "wrest/http_shared"
|
66
|
+
require "wrest/http_codes"
|
67
|
+
require "wrest/callback"
|
68
|
+
require "wrest/native"
|
69
|
+
|
70
|
+
require "wrest/async_request"
|
71
|
+
require "wrest/async_request/thread_backend"
|
77
72
|
Wrest::AsyncRequest.default_to_threads!
|
78
73
|
|
79
|
-
require "
|
74
|
+
require "wrest/caching"
|
80
75
|
|
81
76
|
# Load Wrest Wrappers
|
82
|
-
require "
|
83
|
-
require "
|
84
|
-
require "
|
85
|
-
require "
|
77
|
+
require "wrest/uri/builders"
|
78
|
+
require "wrest/uri"
|
79
|
+
require "wrest/uri_template"
|
80
|
+
require "wrest/exceptions"
|
81
|
+
require "wrest/components"
|
86
82
|
|
87
83
|
# Load Wrest::Resource
|
88
|
-
# require "
|
89
|
-
|
90
|
-
# if (ENV['RAILS_ENV'] == 'test' || (Kernel.const_defined?(:RAILS_ENV) && (RAILS_ENV == 'test')))
|
91
|
-
# require "#{Wrest::Root}/wrest/test"
|
92
|
-
# end
|
84
|
+
# require "wrest/resource"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: wrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.5.0
|
6
6
|
platform: universal-java-1.6
|
7
7
|
authors:
|
8
8
|
- Sidu Ponnappa
|
@@ -11,108 +11,96 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-
|
15
|
-
default_executable:
|
14
|
+
date: 2011-12-09 00:00:00 Z
|
16
15
|
dependencies:
|
17
16
|
- !ruby/object:Gem::Dependency
|
18
17
|
name: rubyforge
|
19
|
-
|
20
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
21
19
|
none: false
|
22
20
|
requirements:
|
23
21
|
- - ">="
|
24
22
|
- !ruby/object:Gem::Version
|
25
23
|
version: "0"
|
24
|
+
requirement: *id001
|
25
|
+
prerelease: false
|
26
26
|
type: :development
|
27
|
-
version_requirements: *id001
|
28
27
|
- !ruby/object:Gem::Dependency
|
29
28
|
name: rspec
|
30
|
-
|
31
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
29
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
32
30
|
none: false
|
33
31
|
requirements:
|
34
32
|
- - ~>
|
35
33
|
- !ruby/object:Gem::Version
|
36
|
-
version: 2.
|
34
|
+
version: "2.6"
|
35
|
+
requirement: *id002
|
36
|
+
prerelease: false
|
37
37
|
type: :development
|
38
|
-
version_requirements: *id002
|
39
38
|
- !ruby/object:Gem::Dependency
|
40
39
|
name: sinatra
|
41
|
-
|
42
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
40
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
43
41
|
none: false
|
44
42
|
requirements:
|
45
43
|
- - ~>
|
46
44
|
- !ruby/object:Gem::Version
|
47
45
|
version: 1.0.0
|
46
|
+
requirement: *id003
|
47
|
+
prerelease: false
|
48
48
|
type: :development
|
49
|
-
version_requirements: *id003
|
50
49
|
- !ruby/object:Gem::Dependency
|
51
50
|
name: metric_fu
|
52
|
-
|
53
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
51
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
54
52
|
none: false
|
55
53
|
requirements:
|
56
54
|
- - ">="
|
57
55
|
- !ruby/object:Gem::Version
|
58
56
|
version: "0"
|
57
|
+
requirement: *id004
|
58
|
+
prerelease: false
|
59
59
|
type: :development
|
60
|
-
version_requirements: *id004
|
61
60
|
- !ruby/object:Gem::Dependency
|
62
61
|
name: activesupport
|
63
|
-
|
64
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
62
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
65
63
|
none: false
|
66
64
|
requirements:
|
67
65
|
- - ~>
|
68
66
|
- !ruby/object:Gem::Version
|
69
|
-
version: "3
|
67
|
+
version: "3"
|
68
|
+
requirement: *id005
|
69
|
+
prerelease: false
|
70
70
|
type: :runtime
|
71
|
-
version_requirements: *id005
|
72
71
|
- !ruby/object:Gem::Dependency
|
73
72
|
name: builder
|
74
|
-
|
75
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
73
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
76
74
|
none: false
|
77
75
|
requirements:
|
78
|
-
- -
|
76
|
+
- - ">"
|
79
77
|
- !ruby/object:Gem::Version
|
80
78
|
version: "2.0"
|
81
|
-
|
82
|
-
version_requirements: *id006
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: i18n
|
79
|
+
requirement: *id006
|
85
80
|
prerelease: false
|
86
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
|
-
requirements:
|
89
|
-
- - ~>
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: "0.4"
|
92
81
|
type: :runtime
|
93
|
-
version_requirements: *id007
|
94
82
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
96
|
-
|
97
|
-
requirement: &id008 !ruby/object:Gem::Requirement
|
83
|
+
name: multi_json
|
84
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
98
85
|
none: false
|
99
86
|
requirements:
|
100
87
|
- - ~>
|
101
88
|
- !ruby/object:Gem::Version
|
102
|
-
version: "1.
|
89
|
+
version: "1.0"
|
90
|
+
requirement: *id007
|
91
|
+
prerelease: false
|
103
92
|
type: :runtime
|
104
|
-
version_requirements: *id008
|
105
93
|
- !ruby/object:Gem::Dependency
|
106
94
|
name: jruby-openssl
|
107
|
-
|
108
|
-
requirement: &id009 !ruby/object:Gem::Requirement
|
95
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
109
96
|
none: false
|
110
97
|
requirements:
|
111
98
|
- - ~>
|
112
99
|
- !ruby/object:Gem::Version
|
113
100
|
version: "0.7"
|
101
|
+
requirement: *id008
|
102
|
+
prerelease: false
|
114
103
|
type: :runtime
|
115
|
-
version_requirements: *id009
|
116
104
|
description: Wrest is a fluent, easy-to-use, object oriented Ruby HTTP/REST client library with support for RFC2616 HTTP caching, multiple HTTP backends and async calls using EventMachine. It runs on CRuby, JRuby and Rubinius.
|
117
105
|
email:
|
118
106
|
- sidu@c42.in
|
@@ -123,10 +111,9 @@ extensions: []
|
|
123
111
|
extra_rdoc_files:
|
124
112
|
- README.rdoc
|
125
113
|
files:
|
114
|
+
- bin/rdoc
|
126
115
|
- bin/wrest
|
127
|
-
- bin/wrest.compiled.rbc
|
128
116
|
- bin/wrest_shell.rb
|
129
|
-
- bin/wrest_shell.rbc
|
130
117
|
- lib/wrest.rb
|
131
118
|
- lib/wrest_no_ext.rb
|
132
119
|
- lib/wrest/async_request.rb
|
@@ -160,6 +147,7 @@ files:
|
|
160
147
|
- lib/wrest/components/mutators/xml_simple_type_caster.rb
|
161
148
|
- lib/wrest/components/translators/content_types.rb
|
162
149
|
- lib/wrest/components/translators/json.rb
|
150
|
+
- lib/wrest/components/translators/txt.rb
|
163
151
|
- lib/wrest/components/translators/xml.rb
|
164
152
|
- lib/wrest/core_ext/hash.rb
|
165
153
|
- lib/wrest/core_ext/string.rb
|
@@ -191,6 +179,7 @@ files:
|
|
191
179
|
- lib/wrest/native/response.rb
|
192
180
|
- lib/wrest/native/session.rb
|
193
181
|
- lib/wrest/test/request_patches.rb
|
182
|
+
- lib/wrest/uri/builders.rb
|
194
183
|
- lib/wrest/xml_mini/jdom.rb
|
195
184
|
- lib/wrest/xml_mini/libxml.rb
|
196
185
|
- lib/wrest/xml_mini/nokogiri.rb
|
@@ -202,7 +191,6 @@ files:
|
|
202
191
|
- README.rdoc
|
203
192
|
- CHANGELOG
|
204
193
|
- LICENCE
|
205
|
-
has_rdoc: true
|
206
194
|
homepage: http://c42.in/open_source
|
207
195
|
licenses: []
|
208
196
|
|
@@ -216,20 +204,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
216
204
|
requirements:
|
217
205
|
- - ">="
|
218
206
|
- !ruby/object:Gem::Version
|
207
|
+
hash: 2
|
208
|
+
segments:
|
209
|
+
- 0
|
219
210
|
version: "0"
|
220
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
212
|
none: false
|
222
213
|
requirements:
|
223
|
-
- - "
|
214
|
+
- - ">="
|
224
215
|
- !ruby/object:Gem::Version
|
225
|
-
version:
|
216
|
+
version: 1.3.0
|
226
217
|
requirements:
|
227
218
|
- To use Memcached as caching back-end, install the 'dalli' gem.
|
228
219
|
- To use multipart post, install the 'multipart-post' gem.
|
229
220
|
- To use curl as the http engine, install the 'patron' gem. This feature is not available (and should be unneccessary) on jruby.
|
230
221
|
- To use eventmachine as a parallel backend, install the 'eventmachine' gem.
|
231
222
|
rubyforge_project: wrest
|
232
|
-
rubygems_version: 1.
|
223
|
+
rubygems_version: 1.8.9
|
233
224
|
signing_key:
|
234
225
|
specification_version: 3
|
235
226
|
summary: Wrest is a fluent, object oriented HTTP client library for 1.8, 1.9, JRuby and Rubinius.
|
data/bin/wrest.compiled.rbc
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
!RBIX
|
2
|
-
0
|
3
|
-
x
|
4
|
-
M
|
5
|
-
1
|
6
|
-
n
|
7
|
-
n
|
8
|
-
x
|
9
|
-
10
|
10
|
-
__script__
|
11
|
-
i
|
12
|
-
23
|
13
|
-
5
|
14
|
-
45
|
15
|
-
0
|
16
|
-
1
|
17
|
-
65
|
18
|
-
49
|
19
|
-
2
|
20
|
-
0
|
21
|
-
49
|
22
|
-
3
|
23
|
-
1
|
24
|
-
7
|
25
|
-
4
|
26
|
-
64
|
27
|
-
81
|
28
|
-
5
|
29
|
-
47
|
30
|
-
49
|
31
|
-
6
|
32
|
-
1
|
33
|
-
15
|
34
|
-
2
|
35
|
-
11
|
36
|
-
I
|
37
|
-
3
|
38
|
-
I
|
39
|
-
0
|
40
|
-
I
|
41
|
-
0
|
42
|
-
I
|
43
|
-
0
|
44
|
-
n
|
45
|
-
p
|
46
|
-
7
|
47
|
-
x
|
48
|
-
4
|
49
|
-
File
|
50
|
-
n
|
51
|
-
x
|
52
|
-
11
|
53
|
-
active_path
|
54
|
-
x
|
55
|
-
7
|
56
|
-
dirname
|
57
|
-
s
|
58
|
-
15
|
59
|
-
/wrest_shell.rb
|
60
|
-
x
|
61
|
-
1
|
62
|
-
+
|
63
|
-
x
|
64
|
-
4
|
65
|
-
load
|
66
|
-
p
|
67
|
-
3
|
68
|
-
I
|
69
|
-
0
|
70
|
-
I
|
71
|
-
3
|
72
|
-
I
|
73
|
-
17
|
74
|
-
x
|
75
|
-
32
|
76
|
-
/Users/sidu/Work/wrest/bin/wrest
|
77
|
-
p
|
78
|
-
0
|