govuk_personalisation 0.11.2 → 0.13.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: 3027b7bc4c484759eed32262b7988b2a6f8953b57634d35174002881dedbd806
4
- data.tar.gz: f504185b2dee2d3c4cd0c9627a54872c4cb10744ea19bb96a9ceea22bed1cd75
3
+ metadata.gz: 3a5a2220ec7824bf32bffa97e4965169731f346303b2712908b4160587c85b1f
4
+ data.tar.gz: 9129d15308675709673f548c3df9d8be6c9d72a076395ef1817e563eb7482572
5
5
  SHA512:
6
- metadata.gz: 83785705cddaee76e6804d2d4f64cfb2cedc1ac5dbeab91e5f07e982e4fd1a1ffbcbc0d8f56e26afb9551298be122aed9cc36a42b58690b405440ed86f4c0dd2
7
- data.tar.gz: 39f5a7677091f18583ebc374541af421a61f70968cedd4954ba7ac69444d1758a394430c80308ab38976a9633de2e71406b9221e446e3950853b896b267ec88f
6
+ metadata.gz: a1ad6932786c4569c68280bab4e0e02a74b0e0afae6e504028c94a6877273ae9c8df75c7de869fcba9eb3502067e2acf724fb72be17a00e04c5c7ac6a03d46a7
7
+ data.tar.gz: bd8db5c53d6f7526bb10f3ae8ca0240500932dfa6b91d361c3ae79ede0055dbcfc0c2faf7c87bd0f5fbe51b9dfecea307c176e7b004800f4db94c7ed5b50e214
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: /
5
+ schedule:
6
+ interval: daily
7
+ - package-ecosystem: "github-actions"
8
+ directory: /
9
+ schedule:
10
+ interval: daily
@@ -0,0 +1,36 @@
1
+ on: [push, pull_request]
2
+
3
+ jobs:
4
+ # This matrix job runs the test suite against multiple Ruby versions
5
+ test_matrix:
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
10
+ ruby: [2.7, '3.0', 3.1, 3.2]
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby }}
17
+ bundler-cache: true
18
+ - run: bundle exec rake
19
+
20
+ # Branch protection rules cannot directly depend on status checks from matrix jobs.
21
+ # So instead we define `test` as a dummy job which only runs after the preceding `test_matrix` checks have passed.
22
+ # Solution inspired by: https://github.community/t/status-check-for-a-matrix-jobs/127354/3
23
+ test:
24
+ needs: test_matrix
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - run: echo "All matrix tests have passed 🚀"
28
+
29
+ publish:
30
+ needs: test
31
+ if: ${{ github.ref == 'refs/heads/main' }}
32
+ permissions:
33
+ contents: write
34
+ uses: alphagov/govuk-infrastructure/.github/workflows/publish-rubygem.yml@main
35
+ secrets:
36
+ GEM_HOST_API_KEY: ${{ secrets.ALPHAGOV_RUBYGEMS_API_KEY }}
data/.rubocop.yml CHANGED
@@ -1,3 +1,4 @@
1
1
  inherit_gem:
2
2
  rubocop-govuk:
3
3
  - config/default.yml
4
+ - config/rspec.yml
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.6
1
+ 2.7.6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 0.13.0
2
+
3
+ - Minimum Ruby version is now 2.7.6 ([#39](https://github.com/alphagov/govuk_personalisation/pull/39))
4
+ - Modify Digital Identity URI to `home.account.gov.uk` ([#43](https://github.com/alphagov/govuk_personalisation/pull/43))
5
+
6
+ # 0.12.0
7
+
8
+ - Set account home to Digital Identity URI ([#36](https://github.com/alphagov/govuk_personalisation/pull/36))
9
+ - Add `GovukPersonalisation::Urls.manage_email` link ([#38](https://github.com/alphagov/govuk_personalisation/pull/38))
10
+
1
11
  # 0.11.2
2
12
 
3
13
  - Add support for Rails 7 ([#33](https://github.com/alphagov/govuk_personalisation/pull/33))
@@ -15,10 +25,12 @@
15
25
  - Make session-change events uncacheable ([#24](https://github.com/alphagov/govuk_personalisation/pull/24))
16
26
 
17
27
  # 0.10.0
28
+
18
29
  - Add `url_with_analytics` helper to allow apps to access the URL used for `redirect_with_analytics` ([#22](https://github.com/alphagov/govuk_personalisation/pull/22))
19
30
 
20
31
  # 0.9.0
21
- - Add `redirect_with_analytics` helper, attaches _ga and cookie_consent values from existing params to redirects. ([#19](https://github.com/alphagov/govuk_personalisation/pull/19))
32
+
33
+ - Add `redirect_with_analytics` helper, attaches \_ga and cookie_consent values from existing params to redirects. ([#19](https://github.com/alphagov/govuk_personalisation/pull/19))
22
34
  - Add `GovukPersonalisation::Redirect` and `.build_url` helper to construct valid URLs with additional parameters. ([#19](https://github.com/alphagov/govuk_personalisation/pull/19))
23
35
 
24
36
  # 0.8.0
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.description = "A gem to hold shared code which other GOV.UK apps will use to implement accounts-related functionality."
15
15
  spec.homepage = "https://github.com/alphagov/govuk_personalisation"
16
16
  spec.license = "MIT"
17
- spec.required_ruby_version = Gem::Requirement.new(">= 2.6.6")
17
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.6")
18
18
 
19
19
  # Specify which files should be added to the gem when it is released.
20
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -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"
36
+ spec.add_development_dependency "rubocop-govuk", "4.9.0"
37
37
  end
@@ -3,7 +3,7 @@
3
3
  module GovukPersonalisation::Flash
4
4
  SESSION_SEPARATOR = "$$"
5
5
  MESSAGE_SEPARATOR = ","
6
- MESSAGE_REGEX = /\A[a-zA-Z0-9._\-]+\z/.freeze
6
+ MESSAGE_REGEX = /\A[a-zA-Z0-9._-]+\z/.freeze
7
7
 
8
8
  # Splits the session header into a session value (suitable for using
9
9
  # in account-api calls) and flash messages.
@@ -15,11 +15,18 @@ module GovukPersonalisation::Urls
15
15
  find_govuk_url(var: "SIGN_OUT", application: "frontend", path: "/sign-out")
16
16
  end
17
17
 
18
- # Find the GOV.UK URL for the "your account" page
18
+ # Find the GOV.UK URL for the "email manager" page
19
+ #
20
+ # @return [String] the URL
21
+ def self.manage_email
22
+ find_govuk_url(var: "SIGN_OUT", application: "email-alert-frontend", path: "/email/manage")
23
+ end
24
+
25
+ # Find the external URL for the "your account" page
19
26
  #
20
27
  # @return [String] the URL
21
28
  def self.your_account
22
- find_govuk_url(var: "YOUR_ACCOUNT", application: "frontend", path: "/account/home")
29
+ find_external_url(var: "YOUR_ACCOUNT", url: "https://#{digital_identity_domain}")
23
30
  end
24
31
 
25
32
  # Find the external URL for the "manage" page
@@ -90,9 +97,9 @@ module GovukPersonalisation::Urls
90
97
  def self.digital_identity_domain
91
98
  environment = ENV["DIGITAL_IDENTITY_ENVIRONMENT"]
92
99
  if environment
93
- "#{environment}.account.gov.uk"
100
+ "home.#{environment}.account.gov.uk"
94
101
  else
95
- "account.gov.uk"
102
+ "home.account.gov.uk"
96
103
  end
97
104
  end
98
105
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GovukPersonalisation
4
- VERSION = "0.11.2"
4
+ VERSION = "0.13.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.11.2
4
+ version: 0.13.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: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek
@@ -118,16 +118,16 @@ dependencies:
118
118
  name: rubocop-govuk
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ">="
121
+ - - '='
122
122
  - !ruby/object:Gem::Version
123
- version: '0'
123
+ version: 4.9.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: '0'
130
+ version: 4.9.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:
@@ -136,13 +136,14 @@ executables: []
136
136
  extensions: []
137
137
  extra_rdoc_files: []
138
138
  files:
139
+ - ".github/dependabot.yml"
140
+ - ".github/workflows/ci.yml"
139
141
  - ".gitignore"
140
142
  - ".rspec"
141
143
  - ".rubocop.yml"
142
144
  - ".ruby-version"
143
145
  - CHANGELOG.md
144
146
  - Gemfile
145
- - Jenkinsfile
146
147
  - LICENCE
147
148
  - README.md
148
149
  - Rakefile
@@ -169,14 +170,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
170
  requirements:
170
171
  - - ">="
171
172
  - !ruby/object:Gem::Version
172
- version: 2.6.6
173
+ version: 2.7.6
173
174
  required_rubygems_version: !ruby/object:Gem::Requirement
174
175
  requirements:
175
176
  - - ">="
176
177
  - !ruby/object:Gem::Version
177
178
  version: '0'
178
179
  requirements: []
179
- rubygems_version: 3.0.3
180
+ rubygems_version: 3.4.4
180
181
  signing_key:
181
182
  specification_version: 4
182
183
  summary: A gem to hold shared code which other GOV.UK apps will use to implement accounts-related
data/Jenkinsfile DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env groovy
2
-
3
- library("govuk")
4
-
5
- node {
6
- govuk.buildProject()
7
- }