diff options
Diffstat (limited to 'Library/Contributions/cmd/brew-ls-taps.rb')
| -rwxr-xr-x | Library/Contributions/cmd/brew-ls-taps.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Contributions/cmd/brew-ls-taps.rb b/Library/Contributions/cmd/brew-ls-taps.rb new file mode 100755 index 000000000..f6c92ebc0 --- /dev/null +++ b/Library/Contributions/cmd/brew-ls-taps.rb @@ -0,0 +1,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 |
