Class: Pod::Downloader::Http

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-cache-proxy/native/downloader.rb

Instance Method Summary collapse

Instance Method Details

#download_file(full_filename) ⇒ Object



38
39
40
41
42
43
44
45
46
47
# File 'lib/cocoapods-cache-proxy/native/downloader.rb', line 38

def download_file(full_filename)
  download_uri = URI(url)

  if !download_uri.query.blank? && download_uri.query.include?("git=") && download_uri.query.include?("tag=") && download_uri.query.include?("cache_proxy=1")
      curl_options = ["-f", "-L", "-o", full_filename, url, "--create-dirs"]
      curl! curl_options
  else
    orig_download_file(full_filename)
  end
end

#orig_download_fileObject



36
# File 'lib/cocoapods-cache-proxy/native/downloader.rb', line 36

alias_method :orig_download_file, :download_file