class Pod::ExternalSources::PathSource
Works with the {LocalPod::LocalSourcedPod} class.
the machine running the installation.
Provides support for fetching a specification file from a path local to
def description
- See: AbstractExternalSource#description -
def description "from `#{params[:path] || params[:local]}`" end
def fetch(sandbox)
- See: AbstractExternalSource#fetch -
def fetch(sandbox) UI.titled_section("Fetching podspec for `#{name}` #{description}", { :verbose_prefix => "-> " }) do podspec = podspec_path store_podspec(sandbox, podspec) sandbox.store_local_path(name, podspec.dirname) end end
def podspec_path
-
(Pathname)- the path of the podspec.
def podspec_path declared_path = (params[:path] || params[:local]).to_s path_with_ext = File.extname(declared_path) == '.podspec' ? declared_path : "#{declared_path}/#{name}.podspec" podfile_dir = File.dirname(podfile_path || '') absolute_path = File.expand_path(path_with_ext, podfile_dir) pathname = Pathname.new(absolute_path) unless pathname.exist? raise Informative, "No podspec found for `#{name}` in `#{params[:local]}`" end pathname end