lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb in brightbox-cli-0.16.0 vs lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb in brightbox-cli-0.17.0

- old
+ new

@@ -74,11 +74,11 @@ def https_url(params, expires) "https://" << host_path_query(params, expires) end def url(params, expires) - Fog::Logger.warning("Fog::Storage::AWS => #url is deprecated, use #https_url instead [light_black](#{caller.first})[/]") + Fog::Logger.deprecation("Fog::Storage::AWS => #url is deprecated, use #https_url instead [light_black](#{caller.first})[/]") https_url(params, expires) end private @@ -197,10 +197,12 @@ 's3-eu-west-1.amazonaws.com' when 'us-east-1' 's3.amazonaws.com' when 'us-west-1' 's3-us-west-1.amazonaws.com' + when 'us-west-2' + 's3-us-west-2.amazonaws.com' else raise ArgumentError, "Unknown region: #{options[:region].inspect}" end @region = options[:region] end @@ -249,11 +251,15 @@ @connection_options = options[:connection_options] || {} @hmac = Fog::HMAC.new('sha1', @aws_secret_access_key) if @endpoint = options[:endpoint] endpoint = URI.parse(@endpoint) @host = endpoint.host - @path = endpoint.path + @path = if endpoint.path.empty? + '/' + else + endpoint.path + end @port = endpoint.port @scheme = endpoint.scheme else options[:region] ||= 'us-east-1' @host = options[:host] || case options[:region] @@ -265,9 +271,11 @@ 's3-eu-west-1.amazonaws.com' when 'us-east-1' 's3.amazonaws.com' when 'us-west-1' 's3-us-west-1.amazonaws.com' + when 'us-west-2' + 's3-us-west-2.amazonaws.com' else raise ArgumentError, "Unknown region: #{options[:region].inspect}" end @path = options[:path] || '/' @persistent = options[:persistent] || true