# 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'
}
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
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}?")