Expand documentation comments

This commit is contained in:
Sam Ford 2022-06-09 15:38:02 -04:00
parent 590aabe9d7
commit d600b662e2
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D
3 changed files with 17 additions and 7 deletions

View File

@ -4,8 +4,8 @@
module Homebrew
module Livecheck
module Strategy
# The {ElectronBuilder} strategy fetches content at a URL and parses
# it as an electron-builder appcast in YAML format.
# The {ElectronBuilder} strategy fetches content at a URL and parses it
# as an electron-builder appcast in YAML format.
#
# This strategy is not applied automatically and it's necessary to use
# `strategy :electron_builder` in a `livecheck` block to apply it.
@ -35,6 +35,7 @@ module Homebrew
# Parses YAML text and identifies versions in it.
#
# @param content [String] the YAML text to parse and check
# @param regex [Regexp, nil] a regex for use in a strategy block
# @return [Array]
sig {
params(

View File

@ -58,6 +58,7 @@ module Homebrew
# {UnversionedCaskChecker} version information.
#
# @param items [Hash] a hash of `Item`s containing version information
# @param regex [Regexp, nil] a regex for use in a strategy block
# @return [Array]
sig {
params(
@ -81,6 +82,7 @@ module Homebrew
# versions from `plist` files.
#
# @param cask [Cask::Cask] the cask to check for version information
# @param regex [Regexp, nil] a regex for use in a strategy block
# @return [Hash]
sig {
params(

View File

@ -6,8 +6,8 @@ require "bundle_version"
module Homebrew
module Livecheck
module Strategy
# The {Sparkle} strategy fetches content at a URL and parses
# it as a Sparkle appcast in XML format.
# The {Sparkle} strategy fetches content at a URL and parses it as a
# Sparkle appcast in XML format.
#
# This strategy is not applied automatically and it's necessary to use
# `strategy :sparkle` in a `livecheck` block to apply it.
@ -60,7 +60,7 @@ module Homebrew
delegate nice_version: :bundle_version
end
# Identify version information from a Sparkle appcast.
# Identifies version information from a Sparkle appcast.
#
# @param content [String] the text of the Sparkle appcast
# @return [Item, nil]
@ -152,9 +152,12 @@ module Homebrew
end.compact
end
# Identify versions from content
# Uses `#items_from_content` to identify versions from the Sparkle
# appcast content or, if a block is provided, passes the content to
# the block to handle matching.
#
# @param content [String] the content to pull version information from
# @param content [String] the content to check
# @param regex [Regexp, nil] a regex for use in a strategy block
# @return [Array]
sig {
params(
@ -186,6 +189,10 @@ module Homebrew
end
# Checks the content at the URL for new versions.
#
# @param url [String] the URL of the content to check
# @param regex [Regexp, nil] a regex for use in a strategy block
# @return [Hash]
sig {
params(
url: String,