Sha256: 0dd72a618d4b584f01426c49cf8111cd23c9d874b2474deb89d01f5976fa6661

Contents?: true

Size: 576 Bytes

Versions: 86

Compression:

Stored size: 576 Bytes

Contents

class Commit < Array

  def initialize
    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('')}%>"
		else
	      self.add 'git commit -a -v -m "commit all"'
		end
	  end
	end
  end

  def add command
    self << command if(!include?(command))
  end
end

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
dev_tasks-0.0.94 lib/commit.rb
dev_tasks-0.0.93 lib/commit.rb
dev_tasks-0.0.92 lib/commit.rb
dev_tasks-0.0.91 lib/commit.rb
dev_tasks-0.0.90 lib/commit.rb
dev_tasks-0.0.89 lib/commit.rb
dev_tasks-0.0.88 lib/commit.rb
dev_tasks-0.0.87 lib/commit.rb
dev_tasks-0.0.86 lib/commit.rb
dev_tasks-0.0.85 lib/commit.rb
dev_tasks-0.0.84 lib/commit.rb
dev_tasks-0.0.83 lib/commit.rb
dev_tasks-0.0.82 lib/commit.rb
dev_tasks-0.0.81 lib/commit.rb
dev_tasks-0.0.80 lib/commit.rb
dev_tasks-0.0.79 lib/commit.rb
dev_tasks-0.0.78 lib/commit.rb
dev_tasks-0.0.77 lib/commit.rb
dev_tasks-0.0.76 lib/commit.rb
dev_tasks-0.0.75 lib/commit.rb