>PodspecSource

PodspecSource

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

Inherits from:

Pod::ExternalSources::AbstractExternalSource

Subclasses hooks

fetch

description

Helpers

podspec_uri

fetch

Signature

fetch(sandbox) #=> undefined

Source

271 def fetch(sandbox)
272   UI.titled_section("Fetching podspec for `#{name}` #{description}", { :verbose_prefix => "-> " }) do
273 
274     require 'open-uri'
275     open(podspec_uri) { |io| store_podspec(sandbox, io.read) }
276   end
277 end

Source Files

lib/cocoapods/external_sources.rb:271

spec/unit/external_sources_spec.rb

description

Signature

description #=> undefined

Source

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

Source Files

lib/cocoapods/external_sources.rb:281

spec/unit/external_sources_spec.rb

podspec_uri

Signature

podspec_uri #=> String 

Returns

String

The uri of the podspec appending the name of the file and expanding it if necessary.

Source

297 def podspec_uri
298   declared_path = params[:podspec].to_s
299   if declared_path.match(%r{^.+://})
300     declared_path
301   else
302     path_with_ext = File.extname(declared_path) == '.podspec' ? declared_path : "#{declared_path}/#{name}.podspec"
303     podfile_dir   = File.dirname(podfile_path || '')
304     absolute_path = File.expand_path(path_with_ext, podfile_dir)
305     absolute_path
306   end
307 end

Source Files

lib/cocoapods/external_sources.rb:297

spec/unit/external_sources_spec.rb