Provides support for fetching a specification file from an URL. Can be http, file, etc.
fetch
description
podspec_uri
fetch(sandbox) #=> undefined
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
description #=> undefined
281 def description
282 "from `#{params[:podspec]}`"
283 end
podspec_uri #=> String
String
The uri of the podspec appending the name of the file and expanding it if necessary.
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