We were hiding that before because the API is not officially released
yet but that's actually quite annoying. It's very conenient to have the
UI on production and be able to try out endpoints.
We need to declare in each spec file for which endpoint the spec is
because it was just choosing the first declared one by default. The
first one was v1 and now it's dfc-v1.7.
This reverts commit 21b80db0ee.
This fix was needed for an old version of the JSON module with a newer
version of Ruby. But we updated the json gem since and don't need this
any more.
There are three main components:
1. The invoice model
2. order serializers: serialize the order for the invoice
3. data presenters: the object that will be use to access the order's serialize data
With generic link to the releases page. We could provide a link to latest tag with `git describe --tags --abbrev=0`. But I thought it better to keep things simple.
Defining an alternate s3 configuration set to `public: true` means we can use it selectively. It sets the objects to `acl: "public-read"` by default (read-only) and means any image tags for those assets can use direct public links in the src attribute (without hitting the ActiveStorage::Representation endpoint). The default non-public service will still be used by default for any other files on instances using s3.
It was bad UX to show a link that doesn't work straight away. At the
time, it was the only way to download the report but now we send an
email which is a much better way to go.
I leave the rest of the code because we want to implement a reflex which
shows the download link once it's ready.
I added a system spec to verify that the download link can be generated
within the mailer in a background job. ActiveStorage is a bit particular
when it comes to genererating URLs and depending on the situation it may
generate a redirect URL, a proxy URL or link directly to the storage.
But we want a redirect URL here.
Refactor split checkout to use the new controller. But unfortunately
we can't have nested form, so adding a voucher is still handled by
SplitCheckoutController.