@@ -15,26 +15,30 @@ module Repology
15
15
MAX_PAGINATION = 15
16
16
private_constant :MAX_PAGINATION
17
17
18
- def query_api ( last_package_in_response = "" , repository :)
19
- last_package_in_response += "/" if last_package_in_response . present?
20
- url = "https://repology.org/api/v1/projects/#{ last_package_in_response } ?inrepo=#{ repository } &outdated=1"
21
-
22
- output , _errors , _status = curl_output ( url . to_s )
23
- JSON . parse ( output )
18
+ def query_api ( _last_package_in_response = "" , repository :)
19
+ { }
20
+ # TODO: uncomment (and remove lines above) when we have a fix for Repology
21
+ # `curl` issues
22
+ # last_package_in_response += "/" if last_package_in_response.present?
23
+ # url = "https://repology.org/api/v1/projects/#{last_package_in_response}?inrepo=#{repository}&outdated=1"
24
+
25
+ # output, _errors, _status = curl_output(url.to_s)
26
+ # JSON.parse(output)
24
27
end
25
28
26
29
def single_package_query ( name , repository :)
27
- url = "https://repology.org/tools/project-by?repo=#{ repository } &" \
28
- "name_type=srcname&target_page=api_v1_project&name=#{ name } "
29
-
30
- output , _errors , _status = curl_output ( "--location" , url . to_s )
31
-
32
- begin
33
- data = JSON . parse ( output )
34
- { name => data }
35
- rescue
36
- nil
37
- end
30
+ # TODO: uncomment when we have a fix for Repology `curl` issues
31
+ # url = "https://repology.org/tools/project-by?repo=#{repository}&" \
32
+ # "name_type=srcname&target_page=api_v1_project&name=#{name}"
33
+
34
+ # output, _errors, _status = curl_output("--location", url.to_s)
35
+
36
+ # begin
37
+ # data = JSON.parse(output)
38
+ # { name => data }
39
+ # rescue
40
+ # nil
41
+ # end
38
42
end
39
43
40
44
def parse_api_response ( limit = nil , repository :)
0 commit comments