class Gravaty::Utils::Downloader::Downloader

!/usr/bin/env ruby

An HTTP/HTTPS/FTP file downloader library/CLI based upon
MiniPortile's HTTP implementation.

Author:: Jon Maken
License:: 3-clause BSD
Revision:: 2012-03-25 23:01:19 -0600

Constants

VERSION

Attributes

ftp_data_chunk_size[RW]
logger[RW]
max_ca_verify_depth[RW]

Public Class Methods

download_file(url, full_path, count = 3) click to toggle source
   # File lib/gravaty/utils/downloader.rb
59 def self.download_file(url, full_path, count = 3)
60   raise RuntimeError, I18n.t('error.nil') if url.nil?
61   return if File.exist?(full_path)
62 
63   http_download(url, full_path, count)
64 end