Sha256: df1aac8b60a93a7f0c35ffe807a15223cbf6709343bc865949a8c555383275d5

Contents?: true

Size: 649 Bytes

Versions: 36

Compression:

Stored size: 649 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
	if(Dir.exists?(".svn"))
	  self.add 'svn commit -m"commit all"'
	end
  end

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

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
dev_tasks-0.0.111 lib/commit.rb
dev_tasks-0.0.110 lib/commit.rb
dev_tasks-0.0.109 lib/commit.rb
dev_tasks-0.0.108 lib/commit.rb
dev_tasks-0.0.107 lib/commit.rb
dev_tasks-0.0.106 lib/commit.rb
dev_tasks-0.0.105 lib/commit.rb
dev_tasks-0.0.104 lib/commit.rb
dev_tasks-0.0.103 lib/commit.rb
dev_tasks-0.0.102 lib/commit.rb
dev_tasks-0.0.101 lib/commit.rb
dev_tasks-0.0.100 lib/commit.rb
dev_tasks-0.0.99 lib/commit.rb
dev_tasks-0.0.98 lib/commit.rb
dev_tasks-0.0.97 lib/commit.rb
dev_tasks-0.0.96 lib/commit.rb