From 0a766350b5c11acda90a539ad0b242637f3791d9 Mon Sep 17 00:00:00 2001 From: Seeker Date: Wed, 2 Sep 2020 12:39:30 -0700 Subject: [PATCH] Fix :cask_url and allow :appcast --- Library/Homebrew/livecheck.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/livecheck.rb b/Library/Homebrew/livecheck.rb index 4900726ff1..52cd8a8dbb 100644 --- a/Library/Homebrew/livecheck.rb +++ b/Library/Homebrew/livecheck.rb @@ -81,8 +81,7 @@ class Livecheck # Sets the `@url` instance variable to the provided argument or returns the # `@url` instance variable when no argument is provided. The argument can be # a `String` (a URL) or a supported `Symbol` corresponding to a URL in the - # formula/cask (e.g. `:stable`, `:homepage`, or `:head`). - # + # formula/cask (e.g. `:stable`, `:homepage`, `:head`, `:cask_url`, `:appcast`). # @param val [String, Symbol] URL to check for version information # @return [String, nil] def url(val = nil) @@ -90,7 +89,9 @@ class Livecheck when nil return @url when :cask_url - @formula_or_cask.url + @formula_or_cask.url.to_s + when :appcast + @formula_or_cask.appcast.to_s when :head, :stable @formula_or_cask.send(val).url when :homepage