diff --git a/.rubocop.yml b/.rubocop.yml index d35f0a87c..5e7830875 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -155,7 +155,7 @@ Layout/RescueEnsureAlignment: Enabled: true Layout/SpaceAfterColon: - Enabled: false + Enabled: true Layout/SpaceAfterComma: Enabled: false diff --git a/lib/tasks/2017_10_30_copy_commentaire_piece_justificative_to_file.rake b/lib/tasks/2017_10_30_copy_commentaire_piece_justificative_to_file.rake index 2ad820f4a..8e3422582 100644 --- a/lib/tasks/2017_10_30_copy_commentaire_piece_justificative_to_file.rake +++ b/lib/tasks/2017_10_30_copy_commentaire_piece_justificative_to_file.rake @@ -1,6 +1,6 @@ namespace :'2017_10_30_copy_commentaire_piece_justificative_to_file' do task set: :environment do - commentaires_to_process = Commentaire.where(file:nil).where.not(piece_justificative_id: nil).reorder(id: :desc) + commentaires_to_process = Commentaire.where(file: nil).where.not(piece_justificative_id: nil).reorder(id: :desc) puts "#{commentaires_to_process.count} commentaires to process..." diff --git a/spec/controllers/api/v1/procedures_controller_spec.rb b/spec/controllers/api/v1/procedures_controller_spec.rb index 1eaa71374..00c526a4f 100644 --- a/spec/controllers/api/v1/procedures_controller_spec.rb +++ b/spec/controllers/api/v1/procedures_controller_spec.rb @@ -11,12 +11,12 @@ describe API::V1::ProceduresController, type: :controller do end context 'when procedure does not belong to administrateur' do let(:procedure) { create(:procedure, administrateur: create(:administrateur)) } - subject { get :show, params:{id: procedure, token: admin.api_token }} + subject { get :show, params: {id: procedure, token: admin.api_token }} it { expect(subject.status).to eq(404) } end context 'when procedure exist' do let(:procedure) { create(:procedure, :with_two_type_de_piece_justificative, :with_type_de_champ, administrateur: admin) } - subject { get :show, params:{id: procedure, token: admin.api_token }} + subject { get :show, params: {id: procedure, token: admin.api_token }} it 'return REST code 200', :show_in_doc do expect(subject.status).to eq(200) @@ -25,7 +25,7 @@ describe API::V1::ProceduresController, type: :controller do describe 'body' do let(:module_api_carto) { create(:module_api_carto, use_api_carto: true, quartiers_prioritaires: true, cadastre: true) } let(:procedure) { create(:procedure, :with_type_de_champ, :with_two_type_de_piece_justificative, module_api_carto: module_api_carto, administrateur: admin) } - let(:response) { get :show, params:{id: procedure.id, token: admin.api_token }} + let(:response) { get :show, params: {id: procedure.id, token: admin.api_token }} subject { JSON.parse(response.body, symbolize_names: true)[:procedure] } it { expect(subject[:id]).to eq(procedure.id) } diff --git a/spec/controllers/users/dossiers/add_siret_controller_spec.rb b/spec/controllers/users/dossiers/add_siret_controller_spec.rb index 2481fd480..091f07aab 100644 --- a/spec/controllers/users/dossiers/add_siret_controller_spec.rb +++ b/spec/controllers/users/dossiers/add_siret_controller_spec.rb @@ -8,7 +8,7 @@ describe Users::Dossiers::AddSiretController, type: :controller do sign_in dossier.user end - subject { get :show, params:{dossier_id: dossier.id }} + subject { get :show, params: {dossier_id: dossier.id }} context 'when dossier is not attached at a procedure with individual siret attribut' do it { is_expected.to redirect_to users_dossiers_path } diff --git a/spec/controllers/users/dossiers/commentaires_controller_spec.rb b/spec/controllers/users/dossiers/commentaires_controller_spec.rb index 18908f468..2871486d9 100644 --- a/spec/controllers/users/dossiers/commentaires_controller_spec.rb +++ b/spec/controllers/users/dossiers/commentaires_controller_spec.rb @@ -6,7 +6,7 @@ describe Users::Dossiers::CommentairesController, type: :controller do describe '#POST create' do subject { - post :create, params:{dossier_id: dossier.id, texte_commentaire: texte_commentaire} + post :create, params: {dossier_id: dossier.id, texte_commentaire: texte_commentaire} dossier.reload } diff --git a/spec/support/shared_exemples_for_dossier.rb b/spec/support/shared_exemples_for_dossier.rb index 7a39ffa22..308aa2b83 100644 --- a/spec/support/shared_exemples_for_dossier.rb +++ b/spec/support/shared_exemples_for_dossier.rb @@ -4,7 +4,7 @@ RSpec.shared_examples 'not owner of dossier' do |controller, redirect| let(:dossier_2) { create(:dossier) } before do - get controller, params:{dossier_id: dossier_2.id} + get controller, params: {dossier_id: dossier_2.id} end it 'redirect to home page' do