govuk_publishing_components 21.21.3 → 21.22.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19f38bde9b5bed66530cba34ab4b13d54c88791b01e39e38f334fb70cd764e03
|
4
|
+
data.tar.gz: f09ecbf5aba1e24f25e4617754c4bca9daca591c96d1a7aaf6d8b5e4c43ae851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b04447b7bdf2500dfcd0c2ddcb3fec53c343fbf5dcce287f3dec431d031a1e160f4c239828fc7874aad4f3e1eadcbb1cbf2cb5ffa0ad9df7831f87313fe0b55f
|
7
|
+
data.tar.gz: 8a5fc55a829ea5de9baea36a4385c9e74d0dcf2b7f94f0ba6e018385e885cc57a3e8d1ea72b6feaa2533515fcca5c61e78b62bcf1438da7f1577fb0ae80ee955
|
@@ -12,6 +12,9 @@ module GovukPublishingComponents
|
|
12
12
|
world_locations
|
13
13
|
statistical_data_sets
|
14
14
|
).freeze
|
15
|
+
WORLD_LOCATION_SPECIAL_CASES = {
|
16
|
+
'UK Mission to the European Union' => 'uk-mission-to-the-eu',
|
17
|
+
}.freeze
|
15
18
|
|
16
19
|
def initialize(options = {})
|
17
20
|
@content_item = options.fetch(:content_item) { raise ArgumentError, 'missing argument: content_item' }
|
@@ -146,7 +149,10 @@ module GovukPublishingComponents
|
|
146
149
|
|
147
150
|
def related_world_locations
|
148
151
|
content_item_links_for('world_locations')
|
149
|
-
.map
|
152
|
+
.map do |link|
|
153
|
+
slug = WORLD_LOCATION_SPECIAL_CASES[link[:text]] || link[:text].parameterize
|
154
|
+
link.merge(path: "/world/#{slug}/news")
|
155
|
+
end
|
150
156
|
end
|
151
157
|
|
152
158
|
def related_statistical_data_sets
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 21.
|
4
|
+
version: 21.22.0
|
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: 2020-
|
11
|
+
date: 2020-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|