lib/ace-client/query2.rb in ace-client-0.0.20 vs lib/ace-client/query2.rb in ace-client-0.0.21

- old
+ new

@@ -102,10 +102,11 @@ digest = OpenSSL::Digest::Digest.new(@signature_method.downcase.gsub(/hmac/, '')) Base64.encode64(OpenSSL::HMAC.digest(digest, secret_access_key, string_to_sign)).strip end def string_to_sign - host = @host_with_port ? @endpoint : @endpoint.gsub(/\:\d+$/, '') + host = @host ? @host : @endpoint + host = @host_with_port ? host : host.gsub(/\:\d+$/, '') [@http_method.to_s.upcase, host, @path, canonical_query_string].join("\n") end def canonical_query_string @params.sort.collect { |param|