Commit graph

13179 commits

Author SHA1 Message Date
simon lehericey
f542c0876e Add missing etablissement_id index on exercices table (-600ms) 2021-04-22 14:12:50 +02:00
Paul Chavard
6b08de77e3
Merge pull request #6117 from tchak/show-more-results
Improuve commune autocomplete results
2021-04-22 10:16:58 +01:00
Paul Chavard
6836191ca5 Improuve commune autocomplete results 2021-04-22 09:59:21 +01:00
LeSim
d1c241cdbc
Merge pull request #6120 from betagouv/improve_instructeur_show_array
Améliore le temps de réponse de la vue d'une procédure par un instructeur
2021-04-22 10:57:26 +02:00
simon lehericey
b20296f8c6 less object (-350) 2021-04-22 10:46:04 +02:00
simon lehericey
553e1d973c remove old methods 2021-04-22 10:46:04 +02:00
simon lehericey
0c845c937d use DossierProjectionService 2021-04-22 10:46:04 +02:00
simon lehericey
5bfd4ecbbf add DossierProjectionService 2021-04-22 10:46:04 +02:00
Kara Diaby
0376ad9564
Merge pull request #6114 from betagouv/display-procedure-link
add procedure number and link into admin dashboard (show)
2021-04-21 17:15:49 +02:00
kara Diaby
d5cea74ee9 add procedure number and link into admin dashboard (show) 2021-04-21 17:01:46 +02:00
LeSim
202309da20
Merge pull request #6118 from betagouv/fix-autoloader-warning
Fix "Initialization autoloaded the constants ActionText::ContentHelper" warning message
2021-04-21 15:21:35 +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
b96151934e
Merge pull request #6115 from betagouv/dependabot/npm_and_yarn/ssri-6.0.2
Dépendances : mise à jour de ssri de 6.0.1 à 6.0.2 (#6115)
2021-04-20 13:47:28 +02:00
dependabot[bot]
591f7c42c2
Bump ssri from 6.0.1 to 6.0.2
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-20 11:10:27 +00:00
Kara Diaby
c62751d006
Merge pull request #6116 from betagouv/fix-flaky-experts-test
spec: fix flaky expert test
2021-04-20 12:53:50 +02:00
Pierre de La Morinerie
7ee29b2190 spec: fix flaky expert test
In this test, two Avis are created for each expert:
- one for the original dossier,
- one for the dossier linked to the original dossier.

When we check for a sign-up link, we should do so using the
Avis for the original dossier explicitely.
2021-04-20 12:06:12 +02:00
Pierre de La Morinerie
d264ab3b8e
Merge pull request #6106 from betagouv/improve-password-reset
Amélioration de l'interface de ré-inititialisation de mot de passe (#6106)
2021-04-20 09:52:51 +02:00
Pierre de La Morinerie
8cb7a49dd9 password: add password reset instructions 2021-04-20 09:34:53 +02:00
Pierre de La Morinerie
53fc7386f1 sign_in: fix the procedure preview not being hidden on mobile 2021-04-20 09:34:52 +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
Pierre de La Morinerie
0749d981ab password: make the "Reset password" button clearer 2021-04-20 09:34:52 +02:00
Pierre de La Morinerie
fffb85987c app: retain user email on sign-in error 2021-04-20 09:34:52 +02:00
Kara Diaby
5b301353f0
Merge pull request #6113 from betagouv/main
2021-04-19-01
2021-04-19 11:21:38 +02:00
Kara Diaby
8640770a15
Merge branch 'production' into main 2021-04-19 11:13:38 +02:00
Kara Diaby
aee76746c4
Merge pull request #6109 from betagouv/button-instead-feature-flag-avis
ETQ Administrateur, je veux pouvoir facilement choisir si je veux gérer les experts sur mon interface
2021-04-19 11:10:27 +02:00
kara Diaby
5982660c37 tests 2021-04-19 10:23:45 +02:00
kara Diaby
6524b6bcb7 layout 2021-04-19 10:23:45 +02:00
kara Diaby
881491c697 add route 2021-04-19 10:23:45 +02:00
kara Diaby
01a91fb35b modify controllers 2021-04-19 10:23:45 +02:00
kara Diaby
541a36abbf Add boolean to procedures table 2021-04-19 10:23:45 +02:00
LeSim
f86bc605a7
Merge pull request #6111 from betagouv/main
2021-04-16-01
2021-04-16 15:03:26 +02:00
LeSim
2bb3dca9e9
Merge pull request #6110 from betagouv/instructeur_procedure_show_another_try
amélioration des temps de réponse instructeur procedure show
2021-04-16 14:29:53 +02:00
simon lehericey
e0959cda1e constantize hot strings
- 1131 objects over 4220 (-25%) created in app/
2021-04-16 13:13:22 +02:00
simon lehericey
47f13219ed Avoid useless TypeDeChamp deserialization
- 520 objects overs 4720 (10%) created in app/ (using ?pp=profile-memory&memory_profiler_allow_files=app/)
2021-04-16 13:13:22 +02:00
simon lehericey
e728a3fcb7 include type_de_champ
Avoid n+1 when matching champ.stable_id in procedure.presentation.displayed_fields_values
win 2s in the worst 3s scenario
2021-04-16 13:13:22 +02:00
Paul Chavard
f6c704d44d
Merge pull request #6095 from tchak/improuve-user-destruction
Users that are experts should not be deletable
2021-04-15 18:23:34 +01:00
Paul Chavard
ea484b879e Prevent expert users to be deleted 2021-04-15 16:17:36 +01:00
Pierre de La Morinerie
3104b4bf17
Merge pull request #6103 from tchak/fix-api-doc-link
Correction du lien vers la documentation de l'API (#6103)
2021-04-15 17:16:02 +02:00
Paul Chavard
f08d704d5f Fix api docs URL 2021-04-15 17:06:23 +02:00
Pierre de La Morinerie
b9e949b481
Merge pull request #6104 from betagouv/update-devise-two-factor
Mise à jour de la gem `devise-two-factor` (#6104)
2021-04-15 17:05:29 +02:00
Pierre de La Morinerie
f7d71ba698 gems: update devise-two-factor to a released version
This is the first official release compatible with Rails 6.1.
2021-04-15 16:54:14 +02:00
Pierre de La Morinerie
727bc4a2ce
Merge pull request #6101 from betagouv/check-zeitwerk
CI : teste automatiquement la conformité des classes avec Zeitwerk (#6101)
2021-04-15 16:51:16 +02:00
Pierre de La Morinerie
f8757ea053
Merge pull request #6098 from adullact/6094_enable_rspec_only-failures_support
Développeur : documente l'option de rspec pour ne faire passer que les tests échoués précédemment
2021-04-15 14:26:20 +02:00
Fabrice Gangler
92ccff785a Doc(test): add rspec only-failures example 2021-04-15 14:17:39 +02:00
François Vantomme
f747b0a46a Chore(test): enable rspec only-failures support 2021-04-15 14:17:39 +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
Kara Diaby
ad5c1a4018
Merge pull request #6100 from betagouv/main
2021-04-15-01
2021-04-15 12:43:00 +02:00
Kara Diaby
d415257111
Merge branch 'production' into main 2021-04-15 12:32:30 +02:00
Pierre de La Morinerie
776ca5a048
Merge pull request #6099 from betagouv/fix-expert-mailer
Corrige `AvisMailerPreview` en `ExpertMailerPreview` (#6099)
2021-04-15 12:31:19 +02:00