lib/cocoapods/external_sources.rb
def pre_download(sandbox)
        UI.titled_section("Pre-downloading: `#{name}` #{description}", { :verbose_prefix => "-> " }) do
          target = sandbox.root + name
          target.rmtree if target.exist?
          downloader = Downloader.for_target(target, params)
          downloader.cache_root = CACHE_ROOT
          downloader.max_cache_size = MAX_CACHE_SIZE
          downloader.aggressive_cache = false
          downloader.download
          store_podspec(sandbox, target + "#{name}.podspec")
          sandbox.store_pre_downloaded_pod(name)
          if downloader.options_specific?
            source = params
          else
            source = downloader.checkout_options
          end
          sandbox.store_checkout_source(name, source)
        end
      end
# Pre-downloads a Pod passing the options to the downloader and informing
# the sandbox.
#
# @param  [Sandbox] sandbox
#         The sandbox where the Pod should be downloaded.
#
# @note   To prevent a double download of the repository the pod is
#         marked as pre-downloaded indicating to the installer that only
#         clean operations are needed.
#
# @todo  The downloader configuration is the same of the
#        #{PodSourceInstaller} and it needs to be kept in sync.
#
# @return [void]
#
Pre-downloads a Pod passing the options to the downloader and informing
the sandbox.
Pre - downloads a Pod passing the options to the downloader and informing the sandbox .
def pre_download(sandbox)
        UI.titled_section("Pre-downloading: `#{name}` #{description}", { :verbose_prefix => "-> " }) do
          target = sandbox.root + name
          target.rmtree if target.exist?
          downloader = Downloader.for_target(target, params)
          downloader.cache_root = CACHE_ROOT
          downloader.max_cache_size = MAX_CACHE_SIZE
          downloader.aggressive_cache = false
          downloader.download
          store_podspec(sandbox, target + "#{name}.podspec")
          sandbox.store_pre_downloaded_pod(name)
          if downloader.options_specific?
            source = params
          else
            source = downloader.checkout_options
          end
          sandbox.store_checkout_source(name, source)
        end
      end
def pre_download ( sandbox ) UI . titled_section ( "Pre-downloading: `#{name}` #{description}" , { :verbose_prefix => "-> " } ) do target = sandbox . root + name target . rmtree if target . exist? downloader = Downloader . for_target ( target , params ) downloader . cache_root = CACHE_ROOT downloader . max_cache_size = MAX_CACHE_SIZE downloader . aggressive_cache = false downloader . download store_podspec ( sandbox , target + "#{name}.podspec" ) sandbox . store_pre_downloaded_pod ( name ) if downloader . options_specific? source = params else source = downloader . checkout_options end sandbox . store_checkout_source ( name , source ) end end
Pre-downloads a Pod passing the options to the downloader and informing
the sandbox.
Pre - downloads a Pod passing the options to the downloader and informing the sandbox .
None
void
sandbox
sandbox The sandbox where the Pod should be downloaded.
sandbox The sandbox where the Pod should be downloaded .
note
To prevent a double download of the repository the pod is marked as pre-downloaded indicating to the installer that only clean operations are needed.
To prevent a double download of the repository the pod is marked as pre - downloaded indicating to the installer that only clean operations are needed .
todo
The downloader configuration is the same of the #{PodSourceInstaller} and it needs to be kept in sync.
The downloader configuration is the same of the # { PodSourceInstaller } and it needs to be kept in sync .