Sha256: c74bf91a47bab7c3627bbf510f33ee246d42abb348a28878e9132b20bcb8e942

Contents?: true

Size: 643 Bytes

Versions: 1

Compression:

Stored size: 643 Bytes

Contents

module Kango
  def self.install!
    zipfile = File.expand_path(File.join("~", 'kango-framework.zip'))
    puts "Downloading Kango Framework to #{zipfile}..."
    require 'open-uri'
    File.open(zipfile, 'wb') do |file|
      open(KANGO_FRAMEWORK_URL, 'rb') do |download|
        file.write download.read
      end
    end
    puts "Download complete! Extracting..."
    `unzip #{zipfile} -d #{KANGO_FRAMEWORK}`
    if Kango.framework_exists?
      FileUtils.rm zipfile
      puts "Kango Framework is ready. You can now 'kango build'"
    else
      puts "Something went wrong... probably could not download Kango Framework"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kango-0.0.2.0.9.2 lib/kango/install.rb