livecheck: update default match_data

This updates these strategies to better align with the default
`match_data` value in other strategies.
This commit is contained in:
Sam Ford 2022-06-09 15:33:42 -04:00
parent 492ac6f771
commit 590aabe9d7
No known key found for this signature in database
GPG Key ID: 7AF5CBEE1DD6F76D
3 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ module Homebrew
raise ArgumentError, "#{T.must(name).demodulize} only supports a regex when using a `strategy` block"
end
match_data = { matches: {}, url: url }
match_data = { matches: {}, regex: regex, url: url }
match_data.merge!(Strategy.page_content(url))
content = match_data.delete(:content)

View File

@ -96,7 +96,7 @@ module Homebrew
end
raise ArgumentError, "The #{T.must(name).demodulize} strategy only supports casks." unless T.unsafe(cask)
match_data = { matches: {} }
match_data = { matches: {}, regex: regex }
unversioned_cask_checker = UnversionedCaskChecker.new(cask)
items = unversioned_cask_checker.all_versions.transform_values { |v| Item.new(bundle_version: v) }

View File

@ -199,7 +199,7 @@ module Homebrew
raise ArgumentError, "#{T.must(name).demodulize} only supports a regex when using a `strategy` block"
end
match_data = { matches: {}, url: url }
match_data = { matches: {}, regex: regex, url: url }
match_data.merge!(Strategy.page_content(url))
content = match_data.delete(:content)