1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge pull request #1609 from will-in-wi/rubocop_if_unless_modifier

Enable the IfUnlessModifier cop
This commit is contained in:
Matt Brictson 2016-03-10 05:43:36 -08:00
commit 90574e065b
2 changed files with 2 additions and 8 deletions

View file

@ -35,8 +35,6 @@ Style/BlockDelimiters:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/Lambda:
Enabled: false
Style/SingleLineBlockParams:

View file

@ -124,9 +124,7 @@ namespace :deploy do
target = release_path.join(dir)
source = shared_path.join(dir)
next if test "[ -L #{target} ]"
if test "[ -d #{target} ]"
execute :rm, "-rf", target
end
execute :rm, "-rf", target if test "[ -d #{target} ]"
execute :ln, "-s", source, target
end
end
@ -142,9 +140,7 @@ namespace :deploy do
target = release_path.join(file)
source = shared_path.join(file)
next if test "[ -L #{target} ]"
if test "[ -f #{target} ]"
execute :rm, target
end
execute :rm, target if test "[ -f #{target} ]"
execute :ln, "-s", source, target
end
end