aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMike McQuaid2015-07-08 14:22:44 +0100
committerMike McQuaid2015-07-08 14:53:48 +0100
commit51a1792e7ad4946940089a68112af783faa8a16c (patch)
tree7896fc9637f4686f874b8fbbe37cdcd25335a47e /Library/Homebrew/utils.rb
parent48df76dc894370f902b02bf495a8b2c0dc021823 (diff)
downloadbrew-51a1792e7ad4946940089a68112af783faa8a16c.tar.bz2
Audit GitHub repository notability.
This stuff seems to be taken better when coming from a script rather than from a human. Feel free to disagree about the specific numbers chosen here.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 19b74a3cd..85aef283e 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -399,6 +399,10 @@ module GitHub extend self
open(uri) { |json| json["items"] }
end
+ def repository(user, repo)
+ open(URI.parse("https://api.github.com/repos/#{user}/#{repo}")) { |j| j }
+ end
+
def build_query_string(query, qualifiers)
s = "q=#{uri_escape(query)}+"
s << build_search_qualifier_string(qualifiers)