Class: Travis::CLI::RepoCommand
- Inherits:
-
ApiCommand
- Object
- Command
- ApiCommand
- Travis::CLI::RepoCommand
- Defined in:
- lib/travis/cli/repo_command.rb
Direct Known Subclasses
Constant Summary collapse
- GIT_REGEX =
%r{Fetch URL: (?:https://|git://|git@)github\.com[:/](.*/.+?)(\.git)?$}
Instance Attribute Summary collapse
-
#slug ⇒ Object
Returns the value of attribute slug.
Attributes inherited from ApiCommand
Attributes inherited from Command
#arguments, #config, #force_interactive, #terminal
Instance Method Summary collapse
Methods inherited from ApiCommand
#authenticate, #endpoint_config, #initialize, #org?, #pro?
Methods included from Travis::Client::Methods
#access_token, #access_token=, #api_endpoint, #api_endpoint=, #explicit_api_endpoint?, #github_auth, #repo, #repos, #user
Methods inherited from Command
abstract, abstract?, command_name, #command_name, #execute, #help, #initialize, #input, #input=, #output, #output=, #parse, #say, skip, #usage, #write_to
Methods included from Parser
Constructor Details
This class inherits a constructor from Travis::CLI::ApiCommand
Instance Attribute Details
#slug ⇒ Object
Returns the value of attribute slug.
9 10 11 |
# File 'lib/travis/cli/repo_command.rb', line 9 def slug @slug end |
Instance Method Details
#repository ⇒ Object
18 19 20 21 22 |
# File 'lib/travis/cli/repo_command.rb', line 18 def repository repo(slug) rescue Travis::Client::NotFound error "repository not known to travis: #{color(slug, :important)}" end |
#setup ⇒ Object
12 13 14 15 16 |
# File 'lib/travis/cli/repo_command.rb', line 12 def setup error "Can't figure out GitHub repo name. Are you in the right directory?" unless self.slug ||= find_slug self.api_endpoint = detect_api_endpoint super end |