lib/travis/cli/requests.rb in travis-1.6.9.travis.458.6 vs lib/travis/cli/requests.rb in travis-1.6.9.travis.461.6

- old
+ new

@@ -2,12 +2,15 @@ module Travis module CLI class Requests < RepoCommand description "lists recent requests" + on '-l', '--limit LIMIT', 'Maximum number requests to display' def run - repository.requests.each do |request| + requests = repository.requests + requests = requests[0, Integer(limit)] if limit + requests.each do |request| style ||= :success if request.accepted? style ||= :error if request.rejected? style ||= :info case request.event_type