1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[core] use Excon :persistent option

This commit is contained in:
Brian D. Burns 2013-12-16 17:03:33 -05:00
parent 4c9bcab433
commit 80b4845156
2 changed files with 2 additions and 3 deletions

View file

@ -42,7 +42,7 @@ Gem::Specification.new do |s|
## List your runtime dependencies here. Runtime dependencies are those
## that are needed for an end user to actually USE your code.
s.add_dependency('builder')
s.add_dependency('excon', '~>0.30.0')
s.add_dependency('excon', '~>0.31.0')
s.add_dependency('formatador', '~>0.2.0')
s.add_dependency('multi_json', '~>1.0')
s.add_dependency('mime-types')

View file

@ -30,8 +30,8 @@ module Fog
end
params[:headers] ||= {}
params[:headers]['User-Agent'] ||= "fog/#{Fog::VERSION}"
params.merge!(:persistent => params.fetch(:persistent, persistent))
@excon = Excon.new(url, params)
@persistent = persistent
end
# Makes a request using the connection using Excon
@ -53,7 +53,6 @@ module Fog
# @raise [Excon::Errors::SocketError]
#
def request(params, &block)
reset unless @persistent
@excon.request(params, &block)
end