Class: Pod::ExternalSources::PodspecSource

Inherits:
AbstractExternalSource show all
Defined in:
lib/cocoapods/external_sources.rb

Overview

Provides support for fetching a specification file from an URL. Can be http, file, etc.

Instance Attribute Summary

Attributes inherited from AbstractExternalSource

#name, #params, #podfile_path

Subclasses hooks collapse

Methods inherited from AbstractExternalSource

#==, #initialize

Constructor Details

This class inherits a constructor from Pod::ExternalSources::AbstractExternalSource

Instance Method Details

#descriptionObject



284
285
286
# File 'lib/cocoapods/external_sources.rb', line 284

def description
  "from `#{params[:podspec]}`"
end

#fetch(sandbox) ⇒ Object



274
275
276
277
278
279
280
# File 'lib/cocoapods/external_sources.rb', line 274

def fetch(sandbox)
  UI.titled_section("Fetching podspec for `#{name}` #{description}", { :verbose_prefix => "-> " }) do

    require 'open-uri'
    open(podspec_uri) { |io| store_podspec(sandbox, io.read) }
  end
end