ccs-frontend_helpers 0.1.0.rc.3 → 0.1.0.rc.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: 675c60c51c25d5cd22e26b1e92a579053d1340200bc4a33e9a4e36e65b6790ca
4
- data.tar.gz: b90658aa1deadfa04ee5dd2d12be7f8a62b83656017a0fc557812fced67a789f
3
+ metadata.gz: 2a55a4bfeb9cc7a9e04b377cbf7301abb8a04b2d511edcac62904176172d3428
4
+ data.tar.gz: 7ea70e1f24ae9eb2f06c80e4518817fd5385b7088201649a79f6319a49fedf48
5
5
  SHA512:
6
- metadata.gz: d5ec2d542ec51558264bfd069546b59969ff401fc1c49c0b332ea547ce7504e477d8dd01ae50f16a7b322d1e80b3d5e584d540259c398090b5aba10af240cd33
7
- data.tar.gz: 93ed922f0db520239e8d27bf422ebf9badaad94cd014f7af431e6009d5d1ba4b9ffb96cfca565e7e7ff1ed2d4912a2f7189d03c9ec4f4a8f1dfe2650a4cc7b1b
6
+ metadata.gz: d7715a11999cd33243acfbbcbfdea9a693648073179ad213b6e683217499605ee2ed3a863ab04d342f491dbc30edf2e6f74959e3a330d5bf7a4e2074b6b01a2c
7
+ data.tar.gz: 73c73b191867565038823856ad02d15f4d418d2791cd2f77b0d706b70f820a80100775871d14520393f3e3f7ce88395d49fc9d90b998f4d6281d35c2f166c7e0
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## [0.1.0.rc.3] - 2023-04-05
1
+ ## [0.1.0.rc.5] - 2023-04-18
2
2
 
3
3
  Initial release of CCS Frontend Helpers.
4
4
  This release contains view helpers that are used to create GOV.UK and CCS components.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ccs-frontend_helpers (0.1.0.rc.3)
4
+ ccs-frontend_helpers (0.1.0.rc.5)
5
5
  rails (>= 6.0)
6
6
 
7
7
  GEM
@@ -72,11 +72,11 @@ GEM
72
72
  i18n (>= 1.6, < 2)
73
73
  minitest (>= 5.1)
74
74
  tzinfo (~> 2.0)
75
- addressable (2.8.1)
75
+ addressable (2.8.3)
76
76
  public_suffix (>= 2.0.2, < 6.0)
77
77
  ast (2.4.2)
78
78
  builder (3.2.4)
79
- capybara (3.38.0)
79
+ capybara (3.39.0)
80
80
  addressable
81
81
  matrix
82
82
  mini_mime (>= 0.1.3)
@@ -124,7 +124,7 @@ GEM
124
124
  nokogiri (1.14.2-x86_64-linux)
125
125
  racc (~> 1.4)
126
126
  parallel (1.22.1)
127
- parser (3.2.1.1)
127
+ parser (3.2.2.0)
128
128
  ast (~> 2.4.1)
129
129
  public_suffix (5.0.1)
130
130
  racc (1.6.2)
@@ -174,21 +174,21 @@ GEM
174
174
  diff-lcs (>= 1.2.0, < 2.0)
175
175
  rspec-support (~> 3.12.0)
176
176
  rspec-support (3.12.0)
177
- rubocop (1.48.1)
177
+ rubocop (1.50.2)
178
178
  json (~> 2.3)
179
179
  parallel (~> 1.10)
180
180
  parser (>= 3.2.0.0)
181
181
  rainbow (>= 2.2.2, < 4.0)
182
182
  regexp_parser (>= 1.8, < 3.0)
183
183
  rexml (>= 3.2.5, < 4.0)
184
- rubocop-ast (>= 1.26.0, < 2.0)
184
+ rubocop-ast (>= 1.28.0, < 2.0)
185
185
  ruby-progressbar (~> 1.7)
186
186
  unicode-display_width (>= 2.4.0, < 3.0)
187
- rubocop-ast (1.27.0)
187
+ rubocop-ast (1.28.0)
188
188
  parser (>= 3.2.1.0)
189
189
  rubocop-capybara (2.17.1)
190
190
  rubocop (~> 1.41)
191
- rubocop-rails (2.18.0)
191
+ rubocop-rails (2.19.1)
192
192
  activesupport (>= 4.2.0)
193
193
  rack (>= 1.1)
194
194
  rubocop (>= 1.33.0, < 2.0)
@@ -209,14 +209,12 @@ GEM
209
209
  tzinfo (2.0.6)
210
210
  concurrent-ruby (~> 1.0)
211
211
  unicode-display_width (2.4.2)
212
- webrick (1.7.0)
213
212
  websocket-driver (0.7.5)
214
213
  websocket-extensions (>= 0.1.0)
215
214
  websocket-extensions (0.1.5)
216
215
  xpath (3.2.0)
217
216
  nokogiri (~> 1.8)
218
- yard (0.9.28)
219
- webrick (~> 1.7.0)
217
+ yard (0.9.34)
220
218
  zeitwerk (2.6.7)
221
219
 
222
220
  PLATFORMS
@@ -226,7 +224,7 @@ PLATFORMS
226
224
 
227
225
  DEPENDENCIES
228
226
  bundler (~> 2.3)
229
- capybara (~> 3.38.0)
227
+ capybara (~> 3.39.0)
230
228
  ccs-frontend_helpers!
231
229
  rake (~> 13.0)
232
230
  rspec (~> 3.0)
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency 'rails', '>= 6.0'
35
35
 
36
36
  spec.add_development_dependency 'bundler', '~> 2.3'
37
- spec.add_development_dependency 'capybara', '~> 3.38.0'
37
+ spec.add_development_dependency 'capybara', '~> 3.39.0'
38
38
  spec.add_development_dependency 'rspec', '~> 3.12'
39
39
  spec.add_development_dependency 'rubocop', '~> 1.36'
40
40
  spec.add_development_dependency 'rubocop-rails', '~> 2.16'
@@ -36,11 +36,13 @@ module CCS
36
36
  def initialize(any_row_has_actions:, key:, value:, actions: nil, **options)
37
37
  super(**options)
38
38
 
39
- @options[:attributes][:class] << ' govuk-summary-list__row--no-actions' if any_row_has_actions && !actions
39
+ actions_present = actions && actions[:items].present?
40
+
41
+ @options[:attributes][:class] << ' govuk-summary-list__row--no-actions' if any_row_has_actions && !actions_present
40
42
 
41
43
  @key = Key.new(context: @context, **key)
42
44
  @value = Value.new(context: @context, **value)
43
- @actions = Actions.new(context: @context, **actions) if actions
45
+ @actions = Actions.new(context: @context, **actions) if actions_present
44
46
  end
45
47
 
46
48
  # Generates the HTML for the GOV.UK Summary list row
@@ -33,7 +33,7 @@ module CCS
33
33
  def initialize(summary_list_items:, card: nil, **options)
34
34
  super(**options)
35
35
 
36
- any_row_has_actions = summary_list_items.any? { |summary_list_item| summary_list_item[:actions].present? }
36
+ any_row_has_actions = summary_list_items.any? { |summary_list_item| summary_list_item.dig(:actions, :items).present? }
37
37
 
38
38
  @summary_list_rows = summary_list_items.map { |summary_list_item| Row.new(any_row_has_actions: any_row_has_actions, context: @context, **summary_list_item) }
39
39
  @card = Card.new(context: @context, **card) if card
@@ -40,7 +40,7 @@ module CCS
40
40
 
41
41
  def render
42
42
  tag.div(**options[:attributes]) do
43
- concat(tag.span('!', class: 'govuk-warning-text__icon'))
43
+ concat(tag.span('!', class: 'govuk-warning-text__icon', aria: { hidden: true }))
44
44
  concat(tag.strong(class: 'govuk-warning-text__text') do
45
45
  concat(tag.span(options[:icon_fallback_text] || 'Warning', class: 'govuk-warning-text__assistive'))
46
46
  if text
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CCS
4
4
  module FrontendHelpers
5
- VERSION = '0.1.0.rc.3'
5
+ VERSION = '0.1.0.rc.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ccs-frontend_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc.3
4
+ version: 0.1.0.rc.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - tim-s-ccs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-05 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.38.0
47
+ version: 3.39.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.38.0
54
+ version: 3.39.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement