From 590aabe9d7d8d383c2be013e16e5fdf83942d584 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Thu, 9 Jun 2022 15:33:42 -0400 Subject: [PATCH] livecheck: update default match_data This updates these strategies to better align with the default `match_data` value in other strategies. --- Library/Homebrew/livecheck/strategy/electron_builder.rb | 2 +- Library/Homebrew/livecheck/strategy/extract_plist.rb | 2 +- Library/Homebrew/livecheck/strategy/sparkle.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/livecheck/strategy/electron_builder.rb b/Library/Homebrew/livecheck/strategy/electron_builder.rb index f33f692052..4b8bdc3273 100644 --- a/Library/Homebrew/livecheck/strategy/electron_builder.rb +++ b/Library/Homebrew/livecheck/strategy/electron_builder.rb @@ -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) diff --git a/Library/Homebrew/livecheck/strategy/extract_plist.rb b/Library/Homebrew/livecheck/strategy/extract_plist.rb index 580d634727..a1593fb840 100644 --- a/Library/Homebrew/livecheck/strategy/extract_plist.rb +++ b/Library/Homebrew/livecheck/strategy/extract_plist.rb @@ -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) } diff --git a/Library/Homebrew/livecheck/strategy/sparkle.rb b/Library/Homebrew/livecheck/strategy/sparkle.rb index f599020f51..26df689d4d 100644 --- a/Library/Homebrew/livecheck/strategy/sparkle.rb +++ b/Library/Homebrew/livecheck/strategy/sparkle.rb @@ -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)