diff --git a/lib/capistrano/tasks/application.rake b/lib/capistrano/tasks/application.rake index c34117b6..2f643704 100644 --- a/lib/capistrano/tasks/application.rake +++ b/lib/capistrano/tasks/application.rake @@ -3,7 +3,7 @@ namespace :application do task :start do on roles(:app), in: :sequence, wait: 5 do within current_path do - if fetch(:rails_env) == 'staging' + if fetch(:rails_env) == :staging execute 'sudo systemctl start stage-ikt.codelabs.site' else execute 'sudo systemctl start ikt.codelabs.site' @@ -16,7 +16,7 @@ namespace :application do task :stop do on roles(:app), in: :sequence, wait: 5 do within current_path do - if fetch(:rails_env) == 'staging' + if fetch(:rails_env) == :staging execute 'sudo systemctl stop stage-ikt.codelabs.site' else execute 'sudo systemctl stop ikt.codelabs.site' @@ -29,10 +29,7 @@ namespace :application do task :restart do on roles(:app), in: :sequence, wait: 5 do within current_path do - p fetch(:rails_env) - p Rails.env - p ENV['RAILS_ENV'] - if Rails.env == 'staging' + if fetch(:rails_env) == :staging execute 'sudo systemctl restart stage-ikt.codelabs.site' else execute 'sudo systemctl restart ikt.codelabs.site'