Class: Push2heroku::Git
- Inherits:
-
Object
- Object
- Push2heroku::Git
- Defined in:
- lib/push2heroku/git.rb
Instance Method Summary collapse
Instance Method Details
#current_branch ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/push2heroku/git.rb', line 3 def current_branch result = %x{git branch}.split("\n") if result.empty? raise "It seems your app is not a git repo" else result.select { |b| b =~ /^\*/ }.first.split(" ").last.strip end end |
#current_user ⇒ Object
12 13 14 |
# File 'lib/push2heroku/git.rb', line 12 def current_user `git config user.name`.chop! end |