Add GovukPersonalisation::Urls
module
#14
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we have ad-hoc approaches to generating account URLs in our
frontend apps. Some use env vars with the full URL in. Some
construct paths based on the account-manager's URL. Some assume URLs.
It's even worse when we want to construct links which work both in
local development (where they need to link to
foo.dev.gov.uk
) and inproduction (where they need to link to
www.gov.uk
).So, let's put all of the URL generation logic in this gem, and re-use
it in different apps. For now, I've added the URLs which we use in
the account template in govuk_publishing_components. Then we can
change govuk_publishing_components to depend on this gem, update the
template, and set the URL env vars on Integration to point to Digital
Identity.
We can migrate other URLs into this gem as needed.
Trello card