>GitHub

GitHub

Allows to download tarballs from GitHub.

Inherits from:

Pod::Downloader::Git

Cache

download_head!

download_tag

download_commit

download_branch

tarball_url_for

tmp_path

download_only?

download_and_extract_tarball

Download implementations

Checking references

Configuration

Downloading

download_head!

Signature

download_head! #=> undefined

Source

239 def download_head!
240   download_only? ? download_and_extract_tarball('master') : super
241 end

Source Files

lib/cocoapods-downloader/git.rb:239

spec/cocoapods-downloaders/git_spec.rb

download_tag

Signature

download_tag #=> undefined

Source

243 def download_tag
244   download_only? ? download_and_extract_tarball(options[:tag]) : super
245 end

Source Files

lib/cocoapods-downloader/git.rb:243

spec/cocoapods-downloaders/git_spec.rb

download_commit

Signature

download_commit #=> undefined

Source

247 def download_commit
248   download_only? ? download_and_extract_tarball(options[:commit]) : super
249 end

Source Files

lib/cocoapods-downloader/git.rb:247

spec/cocoapods-downloaders/git_spec.rb

download_branch

Signature

download_branch #=> undefined

Source

251 def download_branch
252   download_only? ? download_and_extract_tarball(options[:branch]) : super
253 end

Source Files

lib/cocoapods-downloader/git.rb:251

spec/cocoapods-downloaders/git_spec.rb

tarball_url_for

Signature

tarball_url_for(id) #=> undefined

Source

255 def tarball_url_for(id)
256   original_url, username, reponame = *(url.match(/[:\/]([\w\-]+)\/([\w\-]+)\.git/))
257   "https://github.com/#{username}/#{reponame}/tarball/#{id}"
258 end

Source Files

lib/cocoapods-downloader/git.rb:255

spec/cocoapods-downloaders/git_spec.rb

tmp_path

Signature

tmp_path #=> undefined

Source

260 def tmp_path
261   target_path + "tarball.tar.gz"
262 end

Source Files

lib/cocoapods-downloader/git.rb:260

spec/cocoapods-downloaders/git_spec.rb

download_only?

Signature

download_only? #=> Boolean 

Returns

Boolean

Source

266 def download_only?
267   @options[:download_only]
268 end

Source Files

lib/cocoapods-downloader/git.rb:266

spec/cocoapods-downloaders/git_spec.rb

download_and_extract_tarball

Signature

download_and_extract_tarball(id) #=> undefined

Source

270 def download_and_extract_tarball(id)
271   File.open(tmp_path, "w+") do |tmpfile|
272     open tarball_url_for(id) do |archive|
273       tmpfile.write Zlib::GzipReader.new(archive).read
274     end
275 
276     system "tar xf #{tmpfile.path} -C #{target_path} --strip-components 1"
277   end
278 end

Source Files

lib/cocoapods-downloader/git.rb:270

spec/cocoapods-downloaders/git_spec.rb