Merge pull request #6036 from betagouv/use-rails-6-1-defaults
Mise à jour de la configuration Rails pour utiliser les réglages par défaut de Rails 6.1 (#6036)
This commit is contained in:
commit
586028d064
7 changed files with 15 additions and 75 deletions
|
@ -34,6 +34,7 @@ module CreateAvisConcern
|
|||
end
|
||||
end
|
||||
)
|
||||
dossier.avis.reload # unload non-persisted avis from dossier
|
||||
|
||||
persisted, failed = create_results.partition(&:persisted?)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
.col-xs-6
|
||||
%h3 Ajouter un instructeur
|
||||
#procedure_new.section.section-label
|
||||
= form_with url: { controller: 'admin/instructeurs', action: :create }, local: true do
|
||||
= form_with url: { controller: 'admin/instructeurs', action: :create } do
|
||||
.row
|
||||
.col-xs-5
|
||||
= render partial: 'admin/instructeurs/informations'
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
.container
|
||||
%h1
|
||||
= form_with model: @procedure, url: url_for({ controller: 'new_administrateur/procedures', action: :update_jeton }), local: true, html: { class: 'form' } do |f|
|
||||
= form_with model: @procedure, url: url_for({ controller: 'new_administrateur/procedures', action: :update_jeton }), html: { class: 'form' } do |f|
|
||||
%p.explication
|
||||
Démarches Simplifiées utilise
|
||||
= link_to 'API Entreprise', "https://entreprise.api.gouv.fr/"
|
||||
|
|
|
@ -11,7 +11,7 @@ Dotenv::Railtie.load
|
|||
module TPS
|
||||
class Application < Rails::Application
|
||||
# Initialize configuration defaults for originally generated Rails version.
|
||||
config.load_defaults 6.0
|
||||
config.load_defaults 6.1
|
||||
|
||||
# Configuration for the application, engines, and railties goes here.
|
||||
#
|
||||
|
@ -65,6 +65,12 @@ module TPS
|
|||
# disable the check performed by Rails.
|
||||
config.action_dispatch.ip_spoofing_check = false
|
||||
|
||||
# Set the queue name for the mail delivery jobs to 'mailers'
|
||||
config.action_mailer.deliver_later_queue_name = :mailers
|
||||
|
||||
# Set the queue name for the analysis jobs to 'active_storage_analysis'
|
||||
config.active_storage.queues.analysis = :active_storage_analysis
|
||||
|
||||
config.to_prepare do
|
||||
# Make main application helpers available in administrate
|
||||
Administrate::ApplicationController.helper(TPS::Application.helpers)
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
#
|
||||
# This file contains migration options to ease your Rails 6.1 upgrade.
|
||||
#
|
||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
||||
#
|
||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
||||
|
||||
# Support for inversing belongs_to -> has_many Active Record associations.
|
||||
# Rails.application.config.active_record.has_many_inversing = true
|
||||
|
||||
# Track Active Storage variants in the database.
|
||||
# Rails.application.config.active_storage.track_variants = true
|
||||
|
||||
# Apply random variation to the delay when retrying failed jobs.
|
||||
# Rails.application.config.active_job.retry_jitter = 0.15
|
||||
|
||||
# Stop executing `after_enqueue`/`after_perform` callbacks if
|
||||
# `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
|
||||
# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
|
||||
|
||||
# Specify cookies SameSite protection level: either :none, :lax, or :strict.
|
||||
#
|
||||
# This change is not backwards compatible with earlier Rails versions.
|
||||
# It's best enabled when your entire app is migrated and stable on 6.1.
|
||||
# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
|
||||
|
||||
# Generate CSRF tokens that are encoded in URL-safe Base64.
|
||||
#
|
||||
# This change is not backwards compatible with earlier Rails versions.
|
||||
# It's best enabled when your entire app is migrated and stable on 6.1.
|
||||
# Rails.application.config.action_controller.urlsafe_csrf_tokens = true
|
||||
|
||||
# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
|
||||
# UTC offset or a UTC time.
|
||||
# ActiveSupport.utc_to_local_returns_utc_offset_times = true
|
||||
|
||||
# Change the default HTTP status code to `308` when redirecting non-GET/HEAD
|
||||
# requests to HTTPS in `ActionDispatch::SSL` middleware.
|
||||
# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
|
||||
|
||||
# Use new connection handling API. For most applications this won't have any
|
||||
# effect. For applications using multiple databases, this new API provides
|
||||
# support for granular connection swapping.
|
||||
# Rails.application.config.active_record.legacy_connection_handling = false
|
||||
|
||||
# Make `form_with` generate non-remote forms by default.
|
||||
# Rails.application.config.action_view.form_with_generates_remote_forms = false
|
||||
|
||||
# Set the default queue name for the analysis job to the queue adapter default.
|
||||
# Rails.application.config.active_storage.queues.analysis = nil
|
||||
|
||||
# Set the default queue name for the purge job to the queue adapter default.
|
||||
# Rails.application.config.active_storage.queues.purge = nil
|
||||
|
||||
# Set the default queue name for the incineration job to the queue adapter default.
|
||||
# Rails.application.config.action_mailbox.queues.incineration = nil
|
||||
|
||||
# Set the default queue name for the routing job to the queue adapter default.
|
||||
# Rails.application.config.action_mailbox.queues.routing = nil
|
||||
|
||||
# Set the default queue name for the mail deliver job to the queue adapter default.
|
||||
# Rails.application.config.action_mailer.deliver_later_queue_name = nil
|
||||
|
||||
# Generate a `Link` header that gives a hint to modern browsers about
|
||||
# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
|
||||
# Rails.application.config.action_view.preload_links_header = true
|
|
@ -27,7 +27,7 @@ describe ActiveStorage::DownloadableFile do
|
|||
|
||||
context 'when there is a repetition bloc' do
|
||||
before do
|
||||
dossier.champs << build(:champ_repetition_with_piece_jointe, dossier: dossier)
|
||||
dossier.champs << create(:champ_repetition_with_piece_jointe, dossier: dossier)
|
||||
end
|
||||
|
||||
it 'should have 4 piece_justificatives' do
|
||||
|
|
|
@ -23,15 +23,15 @@ describe DossierSearchService do
|
|||
let!(:dossier_0) { create(:dossier, state: Dossier.states.fetch(:brouillon), procedure: procedure_1, user: create(:user, email: 'brouillon@clap.fr')) }
|
||||
|
||||
let!(:etablissement_1) { create(:etablissement, entreprise_raison_sociale: 'OCTO Academy', siret: '41636169600051') }
|
||||
let!(:dossier_1) { create(:dossier, state: Dossier.states.fetch(:en_construction), procedure: procedure_1, user: create(:user, email: 'contact@test.com'), etablissement: etablissement_1) }
|
||||
let!(:dossier_1) { create(:dossier, :en_construction, procedure: procedure_1, user: create(:user, email: 'contact@test.com'), etablissement: etablissement_1) }
|
||||
|
||||
let!(:etablissement_2) { create(:etablissement, entreprise_raison_sociale: 'Plop octo', siret: '41816602300012') }
|
||||
let!(:dossier_2) { create(:dossier, state: Dossier.states.fetch(:en_construction), procedure: procedure_1, user: create(:user, email: 'plop@gmail.com'), etablissement: etablissement_2) }
|
||||
let!(:dossier_2) { create(:dossier, :en_construction, procedure: procedure_1, user: create(:user, email: 'plop@gmail.com'), etablissement: etablissement_2) }
|
||||
|
||||
let!(:etablissement_3) { create(:etablissement, entreprise_raison_sociale: 'OCTO Technology', siret: '41816609600051') }
|
||||
let!(:dossier_3) { create(:dossier, state: Dossier.states.fetch(:en_construction), procedure: procedure_2, user: create(:user, email: 'peace@clap.fr'), etablissement: etablissement_3) }
|
||||
let!(:dossier_3) { create(:dossier, :en_construction, procedure: procedure_2, user: create(:user, email: 'peace@clap.fr'), etablissement: etablissement_3) }
|
||||
|
||||
let!(:dossier_archived) { create(:dossier, state: Dossier.states.fetch(:en_construction), procedure: procedure_1, archived: true, user: create(:user, email: 'archived@clap.fr')) }
|
||||
let!(:dossier_archived) { create(:dossier, :en_construction, procedure: procedure_1, archived: true, user: create(:user, email: 'archived@clap.fr')) }
|
||||
|
||||
describe 'search is empty' do
|
||||
let(:terms) { '' }
|
||||
|
|
Loading…
Reference in a new issue