blob: 55383f0c1438d16cf0342c911a9716dfc4676eb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
class Formula
def self.md5(val)
@stable ||= create_spec(SoftwareSpec)
@stable.md5(val)
end
end
class SoftwareSpec
def md5(val)
@resource.md5(val)
end
end
class Resource
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
|