>PathSource

PathSource

Provides support for fetching a specification file from a path local to the machine running the installation.

Works with the LocalPod::LocalSourcedPod class.

Inherits from:

Pod::ExternalSources::AbstractExternalSource

Helpers

fetch

description

podspec_path

Subclasses hooks

fetch

Signature

fetch(sandbox) #=> undefined

Source

321 def fetch(sandbox)
322   UI.titled_section("Fetching podspec for `#{name}` #{description}", { :verbose_prefix => "-> " }) do
323     podspec = podspec_path
324     store_podspec(sandbox, podspec)
325     sandbox.store_local_path(name, podspec.dirname)
326   end
327 end

Source Files

lib/cocoapods/external_sources.rb:321

spec/unit/external_sources_spec.rb

description

Signature

description #=> undefined

Source

331 def description
332   "from `#{params[:path] || params[:local]}`"
333 end

Source Files

lib/cocoapods/external_sources.rb:331

spec/unit/external_sources_spec.rb

podspec_path

Signature

podspec_path #=> Pathname 

Returns

Pathname The path of the podspec.

Source

343 def podspec_path
344   declared_path = (params[:path] || params[:local]).to_s
345   path_with_ext = File.extname(declared_path) == '.podspec' ? declared_path : "#{declared_path}/#{name}.podspec"
346   podfile_dir   = File.dirname(podfile_path || '')
347   absolute_path = File.expand_path(path_with_ext, podfile_dir)
348   pathname      = Pathname.new(absolute_path)
349 
350   unless pathname.exist?
351     raise Informative, "No podspec found for `#{name}` in `#{params[:local]}`"
352   end
353   pathname
354 end

Source Files

lib/cocoapods/external_sources.rb:343

spec/unit/external_sources_spec.rb