Switch Faraday adapter to typhoeus
It uses curl which has less problems connecting to a missconfigured IPv6 host (falls back to v4)
This commit is contained in:
parent
c225bb17ce
commit
9c88fde821
2 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,13 @@
|
|||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
# Use net_http in test, that's better supported by webmock
|
||||
unless Rails.env.test?
|
||||
require 'typhoeus/adapters/faraday'
|
||||
Faraday.default_adapter = :typhoeus
|
||||
end
|
||||
|
||||
options = {
|
||||
request: {
|
||||
timeout: 25
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ describe Diaspora::Fetcher::Public do
|
|||
|
||||
stub_request(:get, /remote-testpod.net\/people\/.*/)
|
||||
.with(headers: {
|
||||
'Accept'=>'application/json',
|
||||
'Accept'=>'application/json',
|
||||
'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
||||
'User-Agent'=>'diaspora-fetcher'
|
||||
}).to_return(:body => @fixture)
|
||||
|
|
|
|||
Loading…
Reference in a new issue