From e7d3b2cb3116cdd5354c443b0534e50b26ce6113 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Tue, 22 Jun 2021 00:14:07 -0400 Subject: [PATCH] Sparkle: Move default pub_date value --- Library/Homebrew/livecheck/strategy/sparkle.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/livecheck/strategy/sparkle.rb b/Library/Homebrew/livecheck/strategy/sparkle.rb index 5ba6abc26f..38c2809188 100644 --- a/Library/Homebrew/livecheck/strategy/sparkle.rb +++ b/Library/Homebrew/livecheck/strategy/sparkle.rb @@ -75,7 +75,7 @@ module Homebrew version ||= (item > "version").first&.text&.strip title = (item > "title").first&.text&.strip - pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) } || Time.new(0) + pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) } if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/)) short_version ||= match[1] @@ -88,7 +88,7 @@ module Homebrew data = { title: title, - pub_date: pub_date, + pub_date: pub_date || Time.new(0), url: url, bundle_version: bundle_version, }.compact