Class: Committer::GitHelper
- Inherits:
-
Object
- Object
- Committer::GitHelper
- Defined in:
- lib/committer/git_helper.rb
Overview
Helper class for git operations
Class Method Summary collapse
Class Method Details
.commit(summary, body = nil) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/committer/git_helper.rb', line 9 def commit(summary, body = nil) if body system('git', 'commit', '-m', summary, '-m', body, '-e') else system('git', 'commit', '-m', summary, '-e') end end |
.repo_root ⇒ Object
17 18 19 |
# File 'lib/committer/git_helper.rb', line 17 def repo_root `git rev-parse --show-toplevel`.strip end |