From aacdaa554cf629b719baaa2461a1ae0b1c0cded4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 16 Jul 2016 22:16:20 +0100 Subject: [PATCH] compat/sha1: cleanup style. --- Library/Homebrew/compat/sha1.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/compat/sha1.rb b/Library/Homebrew/compat/sha1.rb index 9d6fbc6e01..ed931f634e 100644 --- a/Library/Homebrew/compat/sha1.rb +++ b/Library/Homebrew/compat/sha1.rb @@ -1,23 +1,27 @@ class Formula def self.sha1(val) + odeprecated "Formula.sha1", "Formula.sha256" stable.sha1(val) end end class SoftwareSpec def sha1(val) + odeprecated "SoftwareSpec#sha1", "SoftwareSpec#sha256" @resource.sha1(val) end end class Resource def sha1(val) + odeprecated "Resource#sha1", "Resource#sha256" @checksum = Checksum.new(:sha1, val) end end class BottleSpecification def sha1(val) + odeprecated "BottleSpecification#sha1", "BottleSpecification#sha256" digest, tag = val.shift collector[tag] = Checksum.new(:sha1, digest) end @@ -26,10 +30,7 @@ end class Pathname def sha1 require "digest/sha1" - opoo <<-EOS.undent - SHA1 support is deprecated and will be removed in a future version. - Please switch this formula to SHA256. - EOS + odeprecated "Pathname#sha1", "Pathname#sha256" incremental_hash(Digest::SHA1) end end