]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Style/For (#32530).
authorGo MAEDA <maeda@farend.jp>
Tue, 20 Oct 2020 15:22:11 +0000 (15:22 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 20 Oct 2020 15:22:11 +0000 (15:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20153 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/export/pdf/issues_pdf_helper.rb
lib/redmine/export/pdf/wiki_pdf_helper.rb

index 8458b87ca2f06beceeaca207300d928b19f88d57..828010a53b7513966aa61f9ee5690f287f8ddc76 100644 (file)
@@ -1041,14 +1041,6 @@ Style/EvalWithLocation:
 Style/ExpandPathArguments:
   Enabled: false
 
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: each, for
-Style/For:
-  Exclude:
-    - 'lib/redmine/export/pdf/issues_pdf_helper.rb'
-    - 'lib/redmine/export/pdf/wiki_pdf_helper.rb'
-
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle.
 # SupportedStyles: format, sprintf, percent
index b496916957c4001d96c8e57aa09178d77526fb52..c6ee5a18f5b15e2110ed43ccc51f9daff837939f 100644 (file)
@@ -189,7 +189,7 @@ module Redmine
             pdf.SetFontStyle('B',9)
             pdf.RDMCell(190,5, l(:label_associated_revisions), "B")
             pdf.ln
-            for changeset in issue.changesets
+            issue.changesets.each do |changeset|
               pdf.SetFontStyle('B',8)
               csstr  = "#{l(:label_revision)} #{changeset.format_identifier} - "
               csstr += format_time(changeset.committed_on) + " - " + changeset.author.to_s
@@ -240,7 +240,7 @@ module Redmine
             pdf.SetFontStyle('B',9)
             pdf.RDMCell(190,5, l(:label_attachment_plural), "B")
             pdf.ln
-            for attachment in issue.attachments
+            issue.attachments.each do |attachment|
               pdf.SetFontStyle('',8)
               pdf.RDMCell(80,5, attachment.filename)
               pdf.RDMCell(20,5, number_to_human_size(attachment.filesize),0,0,"R")
index e2f408fc465dc325688e441a983ddb899e21765b..cc4ee6a172c8c2dbeefdae26334c44b367343bba 100644 (file)
@@ -87,7 +87,7 @@ module Redmine
             pdf.SetFontStyle('B', 9)
             pdf.RDMCell(190, 5, l(:label_attachment_plural), "B")
             pdf.ln
-            for attachment in page.attachments
+            page.attachments.each do |attachment|
               pdf.SetFontStyle('', 8)
               pdf.RDMCell(80, 5, attachment.filename)
               pdf.RDMCell(20, 5, number_to_human_size(attachment.filesize), 0, 0, "R")