Sha256: 8558ec5fca35373302d43fabc2fcd01aeb1a8ae0f661e8c3782071e2a4afbb47
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
require "venice/version" require "thor" module Venice class Kit < Thor include Thor::Actions desc "new", "runs the command to clone venice into new project" def new(repo_name = "new-venice-project") url = "https://github.com/alexkravets/venice.git" system "git ls-remote #{url} > /dev/null 2>&1" puts "Starting a new venice project in #{repo_name}" system %{ git clone "#{url}" "#{repo_name}" && cd "#{repo_name}" && git remote rename origin venice && cd - } end desc "setup", "Sets up the project" def setup puts "Setting up your project" system "bin/setup" end desc "deploy", "Deploys the project to heroku or digital-ocean" def deploy(platform = "heroku", target = "") puts "Deploying the project" if platform == "heroku" target = { "" => "us", "us-east-1" => "us", "eu-west-1" => "eu" }[target] if target.nil? puts "Please provide correct target parameter." puts "Available options are:" puts " us-east-1" puts " eu-west-1" exit end end system "bin/#{platform}/deploy #{target}".strip end desc "version", "Show Venice version" def version say "Venice #{Venice::VERSION}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
venice-chr-0.1.5 | lib/venice/kit.rb |