Commit graph

78 commits

Author SHA1 Message Date
Colin Darie
c94b3e9e52 test: enable verbose_query_logs
Helpful to known which line triggered a query
2022-08-02 11:44:07 +02:00
Paul Chavard
ea18c2b9ba chore(build): use vitejs 2022-06-23 15:22:54 +02:00
Martin
a0df24b631 clean(SMTP.balancing): remove some env vars 2022-05-03 16:46:35 +02:00
simon lehericey
d557d512ce change initializer to support dolist 2022-05-02 15:50:13 +02:00
Paul Chavard
44c64669e9 Revert "Merge pull request #6787 from tchak/use-vite"
This reverts commit 5d572727b5, reversing
changes made to 43be4482ee.
2022-03-31 12:07:52 +02:00
Paul Chavard
187e84a010 feat(assets): use vitejs to build javascript 2022-03-29 16:27:08 +02:00
Paul Chavard
d2e9cb5253 fix(map): remove IGN token 2022-03-17 11:55:20 +01:00
Pierre de La Morinerie
3481d27cba config: block browser external connections during system tests
During system tests, we don't want the headless browser to load
external resources:

- It is faster (we don't wait for external resources to be loaded)
- It avoids leaking our test setup to external service

Fixes #6982
2022-02-22 17:24:25 +01:00
François Vantomme
7425a08e74 refactor(openstack): rename STORAGE_TYPE to ACTIVE_STORAGE_SERVICE 2022-02-15 10:34:42 +01:00
François Vantomme
a2c04a80aa refactor(storage): harmonize environment variables
Use STORAGE_TYPE everywhere rather than FOG_ENABLED.
STORAGE_TYPE is more flexible and is the reference variable for
production environment.
2022-02-15 09:40:32 +01:00
Jon
31996c7d09 chore(smtp): add mailcatcher configuration 2022-02-15 09:34:07 +01:00
François Vantomme
0758e2d1cf Refactor: use APP_HOST env variable in development env
It prevents exceptions when APP_HOST is custom in development env.

*** ArgumentError Exception: Missing host to link to! Please provide the
   :host parameter, set default_url_options[:host], or set :only_path to
   true
2022-02-15 09:01:38 +01:00
Pierre de La Morinerie
847abca122 config: simplify mailer configuration again
Move everything to initializers, and replace the email settings
interceptor by a BalancerDeliveryMethod.

It has the advantage that it can be configured entirely from the
`config/environment.rb` file, without an extra file to look at.
2022-02-08 12:44:43 +01:00
Pierre de La Morinerie
04cfc8ed9d config: use alternate delivery methods to configure ActionMailer
Previously `SENDINBLUE_BALANCING` was used only when
`SENDINBLUE_ENABLED` was *disabled* (otherwise only SendInBlue was ever
used).

This commit:

- Ensure that `SENDINBLUE_BALANCING` is used only when SendInBlue is
  *enabled* (which is more intuitive).
- Make it easier to add other delivery methods.
2022-02-08 12:44:43 +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
Paul Chavard
e8cdded515 Use explicit name to avoid unknown constant errors 2021-05-06 16:10:48 +02:00
Paul Chavard
327bec0637 Use HELO 2021-05-06 08:59:18 +02:00
Pierre de La Morinerie
5990439ab7 app: update code to Rails 6.1 2021-03-25 13:24:53 +01:00
Pierre de La Morinerie
2ce3149d92 test: don't cache classes during tests
When running several individual tests in succession using Spring,
we get an error message:

> zeitwerk error: reloading is disabled because config.cache_classes is true

Caching classes during tests used to be recommended – but Rails 6
now recommands to reload them:

- Spring takes care of the caching for us,
- It makes zeitwerk happy.

See discussion in 65344f254c

A potential downside used to be that when running system tests using
Capybara, each web request would reload the classes, which invalidated
the model objects of the test case. But it seems to be fixed now.
2021-02-16 15:59:35 +01:00
Paul Chavard
f1cbc9846e Add carte ign 2020-07-30 16:58:20 +02:00
clemkeirua
60c3047e4f mise à jour de doc pour se passer d'overmind 2020-07-09 09:32:09 +02:00
Pierre de La Morinerie
58c97efde4 config: enable debug assets in development
Historically, debug assets were disabled because they made reloading
pages very slow. This seems fixed by Rails 6.
2020-07-08 17:48:21 +02:00
Paul Chavard
6a24c3f812 Rails app:update 2020-07-07 18:03:56 +02:00
Paul Chavard
0b06864f7a Upgrade core-js 2020-02-24 19:43:07 +01:00
Pierre de La Morinerie
68f5aae99d autosave: add feature test 2019-11-21 14:00:06 +01:00
clemkeirua
04c13190c3 introduce smtp_key in order to use 2 different sendinblue keys
client_key is exposed to the client via gon, so if we use it for sending email too we are exposing a key so anybody could send an email.
The current client_key has a different level of right and can't send emails so it's ok to expose it.
2019-11-06 13:34:36 +01:00
clemkeirua
959aacdea5 Sendinblue email balancing using proper credentials
This reverts commit c61981e795.
2019-11-06 13:34:36 +01:00
clemkeirua
c61981e795 Revert "Sendinblue email balancing using interceptor"
This reverts commit b2135b6576.
2019-11-04 15:55:08 +01:00
Chaïb Martinez
b2135b6576 Sendinblue email balancing using interceptor
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-11-04 15:30:44 +01:00
Paul Chavard
73d4ecf35d Add a DS_PROXY_URL env variable 2019-10-30 16:15:38 +01:00
Paul Chavard
6a3d725134 Revert "Revert "Decommission ActiveStorage proxy service and use openstack service""
This reverts commit 71227be37f.
2019-10-30 12:11:45 +01:00
simon lehericey
71227be37f Revert "Decommission ActiveStorage proxy service and use openstack service"
This reverts commit 0ff6c793ae.
2019-10-29 10:30:40 +01:00
Paul Chavard
0ff6c793ae Decommission ActiveStorage proxy service and use openstack service
We are making these changes in order to always use DS_Proxy. Before this change DS_Proxy was not used to write files when ActiveStorage was used directly and not through “direct upload”.
2019-10-23 17:58:00 +02:00
clemkeirua
d6f2de2fbf enable static + activate csp in production 2019-07-02 09:40:38 +02:00
clemkeirua
0cfd3e3c1f disable csp 2019-07-01 12:10:08 +02:00
clemkeirua
eaf850c1e9 enable csp 2019-06-27 11:10:29 +02:00
clemkeirua
2ae02a132b Report-Only for tests 2019-05-06 10:07:51 +02:00
clemkeirua
8582b08a98 add security policy 2019-05-06 10:07:51 +02:00
Frederic Merizen
0846860748 Proxy for active storage service provider 2019-01-16 11:34:57 +01:00
Frederic Merizen
0a1bdbb6d3 [#2180] Passer sur le nouveau fournisseur de stockage 2018-12-11 19:54:11 +01:00
Paul Chavard
3f62d2b0b6 Allow to override active_job adapter 2018-11-27 17:26:21 +01:00
Pierre de La Morinerie
ac9a87f27b config: fix email assets not having the full URL domain prepended
When sending emails, the mailer doesn't have access to the request
host. It needs to infer it by itself.

For this we need two settings:

- action_mailer.default_url_options, to generate urls to routes
- action_mailer.asset_host, to generate full urls to assets

Only the first one of these settings was set in production.

Fix #2518
2018-11-21 12:30:00 +01:00
Pierre de La Morinerie
b94bc654c9 config: remove duplicated line
The line is duplicated above in the same file.
2018-11-06 17:11:09 +01:00
Paul Chavard
ff9e87b88e Use letter opener 2018-10-04 18:21:43 +02:00
Paul Chavard
c66bb056f5 Remove uglifier 2018-09-25 18:26:19 +02:00
Paul Chavard
198547778d Use uglifier with no mungle option in order to fix leaflet in production 2018-09-25 17:47:32 +02:00
Paul Chavard
5dcc74fcbe Stop using staging environement 2018-08-29 11:22:56 +02:00
Paul Chavard
f0b12d0911 [ENV] Add staging environement file 2018-08-23 15:55:32 +02:00
Paul Chavard
3e23ba5a4f [ENV] Add lograge config 2018-08-23 15:55:32 +02:00
Paul Chavard
d2094fbbd1 [ENV] Disable inmemory cache in production 2018-08-23 15:55:32 +02:00