govuk_personalisation 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6aba4a93adaa9cf995e9933fb12276d84e8d0e3011c17ec4689a63a5cf8f4a0
4
- data.tar.gz: 97b6c20b940afef6fb31671187b619b89f58222922b7b2b8c9ae6233d2dcec0e
3
+ metadata.gz: 72e80d8e2a45cc9b258a963263e91468d69372505d0452205393eb735cf569fa
4
+ data.tar.gz: 6cb230637923f915ef5117b812f6790ba244a07c45a29823ad52c51e6ae33f03
5
5
  SHA512:
6
- metadata.gz: f431ca7c35aca6f808d968d82eca6420ce0fab31c00766ec39226284790c7a46f8a49bf2d1dda60784853c85a8f836972d628b21ee7a77d213b6d5d0090a1715
7
- data.tar.gz: 43eb1db4b1c9cbd2c7a44d8610dc22f33e0ddd37e844038d5b0ca32140cc9c42f0d9519be395d5f247df9963ce17736b106dddd05de0a8f34e1d30366561c3ec
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", application: "account-manager", path: "/account/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", application: "account-manager", path: "/account/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", application: "account-manager", path: "/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 [String] the name of the variable to look up
80
- # @param application [String] the name of the frontend application, passed to Plek (if the env var is set, this is ignored)
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:, application:, path:)
85
- ENV.fetch("GOVUK_PERSONALISATION_#{var}_URI", "#{Plek.find(application)}#{path}")
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GovukPersonalisation
4
- VERSION = "0.10.1"
4
+ VERSION = "0.11.0"
5
5
  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.10.1
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-23 00:00:00.000000000 Z
11
+ date: 2021-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek