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