mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
parent
2f09b7d767
commit
50a570f19e
2 changed files with 6 additions and 2 deletions
|
@ -41,7 +41,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.22.1')
|
||||
s.add_dependency('excon', '~>0.23.0')
|
||||
s.add_dependency('formatador', '~>0.2.0')
|
||||
s.add_dependency('multi_json', '~>1.0')
|
||||
s.add_dependency('mime-types')
|
||||
|
|
|
@ -2,7 +2,11 @@ module Fog
|
|||
class Connection
|
||||
|
||||
def initialize(url, persistent=false, params={})
|
||||
Excon.defaults[:headers]['User-Agent'] ||= "fog/#{Fog::VERSION}"
|
||||
unless params.has_key?(:debug_response)
|
||||
params[:debug_response] = true
|
||||
end
|
||||
params[:headers] ||= {}
|
||||
params[:headers]['User-Agent'] ||= "fog/#{Fog::VERSION}"
|
||||
@excon = Excon.new(url, params)
|
||||
@persistent = persistent
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue