lib/commit.rb in dev_tasks-0.0.141 vs lib/commit.rb in dev_tasks-0.0.142
- old
+ new
@@ -1,9 +1,9 @@
require_relative('./environment.rb')
class Commit < Array
- def initialize
+ def update
if(Dir.exists?(".git"))
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)
self.add "git commit -a -v -m \"#{File.read('commit.message')}\""
self.add "<%File.open('commit.message','w'){|f|f.write('')}%>"
\ No newline at end of file