Fix :cask_url and allow :appcast
This commit is contained in:
parent
6794a78087
commit
0a766350b5
@ -81,8 +81,7 @@ class Livecheck
|
|||||||
# Sets the `@url` instance variable to the provided argument or returns the
|
# Sets the `@url` instance variable to the provided argument or returns the
|
||||||
# `@url` instance variable when no argument is provided. The argument can be
|
# `@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
|
# 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
|
# @param val [String, Symbol] URL to check for version information
|
||||||
# @return [String, nil]
|
# @return [String, nil]
|
||||||
def url(val = nil)
|
def url(val = nil)
|
||||||
@ -90,7 +89,9 @@ class Livecheck
|
|||||||
when nil
|
when nil
|
||||||
return @url
|
return @url
|
||||||
when :cask_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
|
when :head, :stable
|
||||||
@formula_or_cask.send(val).url
|
@formula_or_cask.send(val).url
|
||||||
when :homepage
|
when :homepage
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user