From 02ade68b38bfeae93ccd3a24b1f1282fbcae0414 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 15 Jan 2018 22:02:23 +0100 Subject: [PATCH] Enable the Layout/SpaceInsideBrackets cop --- .rubocop.yml | 2 +- config/initializers/devise.rb | 4 ++-- .../2017_12_21_replace_deprecated_mail_template_tags.rake | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2c7ac0272..536594e17 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -207,7 +207,7 @@ Layout/SpaceInsideBlockBraces: Enabled: true Layout/SpaceInsideBrackets: - Enabled: false + Enabled: true Layout/SpaceInsideHashLiteralBraces: Enabled: false diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index a12c61265..c365fd228 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -41,12 +41,12 @@ Devise.setup do |config| # Configure which authentication keys should be case-insensitive. # These keys will be downcased upon creating or modifying a user and when used # to authenticate or find a user. Default is :email. - config.case_insensitive_keys = [ :email ] + config.case_insensitive_keys = [:email] # Configure which authentication keys should have whitespace stripped. # These keys will have whitespace before and after removed upon creating or # modifying a user and when used to authenticate or find a user. Default is :email. - config.strip_whitespace_keys = [ :email ] + config.strip_whitespace_keys = [:email] # Tell if authentication through request.params is enabled. True by default. # It can be set to an array that will enable params authentication only for the diff --git a/lib/tasks/2017_12_21_replace_deprecated_mail_template_tags.rake b/lib/tasks/2017_12_21_replace_deprecated_mail_template_tags.rake index 18212003f..af3541161 100644 --- a/lib/tasks/2017_12_21_replace_deprecated_mail_template_tags.rake +++ b/lib/tasks/2017_12_21_replace_deprecated_mail_template_tags.rake @@ -7,7 +7,7 @@ namespace :'2017_12_21_replace_deprecated_mail_template_tags' do end def replace_tag(old_tag, new_tag) - mails = [ Mails::ClosedMail, Mails::InitiatedMail, Mails::ReceivedMail, Mails::RefusedMail, Mails::WithoutContinuationMail] + mails = [Mails::ClosedMail, Mails::InitiatedMail, Mails::ReceivedMail, Mails::RefusedMail, Mails::WithoutContinuationMail] mails.each do |mail| replace_tag_in(mail, 'object', old_tag, new_tag) replace_tag_in(mail, 'body', old_tag, new_tag)