Class: Pod::Downloader::Git
- Inherits:
-
Object
- Object
- Pod::Downloader::Git
- Defined in:
- lib/cocoapods_git_tarball/downloader_git.rb
Overview
Concreted Downloader class that provides support for specifications with git sources.
Instance Method Summary collapse
Instance Method Details
#download! ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/cocoapods_git_tarball/downloader_git.rb', line 19 def download! if url.start_with?('https://github.com/') && ![:submodules] download_from_github! else orig_download! end end |
#download_from_github! ⇒ Object
10 11 12 13 14 15 |
# File 'lib/cocoapods_git_tarball/downloader_git.rb', line 10 def download_from_github! base_url = url.chomp('.git').chomp('/') ref = [:commit] || [:tag] || [:branch] || 'master' download_url = "#{base_url}/archive/#{ref.to_s}.tar.gz" Http.new(target_path, download_url, {}).download end |
#orig_download! ⇒ Object
17 |
# File 'lib/cocoapods_git_tarball/downloader_git.rb', line 17 alias_method :orig_download!, :download! |