lib/commit.rb in dev_commands-0.0.17 vs lib/commit.rb in dev_commands-0.0.18

- old
+ new

@@ -1,15 +1,15 @@ -class Commit < Array - def update - if(File.exists?('.git') && `git config --list`.include?('user.name=')) - if(!`git status`.include?('nothing to commit') && - !`git status`.include?('untracked files present')) - if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0) - add "git commit -a -v -m \"#{File.read('commit.message')}\"" - else - add "git commit -m'all'" - end - add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message') - end - end - end +class Commit < Array + def update + if(File.exists?('.git') && `git config --list`.include?('user.name=')) + if(!`git status`.include?('nothing to commit') && + !`git status`.include?('untracked files present')) + if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0) + add "git commit -a -v -m \"#{File.read('commit.message')}\"" + else + add "git commit -m'all'" + end + add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message') + end + end + end end \ No newline at end of file