Sha256: 997bc1ff74b0923ff90da939d43c5536372358f94ceda1622c9b0edd10d4cfa8
Contents?: true
Size: 853 Bytes
Versions: 2
Compression:
Stored size: 853 Bytes
Contents
module Dev module Cmd class Commit < Array def refresh strip_auto_entries File.open('commit.message','w'){|f|f.puts "commit all"} if !File.exists?('commit.message') scm_type = get_default_scm_type if scm_type == "svn" self << "{:cmd=>'svn commit -F commit.message',:auto=>true}" else if scm_type == "git" self << "{:cmd=>'git commit -a -F commit.message',:auto=>true}" self << "{:cmd=>'git svn dcommit',:auto=>true}" end end end def get_default_scm_type call=Dev::SystemCall.new("svn info") return "svn" if call.output.include?("Last Changed Date:") return "svn" if File.exists?(".svn") call=Dev::SystemCall.new("git status") return "git" if call.output.include?("#") return "git" if File.exists?(".git") return nil end end # class Compile end # module Cmd end # module Dev
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dev-1.0.209 | lib/dev/cmd/Commit.rb |
dev-1.0.208 | lib/dev/cmd/Commit.rb |