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

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

View file

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

View file

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

View file

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

View file

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

View file

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