Class: Pod::Downloader::Http

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods_plugin.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.optionsObject

Force flattening of index downloads with :indexDownload => true



48
49
50
# File 'lib/cocoapods_plugin.rb', line 48

def self.options
  [:type, :flatten, :sha1, :sha256, :indexDownload]
end

Instance Method Details

#download_file(full_filename) ⇒ Object



55
56
57
# File 'lib/cocoapods_plugin.rb', line 55

def download_file(full_filename)
  curl! '-n', '-f', '-L', '-o', full_filename, url, '--create-dirs'
end

#orig_download_fileObject



52
# File 'lib/cocoapods_plugin.rb', line 52

alias_method :orig_download_file, :download_file

#orig_should_flatten?Object



53
# File 'lib/cocoapods_plugin.rb', line 53

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

Returns:

  • (Boolean)


61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/cocoapods_plugin.rb', line 61

def should_flatten?
  # TODO uncomment when Artifactory stops sending the :flatten flag
  # if options.key?(:flatten)
  #   true
  # else
  #   false
  # end
  if options.key?(:indexDownload)
    true
  else
    false
  end
end