Run rubocop on tree to catch all of the offenses being missed previously by the rubocop-chromebrew issue (#11521)

This commit is contained in:
Maximilian Downey Twiss
2025-03-13 07:38:56 +11:00
committed by GitHub
parent bf80b761a4
commit cc0d8f61c7
20 changed files with 37 additions and 44 deletions

View File

@@ -42,7 +42,7 @@ def get_anitya_id(name, homepage)
elsif number_of_packages.zero? # Anitya either doesn't have this package, or has it under a different name.
# If it has it under a different name, check if it has the name used by Chromebrew.
json2 = JSON.parse(Net::HTTP.get(URI("https://release-monitoring.org/api/v2/packages/?name=#{name.tr('-', '_')}")))
return if (json2['total_items']).zero?
return if json2['total_items'].zero?
(0..json2['total_items'] - 1).each do |i|
next unless json2['items'][i]['distribution'] == 'Chromebrew'