some whitespace stuff

This commit is contained in:
rick 2010-10-05 11:39:13 -07:00
parent 647c8fe6e1
commit 176c647bdf
2 changed files with 4 additions and 3 deletions

View File

@ -16,13 +16,13 @@ module Faraday
def call(env)
super
hydra = env[:parallel_manager] || self.class.setup_parallel_manager
req = ::Typhoeus::Request.new env[:url].to_s,
:method => env[:method],
:body => env[:body],
:headers => env[:request_headers],
:disable_ssl_peer_verification => (env[:ssl][:verify] == false)
env_req = env[:request]
req.timeout = req.connect_timeout = (env_req[:timeout] * 1000) if env_req[:timeout]
req.connect_timeout = (env_req[:open_timeout] * 1000) if env_req[:open_timeout]
@ -35,6 +35,7 @@ module Faraday
env[:response].finish(env)
end
hydra = env[:parallel_manager] || self.class.setup_parallel_manager
hydra.queue req
if !env[:parallel_manager]

View File

@ -104,7 +104,7 @@ if Faraday::TestCase::LIVE_SERVER
assert !connection.in_parallel?
assert_equal 'hello world', connection.get('hello_world').body
end
define_method "test_#{adapter}_async_requests_uses_parallel_manager_to_run_multiple_json_requests" do
resp1, resp2 = nil, nil