govuk_navigation_helpers 8.1.0 → 8.1.1
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/config/tasklists/end-a-civil-partnership.json +0 -5
- data/config/tasklists/get-a-divorce.json +17 -6
- data/config/tasklists/learn-to-drive-a-car.json +6 -3
- data/lib/govuk_navigation_helpers/related_navigation_sidebar.rb +13 -1
- data/lib/govuk_navigation_helpers/version.rb +1 -1
- data/spec/related_navigation_sidebar_spec.rb +2 -2
- data/spec/tasklist_content_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2097d9cbeb05c288dd203fc0daa94ee9fa2d3a6a
|
|
4
|
+
data.tar.gz: d03f10f2eb85b2702a0eb65810f4715a609d7f30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb9517734393c5b1fc4862be6354e70c0db2e5fa364910ba613990c74a5bb9a3c20b1b5d908f96ccfee01d7848e6c5d8a347033998a78a193cf43e3366cad43c
|
|
7
|
+
data.tar.gz: 0cc1644665f14aacb99a905af0913072e0b7e4219d6c28b1d06da806fd403f3f7e2db5c44eb144fae82b56dd629f904ca577f5cdc8eb967287f80dc998ede264
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 8.1.1
|
|
2
|
+
* Update content in the /end-a-civil-partnership, /get-a-divorce, and /learn-to-drive-a-car tasklists
|
|
3
|
+
* Strip non-alphanumeric characters from world location links for related navigation helper.
|
|
4
|
+
|
|
1
5
|
## 8.1.0
|
|
2
6
|
* Update related navigation sidebar helper to return statistical data sets.
|
|
3
7
|
|
|
@@ -214,11 +214,6 @@
|
|
|
214
214
|
"text": "Find your civil partner's address",
|
|
215
215
|
"context": "£0 to £100"
|
|
216
216
|
},
|
|
217
|
-
{
|
|
218
|
-
"href": "http://hmctsformfinder.justice.gov.uk/HMCTS/GetForm.do?court_forms_id=1112",
|
|
219
|
-
"text": "Apply to skip the dissolution order if you can’t find their address",
|
|
220
|
-
"context": "£50"
|
|
221
|
-
},
|
|
222
217
|
{
|
|
223
218
|
"href": "/end-civil-partnership/if-your-partner-lacks-mental-capacity",
|
|
224
219
|
"text": "Get help if your civil partner can’t make decisions for themselves"
|
|
@@ -20,7 +20,23 @@
|
|
|
20
20
|
},
|
|
21
21
|
"ab_test_prefix": "GetADivorce",
|
|
22
22
|
"related_paths": [
|
|
23
|
-
"/divorce/respond-to-a-divorce-petition"
|
|
23
|
+
"/divorce/respond-to-a-divorce-petition",
|
|
24
|
+
"/divorce/file-for-divorce",
|
|
25
|
+
"/looking-after-children-divorce/if-you-agree",
|
|
26
|
+
"/looking-after-children-divorce/mediation",
|
|
27
|
+
"/looking-after-children-divorce/types-of-court-order",
|
|
28
|
+
"/looking-after-children-divorce/apply-for-court-order",
|
|
29
|
+
"/looking-after-children-divorce/after-you-apply-for-a-court-order",
|
|
30
|
+
"/looking-after-children-divorce/change-or-enforce-an-order",
|
|
31
|
+
"/money-property-when-relationship-ends/apply-for-consent-order",
|
|
32
|
+
"/money-property-when-relationship-ends/mediation",
|
|
33
|
+
"/money-property-when-relationship-ends/apply-for-a-financial-order",
|
|
34
|
+
"/money-property-when-relationship-ends/how-the-court-splits-assets",
|
|
35
|
+
"/money-property-when-relationship-ends/maintenance-payments",
|
|
36
|
+
"/money-property-when-relationship-ends/tax",
|
|
37
|
+
"/visas-when-you-separate-or-divorce/apply-stay-uk",
|
|
38
|
+
"/stay-in-home-during-separation-or-divorce/apply-if-the-property-is-registered",
|
|
39
|
+
"/stay-in-home-during-separation-or-divorce/apply-if-the-property-is-unregistered"
|
|
24
40
|
],
|
|
25
41
|
"tasklist": {
|
|
26
42
|
"groups": [
|
|
@@ -199,11 +215,6 @@
|
|
|
199
215
|
"text": "Find your husband or wife’s address",
|
|
200
216
|
"context": "£0 to £100"
|
|
201
217
|
},
|
|
202
|
-
{
|
|
203
|
-
"href": "http://hmctsformfinder.justice.gov.uk/HMCTS/GetForm.do?court_forms_id=1112",
|
|
204
|
-
"text": "Apply to skip the divorce petition if you can’t find their address",
|
|
205
|
-
"context": "£50"
|
|
206
|
-
},
|
|
207
218
|
{
|
|
208
219
|
"href": "/divorce/if-your-husband-or-wife-lacks-mental-capacity",
|
|
209
220
|
"text": "Get help if your husband or wife can’t make decisions for themselves"
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
"contents": [
|
|
95
95
|
{
|
|
96
96
|
"href": "/apply-first-provisional-driving-licence",
|
|
97
|
-
"text": "Apply for your first provisional driving licence"
|
|
97
|
+
"text": "Apply for your first provisional driving licence",
|
|
98
|
+
"context": "£34"
|
|
98
99
|
}
|
|
99
100
|
]
|
|
100
101
|
}
|
|
@@ -171,7 +172,8 @@
|
|
|
171
172
|
"contents": [
|
|
172
173
|
{
|
|
173
174
|
"href": "/book-theory-test",
|
|
174
|
-
"text": "Book your theory test"
|
|
175
|
+
"text": "Book your theory test",
|
|
176
|
+
"context": "£23"
|
|
175
177
|
},
|
|
176
178
|
{
|
|
177
179
|
"href": "/theory-test/what-to-take",
|
|
@@ -208,7 +210,8 @@
|
|
|
208
210
|
"contents": [
|
|
209
211
|
{
|
|
210
212
|
"href": "/book-driving-test",
|
|
211
|
-
"text": "Book your driving test"
|
|
213
|
+
"text": "Book your driving test",
|
|
214
|
+
"context": "£62"
|
|
212
215
|
},
|
|
213
216
|
{
|
|
214
217
|
"href": "/driving-test/what-to-take",
|
|
@@ -34,7 +34,7 @@ module GovukNavigationHelpers
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def world_location_base_path(title)
|
|
37
|
-
"/world/#{title
|
|
37
|
+
"/world/#{parameterise(title)}/news"
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def related_items
|
|
@@ -92,5 +92,17 @@ module GovukNavigationHelpers
|
|
|
92
92
|
links: build_links_for_sidebar(@content_item.external_links, "url", rel: 'external')
|
|
93
93
|
]
|
|
94
94
|
end
|
|
95
|
+
|
|
96
|
+
def parameterise(str, sep = "-")
|
|
97
|
+
parameterised_str = str.gsub(/[^\w\-]+/, sep)
|
|
98
|
+
unless sep.nil? || sep.empty?
|
|
99
|
+
re_sep = Regexp.escape(sep)
|
|
100
|
+
# No more than one of the separator in a row.
|
|
101
|
+
parameterised_str.gsub!(/#{re_sep}{2,}/, sep)
|
|
102
|
+
# Remove leading/trailing separator.
|
|
103
|
+
parameterised_str.gsub!(/^#{re_sep}|#{re_sep}$/, '')
|
|
104
|
+
end
|
|
105
|
+
parameterised_str.downcase
|
|
106
|
+
end
|
|
95
107
|
end
|
|
96
108
|
end
|
|
@@ -108,7 +108,7 @@ RSpec.describe GovukNavigationHelpers::RelatedNavigationSidebar do
|
|
|
108
108
|
"world_locations" => [
|
|
109
109
|
{
|
|
110
110
|
"content_id" => "32c1b93d-2553-47c9-bc3c-fc5b513ecc32",
|
|
111
|
-
"title" => "World Location",
|
|
111
|
+
"title" => "World, ~ (@Location)",
|
|
112
112
|
"locale" => "en"
|
|
113
113
|
}
|
|
114
114
|
],
|
|
@@ -122,7 +122,7 @@ RSpec.describe GovukNavigationHelpers::RelatedNavigationSidebar do
|
|
|
122
122
|
topical_events: [{ path: "/related-topical-event", text: "related topical event" }],
|
|
123
123
|
policies: [{ path: "/related-policy", text: "related policy" }],
|
|
124
124
|
publishers: [{ path: "/related-organisation", text: "related organisation" }],
|
|
125
|
-
world_locations: [{ path: "/world/world-location/news", text: "World Location" }],
|
|
125
|
+
world_locations: [{ path: "/world/world-location/news", text: "World, ~ (@Location)" }],
|
|
126
126
|
worldwide_organisations: [],
|
|
127
127
|
statistical_data_sets: [],
|
|
128
128
|
other: [[], []]
|
|
@@ -252,6 +252,22 @@ module GovukNavigationHelpers
|
|
|
252
252
|
it 'has related paths' do
|
|
253
253
|
related_paths = %w(
|
|
254
254
|
/divorce/respond-to-a-divorce-petition
|
|
255
|
+
/divorce/file-for-divorce
|
|
256
|
+
/looking-after-children-divorce/if-you-agree
|
|
257
|
+
/looking-after-children-divorce/mediation
|
|
258
|
+
/looking-after-children-divorce/types-of-court-order
|
|
259
|
+
/looking-after-children-divorce/apply-for-court-order
|
|
260
|
+
/looking-after-children-divorce/after-you-apply-for-a-court-order
|
|
261
|
+
/looking-after-children-divorce/change-or-enforce-an-order
|
|
262
|
+
/money-property-when-relationship-ends/apply-for-consent-order
|
|
263
|
+
/money-property-when-relationship-ends/mediation
|
|
264
|
+
/money-property-when-relationship-ends/apply-for-a-financial-order
|
|
265
|
+
/money-property-when-relationship-ends/how-the-court-splits-assets
|
|
266
|
+
/money-property-when-relationship-ends/maintenance-payments
|
|
267
|
+
/money-property-when-relationship-ends/tax
|
|
268
|
+
/visas-when-you-separate-or-divorce/apply-stay-uk
|
|
269
|
+
/stay-in-home-during-separation-or-divorce/apply-if-the-property-is-registered
|
|
270
|
+
/stay-in-home-during-separation-or-divorce/apply-if-the-property-is-unregistered
|
|
255
271
|
).sort
|
|
256
272
|
|
|
257
273
|
expect(
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_navigation_helpers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.1.
|
|
4
|
+
version: 8.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-12-
|
|
11
|
+
date: 2017-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gds-api-adapters
|