From a171186dd8c78734617d6e313698757bef0dcdeb Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 1 Oct 2018 14:06:08 +0200 Subject: [PATCH] Enable Style/TrailingCommaInHashLiteral --- .rubocop.yml | 2 +- app/controllers/admin/mail_templates_controller.rb | 2 +- app/controllers/application_controller.rb | 2 +- app/controllers/manager/administrateurs_controller.rb | 2 +- app/dashboards/dossier_dashboard.rb | 2 +- app/dashboards/procedure_dashboard.rb | 2 +- app/dashboards/service_dashboard.rb | 2 +- app/dashboards/user_dashboard.rb | 2 +- app/lib/pipedrive/deal_adapter.rb | 2 +- app/models/gestionnaire.rb | 2 +- app/models/virus_scan.rb | 2 +- config/initializers/active_job_log_subscriber.rb | 2 +- config/initializers/carrierwave.rb | 2 +- .../20160802113112_build_default_preference_list_dossier.rb | 2 +- .../20161007095443_reset_all_preference_list_dossier.rb | 2 +- spec/controllers/users/passwords_controller_spec.rb | 4 ++-- spec/lib/active_storage/service/cellar_service_spec.rb | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 9d050e9f4..21bdf98b8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1226,7 +1226,7 @@ Style/TrailingCommaInArrayLiteral: Enabled: false Style/TrailingCommaInHashLiteral: - Enabled: false + Enabled: true Style/TrailingMethodEndStatement: Enabled: true diff --git a/app/controllers/admin/mail_templates_controller.rb b/app/controllers/admin/mail_templates_controller.rb index 3ef952fae..bc7c948ff 100644 --- a/app/controllers/admin/mail_templates_controller.rb +++ b/app/controllers/admin/mail_templates_controller.rb @@ -35,7 +35,7 @@ class Admin::MailTemplatesController < AdminController { procedure_id: params[:procedure_id], subject: params[:mail_template][:subject], - body: params[:mail_template][:body], + body: params[:mail_template][:body] } end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ed758ddbf..2573a9a38 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -123,7 +123,7 @@ class ApplicationController < ActionController::Base payload.merge!({ browser: browser.name, browser_version: browser.version.to_s, - platform: browser.platform.name, + platform: browser.platform.name }) end diff --git a/app/controllers/manager/administrateurs_controller.rb b/app/controllers/manager/administrateurs_controller.rb index 3f0a63438..91866045c 100644 --- a/app/controllers/manager/administrateurs_controller.rb +++ b/app/controllers/manager/administrateurs_controller.rb @@ -8,7 +8,7 @@ module Manager redirect_to manager_administrateurs_path else render :new, locals: { - page: Administrate::Page::Form.new(dashboard, administrateur), + page: Administrate::Page::Form.new(dashboard, administrateur) } end end diff --git a/app/dashboards/dossier_dashboard.rb b/app/dashboards/dossier_dashboard.rb index 79040b995..b329da0cd 100644 --- a/app/dashboards/dossier_dashboard.rb +++ b/app/dashboards/dossier_dashboard.rb @@ -15,7 +15,7 @@ class DossierDashboard < Administrate::BaseDashboard created_at: Field::DateTime, updated_at: Field::DateTime, hidden_at: Field::DateTime, - types_de_champ: TypesDeChampCollectionField, + types_de_champ: TypesDeChampCollectionField }.freeze # COLLECTION_ATTRIBUTES diff --git a/app/dashboards/procedure_dashboard.rb b/app/dashboards/procedure_dashboard.rb index 8191cb6e2..de0520588 100644 --- a/app/dashboards/procedure_dashboard.rb +++ b/app/dashboards/procedure_dashboard.rb @@ -33,7 +33,7 @@ class ProcedureDashboard < Administrate::BaseDashboard received_mail_template: MailTemplateField, closed_mail_template: MailTemplateField, refused_mail_template: MailTemplateField, - without_continuation_mail_template: MailTemplateField, + without_continuation_mail_template: MailTemplateField }.freeze # COLLECTION_ATTRIBUTES diff --git a/app/dashboards/service_dashboard.rb b/app/dashboards/service_dashboard.rb index 4066b9e49..41521e3b9 100644 --- a/app/dashboards/service_dashboard.rb +++ b/app/dashboards/service_dashboard.rb @@ -19,7 +19,7 @@ class ServiceDashboard < Administrate::BaseDashboard telephone: Field::String, horaires: Field::String, adresse: Field::String, - siret: Field::String, + siret: Field::String }.freeze # COLLECTION_ATTRIBUTES diff --git a/app/dashboards/user_dashboard.rb b/app/dashboards/user_dashboard.rb index c61cc424b..c95e30bd0 100644 --- a/app/dashboards/user_dashboard.rb +++ b/app/dashboards/user_dashboard.rb @@ -14,7 +14,7 @@ class UserDashboard < Administrate::BaseDashboard created_at: Field::DateTime, updated_at: Field::DateTime, current_sign_in_at: Field::DateTime, - dossiers: Field::HasMany, + dossiers: Field::HasMany }.freeze # COLLECTION_ATTRIBUTES diff --git a/app/lib/pipedrive/deal_adapter.rb b/app/lib/pipedrive/deal_adapter.rb index 725a62936..5e8cd77ef 100644 --- a/app/lib/pipedrive/deal_adapter.rb +++ b/app/lib/pipedrive/deal_adapter.rb @@ -55,7 +55,7 @@ class Pipedrive::DealAdapter user_id: Pipedrive::PersonAdapter::PIPEDRIVE_ROBOT_ID, "#{PIPEDRIVE_NB_OF_PROCEDURES_ATTRIBUTE_ID}": nb_of_procedures, value: nb_of_dossiers, - "#{PIPEDRIVE_DEADLINE_ATTRIBUTE_ID}": deadline, + "#{PIPEDRIVE_DEADLINE_ATTRIBUTE_ID}": deadline } Pipedrive::API.post_deal(params) diff --git a/app/models/gestionnaire.rb b/app/models/gestionnaire.rb index b06068620..675cafebb 100644 --- a/app/models/gestionnaire.rb +++ b/app/models/gestionnaire.rb @@ -76,7 +76,7 @@ class Gestionnaire < ApplicationRecord else { start_date: start_date, - procedure_overviews: active_procedure_overviews, + procedure_overviews: active_procedure_overviews } end end diff --git a/app/models/virus_scan.rb b/app/models/virus_scan.rb index f0a45ca31..e6e0db4c9 100644 --- a/app/models/virus_scan.rb +++ b/app/models/virus_scan.rb @@ -4,7 +4,7 @@ class VirusScan < ApplicationRecord enum status: { pending: 'pending', safe: 'safe', - infected: 'infected', + infected: 'infected' } validates :champ_id, uniqueness: { scope: :blob_key } diff --git a/config/initializers/active_job_log_subscriber.rb b/config/initializers/active_job_log_subscriber.rb index cfcddc188..202820450 100644 --- a/config/initializers/active_job_log_subscriber.rb +++ b/config/initializers/active_job_log_subscriber.rb @@ -50,7 +50,7 @@ class ActiveJobLogSubscriber < ::ActiveJob::Logging::LogSubscriber job_id: event.payload[:job].job_id, queue_name: queue_name(event), job_class: event.payload[:job].class.to_s, - job_args: args_info(event.payload[:job]), + job_args: args_info(event.payload[:job]) } end diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index 299105185..a3dd7d654 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -11,7 +11,7 @@ CarrierWave.configure do |config| openstack_api_key: Rails.application.secrets.fog[:openstack_api_key], openstack_username: Rails.application.secrets.fog[:openstack_username], openstack_auth_url: Rails.application.secrets.fog[:openstack_auth_url], - openstack_region: Rails.application.secrets.fog[:openstack_region], + openstack_region: Rails.application.secrets.fog[:openstack_region] } end diff --git a/db/migrate/20160802113112_build_default_preference_list_dossier.rb b/db/migrate/20160802113112_build_default_preference_list_dossier.rb index 0c7f442d8..7cbfe5868 100644 --- a/db/migrate/20160802113112_build_default_preference_list_dossier.rb +++ b/db/migrate/20160802113112_build_default_preference_list_dossier.rb @@ -88,7 +88,7 @@ class BuildDefaultPreferenceListDossier < ActiveRecord::Migration nom_commercial: create_column('Nom commercial', table, 'nom_commercial', 'nom_commercial', 3), raison_sociale: create_column('Raison sociale', table, 'raison_sociale', 'raison_sociale', 3), siret_siege_social: create_column('SIRET siège social', table, 'siret_siege_social', 'siret_siege_social', 2), - date_creation: create_column('Date de création', table, 'date_creation', 'date_creation', 2), + date_creation: create_column('Date de création', table, 'date_creation', 'date_creation', 2) } end diff --git a/db/migrate/20161007095443_reset_all_preference_list_dossier.rb b/db/migrate/20161007095443_reset_all_preference_list_dossier.rb index 6a14ddc6b..c886bdf70 100644 --- a/db/migrate/20161007095443_reset_all_preference_list_dossier.rb +++ b/db/migrate/20161007095443_reset_all_preference_list_dossier.rb @@ -47,7 +47,7 @@ class ResetAllPreferenceListDossier < ActiveRecord::Migration nom_commercial: create_column('Nom commercial', table, 'nom_commercial', 'nom_commercial', 3), raison_sociale: create_column('Raison sociale', table, 'raison_sociale', 'raison_sociale', 3), siret_siege_social: create_column('SIRET siège social', table, 'siret_siege_social', 'siret_siege_social', 2), - date_creation: create_column('Date de création', table, 'date_creation', 'date_creation', 2), + date_creation: create_column('Date de création', table, 'date_creation', 'date_creation', 2) } end diff --git a/spec/controllers/users/passwords_controller_spec.rb b/spec/controllers/users/passwords_controller_spec.rb index 8ee43dc24..5ee6c2020 100644 --- a/spec/controllers/users/passwords_controller_spec.rb +++ b/spec/controllers/users/passwords_controller_spec.rb @@ -22,7 +22,7 @@ describe Users::PasswordsController, type: :controller do user: { reset_password_token: @token, password: "mot de passe super secret", - password_confirmation: "mot de passe super secret", + password_confirmation: "mot de passe super secret" } } expect(subject.current_user).to eq(user) @@ -34,7 +34,7 @@ describe Users::PasswordsController, type: :controller do user: { reset_password_token: @token, password: "mot de passe super secret", - password_confirmation: "mot de passe super secret", + password_confirmation: "mot de passe super secret" } } expect(subject.current_user).to eq(user) diff --git a/spec/lib/active_storage/service/cellar_service_spec.rb b/spec/lib/active_storage/service/cellar_service_spec.rb index 5bbe76d87..c9bcacda0 100644 --- a/spec/lib/active_storage/service/cellar_service_spec.rb +++ b/spec/lib/active_storage/service/cellar_service_spec.rb @@ -47,7 +47,7 @@ describe 'CellarService' do 'Expires' => ['1475366700'], 'Signature' => ['nzCsB6cip8oofkuOdvvJs6FafkA='], 'response-content-disposition' => ["attachment; filename=\"toto.png\"; filename*=UTF-8''toto.png"], - 'response-content-type' => ['image/png'], + 'response-content-type' => ['image/png'] } ) end