lib/travis/cli/whatsup.rb in travis-1.11.1 vs lib/travis/cli/whatsup.rb in travis-1.12.0
- old
+ new
@@ -1,30 +1,32 @@
+# frozen_string_literal: true
+
require 'travis/cli'
module Travis
module CLI
class Whatsup < ApiCommand
- description "lists most recent builds"
+ description 'lists most recent builds'
on('-m', '--my-repos', 'Only display my own repositories')
def run
- say "nothing to show" if recent.empty?
+ say 'nothing to show' if recent.empty?
recent.each do |repo|
say [
color(repo.slug, [:bold, repo.color]),
color("#{repo.last_build.state}: ##{repo.last_build.number}", repo.color)
- ].join(" ")
+ ].join(' ')
end
end
private
- def recent
- @recent ||= begin
- recent = my_repos ? repos : repos(:member => user.login)
- recent.select { |repo| repo.last_build }
- end
+ def recent
+ @recent ||= begin
+ recent = my_repos ? repos : repos(member: user.login)
+ recent.select { |repo| repo.last_build }
end
+ end
end
end
end