Class: Gem::Release::Context::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/gem/release/context/git.rb

Instance Method Summary collapse

Instance Method Details

#clean?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/gem/release/context/git.rb', line 5

def clean?
  system 'git update-index -q --really-refresh && git diff-index --quiet HEAD'
end

#remotesObject



9
10
11
# File 'lib/gem/release/context/git.rb', line 9

def remotes
  `git remote`.split("\n")
end

#tagsObject



13
14
15
# File 'lib/gem/release/context/git.rb', line 13

def tags
  `git tag`.split("\n")
end

#user_emailObject



22
23
24
25
# File 'lib/gem/release/context/git.rb', line 22

def user_email
  str = `git config --get user.email`.strip
  str unless str.empty?
end

#user_loginObject



27
28
29
30
# File 'lib/gem/release/context/git.rb', line 27

def 
  str = `git config --get github.user`.strip
  str.empty? ? user_name : str
end

#user_nameObject



17
18
19
20
# File 'lib/gem/release/context/git.rb', line 17

def user_name
  str = `git config --get user.name`.strip
  str unless str.empty?
end