demarches-normaliennes/config/initializers
Pierre de La Morinerie 9ad57fde2a initializers: lazy-load Mailjet gem
This fixes an error message on app startup about autoloaded
constants:

> DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.

The reason for this error is that the Mailjet gem forces the
immediate loading of `action_mailer`. Which leads to the
following sequence of events:

On app init, when bundler requires all the gems in the Gemfile:
- The Mailjet gem is required,
- It loads `ActionMailer::Base`.

Later, when Rails initializes itself:
- `ActionText` creates an `action_text.helpers` initializer,
- This initializer register hooks to add `ActionText` helpers
when either `action_controller_base` or `action_mailer` are loaded,
- But as `action_mailer` has already been loaded, the hook is trigerred
immediately,
- ActiveSupport::Dependencies notices `ActionText` constants do not
exist yet, auto-load them, and add the constants to
`ActiveSupport::Dependencies.autoloaded_constants`.

And even later, at the end of the Rails initialization process:
- The `:warn_if_autoloaded` initializer is run,
- It notices that `autoloaded_constants` is not empty, and prints the
warning message.

See https://github.com/mailjet/mailjet-gem/issues/213
2021-04-20 15:11:43 +02:00
..
01_application_name.rb config: move application_name to an initializer 2021-02-24 15:06:55 +01:00
active_job_compatibility.rb config: fix zeitwekr warning when reloading the app 2021-02-24 19:01:27 +01:00
active_job_log_subscriber.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
active_model_serializer.rb Files should end with a new line 2017-04-04 16:59:38 +02:00
active_storage.rb active_storage: refactor concerns 2021-03-16 11:49:14 +01:00
after_party.rb Enable the Lint/UnusedBlockArgument cop 2019-01-03 10:53:50 +01:00
application_controller_renderer.rb Rails app:update 2020-07-07 18:03:56 +02:00
assets.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
authorized_content_types.rb Add authorized content type for pj 2021-01-18 17:23:08 +01:00
backtrace_silencers.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
chartkick.rb stats: improve numeric separators and suffixes 2019-02-01 11:02:37 +01:00
contacts.rb allow mailers/_bizdev_signature to be configured in .env file 2021-02-04 13:09:40 +01:00
content_security_policy.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
cookies_serializer.rb Rails app:update 2020-07-07 18:03:56 +02:00
core_ext.rb zeitwerk: move our Array extension to initializers/core_ext 2021-02-11 12:30:43 +01:00
date_select.rb fix display of labels for datetime on screenreaders 2020-07-20 11:37:01 +02:00
devise.rb add recoverable and two_factor stragegy for administration 2020-11-05 16:03:55 +01:00
dynamic_smtp_settings_interceptor.rb config: fix DynamicSmtpSettingsInterceptor warning again 2021-03-04 22:52:19 +01:00
env_vars.rb Enable the Lint/UnusedBlockArgument cop 2019-01-03 10:53:50 +01:00
excon_setup.rb Fix uninitialized excon constant 2020-09-08 18:36:24 +02:00
filter_parameter_logging.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
flipper.rb use env for localization to avoid db round trip 2021-04-06 18:23:14 +02:00
france_connect.rb [ENV] France connect particulier config in secrets.yml 2018-08-23 15:55:31 +02:00
geocoder.rb Add api address external data fetch 2021-02-17 19:10:16 +01:00
graphql.rb added application name in config/ 2020-07-23 16:17:54 +02:00
groupdate.rb stats: make groupdate week start on Monday 2019-01-10 16:14:14 +01:00
images.rb allow email footer logo to be configured in .env file 2021-02-09 09:39:02 +01:00
inflections.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
lograge.rb Use parentheses 2019-01-03 10:53:50 +01:00
mailjet.rb initializers: lazy-load Mailjet gem 2021-04-20 15:11:43 +02:00
mime_types.rb First Commit 2015-08-10 11:05:06 +02:00
open_id_connect.rb Files should end with a new line 2017-04-04 16:59:38 +02:00
passwords.rb Rename gestionnaire to instructeur in a comment 2019-08-13 10:27:49 +02:00
permissions_policy.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
pg_interval_5_2.rb add interval data type to ActiveRecord 2020-03-24 18:10:13 +01:00
phonelib.rb refuse les numéros de tel invalides 2019-12-04 05:34:43 +01:00
rack.rb [fix #2387] Rack: increase max multipart number 2018-08-13 17:45:47 +02:00
rack_attack.rb Use rack_attack_enabled? 2019-08-20 13:29:29 +02:00
rack_attack_request.rb RackAttack: use remote ip and test it ! 2019-08-20 13:29:29 +02:00
rack_mini_profiler.rb Remove rack_mini_profiler from prod as it could show env var and force us to allow unsafe_eval and script in csp 2020-10-30 17:08:31 +01:00
saml_idp.rb act as an saml identity provider 2020-11-16 12:19:54 +01:00
sendinblue.rb ajout de la gem sendinblue 2020-10-13 17:36:43 +02:00
sentry.rb config: make Sentry ignore rescued ActiveJob exceptions 2021-03-18 10:52:10 +01:00
session_store.rb Change the cookie key 2018-03-01 10:33:53 +01:00
smart_listing.rb Bump development gems 2019-01-05 11:47:55 +01:00
typhoeus.rb added application name in config/ 2020-07-23 16:17:54 +02:00
urls.rb Fix api docs URL 2021-04-15 17:06:23 +02:00
watermark.rb Make watermark configurable 2020-11-25 16:19:06 +01:00
wrap_parameters.rb app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
zxcvbn.rb [Fix #1285] Add a custom dictionary for zxcvbn 2018-09-26 09:02:59 +02:00
zxcvbn_dictionnaries.yaml [Fix #1285] Add a custom dictionary for zxcvbn 2018-09-26 09:02:59 +02:00