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: 15df0c9322d4910a503a3cd642828f48d042c7248848176ac4a63c1824ab7680
4
- data.tar.gz: 18d5d1813014d63c0100c2d0a358eb7a48ed829445eb8f7f996778c66bcc053c
3
+ metadata.gz: 19f38bde9b5bed66530cba34ab4b13d54c88791b01e39e38f334fb70cd764e03
4
+ data.tar.gz: f09ecbf5aba1e24f25e4617754c4bca9daca591c96d1a7aaf6d8b5e4c43ae851
5
5
  SHA512:
6
- metadata.gz: e1778ddf58bff5d2847cd6e564b0890a804ad7937fa37a7ff742108b4afed7e50a8a6dd5465d18f2a9731d5a08066fe1e0a3356ff012bcb793e8587bd05cbbe4
7
- data.tar.gz: bb5144879a43b848eb19286b4230830af3a8510d303c3fc759a199d8b1fde65b284df8df26ecbbdda174e40617015e634d3df5135cbe69a7b1ebe4d73c365908
6
+ metadata.gz: b04447b7bdf2500dfcd0c2ddcb3fec53c343fbf5dcce287f3dec431d031a1e160f4c239828fc7874aad4f3e1eadcbb1cbf2cb5ffa0ad9df7831f87313fe0b55f
7
+ data.tar.gz: 8a5fc55a829ea5de9baea36a4385c9e74d0dcf2b7f94f0ba6e018385e885cc57a3e8d1ea72b6feaa2533515fcca5c61e78b62bcf1438da7f1577fb0ae80ee955
@@ -193,6 +193,10 @@
193
193
  return null
194
194
  }
195
195
 
196
+ window.GOVUK.getCookieCategory = function (cookie) {
197
+ return COOKIE_CATEGORIES[cookie]
198
+ }
199
+
196
200
  window.GOVUK.deleteCookie = function (cookie) {
197
201
  window.GOVUK.cookie(cookie, null)
198
202
 
@@ -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 { |link| link.merge(path: "/world/#{link[:text].parameterize}/news") }
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
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '21.21.3'.freeze
2
+ VERSION = '21.22.0'.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: 21.21.3
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-01-28 00:00:00.000000000 Z
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