Skip to content

Commit

Permalink
Merge pull request #17863 from samford/livecheck/remove-unused-from_u…
Browse files Browse the repository at this point in the history
…rl-param
  • Loading branch information
MikeMcQuaid committed Jul 25, 2024
2 parents c49238c + 0a2e966 commit bdee21b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions Library/Homebrew/livecheck/livecheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ def latest_version(
strategies = Strategy.from_url(
url,
livecheck_strategy:,
url_provided: livecheck_url.present?,
regex_provided: livecheck_regex.present?,
block_provided: livecheck_strategy_block.present?,
)
Expand Down Expand Up @@ -930,7 +929,6 @@ def resource_version(
strategies = Strategy.from_url(
url,
livecheck_strategy:,
url_provided: livecheck_url.present?,
regex_provided: livecheck_regex.present?,
block_provided: livecheck_strategy_block.present?,
)
Expand Down
5 changes: 1 addition & 4 deletions Library/Homebrew/livecheck/strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ def from_symbol(symbol)
# @param url [String] the URL to check for matching strategies
# @param livecheck_strategy [Symbol] a strategy symbol from the
# `livecheck` block
# @param url_provided [Boolean] whether a url is provided in the
# `livecheck` block
# @param regex_provided [Boolean] whether a regex is provided in the
# `livecheck` block
# @param block_provided [Boolean] whether a `strategy` block is provided
Expand All @@ -136,12 +134,11 @@ def from_symbol(symbol)
params(
url: String,
livecheck_strategy: T.nilable(Symbol),
url_provided: T::Boolean,
regex_provided: T::Boolean,
block_provided: T::Boolean,
).returns(T::Array[T.untyped])
}
def from_url(url, livecheck_strategy: nil, url_provided: false, regex_provided: false, block_provided: false)
def from_url(url, livecheck_strategy: nil, regex_provided: false, block_provided: false)
usable_strategies = strategies.select do |strategy_symbol, strategy|
if strategy == PageMatch
# Only treat the strategy as usable if the `livecheck` block
Expand Down

0 comments on commit bdee21b

Please sign in to comment.