govuk_personalisation 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/govuk_personalisation/urls.rb +19 -8
- data/lib/govuk_personalisation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72e80d8e2a45cc9b258a963263e91468d69372505d0452205393eb735cf569fa
|
|
4
|
+
data.tar.gz: 6cb230637923f915ef5117b812f6790ba244a07c45a29823ad52c51e6ae33f03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f527d1acb925660f6b975ceab7bfc87b188578ddecef6e5af15dd340128daed02a84d2c5d042248c79a8b9c9e007a2238c7242fe41cf1dbd4070bea481230eca
|
|
7
|
+
data.tar.gz: 67b6f46b435a2e9480515cd41f98e6381286ede5d0f2c16d97e4f30f248dd52657d2bd95de056515c1c2a3ec5e24a9f51076cf71cdad285d41bdf5d3fb0e9d2a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# 0.11.0
|
|
2
|
+
|
|
3
|
+
- Remove references to the account manager from the URLs module ([#26](https://github.com/alphagov/govuk_personalisation/pull/26))
|
|
4
|
+
|
|
1
5
|
# 0.10.1
|
|
2
6
|
|
|
3
7
|
- Make session-change events uncacheable ([#24](https://github.com/alphagov/govuk_personalisation/pull/24))
|
|
@@ -26,21 +26,21 @@ module GovukPersonalisation::Urls
|
|
|
26
26
|
#
|
|
27
27
|
# @return [String] the URL
|
|
28
28
|
def self.manage
|
|
29
|
-
find_external_url(var: "MANAGE",
|
|
29
|
+
find_external_url(var: "MANAGE", url: "https://#{digital_identity_domain}?link=manage-account")
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Find the external URL for the "security" page
|
|
33
33
|
#
|
|
34
34
|
# @return [String] the URL
|
|
35
35
|
def self.security
|
|
36
|
-
find_external_url(var: "SECURITY",
|
|
36
|
+
find_external_url(var: "SECURITY", url: "https://#{digital_identity_domain}?link=security-privacy")
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
# Find the external URL for the "feedback" page
|
|
40
40
|
#
|
|
41
41
|
# @return [String] the URL
|
|
42
42
|
def self.feedback
|
|
43
|
-
find_external_url(var: "FEEDBACK",
|
|
43
|
+
find_external_url(var: "FEEDBACK", url: "https://signin.account.gov.uk/support")
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
# Finds a URL on www.gov.uk. This method is used so we can have
|
|
@@ -76,12 +76,23 @@ module GovukPersonalisation::Urls
|
|
|
76
76
|
#
|
|
77
77
|
# Otherwise, an application URL generated by Plek will be returned.
|
|
78
78
|
#
|
|
79
|
-
# @param var
|
|
80
|
-
# @param
|
|
81
|
-
# @param path [String] the path to use (if the env var is set this is ignored)
|
|
79
|
+
# @param var [String] the name of the variable to look up
|
|
80
|
+
# @param url [String] the url to default to if there is no environment variable set
|
|
82
81
|
#
|
|
83
82
|
# @return [String] the URL
|
|
84
|
-
def self.find_external_url(var:,
|
|
85
|
-
ENV.fetch("GOVUK_PERSONALISATION_#{var}_URI",
|
|
83
|
+
def self.find_external_url(var:, url:)
|
|
84
|
+
ENV.fetch("GOVUK_PERSONALISATION_#{var}_URI", url)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Gets the Digital Identity domain for the current environment
|
|
88
|
+
#
|
|
89
|
+
# @return [String] the domain
|
|
90
|
+
def self.digital_identity_domain
|
|
91
|
+
environment = ENV["DIGITAL_IDENTITY_ENVIRONMENT"]
|
|
92
|
+
if environment
|
|
93
|
+
"#{environment}.account.gov.uk"
|
|
94
|
+
else
|
|
95
|
+
"account.gov.uk"
|
|
96
|
+
end
|
|
86
97
|
end
|
|
87
98
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_personalisation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: plek
|