Enable the Layout/EmptyLinesAroundClassBody cop
This commit is contained in:
parent
f1907f4d0e
commit
24e7537c49
52 changed files with 1 additions and 69 deletions
|
@ -55,7 +55,7 @@ Layout/EmptyLinesAroundBlockBody:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/EmptyLinesAroundClassBody:
|
Layout/EmptyLinesAroundClassBody:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
|
@ -13,5 +13,4 @@ class API::V1::ProceduresController < APIController
|
||||||
Rails.logger.error(e.message)
|
Rails.logger.error(e.message)
|
||||||
render json: {}, status: 404
|
render json: {}, status: 404
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class Backoffice::AvisController < ApplicationController
|
class Backoffice::AvisController < ApplicationController
|
||||||
|
|
||||||
before_action :authenticate_gestionnaire!, except: [:sign_up, :create_gestionnaire]
|
before_action :authenticate_gestionnaire!, except: [:sign_up, :create_gestionnaire]
|
||||||
before_action :redirect_if_no_sign_up_needed, only: [:sign_up]
|
before_action :redirect_if_no_sign_up_needed, only: [:sign_up]
|
||||||
before_action :check_avis_exists_and_email_belongs_to_avis, only: [:sign_up, :create_gestionnaire]
|
before_action :check_avis_exists_and_email_belongs_to_avis, only: [:sign_up, :create_gestionnaire]
|
||||||
|
|
|
@ -21,5 +21,4 @@ class Backoffice::Dossiers::ProcedureController < Backoffice::DossiersListContro
|
||||||
def retrieve_procedure
|
def retrieve_procedure
|
||||||
current_gestionnaire.procedures.find params[:id]
|
current_gestionnaire.procedures.find params[:id]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
class DossiersDecorator < Draper::CollectionDecorator
|
class DossiersDecorator < Draper::CollectionDecorator
|
||||||
delegate :current_page, :per_page, :offset, :total_entries, :total_pages
|
delegate :current_page, :per_page, :offset, :total_entries, :total_pages
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
class EtablissementDecorator < Draper::Decorator
|
class EtablissementDecorator < Draper::Decorator
|
||||||
delegate_all
|
delegate_all
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ProcedureDecorator < Draper::Decorator
|
class ProcedureDecorator < Draper::Decorator
|
||||||
|
|
||||||
delegate_all
|
delegate_all
|
||||||
|
|
||||||
def lien
|
def lien
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
class ProceduresDecorator < Draper::CollectionDecorator
|
class ProceduresDecorator < Draper::CollectionDecorator
|
||||||
delegate :current_page, :per_page, :offset, :total_entries, :total_pages
|
delegate :current_page, :per_page, :offset, :total_entries, :total_pages
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class TypeDeChampDecorator < Draper::Decorator
|
class TypeDeChampDecorator < Draper::Decorator
|
||||||
|
|
||||||
delegate_all
|
delegate_all
|
||||||
|
|
||||||
def button_up params
|
def button_up params
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
class TypeDeChampPrivateDecorator < TypeDeChampDecorator
|
class TypeDeChampPrivateDecorator < TypeDeChampDecorator
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class DossierFacades
|
class DossierFacades
|
||||||
|
|
||||||
#TODO rechercher en fonction de la personne/email
|
#TODO rechercher en fonction de la personne/email
|
||||||
def initialize(dossier_id, email, champ_id = nil)
|
def initialize(dossier_id, email, champ_id = nil)
|
||||||
@dossier = Dossier.find(dossier_id)
|
@dossier = Dossier.find(dossier_id)
|
||||||
|
|
|
@ -80,5 +80,4 @@ class DossiersListFacades
|
||||||
def base_url liste
|
def base_url liste
|
||||||
@procedure.nil? ? backoffice_dossiers_path(liste: liste) : backoffice_dossiers_procedure_path(id: @procedure.id, liste: liste)
|
@procedure.nil? ? backoffice_dossiers_path(liste: liste) : backoffice_dossiers_procedure_path(id: @procedure.id, liste: liste)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class InviteDossierFacades < DossierFacades
|
class InviteDossierFacades < DossierFacades
|
||||||
|
|
||||||
#TODO rechercher en fonction de la personne/email
|
#TODO rechercher en fonction de la personne/email
|
||||||
def initialize id, email
|
def initialize id, email
|
||||||
@dossier = Invite.where(email: email, id: id).first!.dossier
|
@dossier = Invite.where(email: email, id: id).first!.dossier
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
module Carto
|
module Carto
|
||||||
module GeoAPI
|
module GeoAPI
|
||||||
class Driver
|
class Driver
|
||||||
|
|
||||||
def self.regions
|
def self.regions
|
||||||
call regions_url
|
call regions_url
|
||||||
end
|
end
|
||||||
|
@ -29,7 +28,6 @@ module Carto
|
||||||
rescue RestClient::ServiceUnavailable
|
rescue RestClient::ServiceUnavailable
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
class AvisMailer < ApplicationMailer
|
class AvisMailer < ApplicationMailer
|
||||||
|
|
||||||
def avis_invitation(avis)
|
def avis_invitation(avis)
|
||||||
@avis = avis
|
@avis = avis
|
||||||
email = @avis.gestionnaire.try(:email) || @avis.email
|
email = @avis.gestionnaire.try(:email) || @avis.email
|
||||||
mail(to: email, subject: "Donnez votre avis sur le dossier nº #{@avis.dossier.id} (#{@avis.dossier.procedure.libelle})")
|
mail(to: email, subject: "Donnez votre avis sur le dossier nº #{@avis.dossier.id} (#{@avis.dossier.procedure.libelle})")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class GestionnaireMailer < ApplicationMailer
|
class GestionnaireMailer < ApplicationMailer
|
||||||
|
|
||||||
def new_gestionnaire email, password
|
def new_gestionnaire email, password
|
||||||
send_mail email, password, "Vous avez été nommé accompagnateur sur la plateforme TPS"
|
send_mail email, password, "Vous avez été nommé accompagnateur sur la plateforme TPS"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class InviteMailer < ApplicationMailer
|
class InviteMailer < ApplicationMailer
|
||||||
|
|
||||||
def invite_user invite
|
def invite_user invite
|
||||||
vars_mailer invite
|
vars_mailer invite
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
class ChampPrivate < Champ
|
class ChampPrivate < Champ
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
class ChampPublic < Champ
|
class ChampPublic < Champ
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class Invite < ActiveRecord::Base
|
class Invite < ActiveRecord::Base
|
||||||
|
|
||||||
belongs_to :dossier
|
belongs_to :dossier
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
class InviteGestionnaire < Invite
|
class InviteGestionnaire < Invite
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
class InviteUser < Invite
|
class InviteUser < Invite
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
class TypeDeChampPrivate < TypeDeChamp
|
class TypeDeChampPrivate < TypeDeChamp
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
class TypeDeChampPublic < TypeDeChamp
|
class TypeDeChampPublic < TypeDeChamp
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class BrowserService
|
class BrowserService
|
||||||
|
|
||||||
def self.get_browser request
|
def self.get_browser request
|
||||||
BROWSER.value = Browser.new(request.user_agent)
|
BROWSER.value = Browser.new(request.user_agent)
|
||||||
end
|
end
|
||||||
|
@ -15,5 +14,4 @@ class BrowserService
|
||||||
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class DossierService
|
class DossierService
|
||||||
|
|
||||||
def initialize dossier, siret, france_connect_information
|
def initialize dossier, siret, france_connect_information
|
||||||
@dossier = dossier
|
@dossier = dossier
|
||||||
@siret = siret
|
@siret = siret
|
||||||
|
|
|
@ -186,5 +186,4 @@ class DossiersListGestionnaireService
|
||||||
def current_preference_smart_listing_page
|
def current_preference_smart_listing_page
|
||||||
@current_devise_profil.preference_smart_listing_page
|
@current_devise_profil.preference_smart_listing_page
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class FranceConnectSaltService
|
class FranceConnectSaltService
|
||||||
|
|
||||||
attr_reader :model
|
attr_reader :model
|
||||||
|
|
||||||
def initialize france_connect_information
|
def initialize france_connect_information
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class NotificationService
|
class NotificationService
|
||||||
|
|
||||||
def initialize type_notif, dossier_id, attribut_change=''
|
def initialize type_notif, dossier_id, attribut_change=''
|
||||||
@type_notif = type_notif
|
@type_notif = type_notif
|
||||||
@dossier_id = dossier_id
|
@dossier_id = dossier_id
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class RenderPartialService
|
class RenderPartialService
|
||||||
|
|
||||||
attr_accessor :controller, :method
|
attr_accessor :controller, :method
|
||||||
|
|
||||||
def initialize controller, method
|
def initialize controller, method
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class SyncCredentialsService
|
class SyncCredentialsService
|
||||||
|
|
||||||
def initialize klass, email_was, email, encrypted_password
|
def initialize klass, email_was, email, encrypted_password
|
||||||
@klass = klass
|
@klass = klass
|
||||||
@email_was = email_was
|
@email_was = email_was
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class UserRoutesAuthorizationService
|
class UserRoutesAuthorizationService
|
||||||
|
|
||||||
def self.authorized_route? controller, dossier
|
def self.authorized_route? controller, dossier
|
||||||
auth = controller.route_authorization
|
auth = controller.route_authorization
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
class ProcedureLogoUploader < BaseUploader
|
class ProcedureLogoUploader < BaseUploader
|
||||||
|
|
||||||
def root
|
def root
|
||||||
File.join(Rails.root, "public")
|
File.join(Rails.root, "public")
|
||||||
end
|
end
|
||||||
|
@ -47,5 +46,4 @@ class ProcedureLogoUploader < BaseUploader
|
||||||
def generate_secure_token
|
def generate_secure_token
|
||||||
SecureRandom.uuid
|
SecureRandom.uuid
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class EmailFormatValidator < ActiveModel::Validator
|
class EmailFormatValidator < ActiveModel::Validator
|
||||||
|
|
||||||
def email_regex
|
def email_regex
|
||||||
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
|
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class ProcedurePathFormatValidator < ActiveModel::Validator
|
class ProcedurePathFormatValidator < ActiveModel::Validator
|
||||||
|
|
||||||
def path_regex
|
def path_regex
|
||||||
/^[a-z0-9_]{3,30}$/
|
/^[a-z0-9_]{3,30}$/
|
||||||
end
|
end
|
||||||
|
@ -8,5 +7,4 @@ class ProcedurePathFormatValidator < ActiveModel::Validator
|
||||||
return false if record.path.blank?
|
return false if record.path.blank?
|
||||||
record.errors[:path] << "Path invalide" unless path_regex.match(record.path)
|
record.errors[:path] << "Path invalide" unless path_regex.match(record.path)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
require "unicode_utils/upcase"
|
require "unicode_utils/upcase"
|
||||||
|
|
||||||
class String
|
class String
|
||||||
|
|
||||||
def upcase
|
def upcase
|
||||||
UnicodeUtils.upcase(self)
|
UnicodeUtils.upcase(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
class UpdateModuleAPICarto < ActiveRecord::Migration
|
class UpdateModuleAPICarto < ActiveRecord::Migration
|
||||||
|
|
||||||
class Procedure < ActiveRecord::Base
|
class Procedure < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class ModuleAPICarto < ActiveRecord::Base
|
class ModuleAPICarto < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def up
|
def up
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
class CreateFranceConnectInformation < ActiveRecord::Migration
|
class CreateFranceConnectInformation < ActiveRecord::Migration
|
||||||
|
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class FranceConnectInformation < ActiveRecord::Base
|
class FranceConnectInformation < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def up
|
def up
|
||||||
|
|
|
@ -8,7 +8,6 @@ class PieceJustificativeHaveUser < ActiveRecord::Migration
|
||||||
end
|
end
|
||||||
|
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -8,7 +8,6 @@ class CerfaHaveUser < ActiveRecord::Migration
|
||||||
end
|
end
|
||||||
|
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
class SetOriginalFilenameForUploaders < ActiveRecord::Migration
|
class SetOriginalFilenameForUploaders < ActiveRecord::Migration
|
||||||
class PieceJustificative < ActiveRecord::Base
|
class PieceJustificative < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Cerfa < ActiveRecord::Base
|
class Cerfa < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
class DeleteDefaultDescriptionToDossier < ActiveRecord::Migration
|
class DeleteDefaultDescriptionToDossier < ActiveRecord::Migration
|
||||||
class Dossier < ActiveRecord::Base
|
class Dossier < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Champ < ActiveRecord::Base
|
class Champ < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class Procedure < ActiveRecord::Base
|
class Procedure < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class TypeDeChamp < ActiveRecord::Base
|
class TypeDeChamp < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def up
|
def up
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
class ConvertAllDatetimeToDateOnDatabase < ActiveRecord::Migration
|
class ConvertAllDatetimeToDateOnDatabase < ActiveRecord::Migration
|
||||||
|
|
||||||
class TypeDeChamp < ActiveRecord::Base
|
class TypeDeChamp < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class FixDefaultTypeOnTypeDeChampTable < ActiveRecord::Migration
|
class FixDefaultTypeOnTypeDeChampTable < ActiveRecord::Migration
|
||||||
class TypeDeChamp < ActiveRecord::Base
|
class TypeDeChamp < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def up
|
def up
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class AddTypeAttrInChampTable < ActiveRecord::Migration
|
class AddTypeAttrInChampTable < ActiveRecord::Migration
|
||||||
|
|
||||||
class TypeDeChamp < ActiveRecord::Base
|
class TypeDeChamp < ActiveRecord::Base
|
||||||
has_many :champs
|
has_many :champs
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class DeleteValueOfFilterProcedure < ActiveRecord::Migration
|
class DeleteValueOfFilterProcedure < ActiveRecord::Migration
|
||||||
class Gestionnaire < ActiveRecord::Base
|
class Gestionnaire < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -4,7 +4,6 @@ class InitiatedAllReceivedMailForProcedure < ActiveRecord::Migration
|
||||||
end
|
end
|
||||||
|
|
||||||
class MailTemplate < ActiveRecord::Base
|
class MailTemplate < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class ::MailReceived < MailTemplate
|
class ::MailReceived < MailTemplate
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class ChangeEmptytoNilInPreferenceListDossierTable < ActiveRecord::Migration
|
class ChangeEmptytoNilInPreferenceListDossierTable < ActiveRecord::Migration
|
||||||
class PreferenceListDossier < ActiveRecord::Base
|
class PreferenceListDossier < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class FixTypeDeChampHeaderSectionWithMandatoryTrue < ActiveRecord::Migration
|
class FixTypeDeChampHeaderSectionWithMandatoryTrue < ActiveRecord::Migration
|
||||||
class TypeDeChamp < ActiveRecord::Base
|
class TypeDeChamp < ActiveRecord::Base
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -143,7 +143,6 @@ class ResetAllPreferenceListDossier < ActiveRecord::Migration
|
||||||
class Procedure < ActiveRecord::Base
|
class Procedure < ActiveRecord::Base
|
||||||
has_many :assign_to, dependent: :destroy
|
has_many :assign_to, dependent: :destroy
|
||||||
has_many :gestionnaires, through: :assign_to
|
has_many :gestionnaires, through: :assign_to
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
# Preview all emails at http://localhost:3000/rails/mailers/avis_mailer
|
# Preview all emails at http://localhost:3000/rails/mailers/avis_mailer
|
||||||
class AvisMailerPreview < ActionMailer::Preview
|
class AvisMailerPreview < ActionMailer::Preview
|
||||||
|
|
||||||
def avis_invitation
|
def avis_invitation
|
||||||
AvisMailer.avis_invitation(Avis.last)
|
AvisMailer.avis_invitation(Avis.last)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
class NotificationMailerPreview < ActionMailer::Preview
|
class NotificationMailerPreview < ActionMailer::Preview
|
||||||
|
|
||||||
def send_notification
|
def send_notification
|
||||||
NotificationMailer.send_notification(Dossier.last, Dossier.last.procedure.initiated_mail_template)
|
NotificationMailer.send_notification(Dossier.last, Dossier.last.procedure.initiated_mail_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue