Class: Downlow::Git
Instance Attribute Summary
Attributes inherited from Fetcher
#destination, #local_path, #options, #tmp_dir, #url
Instance Method Summary collapse
Methods inherited from Fetcher
fetch, #fetched?, fetcher_for, handles, #initialize
Constructor Details
This class inherits a constructor from Downlow::Fetcher
Instance Method Details
#fetch ⇒ Object
6 7 8 9 10 11 |
# File 'lib/downlow/fetchers/git.rb', line 6 def fetch self.destination = destination.dirname + destination.stem git_clone rm_dot_git unless [:keep_git] @local_path = destination end |
#git_clone ⇒ Object
13 14 15 |
# File 'lib/downlow/fetchers/git.rb', line 13 def git_clone system "`which git` clone #{url} #{destination.}" end |
#rm_dot_git ⇒ Object
17 18 19 |
# File 'lib/downlow/fetchers/git.rb', line 17 def rm_dot_git FileUtils.rm_rf(destination + '.git') end |