Class: Venice::Kit
- Inherits:
-
Thor
- Object
- Thor
- Venice::Kit
- Includes:
- Thor::Actions
- Defined in:
- lib/venice/kit.rb
Instance Method Summary collapse
- #deploy(platform = "heroku", target = "") ⇒ Object
- #new(repo_name = "new-venice-project") ⇒ Object
- #setup ⇒ Object
- #version ⇒ Object
Instance Method Details
#deploy(platform = "heroku", target = "") ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/venice/kit.rb', line 29 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 |
#new(repo_name = "new-venice-project") ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/venice/kit.rb', line 9 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 |
#setup ⇒ Object
23 24 25 26 |
# File 'lib/venice/kit.rb', line 23 def setup puts "Setting up your project" system "bin/setup" end |