govuk_publishing_components 34.8.0 → 34.8.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
  SHA256:
3
- metadata.gz: 858a7994e35203e75dfc40439dd630bcefefc4a549027d9b7fb404df0028e45b
4
- data.tar.gz: a71a277c8860d002129d138e9e6c104ea040f1163e1cd27ee821c431ed109a2c
3
+ metadata.gz: f532a98c6b1f7f829963c983606cac99ee9335f6000f35ec51f05741524e08d3
4
+ data.tar.gz: 6243027ce6610b993099f6469809750945eeb78180f23eec7952a58fa1809150
5
5
  SHA512:
6
- metadata.gz: 5b7610f82890c3fd2f2ad862ed3443df843a8230cca1f0e2e294ba5cd02f4933dd8393f3be521f053ba8fef46b984fe0f692709d4d8457c1a478e4848de4495e
7
- data.tar.gz: f66f9a9c0076b364293b3973cc1b85253d6c701a347967a253e5fe970c877fa7a5eb43edd95e927a155737037e427536e34f99eb0ccdb51712a9e02d6f5815fa
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
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "34.8.0".freeze
2
+ VERSION = "34.8.1".freeze
3
3
  end
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.0
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-07 00:00:00.000000000 Z
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