Class: Pod::ExternalSources::PathSource
- Inherits:
-
AbstractExternalSource
- Object
- AbstractExternalSource
- Pod::ExternalSources::PathSource
- Defined in:
- lib/cocoapods-tj/native/path_source.rb
Overview
Provides support for fetching a specification file from a path local to the machine running the installation.
Instance Method Summary collapse
Instance Method Details
#normalized_podspec_path(declared_path) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cocoapods-tj/native/path_source.rb', line 11 def normalized_podspec_path(declared_path) extension = File.extname(declared_path) if extension == '.podspec' || extension == '.json' path_with_ext = declared_path else path_with_ext = Specification::VALID_EXTNAME .map { |extname| "#{declared_path}/#{name}#{extname}" } .find { |file| File.exist?(file) } || "#{declared_path}/#{name}.podspec" end podfile_dir = File.dirname(podfile_path || '') File.(path_with_ext, podfile_dir) end |