Class: GitCommitAutouser::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/git_commit_autouser/git.rb

Class Method Summary collapse

Class Method Details

.remote?(name) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/git_commit_autouser/git.rb', line 3

def self.remote?(name)
  !!`git remote`.match(/^#{name}$/)
end

.remote_push_url(name) ⇒ Object



7
8
9
# File 'lib/git_commit_autouser/git.rb', line 7

def self.remote_push_url(name)
  `git remote show -n #{name}`.match(/Push  URL: (.+)/)[1]
end