Commit graph

1509 commits

Author SHA1 Message Date
simon lehericey
652b8367be accept or refuse merge 2021-11-04 16:10:09 +01:00
simon lehericey
894e8fdd47 move update_email check to before_action 2021-11-04 16:10:09 +01:00
Paul Chavard
ba0211ba52 feat(champ): ask for departement before asking for commune 2021-11-04 11:55:25 +01:00
Pierre de La Morinerie
5f2233d07d specs: reduce BCrypt complexity during tests
BCrypt is used to compute Instructeur tokens, and takes a surprisingly
ong time during specs.

Reducing the complexity to speed it up.

Speeds up this spec from 0m 57s to 0m 20s.
2021-11-03 19:38:01 +01:00
kara Diaby
f1f2b76a3d revisions 2021-10-27 12:00:39 +02:00
Paul Chavard
6e8e0c7b6b feat(type_de_champ): reflect changes of secondary labels and descriptions 2021-10-26 12:18:01 +02:00
Pierre de La Morinerie
d0e87a08cf services: cache zxcvbn dictionaries per-thread
Before, every time a password was tested, the dictionaries were parsed
again by zxcvbn.

Parsing dictionaries is slow: it may take up to ~1s. This doesn't matter
that much in production, but it makes tests very slow (because we tend
to create a lot of User records).

With this changes, the initializer tester is shared between calls, class
instances and threads. It is lazily loaded on first use, in order not to
slow down the application boot sequence.

This uses ~20 Mo of memory (only once for all threads), but makes tests
more that twice faster.

For instance, model tests go from **8m 21s** to **3m 26s**.

NB:
An additionnal optimization could be to preload the tester on
boot, before workers are forked, to take advantage of Puma copy-on-write
mechanism. In this way all forked workers would use the same cached
instance.

But:

- We're not actually sure this would work properly. What if Ruby updates
  an interval ivar on the class, and this forces the OS to copy the
  whole data structure in each fork?
- Puma phased restarts are not compatible with copy-on-write anyway.

So we're avoiding this optimisation for now, and take the extra 20 Mo
per worker.
2021-10-25 12:04:56 +02:00
Pierre de La Morinerie
136d0bc341 config: remove pre and post boot code from puma config
This is no longer needed since Rails 5.1.

See https://github.com/rails/rails/pull/31241
2021-10-25 11:28:09 +02:00
simon lehericey
738d08a1d9 change in whitelist 2021-10-19 21:07:24 +02:00
simon lehericey
44c880adc4 allow instructeur and administrateur to change their email to legit domain (#6550) 2021-10-19 15:54:57 +02:00
simon lehericey
ce40e1127d merge with another new account 2021-10-14 14:47:50 +02:00
simon lehericey
19f81b594b merge with an existing account by using the password 2021-10-14 14:47:50 +02:00
simon lehericey
f7299da1e7 launch merge process if an unlinked DS account with the same email exists 2021-10-14 14:47:50 +02:00
simon lehericey
8c81558e56 english locales 2021-10-12 14:27:20 +02:00
simon lehericey
57a7f82a8f add cnaf ui 2021-10-12 14:27:20 +02:00
simon lehericey
40d0cfcdc4 add champ validation 2021-10-12 14:27:20 +02:00
simon lehericey
d68129b34d add cnaf type de champ 2021-10-12 14:26:40 +02:00
simon lehericey
b69dafc3d4 CNAF in lowercase 2021-10-12 14:26:40 +02:00
simon lehericey
05e127af4b corrige une locale 2021-10-12 14:26:40 +02:00
Pierre de La Morinerie
0b02fce5e4 jobs: move ActiveJobLogSubscriber out of initializers
This is a class of its own, it doesn't need to be in the initializers.
2021-10-12 11:40:19 +02:00
kara Diaby
6251c3369b routes 2021-10-05 15:37:29 +02:00
kara Diaby
6c82e40ddb routes 2021-10-05 15:00:21 +02:00
Pierre de La Morinerie
f277731b3d app: upgrade webpacker by running rails webpacker:install 2021-09-30 17:05:26 +02:00
kara Diaby
eb951c75e4 change stats colors 2021-09-28 14:49:24 +02:00
Paul Chavard
357c684688 feat(routage): self managing instructeurs 2021-09-27 15:06:17 +02:00
simon lehericey
75043070da add CNAFAdapter 2021-09-22 12:08:24 +02:00
simon lehericey
07962cc2c7 service: match remote keys 2021-09-22 12:08:24 +02:00
Ismael MOUSSA S
7c7c9c9ea4 Fix file size validation message 2021-09-21 12:11:20 -05:00
simon lehericey
2e1bed8748 an admin can save its sources 2021-09-21 11:21:10 -05:00
Pierre de La Morinerie
6656d1130b i18n: refactor admin support locales
This allow i18n-tasks to better detect dynamic keys.
2021-09-21 10:44:20 -05:00
Pierre de La Morinerie
f9220891a7 i18n: refactor user support locales
This allow i18n-tasks to better detect dynamic keys.
2021-09-21 10:44:20 -05:00
Pierre de La Morinerie
ede23fa542 i18n: remove unused locales about user feedback 2021-09-21 10:44:20 -05:00
Pierre de La Morinerie
274b92c453 i18n: remove simple_form locale files
We don't even use simple_form.
2021-09-21 10:44:20 -05:00
Pierre de La Morinerie
f050a4757a i18n-tasks: consider model names localizations as used 2021-09-21 10:44:20 -05:00
Pierre de La Morinerie
580ae1c063 i18n: add automated check for inconsistent interpolations 2021-09-21 10:44:20 -05:00
Pierre de La Morinerie
b4e850b88b config: remove old retro-compatibility Job constants
These constants were defined so that existing enqueued jobs wouldn't
fail during the app upgrade.

These jobs are long gone. Let's remove the compatibility code.
2021-09-21 10:43:33 -05:00
simon lehericey
75481a644c Add confirm alert 2021-09-20 13:58:11 +02:00
simon lehericey
7239657a75 [Fix #6481] a user see its waiting transfers 2021-09-20 13:58:11 +02:00
simon lehericey
c34476a766 a user can transfer all its dossier 2021-09-20 13:58:11 +02:00
Paul Chavard
c9accbf5a5 refactor(i18n): localize routage description 2021-09-18 11:51:27 +02:00
Paul Chavard
64298503b1 fix(i18n): fix missing translations in partials 2021-09-18 11:44:41 +02:00
Paul Chavard
0c5c8faf16 feat(routage): enable routage for everyone 2021-09-18 11:22:35 +02:00
Paul Chavard
eea6b961d7 refactor(routage): remove administrateur_routage feature flag 2021-09-18 11:21:26 +02:00
simon lehericey
5dbd81ebeb show api particulier sources 2021-09-17 13:50:23 +02:00
Pierre de La Morinerie
64e10c6d8c i18n: fix english file with fr key 2021-09-16 08:16:09 -05:00
Pierre de La Morinerie
c6bc42ad76 i18n: fix english keys scope for passwords views 2021-09-16 07:59:19 -05:00
Pierre de La Morinerie
715b5ea6d8 i18n: move controller keys to the proper scope 2021-09-16 07:59:19 -05:00
Pierre de La Morinerie
0104a71e53 i18n: remove unused english key 2021-09-16 07:51:56 -05:00
Pierre de La Morinerie
973945fb58 i18n-tasks: add gems locales to the search path 2021-09-16 07:51:56 -05:00
Pierre de La Morinerie
446738fbbf i18n: make dynamic scopes explicit
This fixes i18n-tasks not being able to recognize the scopes.
2021-09-16 07:51:56 -05:00