govuk_personalisation 0.15.0 → 0.16.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: ca12ab61e875bd39261e990560cd16d8957b15c2c4f16d9ffef0a2404cee91b7
4
- data.tar.gz: e5826ce6cbd13aa29e6861ff15bd69d173313b73f73581e6df15ae8cc775157d
3
+ metadata.gz: 871e48e51f4a9c01f79d171f71e6fe5658cd2244383646a4067fb5f6c71a0dc5
4
+ data.tar.gz: 46945612a7a4c42d5c8e2b9cb92a6d080fd2c49456414045b8b9bd5e9bd98792
5
5
  SHA512:
6
- metadata.gz: 0caf472a2188909e45cbe7720451dc224b9d809a9cf2983d8cb0f10111fd936fd164bbacafefb3c4480565f24d0ad36a87cd740ea5575076283a8ea688b9e307
7
- data.tar.gz: 678e921c691e474ea7a87b7d1eb96061bceba614c6184c38731caf70e379e6877fb4cf58f5339a44316a616bf596e2634b7df595c93c968b4cd14271898a547f
6
+ metadata.gz: 4fa1377a4de65067c052d465c85d98c62b4b2e97ad42957661608207977cd803ac6f9dcdc139874e847ce0c94d047479f30767303d7013361c245f4caf2a2b40
7
+ data.tar.gz: 7e08d033229d35b8a5009900aeff3f156ce3591285aed1b06d6b3e33609c9e5ca3d9babeb6142f797e78c80760d80e21b76bf4a2f29fd0371a9ec7435b68d1b3
@@ -1,6 +1,27 @@
1
1
  on: [push, pull_request]
2
2
 
3
3
  jobs:
4
+ snyk-security:
5
+ name: SNYK security analysis
6
+ uses: alphagov/govuk-infrastructure/.github/workflows/snyk-security.yml@main
7
+ with:
8
+ skip_sca: true
9
+ secrets: inherit
10
+ permissions:
11
+ contents: read
12
+ security-events: write
13
+ actions: read
14
+
15
+ codeql-sast:
16
+ name: CodeQL SAST scan
17
+ uses: alphagov/govuk-infrastructure/.github/workflows/codeql-analysis.yml@main
18
+ permissions:
19
+ security-events: write
20
+
21
+ dependency-review:
22
+ name: Dependency Review scan
23
+ uses: alphagov/govuk-infrastructure/.github/workflows/dependency-review.yml@main
24
+
4
25
  # This matrix job runs the test suite against multiple Ruby versions
5
26
  test_matrix:
6
27
  strategy:
@@ -0,0 +1,6 @@
1
+ api_version: 1
2
+ auto_merge:
3
+ - dependency: rubocop-govuk
4
+ allowed_semver_bumps:
5
+ - patch
6
+ - minor
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.16.0
2
+
3
+ - Update minimum required Ruby version ([#67](https://github.com/alphagov/govuk_personalisation/pull/67))
4
+ - Map our environments correctly to DI/One Login's environments. ([#63](https://github.com/alphagov/govuk_personalisation/pull/63))
5
+
1
6
  # 0.15.0
2
7
 
3
8
  - Update URLs and method names for One Login ([#56](https://github.com/alphagov/govuk_personalisation/pull/56))
@@ -33,5 +33,6 @@ 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.12.0"
36
+ spec.add_development_dependency "rubocop-govuk", "4.14.0"
37
+ spec.add_development_dependency "simplecov"
37
38
  end
@@ -101,16 +101,24 @@ module GovukPersonalisation::Urls
101
101
  end
102
102
 
103
103
  def self.digital_identity_domain(host)
104
- if digital_identity_environment
105
- "#{host}.#{digital_identity_environment}.account.gov.uk"
106
- else
104
+ if ["production", nil].include?(digital_identity_environment)
107
105
  "#{host}.account.gov.uk"
106
+ else
107
+ "#{host}.#{digital_identity_environment}.account.gov.uk"
108
108
  end
109
109
  end
110
110
 
111
+ # DI/One Login's environments don't map exactly to ours - their staging points to
112
+ # our integration and vice versa. So translate here.
113
+ DIGITAL_IDENTITY_ENVIRONMENT_MAP = {
114
+ "production" => "production",
115
+ "staging" => "integration",
116
+ "integration" => "staging",
117
+ }.freeze
118
+
111
119
  def self.digital_identity_environment
112
120
  return ENV["DIGITAL_IDENTITY_ENVIRONMENT"] if ENV["DIGITAL_IDENTITY_ENVIRONMENT"]
113
121
 
114
- ENV["GOVUK_ENVIRONMENT"] == "production" ? nil : ENV["GOVUK_ENVIRONMENT"]
122
+ DIGITAL_IDENTITY_ENVIRONMENT_MAP[ENV["GOVUK_ENVIRONMENT"]] || ENV["GOVUK_ENVIRONMENT"]
115
123
  end
116
124
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GovukPersonalisation
4
- VERSION = "0.15.0"
4
+ VERSION = "0.16.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.15.0
4
+ version: 0.16.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-09-19 00:00:00.000000000 Z
11
+ date: 2024-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek
@@ -120,14 +120,28 @@ dependencies:
120
120
  requirements:
121
121
  - - '='
122
122
  - !ruby/object:Gem::Version
123
- version: 4.12.0
123
+ version: 4.14.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.12.0
130
+ version: 4.14.0
131
+ - !ruby/object:Gem::Dependency
132
+ name: simplecov
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
131
145
  description: A gem to hold shared code which other GOV.UK apps will use to implement
132
146
  accounts-related functionality.
133
147
  email:
@@ -139,6 +153,7 @@ files:
139
153
  - ".github/dependabot.yml"
140
154
  - ".github/workflows/ci.yml"
141
155
  - ".gitignore"
156
+ - ".govuk_dependabot_merger.yml"
142
157
  - ".rspec"
143
158
  - ".rubocop.yml"
144
159
  - ".ruby-version"
@@ -177,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
192
  - !ruby/object:Gem::Version
178
193
  version: '0'
179
194
  requirements: []
180
- rubygems_version: 3.4.19
195
+ rubygems_version: 3.5.6
181
196
  signing_key:
182
197
  specification_version: 4
183
198
  summary: A gem to hold shared code which other GOV.UK apps will use to implement accounts-related