Class: Pod::Command::Repo
- Inherits:
-
Pod::Command
- Object
- CLAide::Command
- Pod::Command
- Pod::Command::Repo
- Extended by:
- Executable
- Defined in:
- lib/cocoapods/command/repo.rb,
lib/cocoapods/command/repo/push.rb
Defined Under Namespace
Classes: Add, Lint, List, Push, Remove, Update
Instance Method Summary collapse
-
#branch_name ⇒ String
Returns the branch name (i.e. master).
-
#branch_remote_name(branch_name) ⇒ String
Returns the branch remote name (i.e. origin).
- #dir ⇒ Object
-
#url_of_git_repo(remote_name) ⇒ String
Returns the url of the given remote name (i.e. [email protected]:CocoaPods/Specs.git).
Methods included from Executable
Methods inherited from Pod::Command
#initialize, options, parse, report_error, run, verify_git_version!
Methods included from Pod::Config::Mixin
Constructor Details
This class inherits a constructor from Pod::Command
Instance Method Details
#branch_name ⇒ String
Returns the branch name (i.e. master).
294 295 296 |
# File 'lib/cocoapods/command/repo.rb', line 294 def branch_name `git name-rev --name-only HEAD`.strip end |
#branch_remote_name(branch_name) ⇒ String
Returns the branch remote name (i.e. origin).
305 306 307 |
# File 'lib/cocoapods/command/repo.rb', line 305 def branch_remote_name(branch_name) `git config branch.#{branch_name}.remote`.strip end |
#dir ⇒ Object
286 287 288 |
# File 'lib/cocoapods/command/repo.rb', line 286 def dir config.repos_dir + @name end |
#url_of_git_repo(remote_name) ⇒ String
Returns the url of the given remote name (i.e. [email protected]:CocoaPods/Specs.git).
317 318 319 |
# File 'lib/cocoapods/command/repo.rb', line 317 def url_of_git_repo(remote_name) `git config remote.#{remote_name}.url`.strip end |