Don't pass nice_version to block.
This commit is contained in:
parent
d3e2a98136
commit
02849cf3e7
@ -69,20 +69,21 @@ module Homebrew
|
|||||||
data = {
|
data = {
|
||||||
title: (item > "title").first&.text,
|
title: (item > "title").first&.text,
|
||||||
url: enclosure["url"],
|
url: enclosure["url"],
|
||||||
version: short_version || version ? BundleVersion.new(short_version, version) : nil,
|
bundle_version: short_version || version ? BundleVersion.new(short_version, version) : nil,
|
||||||
}.compact
|
}.compact
|
||||||
|
|
||||||
data unless data.empty?
|
data unless data.empty?
|
||||||
end.compact
|
end.compact
|
||||||
|
|
||||||
item = items.max_by { |e| e[:version] }
|
item = items.max_by { |e| e[:bundle_version] }
|
||||||
|
|
||||||
if item
|
if item
|
||||||
match = if block
|
match = if block
|
||||||
item[:version] = item[:version]&.nice_version
|
item[:short_version] = item[:bundle_version]&.short_version
|
||||||
|
item[:version] = item[:bundle_version]&.version
|
||||||
block.call(item).to_s
|
block.call(item).to_s
|
||||||
else
|
else
|
||||||
item[:version]&.nice_version
|
item[:bundle_version]&.nice_version
|
||||||
end
|
end
|
||||||
|
|
||||||
match_data[:matches][match] = Version.new(match) if match
|
match_data[:matches][match] = Version.new(match) if match
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user