govuk_design_system_formbuilder 2.7.4 → 2.7.5

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: 6e957bab838013fdafade2624efb663ab4f40befc05313a3f676e1db7db50ee5
4
- data.tar.gz: f9eaf97153026e3f14c24158013276315a4464a0fd5216b7ce80d36b3c5eda02
3
+ metadata.gz: bb37ec8e436af4e21bbc44dfbc7dbbead355c07f3f41f802f03de5550b7c419c
4
+ data.tar.gz: 8aba7fb23067d7ee5fc422488525b8d0d013bf7f76b67ecb31647619e4901f8f
5
5
  SHA512:
6
- metadata.gz: 27a67e5dfa2a13da2abc4769f539b618fe091f0840b51132e5fac32b5f90285dbdddcf4b6516e562b83fc7b3d0036fdd62dd70c0609204e015172aa14e6fb3d4
7
- data.tar.gz: b9fb370f1e5e3eaeb08fec860a48f03a4ab3b6c38613a90c7cb3d12e906298d26187b268c3a7befacafe1d36a5ab6452a2eac8b598c6d379e559f7ccb31fb101
6
+ metadata.gz: cfcabda01e6b764bbc17ea8185180b48095c2eae04cf308387c7fa430b374fa0c40bffb50e7bacf2d7c0abadca362e4fb07ae27699e7645bd732d9a9487a792a
7
+ data.tar.gz: 37ee3a7a8d6dbf5eaf441d81102e507e17043e79b4b774b3ebdad9e1d6d8607e509651c5b9586d029d1be1732805e950f1824e46f47cb88d5106f5a011bf2ff4
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Gem](https://img.shields.io/gem/dt/govuk_design_system_formbuilder?logo=rubygems)](https://rubygems.org/gems/govuk_design_system_formbuilder)
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/110136fb22341d3ba646/test_coverage)](https://codeclimate.com/github/DFE-Digital/govuk-formbuilder/test_coverage)
8
8
  [![GitHub license](https://img.shields.io/github/license/DFE-Digital/govuk_design_system_formbuilder)](https://github.com/DFE-Digital/govuk-formbuilder/blob/master/LICENSE)
9
- [![GOV.UK Design System Version](https://img.shields.io/badge/GOV.UK%20Design%20System-3.13.1-brightgreen)](https://design-system.service.gov.uk)
9
+ [![GOV.UK Design System Version](https://img.shields.io/badge/GOV.UK%20Design%20System-3.14.0-brightgreen)](https://design-system.service.gov.uk)
10
10
  [![Rails](https://img.shields.io/badge/Ruby-2.6.8%20%E2%95%B1%202.7.4%20%E2%95%B1%203.0.2-E16D6D)](https://www.ruby-lang.org/en/downloads/)
11
11
  [![Ruby](https://img.shields.io/badge/Rails-6.0.4%20%E2%95%B1%206.1.3.2-E16D6D)](https://weblog.rubyonrails.org/releases/)
12
12
 
@@ -125,7 +125,7 @@ module GOVUKDesignSystemFormBuilder
125
125
  module: %(#{brand}-error-summary)
126
126
  },
127
127
  aria: {
128
- labelledby: summary_title_id
128
+ labelledby: [summary_title_id.presence]
129
129
  }
130
130
  }
131
131
  end
@@ -24,7 +24,7 @@ module GOVUKDesignSystemFormBuilder
24
24
  id: field_id(link_errors: @link_errors),
25
25
  class: classes,
26
26
  multiple: @multiple,
27
- aria: { describedby: [hint_id] },
27
+ aria: { describedby: [hint_id.presence] },
28
28
  data: { 'aria-controls' => @conditional_id }
29
29
  }
30
30
  end
@@ -6,11 +6,17 @@ module GOVUKDesignSystemFormBuilder
6
6
  # present
7
7
  # * joins the arrays into strings to maintain Rails 6.0.* compatibility
8
8
  class Attributes
9
- # Rather than attempt to combine these attributes, just overwrite the
10
- # form internally-generated values with those that are passed in. This
11
- # prevents the merge/unique value logic from affecting the content
12
- # (i.e. by remvoving duplicated words).
13
- UNMERGEABLE = [%i(id), %i(value), %i(title), %i(alt), %i(href), %i(aria label)].freeze
9
+ # Only try to combine and merge these attributes that contain a list of
10
+ # values separated by a space. All other values should be merged in a
11
+ # regular fashion (where the custom value overrides the default)
12
+ MERGEABLE = [
13
+ %i(class),
14
+ %i(aria controls),
15
+ %i(aria describedby),
16
+ %i(aria flowto),
17
+ %i(aria labelledby),
18
+ %i(aria owns),
19
+ ].freeze
14
20
 
15
21
  def initialize(defaults, custom)
16
22
  @merged = defaults.deeper_merge(deep_split_values(custom))
@@ -36,7 +42,7 @@ module GOVUKDesignSystemFormBuilder
36
42
  end
37
43
 
38
44
  def split_mergeable(key, value, parent = nil)
39
- return value if [parent, key].compact.in?(UNMERGEABLE)
45
+ return value.presence unless [parent, key].compact.in?(MERGEABLE)
40
46
 
41
47
  value.split
42
48
  end
@@ -1,3 +1,3 @@
1
1
  module GOVUKDesignSystemFormBuilder
2
- VERSION = '2.7.4'.freeze
2
+ VERSION = '2.7.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_design_system_formbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.4
4
+ version: 2.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Yates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-10 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 4.0.0
75
+ version: 4.1.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 4.0.0
82
+ version: 4.1.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -355,7 +355,7 @@ metadata:
355
355
  documentation_uri: https://www.rubydoc.info/gems/govuk_design_system_formbuilder/GOVUKDesignSystemFormBuilder/Builder
356
356
  homepage_uri: https://govuk-form-builder.netlify.app
357
357
  source_code_uri: https://github.com/DFE-Digital/govuk_design_system_formbuilder
358
- github_repo: git@github.com:DFE-Digital/govuk_design_system_formbuilder.git
358
+ github_repo: https://github.com/DFE-Digital/govuk_design_system_formbuilder
359
359
  post_install_message:
360
360
  rdoc_options: []
361
361
  require_paths: