Module: Kamal::Git
Instance Method Summary collapse
- #email ⇒ Object
- #revision ⇒ Object
- #root ⇒ Object
- #uncommitted_changes ⇒ Object
- #used? ⇒ Boolean
- #user_name ⇒ Object
Instance Method Details
#email ⇒ Object
12 13 14 |
# File 'lib/kamal/git.rb', line 12 def email `git config user.email`.strip end |
#revision ⇒ Object
16 17 18 |
# File 'lib/kamal/git.rb', line 16 def revision `git rev-parse HEAD`.strip end |
#root ⇒ Object
24 25 26 |
# File 'lib/kamal/git.rb', line 24 def root `git rev-parse --show-toplevel`.strip end |
#uncommitted_changes ⇒ Object
20 21 22 |
# File 'lib/kamal/git.rb', line 20 def uncommitted_changes `git status --porcelain`.strip end |
#used? ⇒ Boolean
4 5 6 |
# File 'lib/kamal/git.rb', line 4 def used? system("git rev-parse") end |
#user_name ⇒ Object
8 9 10 |
# File 'lib/kamal/git.rb', line 8 def user_name `git config user.name`.strip end |