class RocketFuel::Install::Download

Constants

URL

Public Instance Methods

extract() click to toggle source
# File lib/rocket_fuel/install/download.rb, line 20
def extract
  FileUtils.mkdir_p(recipe_path)
  `tar xvfz #{archive_path} -C #{File.join(recipe_path, '..') }`
end
retrieve() click to toggle source
# File lib/rocket_fuel/install/download.rb, line 11
def retrieve
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  resp = http.get(uri.request_uri)
  open(archive_path, "wb") do |file|
    file.write(resp.body)
  end
end

Protected Instance Methods

archive_path() click to toggle source
# File lib/rocket_fuel/install/download.rb, line 26
def archive_path
  RocketFuel::Install::ARCHIVE_PATH
end
recipe_path() click to toggle source
# File lib/rocket_fuel/install/download.rb, line 30
def recipe_path
  RocketFuel::Install::RECIPE_PATH
end
uri() click to toggle source
# File lib/rocket_fuel/install/download.rb, line 34
def uri
  @uri = URI.parse(URL)
end