diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 0de9041e06..a265e3bfbb 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2764,6 +2764,7 @@ class Formula #
deprecate! date: "2020-08-27", because: "has been replaced by foo"def deprecate!(date: nil, because: nil) odeprecated "`deprecate!` without a reason", "`deprecate! because: \"reason\"`" if because.blank? + odeprecated "`deprecate!` without a date", "`deprecate! date: \"#{Date.today}\"`" if date.blank? return if date.present? && Date.parse(date) > Date.today @@ -2790,6 +2791,7 @@ class Formula #
disable! date: "2020-08-27", because: "has been replaced by foo"def disable!(date: nil, because: nil) odeprecated "`disable!` without a reason", "`disable! because: \"reason\"`" if because.blank? + odeprecated "`disable!` without a date", "`disable! date: \"#{Date.today}\"`" if date.blank? if date.present? && Date.parse(date) > Date.today @deprecation_reason = because if because.present? diff --git a/Library/Homebrew/test/livecheck/livecheck_spec.rb b/Library/Homebrew/test/livecheck/livecheck_spec.rb index f742c9843a..5873f7ae78 100644 --- a/Library/Homebrew/test/livecheck/livecheck_spec.rb +++ b/Library/Homebrew/test/livecheck/livecheck_spec.rb @@ -25,7 +25,7 @@ describe Homebrew::Livecheck do desc "Deprecated test formula" homepage "https://brew.sh" url "https://brew.sh/test-0.0.1.tgz" - deprecate! because: :unmaintained + deprecate! date: "2020-06-25", because: :unmaintained end end @@ -34,7 +34,7 @@ describe Homebrew::Livecheck do desc "Disabled test formula" homepage "https://brew.sh" url "https://brew.sh/test-0.0.1.tgz" - disable! because: :unmaintained + disable! date: "2020-06-25", because: :unmaintained end end