Sha256: 98ca6b776079e8cbb14e05398c1de1b2d137e5c498ec3d9d1dd43ad6f9de8a0d
Contents?: true
Size: 534 Bytes
Versions: 3
Compression:
Stored size: 534 Bytes
Contents
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 =~ /no branch/ raise UserError, 'A rebase is in process. Finish the rebase, then run the command again' else res end end def changes_committed? cmd = Command.new 'git' cmd.arg 'status' out = cmd.run out =~ /nothing to commit/ end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
straight_line-0.1.4.0 | lib/straight_line/common/feature.rb |
straight_line-0.1.3.0 | lib/straight_line/common/feature.rb |
straight_line-0.1.2.0 | lib/straight_line/common/feature.rb |