govuk_personalisation 0.14.0 → 0.15.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: 9bcf8d368f8b0a1b1262d714d53eca96638270d12d9a064bb91439d384b42eb0
4
- data.tar.gz: 277a7a1ca1a96370676bbce2548a85a033a73b8c49e1bcae6ca3f56671e45c6f
3
+ metadata.gz: ca12ab61e875bd39261e990560cd16d8957b15c2c4f16d9ffef0a2404cee91b7
4
+ data.tar.gz: e5826ce6cbd13aa29e6861ff15bd69d173313b73f73581e6df15ae8cc775157d
5
5
  SHA512:
6
- metadata.gz: 1cd009d3a20051533961e3c581b178ffde8def6bf2e29fc4b2bde9745626abed38aa8153c8a99153401dac9b2d72d1cfcdfe97cad465f01f512bd8367d018167
7
- data.tar.gz: 5c68fbff6fdbb178bb13e07e9002ba934a78e68a40e309de241495cd6eee265ab6ca5be0a8fe0f9bda39aa465e069baac407a433d72b0174d18feb6dfa30c65c
6
+ metadata.gz: 0caf472a2188909e45cbe7720451dc224b9d809a9cf2983d8cb0f10111fd936fd164bbacafefb3c4480565f24d0ad36a87cd740ea5575076283a8ea688b9e307
7
+ data.tar.gz: 678e921c691e474ea7a87b7d1eb96061bceba614c6184c38731caf70e379e6877fb4cf58f5339a44316a616bf596e2634b7df595c93c968b4cd14271898a547f
@@ -10,7 +10,7 @@ jobs:
10
10
  ruby: ['3.0', 3.1, 3.2]
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v3
13
+ - uses: actions/checkout@v4
14
14
  - uses: ruby/setup-ruby@v1
15
15
  with:
16
16
  ruby-version: ${{ matrix.ruby }}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.15.0
2
+
3
+ - Update URLs and method names for One Login ([#56](https://github.com/alphagov/govuk_personalisation/pull/56))
4
+ - Note that this release deprecates the your_account, manage, security, and feedback methods of GovukPersonalisation::Urls, but retains them as aliases to allow easier transition. They will be removed in a later release.
5
+
1
6
  # 0.14.0
2
7
 
3
8
  - Use GOVUK_ENVIRONMENT as a backstop for DIGITAL_IDENTITY_ENVIRONMENT ([#53](https://github.com/alphagov/govuk_personalisation/pull/53))
@@ -33,5 +33,5 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency "pry-byebug"
34
34
  spec.add_development_dependency "rake"
35
35
  spec.add_development_dependency "rspec-rails"
36
- spec.add_development_dependency "rubocop-govuk", "4.11.0"
36
+ spec.add_development_dependency "rubocop-govuk", "4.12.0"
37
37
  end
@@ -22,32 +22,41 @@ module GovukPersonalisation::Urls
22
22
  find_govuk_url(var: "SIGN_OUT", application: "email-alert-frontend", path: "/email/manage")
23
23
  end
24
24
 
25
- # Find the external URL for the "your account" page
25
+ # Find the external URL for the "your services" page on One Login
26
26
  #
27
27
  # @return [String] the URL
28
+ def self.one_login_your_services
29
+ find_external_url(var: "ONE_LOGIN_YOUR_SERVICES", url: "https://#{digital_identity_domain('home')}")
30
+ end
31
+
28
32
  def self.your_account
29
- find_external_url(var: "YOUR_ACCOUNT", url: "https://#{digital_identity_domain}")
33
+ one_login_your_services
30
34
  end
31
35
 
32
- # Find the external URL for the "manage" page
36
+ # Find the external URL for the "security" page on One Login
33
37
  #
34
38
  # @return [String] the URL
39
+ def self.one_login_security
40
+ find_external_url(var: "ONE_LOGIN_SECURITY", url: "https://#{digital_identity_domain('home')}/security")
41
+ end
42
+
35
43
  def self.manage
36
- find_external_url(var: "MANAGE", url: "https://#{digital_identity_domain}?link=manage-account")
44
+ one_login_security
37
45
  end
38
46
 
39
- # Find the external URL for the "security" page
40
- #
41
- # @return [String] the URL
42
47
  def self.security
43
- find_external_url(var: "SECURITY", url: "https://#{digital_identity_domain}?link=security-privacy")
48
+ one_login_security
44
49
  end
45
50
 
46
- # Find the external URL for the "feedback" page
51
+ # Find the external URL for the "feedback" page on One Login
47
52
  #
48
53
  # @return [String] the URL
54
+ def self.one_login_feedback
55
+ find_external_url(var: "ONE_LOGIN_FEEDBACK", url: "https://#{digital_identity_domain('signin')}/support?supportType=PUBLIC")
56
+ end
57
+
49
58
  def self.feedback
50
- find_external_url(var: "FEEDBACK", url: "https://signin.account.gov.uk/support")
59
+ one_login_feedback
51
60
  end
52
61
 
53
62
  # Finds a URL on www.gov.uk. This method is used so we can have
@@ -91,14 +100,11 @@ module GovukPersonalisation::Urls
91
100
  ENV.fetch("GOVUK_PERSONALISATION_#{var}_URI", url)
92
101
  end
93
102
 
94
- # Gets the Digital Identity domain for the current environment
95
- #
96
- # @return [String] the domain
97
- def self.digital_identity_domain
103
+ def self.digital_identity_domain(host)
98
104
  if digital_identity_environment
99
- "home.#{digital_identity_environment}.account.gov.uk"
105
+ "#{host}.#{digital_identity_environment}.account.gov.uk"
100
106
  else
101
- "home.account.gov.uk"
107
+ "#{host}.account.gov.uk"
102
108
  end
103
109
  end
104
110
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GovukPersonalisation
4
- VERSION = "0.14.0"
4
+ VERSION = "0.15.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.14.0
4
+ version: 0.15.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: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - '='
122
122
  - !ruby/object:Gem::Version
123
- version: 4.11.0
123
+ version: 4.12.0
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - '='
129
129
  - !ruby/object:Gem::Version
130
- version: 4.11.0
130
+ version: 4.12.0
131
131
  description: A gem to hold shared code which other GOV.UK apps will use to implement
132
132
  accounts-related functionality.
133
133
  email:
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  requirements: []
180
- rubygems_version: 3.4.15
180
+ rubygems_version: 3.4.19
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: A gem to hold shared code which other GOV.UK apps will use to implement accounts-related