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