Class: Gunter::Model::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/gunter/model/git.rb

Class Method Summary collapse

Class Method Details

.clone(repo, location = '.') ⇒ Object



10
11
12
13
14
15
16
# File 'lib/gunter/model/git.rb', line 10

def clone(repo, location = '.')
  location ||= File.basename(repo, '.git')
  system("git clone --depth 1 [email protected]:#{repo}.git #{Shellwords.escape(location)}")

  FileUtils.rm_rf("#{location}/.git")
  FileUtils.rm_rf("#{location}/.github")
end