Rubocop: enable indentation width rule

This commit is contained in:
Simon Lehericey 2017-08-28 11:18:38 +02:00
parent 324628835d
commit 62f1b9c712
6 changed files with 8 additions and 8 deletions

View file

@ -110,7 +110,7 @@ Layout/IndentationConsistency:
Enabled: false Enabled: false
Layout/IndentationWidth: Layout/IndentationWidth:
Enabled: false Enabled: true
Layout/InitialIndentation: Layout/InitialIndentation:
Enabled: false Enabled: false

View file

@ -72,9 +72,9 @@ class Admin::AttestationTemplatesController < AdminController
def uninterlaced_png(uploaded_file) def uninterlaced_png(uploaded_file)
if uploaded_file.present? && uploaded_file.content_type == 'image/png' if uploaded_file.present? && uploaded_file.content_type == 'image/png'
chunky_img = ChunkyPNG::Image.from_io(uploaded_file) chunky_img = ChunkyPNG::Image.from_io(uploaded_file)
chunky_img.save(uploaded_file.tempfile.to_path, interlace: false) chunky_img.save(uploaded_file.tempfile.to_path, interlace: false)
uploaded_file.tempfile.reopen(uploaded_file.tempfile.to_path, 'rb') uploaded_file.tempfile.reopen(uploaded_file.tempfile.to_path, 'rb')
end end
uploaded_file uploaded_file

View file

@ -1,5 +1,5 @@
module CredentialsSyncableConcern module CredentialsSyncableConcern
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
after_update :sync_credentials after_update :sync_credentials

View file

@ -1,5 +1,5 @@
if LogStasher.enabled if LogStasher.enabled
LogStasher.add_custom_fields do |fields| LogStasher.add_custom_fields do |fields|
fields[:type] = "tps" fields[:type] = "tps"
end end
end end

View file

@ -1,6 +1,6 @@
class RemoveDuplicateEmailReceived < ActiveRecord::Migration[5.0] class RemoveDuplicateEmailReceived < ActiveRecord::Migration[5.0]
def change def change
all_mails = MailReceived.all all_mails = MailReceived.all
groupped = all_mails.group_by { |m| m.procedure_id } groupped = all_mails.group_by { |m| m.procedure_id }
filtered = groupped.reject { |k, v| v.length < 2 } filtered = groupped.reject { |k, v| v.length < 2 }
filtered.each do |k, duplicate_mails| filtered.each do |k, duplicate_mails|

View file

@ -6,7 +6,7 @@ describe MailTemplateConcern do
let(:initiated_mail) { Mails::InitiatedMail.default } let(:initiated_mail) { Mails::InitiatedMail.default }
it 'works' do it 'works' do
initiated_mail.object = '[TPS] --numero_dossier-- --libelle_procedure-- --lien_dossier--' initiated_mail.object = '[TPS] --numero_dossier-- --libelle_procedure-- --lien_dossier--'
expected = expected =
"[TPS] #{dossier.id} #{dossier.procedure.libelle} " + "[TPS] #{dossier.id} #{dossier.procedure.libelle} " +
"<a target=\"_blank\" href=\"http://localhost:3000/users/dossiers/#{dossier.id}/recapitulatif\">http://localhost:3000/users/dossiers/#{dossier.id}/recapitulatif</a>" "<a target=\"_blank\" href=\"http://localhost:3000/users/dossiers/#{dossier.id}/recapitulatif\">http://localhost:3000/users/dossiers/#{dossier.id}/recapitulatif</a>"