From 1bd2be5e047ce7b1e2b68b48b1b2c6c2539cd89d Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Sat, 19 Dec 2020 00:21:29 -0500 Subject: [PATCH] Rename page_contents to page_content --- Library/Homebrew/livecheck/strategy.rb | 6 +++--- Library/Homebrew/livecheck/strategy/page_match.rb | 2 +- Library/Homebrew/livecheck/strategy/sparkle.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/livecheck/strategy.rb b/Library/Homebrew/livecheck/strategy.rb index 5dd94e4111..78d85acacf 100644 --- a/Library/Homebrew/livecheck/strategy.rb +++ b/Library/Homebrew/livecheck/strategy.rb @@ -110,9 +110,9 @@ module Homebrew headers end - def self.page_contents(url) - @page_contents ||= {} - @page_contents[url] ||= URI.parse(url).open.read + def self.page_content(url) + @page_content ||= {} + @page_content[url] ||= URI.parse(url).open.read end end end diff --git a/Library/Homebrew/livecheck/strategy/page_match.rb b/Library/Homebrew/livecheck/strategy/page_match.rb index e739f2a839..361cf04b97 100644 --- a/Library/Homebrew/livecheck/strategy/page_match.rb +++ b/Library/Homebrew/livecheck/strategy/page_match.rb @@ -47,7 +47,7 @@ module Homebrew # content # @return [Array] def self.page_matches(url, regex, &block) - page = Strategy.page_contents(url) + page = Strategy.page_content(url) if block case (value = block.call(page)) diff --git a/Library/Homebrew/livecheck/strategy/sparkle.rb b/Library/Homebrew/livecheck/strategy/sparkle.rb index ea4903732b..24b27c738f 100644 --- a/Library/Homebrew/livecheck/strategy/sparkle.rb +++ b/Library/Homebrew/livecheck/strategy/sparkle.rb @@ -23,7 +23,7 @@ module Homebrew match_data = { matches: {}, regex: regex, url: url } - contents = Strategy.page_contents(url) + contents = Strategy.page_content(url) if (item = item_from_content(contents)) match = if block