module Installer require 'fileutils' class Handler @@source def initialize(source = nil) if source.nil? @@source = "http://sedat.us/installer/" else @@source = source end end def get_composer if ! File.exist?('/usr/local/bin/composer') system("curl -sS https://getcomposer.org/installer | php") system("mv composer.phar /usr/local/bin/composer") end end def get_laravel(path,project_name) if path.empty? or project_name.empty? puts "Please input a path and project_name" else include FileUtils cd(path, :verbose => false) system("composer create-project laravel/laravel #{project_name} --prefer-dist") system("clear") puts "Laravel project is created !" end end end end