govuk_publishing_components 34.8.0 → 34.8.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f532a98c6b1f7f829963c983606cac99ee9335f6000f35ec51f05741524e08d3
|
|
4
|
+
data.tar.gz: 6243027ce6610b993099f6469809750945eeb78180f23eec7952a58fa1809150
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12a54683c41202563b1d1558c0abdb2c32218505289a14a83744dc3ea630d518e012dbd67c8c787b6a5d24f75e1514e31c745c8195bce3d4d8a933493c671061
|
|
7
|
+
data.tar.gz: ecc1b37817bd4c0f897811d56ec853c1a84f28c9a6ac24bc9e466c17f8a2d9061ed572050aefe5dc48e33c498b4cb571d424c081896e178e45b74d71b77a6ed9
|
|
@@ -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" }
|
|
@@ -112,6 +115,10 @@ module GovukPublishingComponents
|
|
|
112
115
|
|
|
113
116
|
def related_world_locations
|
|
114
117
|
content_item_links_for("world_locations")
|
|
118
|
+
.map do |link|
|
|
119
|
+
slug = WORLD_LOCATION_SPECIAL_CASES[link[:text]] || link[:text].parameterize
|
|
120
|
+
link.merge(path: "/world/#{slug}/news")
|
|
121
|
+
end
|
|
115
122
|
end
|
|
116
123
|
|
|
117
124
|
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: 34.8.
|
|
4
|
+
version: 34.8.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: 2023-02-
|
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govuk_app_config
|