blob: f6c92ebc0c55f6812ec3c6773dcd4e7bf11c8055 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require 'open-uri'
require 'vendor/multi_json'
begin
open "https://api.github.com/legacy/repos/search/homebrew" do |f|
MultiJson.decode(f.read)["repositories"].each do |repo|
if repo['name'] =~ /^homebrew-(\S+)$/
puts tap = if repo['username'] == "Homebrew"
"homebrew/#{$1}"
else
repo['username']+"/"+$1
end
end
end
end
rescue
nil
end
|