Class: Util
- Inherits:
-
Object
- Object
- Util
- Defined in:
- lib/push2heroku/util.rb
Class Method Summary collapse
Class Method Details
.hard_push?(base) ⇒ Boolean
3 4 5 6 |
# File 'lib/push2heroku/util.rb', line 3 def self.hard_push?(base) remote_branch_name = "h#{base.branch_name}" base.hard || !remote_branch_exists?(remote_branch_name) end |
.remote_branch_exists?(remote_branch_name) ⇒ Boolean
8 9 10 11 |
# File 'lib/push2heroku/util.rb', line 8 def self.remote_branch_exists?(remote_branch_name) out = `cd #{Rails.root.} && git branch -r` out.include?(remote_branch_name) end |