diff options
| author | Mike McQuaid | 2016-07-16 22:16:20 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-07-29 21:21:29 -0600 |
| commit | aacdaa554cf629b719baaa2461a1ae0b1c0cded4 (patch) | |
| tree | 5e537f8d18106cc54447730f097c3497ba458483 /Library | |
| parent | 3d3620832876f4167cdd5e0313affa3c954ece27 (diff) | |
| download | brew-aacdaa554cf629b719baaa2461a1ae0b1c0cded4.tar.bz2 | |
compat/sha1: cleanup style.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/compat/sha1.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/compat/sha1.rb b/Library/Homebrew/compat/sha1.rb index 9d6fbc6e0..ed931f634 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 |
