Use boolean comparators where it makes sense
This commit is contained in:
parent
dbdc7ae4aa
commit
118886344a
28 changed files with 60 additions and 60 deletions
|
|
@ -23,7 +23,7 @@ namespace :deploy do
|
|||
task :config => ['deploy:set_rails_env'] do
|
||||
require 'securerandom'
|
||||
on roles(:app), in: :groups do
|
||||
db_name = (fetch(:db_user) or fetch(:application))
|
||||
db_name = fetch(:db_user) || fetch(:application)
|
||||
db_passwd = SecureRandom.urlsafe_base64(24).to_s
|
||||
db_yaml = {
|
||||
fetch(:rails_env).to_s => {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace :enable_plugins do
|
|||
text = capture :cat, shared_path.join('config/plugins.yml'), '||true'
|
||||
if text
|
||||
plugins = YAML.load(text)
|
||||
enable_foodsoft_plugins(plugins['enabled']) if plugins and not plugins['enabled'].nil?
|
||||
enable_foodsoft_plugins(plugins['enabled']) if plugins && !plugins['enabled'].nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace :resque do
|
|||
on roles(:resque), in: :groups do
|
||||
|
||||
SSHKit.config.command_map[:rake_as_run_user] =
|
||||
unless fetch(:run_user).nil? or fetch(:run_user) == fetch(:user)
|
||||
unless fetch(:run_user).nil? || fetch(:run_user) == fetch(:user)
|
||||
"sudo -u '#{fetch(:run_user)}' "
|
||||
else
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue