Skip to content

Commit 6a89bd0

Browse files
committed
Merge pull request #1610 from will-in-wi/rubocop_style_next
Enable Style/Next cop
2 parents 03a6295 + bb22c89 commit 6a89bd0

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.rubocop.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ Style/AlignParameters:
4747
Enabled: false
4848
Style/IfUnlessModifier:
4949
Enabled: false
50-
Style/Next:
51-
Enabled: false
5250
Style/Lambda:
5351
Enabled: false
5452
Style/EmptyLiteral:

lib/capistrano/tasks/deploy.rake

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ namespace :deploy do
123123
fetch(:linked_dirs).each do |dir|
124124
target = release_path.join(dir)
125125
source = shared_path.join(dir)
126-
unless test "[ -L #{target} ]"
127-
if test "[ -d #{target} ]"
128-
execute :rm, "-rf", target
129-
end
130-
execute :ln, "-s", source, target
126+
next if test "[ -L #{target} ]"
127+
if test "[ -d #{target} ]"
128+
execute :rm, "-rf", target
131129
end
130+
execute :ln, "-s", source, target
132131
end
133132
end
134133
end
@@ -142,12 +141,11 @@ namespace :deploy do
142141
fetch(:linked_files).each do |file|
143142
target = release_path.join(file)
144143
source = shared_path.join(file)
145-
unless test "[ -L #{target} ]"
146-
if test "[ -f #{target} ]"
147-
execute :rm, target
148-
end
149-
execute :ln, "-s", source, target
144+
next if test "[ -L #{target} ]"
145+
if test "[ -f #{target} ]"
146+
execute :rm, target
150147
end
148+
execute :ln, "-s", source, target
151149
end
152150
end
153151
end

0 commit comments

Comments
 (0)