Class: Pod::ExternalSources::PathSource

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

Overview

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

Instance Attribute Summary

Attributes inherited from AbstractExternalSource

#can_cache, #name, #params, #podfile_path

Instance Method Summary collapse

Methods inherited from AbstractExternalSource

#==, #initialize

Constructor Details

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

Instance Method Details

#descriptionObject


26
27
28
# File 'lib/cocoapods/external_sources/path_source.rb', line 26

def description
  "from `#{declared_path}`"
end

#fetch(sandbox) ⇒ Object


9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/cocoapods/external_sources/path_source.rb', line 9

def fetch(sandbox)
  title = "Fetching podspec for `#{name}` #{description}"
  UI.section(title, '-> ') do
    podspec = podspec_path
    unless podspec.exist?
      raise Informative, "No podspec found for `#{name}` in " \
        "`#{declared_path}`"
    end
    store_podspec(sandbox, podspec, podspec.extname == '.json')
    is_absolute = absolute?(declared_path)
    sandbox.store_local_path(name, podspec, is_absolute)
    sandbox.remove_checkout_source(name)
  end
end