Sha256: 2397fe09b4a4c19b4636c2ee6c07f85efdbd18f6372177f7c349c4fdcbcd50a0

Contents?: true

Size: 680 Bytes

Versions: 38

Compression:

Stored size: 680 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

38 entries across 38 versions & 2 rubygems

Version Path
dev-2.0.46 lib/commit.rb
dev-2.0.45 lib/commit.rb
dev-2.0.44 lib/commit.rb
dev-2.0.43 lib/commit.rb
dev-2.0.42 lib/commit.rb
dev_commands-0.0.58 lib/commit.rb
dev_commands-0.0.57 lib/commit.rb
dev_commands-0.0.56 lib/commit.rb
dev_commands-0.0.55 lib/commit.rb
dev_commands-0.0.54 lib/commit.rb
dev_commands-0.0.53 lib/commit.rb
dev_commands-0.0.52 lib/commit.rb
dev_commands-0.0.51 lib/commit.rb
dev_commands-0.0.50 lib/commit.rb
dev_commands-0.0.49 lib/commit.rb
dev_commands-0.0.48 lib/commit.rb
dev_commands-0.0.47 lib/commit.rb
dev_commands-0.0.46 lib/commit.rb
dev_commands-0.0.45 lib/commit.rb
dev_commands-0.0.44 lib/commit.rb