lib/fog/google/storage.rb in fog-0.3.31 vs lib/fog/google/storage.rb in fog-0.3.32

- old
+ new

@@ -1,11 +1,11 @@ module Fog module Google class Storage < Fog::Service - requires :google_storage_access_key_id, :google_storage_secret_access_key, &inject_parameter_specs - recognizes :host, :port, :scheme, :persistent, &inject_parameter_specs + requires :google_storage_access_key_id, :google_storage_secret_access_key + recognizes :host, :port, :scheme, :persistent model_path 'fog/google/models/storage' collection :directories model :directory collection :files @@ -55,10 +55,11 @@ params[:headers]['Date'] = expires.to_i query = [params[:query]].compact query << "GoogleAccessKeyId=#{@google_storage_access_key_id}" query << "Signature=#{CGI.escape(signature(params))}" query << "Expires=#{params[:headers]['Date']}" - "http://#{params[:host]}/#{params[:path]}?#{query.join('&')}" + path = CGI.escape(params[:path]).gsub('%2F', '/') + "http://#{params[:host]}/#{path}?#{query.join('&')}" end end class Mock