Skip to content

Commit

Permalink
gojek#108 Allow async backends to return whatever they want so that, …
Browse files Browse the repository at this point in the history
…for example, the thread backend allows for Thread#join to be called
  • Loading branch information
kaiwren committed Sep 3, 2011
2 parents 69f3274 + cf68e44 commit c5a4012
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
6 changes: 0 additions & 6 deletions lib/wrest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.

require 'rubygems'

require 'net/http'
require 'net/https'
require 'forwardable'
Expand Down Expand Up @@ -84,7 +82,3 @@ def self.use_curl!

# Load Wrest::Resource
# require "#{Wrest::Root}/wrest/resource"

# if (ENV['RAILS_ENV'] == 'test' || (Kernel.const_defined?(:RAILS_ENV) && (RAILS_ENV == 'test')))
# require "#{Wrest::Root}/wrest/test"
# end
2 changes: 0 additions & 2 deletions lib/wrest/multipart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def post_multipart(parameters = {}, headers = {}, &block)
# This implementation of asynchronous post_multipart is currently in alpha. Hence, it should not be used in production.
def post_multipart_async(parameters = {}, headers = {}, &block)
(@options[:asynchronous_backend] || Wrest::AsyncRequest.default_backend).execute(Http::PostMultipart.new(self, parameters, headers, block ? @options.merge(:callback_block => block) : @options))
nil
end

# Makes a multipart/form-data encoded PUT request to this URI. This is a convenience API
Expand All @@ -66,7 +65,6 @@ def put_multipart(parameters = {}, headers = {}, &block)
# This implementation of asynchronous put_multipart is currently in alpha. Hence, it should not be used in production.
def put_multipart_async(parameters = {}, headers = {}, &block)
(@options[:asynchronous_backend] || Wrest::AsyncRequest.default_backend).execute(Http::PutMultipart.new(self, parameters, headers, block ? @options.merge(:callback_block => block) : @options))
nil
end
end

Expand Down
5 changes: 0 additions & 5 deletions lib/wrest/uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ def get(parameters = {}, headers = {}, &block)
# This implementation of asynchronous get is currently in alpha. Hence, it should not be used in production.
def get_async(parameters = {}, headers = {}, &block)
@asynchronous_backend.execute(build_get(parameters, headers, &block))
nil
end

# Make a PUT request to this URI. This is a convenience API
Expand All @@ -170,7 +169,6 @@ def put(body = '', headers = {}, parameters = {}, &block)
# This implementation of asynchronous put is currently in alpha. Hence, it should not be used in production.
def put_async(body = '', headers = {}, parameters = {}, &block)
@asynchronous_backend.execute(build_put(body, headers, parameters, &block))
nil
end

# Makes a POST request to this URI. This is a convenience API
Expand All @@ -192,7 +190,6 @@ def post(body = '', headers = {}, parameters = {}, &block)
# This implementation of asynchronous post is currently in alpha. Hence, it should not be used in production.
def post_async(body = '', headers = {}, parameters = {}, &block)
@asynchronous_backend.execute(build_post(body, headers, parameters, &block))
nil
end

# Makes a POST request to this URI. This is a convenience API
Expand All @@ -218,7 +215,6 @@ def post_form(parameters = {}, headers = {}, &block)
# This implementation of asynchronous post_form is currently in alpha. Hence, it should not be used in production.
def post_form_async(parameters = {}, headers = {}, &block)
@asynchronous_backend.execute(build_post_form(parameters, headers, &block))
nil
end

# Makes a DELETE request to this URI. This is a convenience API
Expand All @@ -238,7 +234,6 @@ def delete(parameters = {}, headers = {}, &block)
# This implementation of asynchronous delete is currently in alpha. Hence, it should not be used in production.
def delete_async(parameters = {}, headers = {}, &block)
@asynchronous_backend.execute(build_delete(parameters, headers, &block))
nil
end

# Makes an OPTIONS request to this URI. This is a convenience API
Expand Down

0 comments on commit c5a4012

Please sign in to comment.