Commit Graph

318 Commits

Author SHA1 Message Date
Matt-Yorkley
617164684c Configure OIDC 2022-10-18 11:32:14 +11:00
Maikel Linke
57a70455a8 Simplify setting of secret token
We define it in the dotenv files already which has the advantage of
being overridable. I adjusted the dotenv files to have the same value as
was set before, 30 times `x`.
2022-10-04 19:35:40 +02:00
binarygit
ebe4a3d6ab Add StimulusReflex 2022-09-29 16:03:45 +02:00
filipefurtad0
e4cceffd5c Makes wicked-pdf config env dependent 2022-09-15 12:12:47 +01:00
Diego de Araújo Martinez Camarinha
a4fa4a4803 Remove aws sdk patch
This was introduced because an old version of the aws sdk was used. Now
with a newer version installed, this should not be need anymore
2022-06-20 07:10:53 -03:00
Maikel Linke
bea080a9b1 Remove Paperclip
It has been replaced by Active Storage.
2022-06-01 17:16:55 +10:00
Maikel Linke
b7efa1b018 Replace Paperclip on Spree::Image 2022-06-01 17:16:55 +10:00
Matt-Yorkley
0c2a267bea Patch keyword arguments syntax in Paperclip error handling 2022-02-14 11:58:22 +00:00
Matt-Yorkley
ae2726fc6b Generate rswag initializers
Done via rswag rake tasks and tidied up a bit.
2022-02-08 11:43:49 +11:00
Maikel Linke
2e6d8c1216 Provide aws-sdk with working URI.encode method
The S3 class is calling URI.encode which is removed in Ruby 3. By
providing a URI module within the S3 class makes the S3 code call that
module instead.
2022-02-03 15:20:51 +11:00
Matt-Yorkley
931e68ef6f Update script sources for google maps and bugnsag 2022-01-18 12:22:06 +00:00
Matt-Yorkley
4c9e64589b Update style sources 2022-01-18 12:22:06 +00:00
Matt-Yorkley
6af5f46d30 Update CSP; re-enable Angular templates
We really need to remove all those Angular templates as soon as possible, and then revert this commit...
2022-01-18 12:22:06 +00:00
Matt-Yorkley
6a3ca98ac6 Add frame-ancestors to CSP 2022-01-18 12:19:54 +00:00
Matt-Yorkley
114a9d8993 Allow unsafe_inline 2022-01-18 12:19:54 +00:00
Matt-Yorkley
0fc6b4c882 Add some whitelisting 2022-01-18 12:19:54 +00:00
Matt-Yorkley
0dd97a631e Set CSP configuration 2022-01-18 12:19:54 +00:00
Maikel
50a94931d4 Merge pull request #8645 from Matt-Yorkley/initialization-deprecations
Initialization deprecations
2022-01-13 16:06:56 +11:00
Maikel
696bbdc2e2 Merge pull request #8649 from Matt-Yorkley/deprecation-fixes
Deprecation fixes
2022-01-13 15:59:47 +11:00
Maikel
5257361df8 Merge pull request #8651 from Matt-Yorkley/custom-errors
Remove custom errors gem
2022-01-13 15:54:50 +11:00
Matt-Yorkley
f5ebd47751 Replace customisations with explicit patch in an initializer
See previous commit.

This isn't nice, but it does the same job as the gem did. We can also update this code now as Rails changes (the gem was incompatible with Rails 7).
2021-12-28 10:19:35 +00:00
Matt-Yorkley
3c9d461f5f Provide #image_pack_path helper method 2021-12-27 17:45:06 +00:00
Matt-Yorkley
825aeeae04 Migrate images and update assets 2021-12-27 17:45:06 +00:00
Matt-Yorkley
aaf5d1ba38 Patch CanCan deprecated keyword arguments
Solves an issue with use of deprecated positional args. The version of CanCan which fixes this is not currently compatible with OFN...
2021-12-27 16:27:04 +00:00
Matt-Yorkley
6aada422fd Fix deprecation warnings around class loading during initialization
This:
```
DEPRECATION WARNING: Initialization autoloaded the constant User.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload User, for example,
the expected changes won't be reflected in that stale Class object.

This autoloaded constant has been unloaded.

In order to autoload safely at boot time, please wrap your code in a reloader
callback this way:

    Rails.application.reloader.to_prepare do
      # Autoload classes and modules needed at boot time here.
    end

That block runs when the application boots, and every time there is a reload.
For historical reasons, it may run twice, so it has to be idempotent.

Check the "Autoloading and Reloading Constants" guide to learn more about how
Rails autoloads and reloads.
```
2021-12-25 20:51:18 +00:00
Matt-Yorkley
6d2521bf5f Remove Spree.user_class
This construct was previously used in Spree to switch out the user class with a dummy class during certain tests. We don't use this any more, so it's just mess.

🔥
2021-12-10 18:18:20 +00:00
Adrien Chauve
051950e04c Remove references to deprecated application.yml config file.
Point to .env and other .env.* config files.
2021-11-24 15:11:00 +01:00
Matt-Yorkley
636ca9987a Ignore StateMachines warnings in console output
We *already* ignore them anyway, so this just removes the console noise.
2021-10-29 18:59:08 +01:00
Maikel Linke
7c73495b07 Update Pagy config for version 5
Some variables were renamed.
2021-10-19 15:12:35 +11:00
Matt-Yorkley
cb65c7c2ef Fix deprecation warning in Paperclip
Fixes deprecation warnings in Paperclip::UrlGenerator#escape_url

On a side note: we shouldn't be using Paperclip at all, and should migrate to ActiveStorage.
2021-09-30 17:29:54 +01:00
Matt-Yorkley
dc8939c35f Strip subdomains from session cookie host 2021-09-02 17:29:26 +01:00
Matt-Yorkley
e6ac57ac3a Migrate session cookies to new setup
Currently sessions set on (www.openfoodnetwork.xxx) are not usable on the bare domain (openfoonetwork.xxx). When transitioning from one to the other, the user's session is completely lost.

This change means sessions on subdomains (including www) will be transferable.
2021-08-22 15:53:41 +01:00
Matt-Yorkley
a92847d80d Merge pull request #7947 from andrewpbrett/zeitwerk
Use zeitwerk for autoloading
2021-08-05 00:36:32 +02:00
Matt-Yorkley
9d4b34b35b Merge pull request #7977 from Matt-Yorkley/tidy-up
Spree tidy-up
2021-07-27 11:52:22 +02:00
Matt-Yorkley
38aac70705 Remove class_eval on Spree::Gateway 2021-07-24 21:28:13 +01:00
Andy Brett
bb8dc3f3bc add inflector for StripeSCA 2021-07-23 17:01:22 -07:00
Matt-Yorkley
7597a58f53 Add overflow handling on pagination 2021-07-21 09:55:42 +01:00
Matt-Yorkley
60595059e2 Drop unused options from Pagy initializer 2021-07-14 13:17:33 +01:00
Matt-Yorkley
b3c4a38b0f Enable 'pagy/extras/items' for customising items parameter 2021-07-14 13:17:33 +01:00
Nihal Mohammed
e5bdaa603a Setup pagy 2021-07-14 13:17:33 +01:00
Matt-Yorkley
083f512aae Refactor Sidekiq settings and set expiry in development
This means old cache entries will be automatically removed instead of perpetually filling up the local Redis instance in dev.
2021-07-01 12:59:11 +01:00
Matt-Yorkley
a074f627b2 Add Webpacker
Most of this is automatically generated by the rake task: `bundle exec rake webpacker:install`

Docs: https://github.com/rails/webpacker/tree/5-x-stable
2021-06-19 17:51:18 +01:00
Matt-Yorkley
8753076dcd Merge pull request #7737 from luisramos0/ruby273
Upgrade to ruby 2.7.3
2021-06-15 21:07:38 +02:00
Matt-Yorkley
8e0a84a502 Merge pull request #7729 from Matt-Yorkley/delayed-cleanup
Delayed::Cleanup
2021-06-07 19:11:37 +02:00
Luis Ramos
21b80db0ee Fix json v1.8.6 common.rb warning
Using this patch https://github.com/flori/json/issues/399#issuecomment-734863279

We can upgrade to json v2 but to do that we need to switch from aws-sdk-v1 to aws-sdk-s3 first
2021-06-04 22:42:27 +01:00
Maikel
0c92a594f4 Merge pull request #7717 from coopdevs/fix-docker-jemalloc-sidekiq
Fix docker Jemalloc + Sidekiq setup
2021-06-04 13:16:53 +10:00
Andy Brett
6d56a0791f Merge pull request #7728 from Matt-Yorkley/papertrail-deprecation
Remove papertrail initializer
2021-06-03 09:52:56 -07:00
Matt-Yorkley
0ede0acc6a Remove DelayedJob references 2021-06-03 12:45:23 +01:00
Matt-Yorkley
5b676e8f93 Remove papertrail initializer
This setting is now deprecated and triggers this message:

Association Tracking for PaperTrail has been extracted to a separate gem. To use it, please add `paper_trail-association_tracking` to your Gemfile. If you don't use it (most people don't, that's the default) and you set `track_associations = false` somewhere (probably a rails initializer) you can remove that line now.
2021-06-03 11:33:33 +01:00
Luis Ramos
2c43522bf9 change devise config to use secret_key_Base instead of secret_token as pepper 2021-06-01 22:33:12 +01:00