govuk_navigation_helpers 8.1.0 → 8.1.1

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
  SHA1:
3
- metadata.gz: 9bccfd9c258c7c6f945128b01c3c1db4920ea14d
4
- data.tar.gz: b03031562708aac53ca280baf28fd113a2d1efdc
3
+ metadata.gz: 2097d9cbeb05c288dd203fc0daa94ee9fa2d3a6a
4
+ data.tar.gz: d03f10f2eb85b2702a0eb65810f4715a609d7f30
5
5
  SHA512:
6
- metadata.gz: c9249a91fc7aa6efdc3d620cb0b263220f4f182026f0aa5284d76977515e1b1b5ccb7053e71b0cc94ec0adb3da6143b78bb2c6ab957f71b00cb36e9d2cdbc2ba
7
- data.tar.gz: 3eefa4583d68e4b780ff9589894f3e5aa436b3c21fe9ceccbb7e77705a00f85d541bf0e13346c5a4c3c0bd3d1a5d878ac5bd104a77c5390c29f20e801f4b87ae
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.downcase.tr(' ', '-')}/news"
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
@@ -1,3 +1,3 @@
1
1
  module GovukNavigationHelpers
2
- VERSION = "8.1.0".freeze
2
+ VERSION = "8.1.1".freeze
3
3
  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.0
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-19 00:00:00.000000000 Z
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