From 176c647bdf1884a6bff89d0427851347af18b13b Mon Sep 17 00:00:00 2001 From: rick Date: Tue, 5 Oct 2010 11:39:13 -0700 Subject: [PATCH] some whitespace stuff --- lib/faraday/adapter/typhoeus.rb | 5 +++-- test/adapters/live_test.rb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/faraday/adapter/typhoeus.rb b/lib/faraday/adapter/typhoeus.rb index c3369f25..5e71f561 100644 --- a/lib/faraday/adapter/typhoeus.rb +++ b/lib/faraday/adapter/typhoeus.rb @@ -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] diff --git a/test/adapters/live_test.rb b/test/adapters/live_test.rb index 840ddf19..20ac4feb 100644 --- a/test/adapters/live_test.rb +++ b/test/adapters/live_test.rb @@ -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