class CircleCI::CLI::Runner
Public Class Methods
branch_name()
click to toggle source
# File lib/circleci/cli.rb, line 33 def branch_name repository = Rugged::Repository.new('.') head = repository.head return nil unless head.branch? head.name.sub(%r{\Arefs/heads/}, '') end
project()
click to toggle source
# File lib/circleci/cli.rb, line 24 def project repository = Rugged::Repository.new('.') origin = repository.remotes.find { |r| r.name == 'origin' } regexp = %r{(?:git@|https://)github.com(?::|/)([\w_-]+/[.\w_-]+?)(?:\.git)*$} return Regexp.last_match(1) if origin.url =~ regexp nil end
Public Instance Methods
browse()
click to toggle source
# File lib/circleci/cli.rb, line 98 def browse Command::BrowseCommand.run(options) end
build()
click to toggle source
# File lib/circleci/cli.rb, line 82 def build Command::BuildCommand.run(options) end
builds()
click to toggle source
# File lib/circleci/cli.rb, line 68 def builds Command::BuildsCommand.run(options) end
cancel()
click to toggle source
# File lib/circleci/cli.rb, line 130 def cancel Command::CancelCommand.run(options) end
projects()
click to toggle source
# File lib/circleci/cli.rb, line 45 def projects Command::ProjectsCommand.run(options) end
retry()
click to toggle source
# File lib/circleci/cli.rb, line 115 def retry Command::RetryCommand.run(options) end
version()
click to toggle source
# File lib/circleci/cli.rb, line 163 def version say CircleCI::CLI::VERSION end
watch()
click to toggle source
# File lib/circleci/cli.rb, line 158 def watch Command::WatchCommand.run(options) end