govuk_design_system_formbuilder 2.7.3 → 2.7.4

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: 8dde478d08a40d1cc871b7f0b2db7180db591ec384d4d7cc160ce9523605d8f2
4
- data.tar.gz: f406bfbc2ac3b5eb5a5ce5c6cade4138459323a6a9fe9e8cbe23dcf33edcd9cb
3
+ metadata.gz: 6e957bab838013fdafade2624efb663ab4f40befc05313a3f676e1db7db50ee5
4
+ data.tar.gz: f9eaf97153026e3f14c24158013276315a4464a0fd5216b7ce80d36b3c5eda02
5
5
  SHA512:
6
- metadata.gz: 112918eb62e62548f16a27cb8e3a33e353d4be9543819f366f88671e628faff90a4ec28fb49a4a76d0d8ed0136569db090a36091c1cf6e1e3e0f360e770939c4
7
- data.tar.gz: ae6d8df17006b0a5d77eb6bd21d8402f53eca1087c34071c39534ca8e9753e33a6ca555f242eadf2a83e6eeaa4cbc92689e19458351851ba408cf4b419b656e3
6
+ metadata.gz: 27a67e5dfa2a13da2abc4769f539b618fe091f0840b51132e5fac32b5f90285dbdddcf4b6516e562b83fc7b3d0036fdd62dd70c0609204e015172aa14e6fb3d4
7
+ data.tar.gz: b9fb370f1e5e3eaeb08fec860a48f03a4ab3b6c38613a90c7cb3d12e906298d26187b268c3a7befacafe1d36a5ab6452a2eac8b598c6d379e559f7ccb31fb101
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.0-brightgreen)](https://design-system.service.gov.uk)
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)
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
 
@@ -471,9 +471,9 @@ module GOVUKDesignSystemFormBuilder
471
471
  # @note Unlike the Rails +#collection_radio_buttons+ helper, this version can also insert
472
472
  # hints per item in the collection by supplying a +:hint_method+
473
473
  #
474
- # @note +:bold_labels+, while false by default, is set to true when a
475
- # +:hint_method+ is provided. This is done to make the label stand out more
476
- # from the hint.
474
+ # @note +:bold_labels+, is +nil+ (falsy) by default. When a +:hint_method+
475
+ # is provided it will become +true+ to make the label stand out more
476
+ # from the hint. The choice can be overridden with +true+ or +false+.
477
477
  #
478
478
  # @param attribute_name [Symbol] The name of the attribute
479
479
  # @param collection [Enumerable<Object>] Options to be added to the +select+ element
@@ -538,7 +538,7 @@ module GOVUKDesignSystemFormBuilder
538
538
  # :name,
539
539
  # legend: -> { tag.h3('Which category do you belong to?') }
540
540
  #
541
- def govuk_collection_radio_buttons(attribute_name, collection, value_method, text_method = nil, hint_method = nil, hint: {}, legend: {}, caption: {}, inline: false, small: false, bold_labels: false, classes: nil, include_hidden: config.default_collection_radio_buttons_include_hidden, form_group: {}, &block)
541
+ def govuk_collection_radio_buttons(attribute_name, collection, value_method, text_method = nil, hint_method = nil, hint: {}, legend: {}, caption: {}, inline: false, small: false, bold_labels: nil, classes: nil, include_hidden: config.default_collection_radio_buttons_include_hidden, form_group: {}, &block)
542
542
  Elements::Radios::Collection.new(
543
543
  self,
544
544
  object_name,
@@ -21,7 +21,11 @@ module GOVUKDesignSystemFormBuilder
21
21
  @classes = classes
22
22
  @form_group = form_group
23
23
  @include_hidden = include_hidden
24
- @bold_labels = hint_method.present? || bold_labels
24
+ @bold_labels = if bold_labels.nil?
25
+ hint_method.present?
26
+ else
27
+ bold_labels
28
+ end
25
29
  end
26
30
 
27
31
  def html
@@ -1,3 +1,3 @@
1
1
  module GOVUKDesignSystemFormBuilder
2
- VERSION = '2.7.3'.freeze
2
+ VERSION = '2.7.4'.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.3
4
+ version: 2.7.4
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-01 00:00:00.000000000 Z
11
+ date: 2021-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -355,6 +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
359
  post_install_message:
359
360
  rdoc_options: []
360
361
  require_paths: