Sha256: d7c0dfb7ee27e36cac55576fc42207d7cc3874e5c7d86f8c852ef83af303e079
Contents?: true
Size: 461 Bytes
Versions: 1
Compression:
Stored size: 461 Bytes
Contents
# frozen_string_literal: true require 'fileutils' require 'shellwords' module Gunter module Model class Git class << self def clone(repo, location = '.') location ||= File.basename(repo, '.git') system("git clone --depth 1 git@github.com:#{repo}.git #{Shellwords.escape(location)}") FileUtils.rm_rf("#{location}/.git") FileUtils.rm_rf("#{location}/.github") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gunter-0.1.0 | lib/gunter/model/git.rb |