Class: GitChange::Util

Inherits:
Object
  • Object
show all
Defined in:
lib/git_change/util.rb

Class Method Summary collapse

Class Method Details

.git_remote_urlObject



4
5
6
7
8
9
10
# File 'lib/git_change/util.rb', line 4

def git_remote_url
  result = `git remote --verbose`
  remote = result.lines.first.split "\s"
  name = remote.shift
  url = remote.shift
  url
end

.user_emailObject



16
17
18
# File 'lib/git_change/util.rb', line 16

def user_email
  `git config user.email`.strip
end

.user_nameObject



12
13
14
# File 'lib/git_change/util.rb', line 12

def user_name
  `git config user.name`.strip
end