module Feature
Base module for all features
Public Instance Methods
changes_committed?()
click to toggle source
# File lib/straight_line/common/feature.rb, line 17 def changes_committed? cmd = Command.new 'git' cmd.arg 'status' out = cmd.run out =~ /nothing to commit/ end
current_feature()
click to toggle source
# File lib/straight_line/common/feature.rb, line 4 def current_feature res = Command.new('git') .arg('branch') .run .match(/^\*\s+(.*)/)[1].strip if res =~ /no branch/ raise UserError, 'A rebase is in process. Finish the rebase, then run the command again' else res end end