Sha256: bbe78ed1613243a45ada6e59f26d63998ec20b411ddb303079069ec8183cc455
Contents?: true
Size: 795 Bytes
Versions: 4
Compression:
Stored size: 795 Bytes
Contents
module Overapp class Git class << self def commit_inner(output_path,message,init,&b) res = nil res = yield if block_given? if init `rm -rf #{output_path}/.git` ec "cd #{output_path} && git init && git config user.email johnsmith@fake.com && git config user.name 'John Smith'", :silent => true end begin ec "cd #{output_path} && git add . && git commit -m '#{message}'", :silent => true rescue; end res end def commit(output_path,message,&b) init = !FileTest.exist?("#{output_path}/.git") commit_inner(output_path,message,init,&b) end def repo?(path) path =~ /\.git/ || path =~ /file:\/\// || path =~ /git:\/\// end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
overapp-0.5.1 | lib/overapp/util/git.rb |
overapp-0.5.0 | lib/overapp/util/git.rb |
overapp-0.4.2 | lib/overapp/util/git.rb |
overapp-0.4.1 | lib/overapp/util/git.rb |