Sha256: 7184a2b516f3881d4b77178ee490cc9e8e5b7cb1017bcceccdb0a9d2ab1fdd79
Contents?: true
Size: 737 Bytes
Versions: 1
Compression:
Stored size: 737 Bytes
Contents
require 'travis/cli' module Travis module CLI class Accounts < ApiCommand description "displays accounts and their subscription status" def run authenticate accounts.each do |account| color = account.subscribed? ? :green : :info say [ color(account.login, [color, :bold]), color("(#{account.name}):", color), account.subscribed? ? "subscribed," : "not subscribed,", account.repos_count == 1 ? "1 repository" : "#{account.repos_count} repositories" ].join(" ") end say session.config['host'], "To set up a subscription, please visit %s." unless accounts.all?(&:subscribed?) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
travis-1.5.3 | lib/travis/cli/accounts.rb |