From caefd6d1157e75dd8474c82ce9f478f4b3451ee8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 17 Oct 2019 11:22:06 +0000 Subject: [PATCH] code cleanup: rubocop: fix Layout/ElseAlignment in lib/redmine/plugin.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18703 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - lib/redmine/plugin.rb | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7002203cc..528940a60 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -110,7 +110,6 @@ Layout/ElseAlignment: - 'app/models/issue_query.rb' - 'lib/redmine/export/pdf/issues_pdf_helper.rb' - 'lib/redmine/i18n.rb' - - 'lib/redmine/plugin.rb' # Cop supports --auto-correct. Layout/EmptyLineAfterGuardClause: diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index b3982fcfd..51811ac9b 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -501,22 +501,22 @@ module Redmine class MigrationContext < ActiveRecord::MigrationContext def up(target_version = nil) - selected_migrations = if block_given? - migrations.select { |m| yield m } - else - migrations - end - + selected_migrations = + if block_given? + migrations.select { |m| yield m } + else + migrations + end Migrator.new(:up, selected_migrations, target_version).migrate end def down(target_version = nil) - selected_migrations = if block_given? - migrations.select { |m| yield m } - else - migrations - end - + selected_migrations = + if block_given? + migrations.select { |m| yield m } + else + migrations + end Migrator.new(:down, selected_migrations, target_version).migrate end -- 2.39.5