Fixed handling options[:persistent] in some cases

Removed useless
@persistent = options[:persistent]  || true

It prevented @persistent from being set to `false`
This commit is contained in:
Alexander Kolesen 2012-06-21 14:56:46 +03:00
parent a9acf510bd
commit fcc4db6a1d
6 changed files with 6 additions and 6 deletions

View File

@ -88,7 +88,7 @@ module Fog
@hmac = Fog::HMAC.new('sha1', @aws_secret_access_key)
@host = options[:host] || 'cloudfront.amazonaws.com'
@path = options[:path] || '/'
@persistent = options[:persistent] || true
@persistent = options.fetch(:persistent, true)
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'
@version = options[:version] || '2010-11-01'

View File

@ -90,7 +90,7 @@ module Fog
@hmac = Fog::HMAC.new('sha1', @aws_secret_access_key)
@host = options[:host] || 'route53.amazonaws.com'
@path = options[:path] || '/'
@persistent = options[:persistent].nil? || options[:persistent]
@persistent = options.fetch(:persistent, true)
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'
@version = options[:version] || '2012-02-29'

View File

@ -271,7 +271,7 @@ module Fog
"s3-#{options[:region]}.amazonaws.com"
end
@path = options[:path] || '/'
@persistent = options[:persistent] || true
@persistent = options.fetch(:persistent, true)
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'
end

View File

@ -85,7 +85,7 @@ module Fog
@dnsmadeeasy_secret_key = options[:dnsmadeeasy_secret_key]
@connection_options = options[:connection_options] || {}
@host = options[:host] || 'api.dnsmadeeasy.com'
@persistent = options[:persistent] || true
@persistent = options.fetch(:persistent, true)
@port = options[:port] || 80 #443 Not yet
@scheme = options[:scheme] || 'http' #'https Not yet
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)

View File

@ -192,7 +192,7 @@ module Fog
@connection_options = options[:connection_options] || {}
@hmac = Fog::HMAC.new('sha1', @google_storage_secret_access_key)
@host = options[:host] || 'commondatastorage.googleapis.com'
@persistent = options[:persistent] || true
@persistent = options.fetch(:persistent, true)
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)

View File

@ -54,7 +54,7 @@ module Fog
@connection_options = options[:connection_options] || {}
@hmac = Fog::HMAC.new('sha1', @ninefold_storage_secret_decoded)
@persistent = options[:persistent] || true
@persistent = options.fetch(:persistent, true)
@connection = Fog::Connection.new("#{Fog::Storage::Ninefold::STORAGE_SCHEME}://#{Fog::Storage::Ninefold::STORAGE_HOST}:#{Fog::Storage::Ninefold::STORAGE_PORT}", @persistent, @connection_options)
end