Skip to content

Commit

Permalink
[core] use Excon :persistent option
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian D. Burns committed Dec 16, 2013
1 parent 4c9bcab commit 80b4845
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fog.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
3 changes: 1 addition & 2 deletions lib/fog/core/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def initialize(url, persistent=false, params={})
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
Expand All @@ -53,7 +53,6 @@ def initialize(url, persistent=false, params={})
# @raise [Excon::Errors::SocketError]
#
def request(params, &block)
reset unless @persistent
@excon.request(params, &block)
end

Expand Down

0 comments on commit 80b4845

Please sign in to comment.