Sha256: fe5c417c5350bc1cf4406efdf8e5b07d10c0c3698d41fba3f8dacb34db635752
Contents?: true
Size: 681 Bytes
Versions: 29
Compression:
Stored size: 681 Bytes
Contents
#require_relative('internet.rb') class Commit < Array def update if(File.exists?('.git') && `git config --list`.include?('user.name=')) 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) add "git commit -a -v -m \"#{File.read('commit.message')}\"" else add "git commit -m'all'" end add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message') end end if(File.exists?('.svn') && Internet.available?) add 'svn commit -m"commit all"' end end end
Version data entries
29 entries across 29 versions & 1 rubygems