Class: Travis::CLI::Branches
- Inherits:
-
RepoCommand
- Object
- Command
- ApiCommand
- RepoCommand
- Travis::CLI::Branches
- Defined in:
- lib/travis/cli/branches.rb
Constant Summary
Constants inherited from RepoCommand
RepoCommand::GIT_REGEX, RepoCommand::TRAVIS
Constants inherited from Command
Command::DAY, Command::HOUR, Command::MINUTE, Command::WEEK
Constants included from Tools::Assets
Instance Attribute Summary
Attributes inherited from RepoCommand
Attributes inherited from ApiCommand
Attributes inherited from Command
#arguments, #config, #debug, #force_interactive, #formatter, #input, #output
Instance Method Summary collapse
Methods inherited from RepoCommand
Methods inherited from ApiCommand
#authenticate, #detected_endpoint?, #endpoint_config, #enterprise?, #initialize, #org?, #pro?, #setup, #sync
Methods included from Travis::Client::Methods
#access_token, #access_token=, #account, #accounts, #api_endpoint, #api_endpoint=, #artifact, #broadcasts, #build, #cancel, #explicit_api_endpoint?, #github_auth, #hooks, #job, #lint, #listen, #repo, #repos, #restart, #user
Methods inherited from Command
abstract, abstract?, #check_completion, #check_ruby, #check_version, command_name, #command_name, #debug?, description, #execute, #help, #info, #initialize, #last_check, #on_signal, #parse, #say, #setup, skip, subcommands, #terminal, #time, #usage, #usage_for, #write_to
Methods included from Tools::Assets
Methods included from Parser
Constructor Details
This class inherits a constructor from Travis::CLI::ApiCommand
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/travis/cli/branches.rb', line 8 def run repository.last_on_branch.each do |build| say [ color("#{build.branch_info}:".ljust(longest + 2), [:info, :bold]), color("##{build.number.to_s.ljust(4)} #{build.state}".ljust(16), build.color), build.commit.subject ].join(" ").strip + "\n" end end |