module Pod::Downloader
Public Class Methods
download( request, target, can_cache: true, cache_path: Config.instance.cache_root + 'Pods' )
click to toggle source
# File lib/cocoapods-ve/ext/downloader_ext.rb, line 5 def download( request, target, can_cache: true, cache_path: Config.instance.cache_root + 'Pods' ) if ENV['COCOAPODS_LINK_POD_CACHE_VE'] == 'true' can_cache &&= !Config.instance.skip_download_cache request = preprocess_request(request) if can_cache raise ArgumentError, 'Must provide a `cache_path` when caching.' unless cache_path cache = Cache.new(cache_path) result = cache.download_pod(request) else raise ArgumentError, 'Must provide a `target` when caching is disabled.' unless target require 'cocoapods/installer/pod_source_preparer' result, = download_request(request, target) Installer::PodSourcePreparer.new(result.spec, result.location).prepare! end if target && result.location && target != result.location UI.message "link #{request.name} from `#{result.location}` to #{UI.path target}", '> ' do FileUtils.rm_rf target FileUtils.ln_sf(result.location, target) end end result else download_t( request,target) end end
Also aliased as: download_t
download_t( request, target, can_cache: true, cache_path: Config.instance.cache_root + 'Pods' )
Alias for: download