aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions/cmd/brew-ls-taps.rb
blob: 40cf0cafe32a23abe054614a0f7ff5bf33012f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'utils/json'

GitHub.open "https://api.github.com/legacy/repos/search/homebrew" do |f|
  Utils::JSON.load(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