From: Toshi MARUYAMA Date: Thu, 17 Oct 2019 11:22:06 +0000 (+0000) Subject: code cleanup: rubocop: fix Layout/ElseAlignment in lib/redmine/plugin.rb X-Git-Tag: 4.1.0~390 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=caefd6d1157e75dd8474c82ce9f478f4b3451ee8;p=redmine.git 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 --- 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