aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-02-01 21:53:10 -0600
committerJack Nagel2013-02-01 21:53:11 -0600
commit6fbb1798e6b046376f1b2b7b24e9281d65366dfb (patch)
tree9b5cb67736de114ca7d6c419a7857ae8860b7ea2 /Library
parent65ddad02df95c1d4ba3523e01cd7a23018dd1753 (diff)
downloadhomebrew-6fbb1798e6b046376f1b2b7b24e9281d65366dfb.tar.bz2
Move MD5 deprecation warning into Pathname#md5
This way it will print when the verification takes place, making it a bit more obvious which formula it refers to.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/compat/compatibility.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb
index fbd6ad737..41a811a1a 100644
--- a/Library/Homebrew/compat/compatibility.rb
+++ b/Library/Homebrew/compat/compatibility.rb
@@ -265,10 +265,6 @@ class SoftwareSpec
if val.nil?
@checksum if checksum.nil? or @checksum.hash_type == :md5
else
- 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
@checksum = Checksum.new(:md5, val)
end
end
@@ -277,6 +273,10 @@ 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