Class: Gem::Release::Context::Git
- Inherits:
-
Object
- Object
- Gem::Release::Context::Git
- Defined in:
- lib/gem/release/context/git.rb
Instance Method Summary collapse
- #clean? ⇒ Boolean
- #remotes ⇒ Object
- #tags ⇒ Object
- #user_email ⇒ Object
- #user_login ⇒ Object
- #user_name ⇒ Object
Instance Method Details
#clean? ⇒ 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 |
#remotes ⇒ Object
9 10 11 |
# File 'lib/gem/release/context/git.rb', line 9 def remotes `git remote`.split("\n") end |
#tags ⇒ Object
13 14 15 |
# File 'lib/gem/release/context/git.rb', line 13 def `git tag`.split("\n") end |
#user_email ⇒ Object
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_login ⇒ Object
27 28 29 30 |
# File 'lib/gem/release/context/git.rb', line 27 def user_login str = `git config --get github.user`.strip str.empty? ? user_name : str end |
#user_name ⇒ Object
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 |