govuk_design_system_formbuilder 1.2.0b4 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/govuk_design_system_formbuilder.rb +4 -0
  3. data/lib/govuk_design_system_formbuilder/base.rb +5 -0
  4. data/lib/govuk_design_system_formbuilder/builder.rb +6 -4
  5. data/lib/govuk_design_system_formbuilder/containers/character_count.rb +8 -7
  6. data/lib/govuk_design_system_formbuilder/containers/check_boxes.rb +8 -1
  7. data/lib/govuk_design_system_formbuilder/containers/check_boxes_fieldset.rb +18 -10
  8. data/lib/govuk_design_system_formbuilder/containers/fieldset.rb +23 -13
  9. data/lib/govuk_design_system_formbuilder/containers/radio_buttons_fieldset.rb +18 -10
  10. data/lib/govuk_design_system_formbuilder/containers/radios.rb +8 -1
  11. data/lib/govuk_design_system_formbuilder/containers/supplemental.rb +1 -3
  12. data/lib/govuk_design_system_formbuilder/elements/caption.rb +2 -2
  13. data/lib/govuk_design_system_formbuilder/elements/check_boxes/collection.rb +17 -12
  14. data/lib/govuk_design_system_formbuilder/elements/check_boxes/collection_check_box.rb +17 -15
  15. data/lib/govuk_design_system_formbuilder/elements/check_boxes/fieldset_check_box.rb +23 -27
  16. data/lib/govuk_design_system_formbuilder/elements/date.rb +44 -41
  17. data/lib/govuk_design_system_formbuilder/elements/error_message.rb +8 -7
  18. data/lib/govuk_design_system_formbuilder/elements/error_summary.rb +23 -26
  19. data/lib/govuk_design_system_formbuilder/elements/file.rb +18 -20
  20. data/lib/govuk_design_system_formbuilder/elements/hint.rb +10 -13
  21. data/lib/govuk_design_system_formbuilder/elements/label.rb +33 -22
  22. data/lib/govuk_design_system_formbuilder/elements/radios/collection.rb +32 -23
  23. data/lib/govuk_design_system_formbuilder/elements/radios/collection_radio_button.rb +24 -14
  24. data/lib/govuk_design_system_formbuilder/elements/radios/fieldset_radio_button.rb +18 -19
  25. data/lib/govuk_design_system_formbuilder/elements/select.rb +15 -22
  26. data/lib/govuk_design_system_formbuilder/elements/submit.rb +29 -25
  27. data/lib/govuk_design_system_formbuilder/elements/text_area.rb +37 -39
  28. data/lib/govuk_design_system_formbuilder/traits/caption.rb +5 -6
  29. data/lib/govuk_design_system_formbuilder/traits/input.rb +19 -28
  30. data/lib/govuk_design_system_formbuilder/traits/label.rb +2 -2
  31. data/lib/govuk_design_system_formbuilder/version.rb +1 -1
  32. metadata +17 -17
@@ -4,10 +4,10 @@ module GOVUKDesignSystemFormBuilder
4
4
  private
5
5
 
6
6
  def label_element
7
- @label_element ||= Elements::Label.new(@builder, @object_name, @attribute_name, caption: @caption, **label_args)
7
+ @label_element ||= Elements::Label.new(@builder, @object_name, @attribute_name, caption: @caption, **label_content)
8
8
  end
9
9
 
10
- def label_args
10
+ def label_content
11
11
  case @label
12
12
  when Hash
13
13
  @label
@@ -1,3 +1,3 @@
1
1
  module GOVUKDesignSystemFormBuilder
2
- VERSION = '1.2.0b4'.freeze
2
+ VERSION = '1.2.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: 1.2.0b4
4
+ version: 1.2.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: 2020-06-04 00:00:00.000000000 Z
11
+ date: 2020-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.9.0
61
+ version: 3.16.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 3.9.0
68
+ version: 3.16.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -84,22 +84,22 @@ dependencies:
84
84
  name: pry-byebug
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: 3.9.0
90
87
  - - "~>"
91
88
  - !ruby/object:Gem::Version
92
89
  version: '3.9'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 3.9.0
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: 3.9.0
100
97
  - - "~>"
101
98
  - !ruby/object:Gem::Version
102
99
  version: '3.9'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 3.9.0
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rspec-html-matchers
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -176,14 +176,14 @@ dependencies:
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: 3.19.0
179
+ version: 3.20.0
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: 3.19.0
186
+ version: 3.20.0
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: rubypants
189
189
  requirement: !ruby/object:Gem::Requirement
@@ -204,14 +204,14 @@ dependencies:
204
204
  requirements:
205
205
  - - "~>"
206
206
  - !ruby/object:Gem::Version
207
- version: 2.3.0
207
+ version: 2.4.0
208
208
  type: :development
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
- version: 2.3.0
214
+ version: 2.4.0
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: sass
217
217
  requirement: !ruby/object:Gem::Requirement
@@ -313,11 +313,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
313
313
  version: '0'
314
314
  required_rubygems_version: !ruby/object:Gem::Requirement
315
315
  requirements:
316
- - - ">"
316
+ - - ">="
317
317
  - !ruby/object:Gem::Version
318
- version: 1.3.1
318
+ version: '0'
319
319
  requirements: []
320
- rubygems_version: 3.0.3
320
+ rubygems_version: 3.1.2
321
321
  signing_key:
322
322
  specification_version: 4
323
323
  summary: GOV.UK-compliant Rails form builder