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.74 lib/commit.rb
dev_tasks-0.0.73 lib/commit.rb
dev_tasks-0.0.72 lib/commit.rb
dev_tasks-0.0.71 lib/commit.rb
dev_tasks-0.0.70 lib/commit.rb
dev_tasks-0.0.69 lib/commit.rb
dev_tasks-0.0.68 lib/commit.rb
dev_tasks-0.0.67 lib/commit.rb
dev_tasks-0.0.66 lib/commit.rb
dev_tasks-0.0.65 lib/commit.rb
dev_tasks-0.0.64 lib/commit.rb
dev_tasks-0.0.63 lib/commit.rb
dev_tasks-0.0.62 lib/commit.rb
dev_tasks-0.0.61 lib/commit.rb
dev_tasks-0.0.60 lib/commit.rb
dev_tasks-0.0.59 lib/commit.rb
dev_tasks-0.0.58 lib/commit.rb
dev_tasks-0.0.57 lib/commit.rb
dev_tasks-0.0.56 lib/commit.rb
dev_tasks-0.0.55 lib/commit.rb