lib/travis/cli/whatsup.rb in travis-1.3.0 vs lib/travis/cli/whatsup.rb in travis-1.3.1

- old
+ new

@@ -1,16 +1,25 @@ require 'travis/cli' module Travis module CLI class Whatsup < ApiCommand + on('-m', '--my-repos') + def run - repos.each do |repo| + recent.each do |repo| say [ color(repo.slug, [:bold, repo.color]), color("#{repo.last_build.state}: ##{repo.last_build.number}", repo.color) ].join(" ") end end + + private + + def recent + return repos unless my_repos + repos(:member => user.login) + end end end end