Skip to content
Snippets Groups Projects
Commit 0021ed45 authored by Baffour Adu Boampong's avatar Baffour Adu Boampong
Browse files

brew style fixes

parent 27ee9cf7
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment