Commit graph

1384 commits

Author SHA1 Message Date
Christophe Robillard
59a08ad307 affiche quand l'archive a été générée 2021-04-28 11:40:58 +02:00
Christophe Robillard
8b2849408c instructeurs can create and download archives 2021-04-28 11:40:58 +02:00
Pierre de La Morinerie
4a12e973bf i18n: add unbreakable spaces to reset_link_sent locales 2021-04-27 13:56:57 +02:00
Pierre de La Morinerie
d530b272a1 password: add specific page for reset instructions 2021-04-22 14:24:15 +02:00
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
Pierre de La Morinerie
8cb7a49dd9 password: add password reset instructions 2021-04-20 09:34:53 +02:00
Pierre de La Morinerie
85691b9f2e sign_in: no need to specify password length 2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
6b14420ffa sign_in: improve "Forgot password?" appearance on mobile 2021-04-20 09:34:52 +02:00
kara Diaby
881491c697 add route 2021-04-19 10:23:45 +02:00
Paul Chavard
f08d704d5f Fix api docs URL 2021-04-15 17:06:23 +02:00
Pierre de La Morinerie
c96a2550d8 ci: check for zeitwerk errors
If a zeitwerk-incompatible class is introduced, it won't break
any test before reaching production.
2021-04-15 13:17:46 +02:00
Christophe Robillard
54f2b9dc7e [manager] remove super admin 2021-04-15 10:12:11 +02:00
Christophe Robillard
db48ea02aa [manager] list superadmins 2021-04-15 10:12:11 +02:00
Paul Chavard
651a928b7c Improuve export UI 2021-04-08 14:40:26 +01:00
simon lehericey
44f9ae3c65 only preload what is needed on most requests 2021-04-06 18:23:14 +02:00
simon lehericey
b87a691176 use env for localization to avoid db round trip 2021-04-06 18:23:14 +02:00
simon lehericey
cd4ad6878c remove insee_api_v3 feature 2021-04-06 18:23:14 +02:00
simon lehericey
06d2eb2d21 remove feature xray 2021-04-06 18:23:14 +02:00
simon lehericey
c2847d1481 remove unused mini_profiler var 2021-04-06 18:23:14 +02:00
simon lehericey
6f2b2c3c1f use env for maintenance mode to avoid DB roundtrip 2021-04-06 18:23:14 +02:00
simon lehericey
1715a4899f remove coronavirus banner 2021-04-06 18:23:14 +02:00
Pierre de La Morinerie
62051c926a app: move update_allow_decision_access to ExpertsController 2021-04-06 14:54:18 +02:00
Pierre de La Morinerie
c82c72402d app: move the experts list to ExpertsProceduresController 2021-04-06 14:29:02 +02:00
Pierre de La Morinerie
7acb4cee83 controllers: use standard action names in ExpertsProceduresController 2021-04-06 13:45:51 +02:00
Pierre de La Morinerie
3f25624a5a routes: nest ExpertsProcedures routes in a resource 2021-04-06 13:18:51 +02:00
Pierre de La Morinerie
42b3ba1e1b config: migrate all config to Rails 6.1 defaults 2021-04-06 12:12:57 +02:00
Pierre de La Morinerie
ce427784e7 config: enable has_many_inversing 2021-04-06 12:12:57 +02:00
Pierre de La Morinerie
6bc608a821 config: enable most Rails 6.1 defaults 2021-04-06 12:12:57 +02:00
Pierre de La Morinerie
c2ce20d40c config: form_with now generates local forms by default
We can remove the `local: true` parameter, as it is now implied by
default.
2021-04-06 12:12:57 +02:00
Pierre de La Morinerie
b65de3e583 config: make the queue names explicit
With Rails 6.1, the default queue is now the global application queue.

We want to retain our custom queues in some cases, so configure them
epxlicitely.
2021-04-06 12:12:57 +02:00
Fabrice Gangler
6f0b594fc5 doc: add ACCESSIBILITE_URL to env.example.optional file
Refs: #6050
2021-04-06 11:33:42 +02:00
kara Diaby
39d0dd2af1 yml traduction 2021-04-06 10:38:46 +02:00
kara Diaby
5b7b2d4966 change routes 2021-04-06 10:38:46 +02:00
Christophe Robillard
dbfc878bf5 supprime la page accessibilité 2021-03-30 15:12:18 +02:00
Christophe Robillard
d89dc785f0 met à jour le lien de bas de page Accessibilité
Ce lien pointe désormais vers notre site de documentation
2021-03-30 15:08:20 +02:00
simon lehericey
5624e87867 add webserver file logic 2021-03-29 18:45:40 +02:00
Pierre de La Morinerie
5990439ab7 app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
lydiasan
8dce3e5d2a i18n: localize users/sign_in page 2021-03-25 11:59:05 +01:00
kara Diaby
fe7fb882c8 remove useless routes 2021-03-24 16:20:44 +01:00
Christophe Robillard
83cf0fa903 detect staging env 2021-03-24 15:30:12 +01:00
Pierre de La Morinerie
56b3601063 app: enable Bootsnap
Bootsnap speeds up the initial loading of the Rails app by:
- Optimizing the LOAD_PATH dynamically
- Caching the result of Ruby bytecode compilation

Cached data are written to `tmp/cache/bootsnap*`.

This is enabled in the default Rails app template.
2021-03-19 08:05:14 +01:00
kara Diaby
c7392d8140 changes routes 2021-03-18 11:38:52 +01:00
kara Diaby
d2ab2debb6 add expert logic 2021-03-18 11:27:51 +01:00
Pierre de La Morinerie
ac5303d56d config: make Sentry ignore rescued ActiveJob exceptions
For now the Sentry delayed_job integration reports errors that are
rescued with `retry_on`.

Ignore these errors manually for now.

See https://github.com/getsentry/sentry-ruby/issues/1347
2021-03-18 10:52:10 +01:00
Pierre de La Morinerie
75a1046315 active_storage: refactor concerns
Follow-up of #5953.

Refactor the concerns with two goals:

- Getting closer from the way ActiveStorage adds its own hooks.
  Usually ActiveStorage does this using an `Attachment#after_create`
  hook, which then delegates to the blob to enqueue the job.
- Enqueuing each job only once. By hooking on `Attachment#after_create`,
  we guarantee each job will be added only once.

We then let the jobs themselves check if they are relevant or not, and
retry or discard themselves if necessary.

We also need to update the tests a bit, because Rails'
`perform_enqueued_jobs(&block)` test helper doesn't honor the `retry_on`
clause of jobs. Instead it forwards the exception to the caller – which
makes the test fail.

Instead we use the inline version of `perform_enqueued_jobs()`, without
a block, which properly ignores errors catched by retry_on.
2021-03-16 11:49:14 +01:00
Pierre de La Morinerie
70104d7059 config: avoid blocking legitimate requests from mobile ISPs 2021-03-11 18:28:10 +01:00
Paul Chavard
1644c9d44b Another attempt at fixing IE 2021-03-09 11:29:20 +01:00
Pierre de La Morinerie
b0735aafe0 config: fix DynamicSmtpSettingsInterceptor warning again
This warning re-appeared when running mailer tests:

```
DISABLE_SPRING=1 bin/rspec spec/mailers/administration_mailer_spec.rb
```

It is now fixed properly, in a way recommanded by the documentation.
2021-03-04 22:52:19 +01:00
Paul Chavard
d4a34edab5 fix mapbox-gl transpilation 2021-03-04 19:04:39 +01:00
Paul Chavard
600f49a0ff Hide groupe instructeur selector when routage is done via API 2021-03-04 11:06:04 +01:00