brew style fixes
This commit is contained in:
parent
27ee9cf7b9
commit
0021ed45d0
@ -29,11 +29,11 @@ module Repology
|
||||
def parse_api_response(limit = nil)
|
||||
ohai "Querying outdated packages from Repology"
|
||||
|
||||
page_no = 1
|
||||
page_no = 1
|
||||
outdated_packages = query_api
|
||||
response_size = outdated_packages.size
|
||||
last_package_index = outdated_packages.size - 1
|
||||
max_pagination = limit.nil? ? 15 : (limit.to_f / 200).ceil
|
||||
max_pagination = limit.nil? ? 15 : (limit.to_f / 200).ceil
|
||||
|
||||
while response_size > 1 && page_no <= max_pagination
|
||||
odebug "Paginating Repology API page: #{page_no}"
|
||||
@ -44,7 +44,7 @@ module Repology
|
||||
outdated_packages.merge!(response)
|
||||
last_package_index = outdated_packages.size - 1
|
||||
end
|
||||
|
||||
|
||||
outdated_packages = outdated_packages.first(limit) if outdated_packages.size > limit
|
||||
|
||||
puts "#{outdated_packages.size} outdated #{"package".pluralize(outdated_packages.size)} found"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user