lib/sailthru.rb in sailthru-client-1.03 vs lib/sailthru.rb in sailthru-client-1.04
- old
+ new
@@ -1,15 +1,15 @@
require 'net/http'
require 'uri'
require 'cgi'
require 'rubygems'
require 'json'
-require 'md5'
+require 'digest/md5'
module Sailthru
- Version = VERSION = '1.03'
+ Version = VERSION = '1.04'
class SailthruClientException < Exception
end
module Helpers
@@ -55,11 +55,11 @@
# returns:
# String
#
# Returns an MD5 hash of the signature string for an API call.
def get_signature_hash(params, secret)
- MD5.md5(get_signature_string(params, secret)).to_s # debuggin
+ Digest::MD5.hexdigest(get_signature_string(params, secret)).to_s
end
# Flatten nested hash for GET / POST request.
def flatten_nested_hash(hash, brackets = true)
@@ -671,6 +671,6 @@
else
raise SailthruClientException.new("No response received from stream: #{_uri.to_s}")
end
end
end
-end
\ No newline at end of file
+end