lib/venice/kit.rb in venice-chr-0.1.4 vs lib/venice/kit.rb in venice-chr-0.1.5

- old
+ new

@@ -23,13 +23,28 @@ def setup puts "Setting up your project" system "bin/setup" end - desc "deploy", "Deploys the site to Heroku" - def deploy(platform = "heroku") - puts "Deploying the site to Heroku" - system "bin/deploy-#{platform}" + 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}"