Skip to content

Commit

Permalink
fixup! fixup! fixup! Add stage env
Browse files Browse the repository at this point in the history
  • Loading branch information
kostyanf14 committed Sep 11, 2023
1 parent b088829 commit 841e511
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/capistrano/tasks/application.rake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ namespace :application do
task :restart do
on roles(:app), in: :sequence, wait: 5 do
within current_path do
if fetch(:rails_env) == 'staging'
p fetch(:rails_env)
p Rails.env
p ENV['RAILS_ENV']

Check notice

Code scanning / Rubocop

Suggests `ENV.fetch` for the replacement of `ENV[]`. Note

Style/FetchEnvVar: Use ENV.fetch('RAILS\_ENV') or ENV.fetch('RAILS\_ENV', nil) instead of ENV['RAILS\_ENV'].
if Rails.env == 'staging'

Check notice

Code scanning / Rubocop

Favor `Rails.env.production?` over `Rails.env == 'production'`. Note

Rails/EnvironmentComparison: Favor Rails.env.staging? over Rails.env == 'staging'.

Check notice

Code scanning / Rubocop

Use correct environment name.

Rails/UnknownEnv: Unknown environment staging.
execute 'sudo systemctl restart stage-ikt.codelabs.site'
else
execute 'sudo systemctl restart ikt.codelabs.site'
Expand Down

0 comments on commit 841e511

Please sign in to comment.