Class: Pod::Downloader::Http
- Inherits:
-
Object
- Object
- Pod::Downloader::Http
- Defined in:
- lib/cocoapods_plugin.rb
Class Method Summary collapse
-
.options ⇒ Object
Force flattening of index downloads with :indexDownload => true.
Instance Method Summary collapse
- #download_file(full_filename) ⇒ Object
- #orig_download_file ⇒ Object
- #orig_should_flatten? ⇒ Object
-
#should_flatten? ⇒ Boolean
Note that we disabled flattening here for the ENTIRE client to deal with default flattening for non zip archives messing up tarballs incoming.
Class Method Details
.options ⇒ Object
Force flattening of index downloads with :indexDownload => true
46 47 48 |
# File 'lib/cocoapods_plugin.rb', line 46 def self. [:type, :flatten, :sha1, :sha256, :indexDownload] end |
Instance Method Details
#download_file(full_filename) ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/cocoapods_plugin.rb', line 53 def download_file(full_filename) = ["-f", "-L", "-o", full_filename, url, "--create-dirs", "--netrc-optional"] netrc_path = ENV["COCOAPODS_ART_NETRC_PATH"] .concat(["--netrc-file", Pathname.new(netrc_path).]) if netrc_path curl! end |
#orig_download_file ⇒ Object
50 |
# File 'lib/cocoapods_plugin.rb', line 50 alias_method :orig_download_file, :download_file |
#orig_should_flatten? ⇒ Object
51 |
# File 'lib/cocoapods_plugin.rb', line 51 alias_method :orig_should_flatten?, :should_flatten? |
#should_flatten? ⇒ Boolean
Note that we disabled flattening here for the ENTIRE client to deal with default flattening for non zip archives messing up tarballs incoming
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/cocoapods_plugin.rb', line 64 def should_flatten? # TODO uncomment when Artifactory stops sending the :flatten flag # if options.key?(:flatten) # true # else # false # end if .key?(:indexDownload) true else orig_should_flatten? end end |