Skip to content

Commit e1a708c

Browse files
author
Twill
committed
Fix indentation in chunky_png_driver.rb to pass Standard Ruby linter
1 parent 3083929 commit e1a708c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/capybara/screenshot/diff/drivers/chunky_png_driver.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ def shift_distance_at(new_img, old_img, x, y, color_distance_limit:)
254254
if (x - shift_distance) >= 0 # left
255255
([0, top_row + 1].max..[y + shift_distance, new_img.height - 2].min)
256256
.each do |dy|
257-
if color_matches(new_img, org_color, x - shift_distance, dy, color_distance_limit)
258-
return shift_distance
257+
if color_matches(new_img, org_color, x - shift_distance, dy, color_distance_limit)
258+
return shift_distance
259+
end
259260
end
260-
end
261261
else
262262
bounds_breached += 1
263263
end
@@ -273,10 +273,10 @@ def shift_distance_at(new_img, old_img, x, y, color_distance_limit:)
273273
if (x + shift_distance) < new_img.width # right
274274
([0, top_row + 1].max..[y + shift_distance, new_img.height - 2].min)
275275
.each do |dy|
276-
if color_matches(new_img, org_color, x + shift_distance, dy, color_distance_limit)
277-
return shift_distance
276+
if color_matches(new_img, org_color, x + shift_distance, dy, color_distance_limit)
277+
return shift_distance
278+
end
278279
end
279-
end
280280
else
281281
bounds_breached += 1
282282
end

0 commit comments

Comments
 (0)