Class: Railshoster::DeployCommand
- Defined in:
- lib/railshoster/deploy_command.rb
Overview
This action class helps to deploy a rails applicaton
Instance Method Summary collapse
- #deploy ⇒ Object
- #deploy_cold ⇒ Object
- #deploy_setup ⇒ Object
-
#initialize(project_dir) ⇒ DeployCommand
constructor
A new instance of DeployCommand.
Methods included from GeneralCapistranoHelpers
#capistrano_greater_than_2?, #installed_capistrano_version
Constructor Details
#initialize(project_dir) ⇒ DeployCommand
Returns a new instance of DeployCommand.
6 7 8 |
# File 'lib/railshoster/deploy_command.rb', line 6 def initialize(project_dir) super(project_dir) end |
Instance Method Details
#deploy ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/railshoster/deploy_command.rb', line 10 def deploy if_project_already_initialized do if capistrano_greater_than_2? system("cap production deploy") else system("cap deploy") end end end |
#deploy_cold ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/railshoster/deploy_command.rb', line 30 def deploy_cold if_project_already_initialized do if capistrano_greater_than_2? system("cap production deploy:cold") else system("cap deploy:cold") end end end |
#deploy_setup ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/railshoster/deploy_command.rb', line 20 def deploy_setup if_project_already_initialized do if capistrano_greater_than_2? system("cap production deploy:setup") else system("cap deploy:setup") end end end |