Enable the Layout/FirstParameterIndentation cop
This commit is contained in:
parent
9f855afdfe
commit
5125cf8396
10 changed files with 53 additions and 50 deletions
|
@ -95,7 +95,7 @@ Layout/FirstMethodParameterLineBreak:
|
|||
Enabled: false
|
||||
|
||||
Layout/FirstParameterIndentation:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
|
||||
Layout/IndentArray:
|
||||
Enabled: false
|
||||
|
|
|
@ -40,9 +40,11 @@ class Admin::GestionnairesController < AdminController
|
|||
attributes = params.require(:gestionnaire).permit(:email)
|
||||
.merge(password: SecureRandom.hex(5))
|
||||
|
||||
@gestionnaire = Gestionnaire.create(attributes.merge(
|
||||
administrateurs: [current_administrateur]
|
||||
))
|
||||
@gestionnaire = Gestionnaire.create(
|
||||
attributes.merge(
|
||||
administrateurs: [current_administrateur]
|
||||
)
|
||||
)
|
||||
|
||||
if @gestionnaire.errors.messages.empty?
|
||||
User.create(attributes)
|
||||
|
|
|
@ -96,11 +96,12 @@ class Admin::ProceduresController < AdminController
|
|||
procedure = current_administrateur.procedures.find(params[:procedure_id])
|
||||
|
||||
new_procedure_path = ProcedurePath.new(
|
||||
{
|
||||
path: params[:procedure_path],
|
||||
procedure: procedure,
|
||||
administrateur: procedure.administrateur
|
||||
})
|
||||
{
|
||||
path: params[:procedure_path],
|
||||
procedure: procedure,
|
||||
administrateur: procedure.administrateur
|
||||
})
|
||||
|
||||
if new_procedure_path.validate
|
||||
new_procedure_path.delete
|
||||
else
|
||||
|
|
|
@ -13,9 +13,9 @@ module NewGestionnaire
|
|||
# full text search
|
||||
if @dossiers.empty?
|
||||
@dossiers = Search.new(
|
||||
gestionnaire: current_gestionnaire,
|
||||
query: @search_terms,
|
||||
page: params[:page]
|
||||
gestionnaire: current_gestionnaire,
|
||||
query: @search_terms,
|
||||
page: params[:page]
|
||||
).results
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,10 +35,10 @@ class RootController < ApplicationController
|
|||
.each do |champ|
|
||||
champ.type_de_champ.drop_down_list = DropDownList.new(type_de_champ: champ.type_de_champ)
|
||||
champ.drop_down_list.value =
|
||||
"option A
|
||||
option B
|
||||
-- avant l'option C --
|
||||
option C"
|
||||
"option A
|
||||
option B
|
||||
-- avant l'option C --
|
||||
option C"
|
||||
champ.value = '["option B", "option C"]'
|
||||
end
|
||||
|
||||
|
|
|
@ -26,14 +26,14 @@ class ModuleApiCartoService
|
|||
def self.generate_qp coordinates
|
||||
coordinates.inject({}) { |acc, coordinate|
|
||||
acc.merge CARTO::SGMAP::QuartiersPrioritaires::Adapter.new(
|
||||
coordinate.map { |element| [element['lng'], element['lat']] }).to_params
|
||||
coordinate.map { |element| [element['lng'], element['lat']] }).to_params
|
||||
}
|
||||
end
|
||||
|
||||
def self.generate_cadastre coordinates
|
||||
(coordinates.inject([]) { |acc, coordinate|
|
||||
acc << CARTO::SGMAP::Cadastre::Adapter.new(
|
||||
coordinate.map { |element| [element['lng'], element['lat']] }).to_params
|
||||
coordinate.map { |element| [element['lng'], element['lat']] }).to_params
|
||||
}).flatten
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,8 +11,8 @@ class SyncCredentialsService
|
|||
user = User.find_by(email: @email_was)
|
||||
if user
|
||||
return false if !user.update_columns(
|
||||
email: @email,
|
||||
encrypted_password: @encrypted_password)
|
||||
email: @email,
|
||||
encrypted_password: @encrypted_password)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -20,8 +20,8 @@ class SyncCredentialsService
|
|||
gestionnaire = Gestionnaire.find_by(email: @email_was)
|
||||
if gestionnaire
|
||||
return false if !gestionnaire.update_columns(
|
||||
email: @email,
|
||||
encrypted_password: @encrypted_password)
|
||||
email: @email,
|
||||
encrypted_password: @encrypted_password)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -29,8 +29,8 @@ class SyncCredentialsService
|
|||
administrateur = Administrateur.find_by(email: @email_was)
|
||||
if administrateur
|
||||
return false if !administrateur.update_columns(
|
||||
email: @email,
|
||||
encrypted_password: @encrypted_password)
|
||||
email: @email,
|
||||
encrypted_password: @encrypted_password)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@ class BuildDefaultPreferenceListDossier < ActiveRecord::Migration
|
|||
table.second.each do |column|
|
||||
if valid_couple_table_attr? table.first, column.first
|
||||
PreferenceListDossier.create(
|
||||
libelle: column.second[:libelle],
|
||||
table: column.second[:table],
|
||||
attr: column.second[:attr],
|
||||
attr_decorate: column.second[:attr_decorate],
|
||||
bootstrap_lg: column.second[:bootstrap_lg],
|
||||
order: nil,
|
||||
filter: nil,
|
||||
gestionnaire_id: self.id
|
||||
libelle: column.second[:libelle],
|
||||
table: column.second[:table],
|
||||
attr: column.second[:attr],
|
||||
attr_decorate: column.second[:attr_decorate],
|
||||
bootstrap_lg: column.second[:bootstrap_lg],
|
||||
order: nil,
|
||||
filter: nil,
|
||||
gestionnaire_id: self.id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -100,15 +100,15 @@ class ResetAllPreferenceListDossier < ActiveRecord::Migration
|
|||
table.second.each do |column|
|
||||
if valid_couple_table_attr? table.first, column.first
|
||||
PreferenceListDossier.create(
|
||||
libelle: column.second[:libelle],
|
||||
table: column.second[:table],
|
||||
attr: column.second[:attr],
|
||||
attr_decorate: column.second[:attr_decorate],
|
||||
bootstrap_lg: column.second[:bootstrap_lg],
|
||||
order: nil,
|
||||
filter: nil,
|
||||
procedure_id: procedure_id,
|
||||
gestionnaire: self
|
||||
libelle: column.second[:libelle],
|
||||
table: column.second[:table],
|
||||
attr: column.second[:attr],
|
||||
attr_decorate: column.second[:attr_decorate],
|
||||
bootstrap_lg: column.second[:bootstrap_lg],
|
||||
order: nil,
|
||||
filter: nil,
|
||||
procedure_id: procedure_id,
|
||||
gestionnaire: self
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,15 +2,15 @@ namespace :cloudstorage do
|
|||
task init: :environment do
|
||||
os_config = (YAML.load_file(Fog.credentials_path))['default']
|
||||
@os = OpenStack::Connection.create(
|
||||
{
|
||||
username: os_config['openstack_username'],
|
||||
api_key: os_config['openstack_api_key'],
|
||||
auth_method: "password",
|
||||
auth_url: "https://auth.cloud.ovh.net/v2.0/",
|
||||
authtenant_name: os_config['openstack_tenant'],
|
||||
service_type: "object-store",
|
||||
region: os_config['openstack_region']
|
||||
}
|
||||
{
|
||||
username: os_config['openstack_username'],
|
||||
api_key: os_config['openstack_api_key'],
|
||||
auth_method: "password",
|
||||
auth_url: "https://auth.cloud.ovh.net/v2.0/",
|
||||
authtenant_name: os_config['openstack_tenant'],
|
||||
service_type: "object-store",
|
||||
region: os_config['openstack_region']
|
||||
}
|
||||
)
|
||||
@cont = @os.container(CarrierWave::Uploader::Base.fog_directory)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue