From c166ce3f581bda226b8fde4852dcf5775255d713 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 1 Feb 2013 21:53:10 -0600 Subject: [PATCH] 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. --- Library/Homebrew/compat/compatibility.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb index fbd6ad7378..41a811a1ac 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