class Pod::ExternalSources::AbstractExternalSource


Abstract class that defines the common behaviour of external sources.

def ==(other)

Returns:
  • (Bool) - whether an external source source is equal to another
def ==(other)
  return false if other.nil?
  name == other.name && params == other.params
end

def description

Returns:
  • (String) - a string representation of the source suitable for UI.
def description
  raise "Abstract method"
end

def fetch(sandbox)

Returns:
  • (void) -

Parameters:
  • sandbox (Sandbox) --
def fetch(sandbox)
  raise "Abstract method"
end

def fetch(sandbox)

Returns:
  • (void) -

Parameters:
  • sandbox (Sandbox) --
def fetch(sandbox)
  raise "Abstract method"
end

def initialize(name, params, podfile_path)

Parameters:
  • podfile_path (String) -- @see podfile_path
  • params (Hash) -- @see params
  • name (String) -- @see name
def initialize(name, params, podfile_path)
  @name = name
  @params = params
  @podfile_path = podfile_path
end

def pre_download(sandbox)

Returns:
  • (void) -

Other tags:
    Todo: - The downloader configuration is the same of the

Other tags:
    Note: - To prevent a double download of the repository the pod is

Parameters:
  • sandbox (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 = Config.instance.downloader(target, params)
    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 store_podspec(sandbox, spec)

Returns:
  • (void) -

Other tags:
    Note: - The sandbox ensures that the podspec exists and that the names
    Note: - All the concrete implementations of #{fetch} should invoke this

Parameters:
  • spec (Pathname, String) --
  • sandbox (Sandbox) --
def store_podspec(sandbox, spec)
  sandbox.store_podspec(name, spec, true)
end