Permalink
Browse files

refs #10283, RightAws issue #78, NameError: uninitialized constant Ri…

…ghtAws::RightAwsBaseInterface::MD5
  • Loading branch information...
1 parent a6a9c2a commit 09d656312eab2c8638b50330f182094e6d7c158c @konstantin-dzreev konstantin-dzreev committed Jun 29, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −2 lib/awsbase/right_awsbase.rb
  2. +0 −1 test/awsbase/test_right_awsbase.rb
  3. +0 −1 test/ec2/test_right_ec2.rb
@@ -24,7 +24,6 @@
# Test
module RightAws
require 'digest/md5'
- require 'pp'
class AwsUtils #:nodoc:
@@digest1 = OpenSSL::Digest::Digest.new("sha1")
@@ -337,7 +336,8 @@ def cache_hits?(function, response, do_raise=:raise)
# get rid of requestId (this bad boy was added for API 2008-08-08+ and it is uniq for every response)
# feb 04, 2009 (load balancer uses 'RequestId' hence use 'i' modifier to hit it also)
response = response.sub(%r{<requestId>.+?</requestId>}i, '')
- response_md5 = MD5.md5(response).to_s
+ # this should work for both ruby 1.8.x and 1.9.x
+ response_md5 = Digest::MD5::new.update(response).to_s
# check for changes
unless @cache[function] && @cache[function][:response_md5] == response_md5
# well, the response is new, reset cache data
@@ -1,5 +1,4 @@
require File.dirname(__FILE__) + '/test_helper.rb'
-require 'pp'
class TestAwsbase < Test::Unit::TestCase
@@ -1,5 +1,4 @@
require File.dirname(__FILE__) + '/test_helper.rb'
-require 'pp'
class TestEc2 < Test::Unit::TestCase

0 comments on commit 09d6563

Please sign in to comment.