aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/compat/sha1.rb9
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