Enable the Layout/ExtraSpacing cop
This commit is contained in:
parent
f1d66e40c3
commit
d248afc376
19 changed files with 34 additions and 31 deletions
|
@ -71,7 +71,10 @@ Layout/EndOfLine:
|
|||
EnforcedStyle: lf
|
||||
|
||||
Layout/ExtraSpacing:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- "Guardfile"
|
||||
- "db/schema.rb"
|
||||
|
||||
Layout/FirstArrayElementLineBreak:
|
||||
Enabled: false
|
||||
|
|
|
@ -61,7 +61,7 @@ class StatsController < ApplicationController
|
|||
count_per_administrateur = procedures.group(:administrateur_id).count.values
|
||||
{
|
||||
'Une procédure' => count_per_administrateur.select { |count| count == 1 }.count,
|
||||
'Entre deux et cinq procédures' => count_per_administrateur.select { |count| 2 <= count && count <= 5 }.count,
|
||||
'Entre deux et cinq procédures' => count_per_administrateur.select { |count| 2 <= count && count <= 5 }.count,
|
||||
'Plus de cinq procédures' => count_per_administrateur.select { |count| 5 < count }.count
|
||||
}
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class Users::Dossiers::AddSiretController < ApplicationController
|
||||
def show
|
||||
@facade = DossierFacades.new params[:dossier_id], current_user.email
|
||||
@facade = DossierFacades.new params[:dossier_id], current_user.email
|
||||
|
||||
raise ActiveRecord::RecordNotFound unless @facade.procedure.individual_with_siret?
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ SmartListing.configure do |config|
|
|||
# :unlimited_per_page => false, # allow infinite page size
|
||||
# :paginate => true, # allow pagination
|
||||
# :memorize_per_page => false, # save per page settings in the cookie
|
||||
:page_sizes => [10, 20, 50, 100], # set available page sizes array
|
||||
:page_sizes => [10, 20, 50, 100], # set available page sizes array
|
||||
# :kaminari_options => {:theme => "smart_listing"}, # Kaminari's paginate helper options
|
||||
})
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class DeleteValueOfFilterProcedure < ActiveRecord::Migration
|
||||
class Gestionnaire < ActiveRecord::Base
|
||||
class Gestionnaire < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def change
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace :dev do
|
||||
desc 'Initialise dev environment'
|
||||
task :init do
|
||||
task :init do
|
||||
puts 'start initialisation'
|
||||
Rake::Task['dev:generate_token_file'].invoke
|
||||
Rake::Task['dev:generate_franceconnect_file'].invoke
|
||||
|
@ -10,10 +10,10 @@ namespace :dev do
|
|||
puts 'end initialisation'
|
||||
end
|
||||
|
||||
task :generate_token_file do
|
||||
task :generate_token_file do
|
||||
puts 'creating token.rb file'
|
||||
res = `rake secret`.gsub("\n", '')
|
||||
file = File.new('config/initializers/token.rb', 'w+')
|
||||
file = File.new('config/initializers/token.rb', 'w+')
|
||||
comment = <<EOF
|
||||
EOF
|
||||
file.write(comment)
|
||||
|
@ -22,7 +22,7 @@ EOF
|
|||
end
|
||||
|
||||
task :generate_franceconnect_file do
|
||||
file = File.new('config/france_connect.yml', 'w+')
|
||||
file = File.new('config/france_connect.yml', 'w+')
|
||||
comment = <<EOF
|
||||
particulier_identifier: plop
|
||||
particulier_secret: plip
|
||||
|
@ -48,7 +48,7 @@ default:
|
|||
openstack_auth_url: "https://auth.cloud.ovh.net/v2.0/tokens"
|
||||
openstack_region: "SBG1"
|
||||
EOF
|
||||
file = File.new("config/fog_credentials.test.yml", "w+")
|
||||
file = File.new("config/fog_credentials.test.yml", "w+")
|
||||
file.write(content)
|
||||
file.close
|
||||
end
|
||||
|
@ -58,7 +58,7 @@ EOF
|
|||
content = <<EOF
|
||||
remote_storage: true
|
||||
EOF
|
||||
file = File.new("config/initializers/features.yml", "w+")
|
||||
file = File.new("config/initializers/features.yml", "w+")
|
||||
file.write(content)
|
||||
file.close
|
||||
end
|
||||
|
|
|
@ -369,10 +369,10 @@ describe Users::DossiersController, type: :controller do
|
|||
dossier.reload
|
||||
end
|
||||
|
||||
it { expect(dossier.individual.gender).to eq 'M.' }
|
||||
it { expect(dossier.individual.nom).to eq 'Julien' }
|
||||
it { expect(dossier.individual.prenom).to eq 'Xavier' }
|
||||
it { expect(dossier.individual.birthdate).to eq '20/01/1991' }
|
||||
it { expect(dossier.individual.gender).to eq 'M.' }
|
||||
it { expect(dossier.individual.nom).to eq 'Julien' }
|
||||
it { expect(dossier.individual.prenom).to eq 'Xavier' }
|
||||
it { expect(dossier.individual.birthdate).to eq '20/01/1991' }
|
||||
it { expect(dossier.procedure.for_individual).to eq true }
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe ProcedureDecorator do
|
||||
let(:procedure) { create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10)) }
|
||||
let(:procedure) { create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10)) }
|
||||
subject { procedure.decorate }
|
||||
|
||||
describe 'lien' do
|
||||
|
|
|
@ -20,7 +20,7 @@ describe AdminProceduresShowFacades do
|
|||
describe '.dossiers' do
|
||||
subject { super().dossiers }
|
||||
|
||||
it { expect(subject.size).to eq(4) }
|
||||
it { expect(subject.size).to eq(4) }
|
||||
end
|
||||
|
||||
describe '.dossiers_for_pie_highchart' do
|
||||
|
@ -34,7 +34,7 @@ describe AdminProceduresShowFacades do
|
|||
|
||||
it { expect(subject.size).to eq(1) }
|
||||
|
||||
it { expect(subject.first.state).to eq('initiated') }
|
||||
it { expect(subject.first.state).to eq('initiated') }
|
||||
it { expect(subject.first.total).to eq(1) }
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||
|
||||
feature 'when gestionnaire come to /backoffice and is not authenticated' do
|
||||
let(:procedure) { create(:procedure) }
|
||||
let!(:dossier) { create(:dossier, procedure: procedure) }
|
||||
let!(:dossier) { create(:dossier, procedure: procedure) }
|
||||
before do
|
||||
visit backoffice_path
|
||||
end
|
||||
|
@ -25,8 +25,8 @@ feature 'when gestionnaire come to /backoffice and is not authenticated' do
|
|||
|
||||
before do
|
||||
create :assign_to, gestionnaire: gestionnaire, procedure: procedure
|
||||
page.find_by_id(:user_email).set gestionnaire.email
|
||||
page.find_by_id(:user_password).set gestionnaire.password
|
||||
page.find_by_id(:user_email).set gestionnaire.email
|
||||
page.find_by_id(:user_password).set gestionnaire.password
|
||||
page.click_on 'Se connecter'
|
||||
end
|
||||
scenario 'he is redirected to /backoffice' do
|
||||
|
|
|
@ -39,8 +39,8 @@ feature 'search file on gestionnaire backoffice' do
|
|||
end
|
||||
|
||||
context 'when terms input does return result' do
|
||||
let!(:dossier) { create(:dossier, :with_entreprise, procedure: procedure, state: 'initiated') }
|
||||
let!(:dossier_2) { create(:dossier, procedure: procedure, state: 'initiated') }
|
||||
let!(:dossier) { create(:dossier, :with_entreprise, procedure: procedure, state: 'initiated') }
|
||||
let!(:dossier_2) { create(:dossier, procedure: procedure, state: 'initiated') }
|
||||
|
||||
let(:terms) { dossier.entreprise.raison_sociale }
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ describe Administrateur, type: :model do
|
|||
describe 'generate_api_token' do
|
||||
let(:token) { 'bullshit' }
|
||||
let(:new_token) { 'pocket_master' }
|
||||
let!(:admin_1) { create(:administrateur, email: 'toto@tps.com', password: 'password', api_token: token) }
|
||||
let!(:admin_1) { create(:administrateur, email: 'toto@tps.com', password: 'password', api_token: token) }
|
||||
before do
|
||||
allow(SecureRandom).to receive(:hex).and_return(token, new_token)
|
||||
admin_1.renew_api_token
|
||||
|
|
|
@ -7,7 +7,7 @@ describe AccompagnateurService do
|
|||
let(:accompagnateur_service) { AccompagnateurService.new accompagnateur, procedure, to}
|
||||
|
||||
describe '#change_assignement!' do
|
||||
subject { accompagnateur_service.change_assignement! }
|
||||
subject { accompagnateur_service.change_assignement! }
|
||||
|
||||
context 'when accompagnateur is not assign at the procedure' do
|
||||
let(:to) { AccompagnateurService::ASSIGN }
|
||||
|
|
|
@ -43,7 +43,7 @@ describe 'admin/types_de_champ/show.html.haml', type: :view do
|
|||
let!(:type_de_champ_1) { create(:type_de_champ_public, procedure: procedure, order_place: 1) }
|
||||
it { expect(subject).to have_css('#btn_down_0') }
|
||||
it { expect(subject).to have_css('#btn_up_0[style*="visibility: hidden"]') }
|
||||
it { expect(subject).to have_css('#btn_up_1') }
|
||||
it { expect(subject).to have_css('#btn_up_1') }
|
||||
it { expect(subject).to have_css('#btn_down_1[style*="visibility: hidden"]') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -51,7 +51,7 @@ describe 'admin/types_de_champ/show.html.haml', type: :view do
|
|||
let!(:type_de_champ_1) { create(:type_de_champ_private, procedure: procedure, order_place: 1) }
|
||||
it { expect(subject).to have_css('#btn_down_0') }
|
||||
it { expect(subject).to have_css('#btn_up_0[style*="visibility: hidden"]') }
|
||||
it { expect(subject).to have_css('#btn_up_1') }
|
||||
it { expect(subject).to have_css('#btn_up_1') }
|
||||
it { expect(subject).to have_css('#btn_down_1[style*="visibility: hidden"]') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,7 +41,7 @@ describe 'admin/pieces_justificatives/show.html.haml', type: :view do
|
|||
let!(:type_de_piece_justificative_1) { create(:type_de_piece_justificative, procedure: procedure, order_place: 1) }
|
||||
it { expect(subject).to have_css('#btn_down_0') }
|
||||
it { expect(subject).not_to have_css('#btn_up_0') }
|
||||
it { expect(subject).to have_css('#btn_up_1') }
|
||||
it { expect(subject).to have_css('#btn_up_1') }
|
||||
it { expect(subject).not_to have_css('#btn_down_1') }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'backoffice/dossiers/show.html.haml', type: :view do
|
||||
let!(:dossier) { create(:dossier, :with_entreprise, state: state) }
|
||||
let!(:dossier) { create(:dossier, :with_entreprise, state: state) }
|
||||
let(:state) { 'draft' }
|
||||
let(:dossier_id) { dossier.id }
|
||||
let(:gestionnaire) { create(:gestionnaire) }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'dossiers/_infos_dossier.html.haml', type: :view do
|
||||
let(:dossier) { create(:dossier, :with_entreprise, procedure: create(:procedure, :with_api_carto, :with_type_de_champ)) }
|
||||
let(:dossier) { create(:dossier, :with_entreprise, procedure: create(:procedure, :with_api_carto, :with_type_de_champ)) }
|
||||
|
||||
before do
|
||||
champs.each do |champ|
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||
|
||||
describe 'users/carte/show.html.haml', type: :view do
|
||||
let(:state) { 'draft' }
|
||||
let(:dossier) { create(:dossier, state: state) }
|
||||
let(:dossier) { create(:dossier, state: state) }
|
||||
let(:dossier_id) { dossier.id }
|
||||
|
||||
before do
|
||||
|
|
Loading…
Reference in a new issue