2013-05-10 23:27:28 -05:00

24 lines
469 B
Ruby

class Formula
def self.md5(val)
@stable ||= SoftwareSpec.new
@stable.md5(val)
end
end
class SoftwareSpec
def md5(val)
@checksum = Checksum.new(:md5, val)
end
end
class Pathname
def md5
require 'digest/md5'
opoo <<-EOS.undent
MD5 support is deprecated and will be removed in a future version.
Please switch this formula to #{Checksum::TYPES.map { |t| t.to_s.upcase } * ' or '}.
EOS
incremental_hash(Digest::MD5)
end
end