From 14c17476456787ddda2ed68cc4c1700a2f5aa688 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 15 Jan 2018 19:17:01 +0100 Subject: [PATCH] Enable the Layout/MultilineArrayBraceLayout cop --- .rubocop.yml | 3 ++- app/models/concerns/tags_substitution_concern.rb | 3 ++- spec/features/new_gestionnaire/gestionnaire_spec.rb | 3 ++- spec/models/procedure_presentation_spec.rb | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 10af7eb1a..7f6109c35 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -124,7 +124,8 @@ Layout/LeadingCommentSpace: Enabled: true Layout/MultilineArrayBraceLayout: - Enabled: false + Enabled: true + EnforcedStyle: new_line Layout/MultilineAssignmentLayout: Enabled: false diff --git a/app/models/concerns/tags_substitution_concern.rb b/app/models/concerns/tags_substitution_concern.rb index 0fc3b059e..6dcfc25ce 100644 --- a/app/models/concerns/tags_substitution_concern.rb +++ b/app/models/concerns/tags_substitution_concern.rb @@ -97,7 +97,8 @@ module TagsSubstitutionConcern [dossier_tags, dossier], [individual_tags, dossier.individual], [entreprise_tags, dossier.entreprise], - [etablissement_tags, dossier.entreprise&.etablissement]] + [etablissement_tags, dossier.entreprise&.etablissement] + ] tags_and_datas .map { |(tags, data)| [filter_tags(tags, dossier.termine?), data] } diff --git a/spec/features/new_gestionnaire/gestionnaire_spec.rb b/spec/features/new_gestionnaire/gestionnaire_spec.rb index d858ca41e..ed4cacc89 100644 --- a/spec/features/new_gestionnaire/gestionnaire_spec.rb +++ b/spec/features/new_gestionnaire/gestionnaire_spec.rb @@ -162,7 +162,8 @@ feature 'The gestionnaire part' do "suivi #{suivi}", "traité #{traite}", "tous les dossiers #{tous_les_dossiers}", - "archivé #{archive}"] + "archivé #{archive}" + ] texts.each { |text| expect(page).to have_text(text) } end diff --git a/spec/models/procedure_presentation_spec.rb b/spec/models/procedure_presentation_spec.rb index f75aa84cc..21c8a6a9e 100644 --- a/spec/models/procedure_presentation_spec.rb +++ b/spec/models/procedure_presentation_spec.rb @@ -5,7 +5,8 @@ describe ProcedurePresentation do ProcedurePresentation.create( displayed_fields: [ { "label" => "test1", "table" => "user" }.to_json, - { "label" => "test2", "table" => "champs" }.to_json], + { "label" => "test2", "table" => "champs" }.to_json + ], sort: { "table" => "user","column" => "email","order" => "asc" }.to_json, filters: { "a-suivre" => [], "suivis" => [{ "label" => "label1", "table" => "table1", "column" => "column1" }] }.to_json ).id