Merge pull request #15806 from EricFromCanada/repology-api-url

utils/repology: update API URL
This commit is contained in:
Mike McQuaid 2023-08-02 14:37:40 +01:00 committed by GitHub
commit 5183103d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -21,7 +21,7 @@ module Kernel
Context.current.verbose?
end
title = Tty.truncate(title) if $stdout.tty? && !verbose
title = Tty.truncate(title.to_s) if $stdout.tty? && !verbose
Formatter.headline(title, color: :blue)
end
@ -50,7 +50,7 @@ module Kernel
Context.current.verbose?
end
title = Tty.truncate(title) if $stdout.tty? && !verbose && truncate == :auto
title = Tty.truncate(title.to_s) if $stdout.tty? && !verbose && truncate == :auto
Formatter.headline(title, color: :green)
end

View File

@ -29,8 +29,7 @@ module Repology
end
def self.single_package_query(name, repository:)
url = "https://repology.org/tools/project-by?repo=#{repository}&" \
"name_type=srcname&target_page=api_v1_project&name=#{name}"
url = "https://repology.org/api/v1/project/#{name}"
output, errors, = curl_output("--location", "--silent", url.to_s, use_homebrew_curl: !curl_supports_tls13?)