Merge pull request #5931 from betagouv/app-name-initializer
Nettoyage : déplacement de la configuration du nom de l'app dans un initialiseur (#5931)
This commit is contained in:
commit
4c66d2d206
3 changed files with 4 additions and 2 deletions
|
@ -20,7 +20,7 @@ DS/Unscoped:
|
||||||
DS/ApplicationName:
|
DS/ApplicationName:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Exclude:
|
Exclude:
|
||||||
- './config/application_name.rb'
|
- './config/initializers/01_application_name.rb'
|
||||||
- './lib/cops/application_name.rb'
|
- './lib/cops/application_name.rb'
|
||||||
- './lib/linters/application_name_linter.rb'
|
- './lib/linters/application_name_linter.rb'
|
||||||
- "./spec/**/*"
|
- "./spec/**/*"
|
||||||
|
|
|
@ -7,7 +7,6 @@ require 'rails/all'
|
||||||
Bundler.require(*Rails.groups)
|
Bundler.require(*Rails.groups)
|
||||||
|
|
||||||
Dotenv::Railtie.load
|
Dotenv::Railtie.load
|
||||||
require_relative 'application_name'
|
|
||||||
|
|
||||||
module TPS
|
module TPS
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# This file is named '01-application-name.rb' to load it before the other
|
||||||
|
# initializers, and thus make the APPLICATION_ constants available in
|
||||||
|
# the other initializers.
|
||||||
APPLICATION_NAME = ENV.fetch("APPLICATION_NAME", "demarches-simplifiees.fr")
|
APPLICATION_NAME = ENV.fetch("APPLICATION_NAME", "demarches-simplifiees.fr")
|
||||||
APPLICATION_SHORTNAME = ENV.fetch("APPLICATION_SHORTNAME", "d-s.fr")
|
APPLICATION_SHORTNAME = ENV.fetch("APPLICATION_SHORTNAME", "d-s.fr")
|
||||||
APPLICATION_BASE_URL = ENV.fetch("APPLICATION_BASE_URL", "https://www.demarches-simplifiees.fr")
|
APPLICATION_BASE_URL = ENV.fetch("APPLICATION_BASE_URL", "https://www.demarches-simplifiees.fr")
|
Loading…
Reference in a new issue