Typhoeus::Response hack moved to hacks.rb, ignoring hacks.rb in coverage

This commit is contained in:
erwanlr
2013-03-22 18:37:28 +01:00
parent d937b20d79
commit e058b204f4
3 changed files with 17 additions and 16 deletions

View File

@@ -1,21 +1,5 @@
# encoding: UTF-8
# HACK
module Typhoeus
class Response
# Compare the body hash to error_404_hash and homepage_hash
# returns true if they are different, false otherwise
#
# @return [ Boolean ]
def has_valid_hash?(error_404_hash, homepage_hash)
body_hash = Digest::MD5.hexdigest(self.body)
body_hash != error_404_hash && body_hash != homepage_hash
end
end
end
class WpItem
module Existable