Class: LgPodPlugin::HTTPDownloader
- Inherits:
-
Object
- Object
- LgPodPlugin::HTTPDownloader
- Defined in:
- lib/lg_pod_plugin/git/http_download.rb
Instance Method Summary collapse
- #download ⇒ Object
-
#initialize(checkout_options = {}) ⇒ HTTPDownloader
constructor
A new instance of HTTPDownloader.
Constructor Details
#initialize(checkout_options = {}) ⇒ HTTPDownloader
Returns a new instance of HTTPDownloader.
15 16 17 18 19 20 21 |
# File 'lib/lg_pod_plugin/git/http_download.rb', line 15 def initialize( = {}) self.name = [:name] self.path = [:path] self.http = [:http] self.lg_spec = [:spec] @checkout_options = end |
Instance Method Details
#download ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/lg_pod_plugin/git/http_download.rb', line 23 def download download_params = Hash.new new_filename = self.http.split("/").last ||= "lg_temp_pod.tar" download_params["path"] = self.path.to_path download_params["name"] = self.name download_params["type"] = "http" download_params["download_urls"] = [{ "filename" => (new_filename ? new_filename : filename), "url" => http }] if self.lg_spec download_params["podspec"] = self.lg_spec download_params["source_files"] = self.lg_spec.source_files.keys end download_params end |