lib/straight_line/common/feature.rb in straight_line-0.1.1.0 vs lib/straight_line/common/feature.rb in straight_line-0.1.2.0

- old
+ new

@@ -1,15 +1,15 @@ require 'straight_line/common/command' # Base module for all features module Feature def current_feature res = Command.new('git') - .arg('branch') - .run - .match(/^\*\s+(.*)/)[1].strip - if res.match(/no branch/) - raise UserError, %q(A rebase is in process. - Finish the rebase, then run the command again) + .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