]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/IndentFirstArrayElement in app/models/setting.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 12:57:50 +0000 (12:57 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 12:57:50 +0000 (12:57 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19248 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/models/setting.rb

index a409a463478f3cb36ed44b9fab8d04fd67cfaaf7..c19fe8f3f91f672d60a71ae9a2ac94fd2b1e23e3 100644 (file)
@@ -149,7 +149,6 @@ Layout/IndentFirstArgument:
 # SupportedStyles: special_inside_parentheses, consistent, align_brackets
 Layout/IndentFirstArrayElement:
   Exclude:
-    - 'app/models/setting.rb'
     - 'lib/redmine/nested_set/issue_nested_set.rb'
     - 'lib/redmine/nested_set/project_nested_set.rb'
     - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
index d4e11c35590c243c1957658a41f5eec016073949..7fdd79a4156d5290532eda0fdf5dadc86fb31542 100644 (file)
@@ -26,21 +26,21 @@ class Setting < ActiveRecord::Base
     }
 
   DATE_FORMATS = [
-        '%Y-%m-%d',
-        '%d/%m/%Y',
-        '%d.%m.%Y',
-        '%d-%m-%Y',
-        '%m/%d/%Y',
-        '%d %b %Y',
-        '%d %B %Y',
-        '%b %d, %Y',
-        '%B %d, %Y'
-    ]
+    '%Y-%m-%d',
+    '%d/%m/%Y',
+    '%d.%m.%Y',
+    '%d-%m-%Y',
+    '%m/%d/%Y',
+    '%d %b %Y',
+    '%d %B %Y',
+    '%b %d, %Y',
+    '%B %d, %Y'
+  ]
 
   TIME_FORMATS = [
     '%H:%M',
     '%I:%M %p'
-    ]
+  ]
 
   ENCODINGS =  %w(US-ASCII
                   windows-1250
@@ -150,8 +150,12 @@ class Setting < ActiveRecord::Base
   def self.validate_all_from_params(settings)
     messages = []
     [
-     [:mail_handler_enable_regex_delimiters,         :mail_handler_body_delimiters,    /[\r\n]+/],
-     [:mail_handler_enable_regex_excluded_filenames, :mail_handler_excluded_filenames, /\s*,\s*/]
+      [:mail_handler_enable_regex_delimiters,
+       :mail_handler_body_delimiters,
+       /[\r\n]+/],
+      [:mail_handler_enable_regex_excluded_filenames,
+       :mail_handler_excluded_filenames,
+       /\s*,\s*/]
     ].each do |enable_regex, regex_field, delimiter|
       if settings.key?(regex_field) || settings.key?(enable_regex)
         regexp = Setting.send("#{enable_regex}?")