ccs-frontend_helpers 0.3.0 → 0.4.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: d935d241fb0117c445c9e5a7eaa2cee257c5f7bc1e68457baf347aabf946a664
4
- data.tar.gz: 4a8328285e0adad683eafbf72d8385ea7b3703ae352eded484eb6595bb8ce136
3
+ metadata.gz: fca2cbae35b1e0e0845af49145d1c9141bdcf235dea294ab305acbbeb301f781
4
+ data.tar.gz: 3e874c9bc894b40c56efefd54397f134b697ad717ce5b4ab9a3247fe36160d67
5
5
  SHA512:
6
- metadata.gz: 3e4698ad6bcca9cfc345922d05da7580f8f21c4789ff2631d838001f0cd68090c0039467d95e2af4fee2b279822e9b522bfcc42f9ee198c89f4658e153e9e9ae
7
- data.tar.gz: 5fb56ee826dc2350d685e6fa888e11e2644bbf199db306a9953174b386e21efd42393db88f62813268218f0a387f15e107f3f010d8d2964690063034808833f2
6
+ metadata.gz: 6109e7f5c6a7bb6d210c47b07ce9e88f83ccb81a6c76fba097bf9ce467423aca549230686f78ec6fcabfe8e48443f9cfe9c41f8cb947181631ce33895ee7ccf6
7
+ data.tar.gz: c6cd26aedc098f409ecb4a625daef8236f3eabe9a071dfb611d6352f9c5e6595034de5b3a9d5b260c724cec5b1be41bd1e974153e43d6b1e9a8e6b47cfeae662
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.4.0] - 2024-05-20
2
+
3
+ Update components to be compatible with GOV.UK Frontend v5.4
4
+
1
5
  ## [0.3.0] - 2024-04-12
2
6
 
3
7
  Update components to be compatible with GOV.UK Frontend v5.3
data/Gemfile CHANGED
@@ -16,8 +16,8 @@ gem 'simplecov', '~> 0.21'
16
16
  gem 'nokogiri-diff', '~> 0.3.0'
17
17
 
18
18
  # Gems for linting/formatting the package
19
- gem 'rubocop', '~> 1.62'
20
- gem 'rubocop-rails', '~> 2.24'
19
+ gem 'rubocop', '~> 1.63'
20
+ gem 'rubocop-rails', '~> 2.25'
21
21
  gem 'rubocop-rake', '~> 0.6'
22
22
  gem 'rubocop-rspec', '~> 2.29'
23
23
 
data/Gemfile.lock CHANGED
@@ -1,41 +1,41 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ccs-frontend_helpers (0.3.0)
4
+ ccs-frontend_helpers (0.4.0)
5
5
  rails (>= 6.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (7.1.3.2)
11
- actionpack (= 7.1.3.2)
12
- activesupport (= 7.1.3.2)
10
+ actioncable (7.1.3.3)
11
+ actionpack (= 7.1.3.3)
12
+ activesupport (= 7.1.3.3)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
15
  zeitwerk (~> 2.6)
16
- actionmailbox (7.1.3.2)
17
- actionpack (= 7.1.3.2)
18
- activejob (= 7.1.3.2)
19
- activerecord (= 7.1.3.2)
20
- activestorage (= 7.1.3.2)
21
- activesupport (= 7.1.3.2)
16
+ actionmailbox (7.1.3.3)
17
+ actionpack (= 7.1.3.3)
18
+ activejob (= 7.1.3.3)
19
+ activerecord (= 7.1.3.3)
20
+ activestorage (= 7.1.3.3)
21
+ activesupport (= 7.1.3.3)
22
22
  mail (>= 2.7.1)
23
23
  net-imap
24
24
  net-pop
25
25
  net-smtp
26
- actionmailer (7.1.3.2)
27
- actionpack (= 7.1.3.2)
28
- actionview (= 7.1.3.2)
29
- activejob (= 7.1.3.2)
30
- activesupport (= 7.1.3.2)
26
+ actionmailer (7.1.3.3)
27
+ actionpack (= 7.1.3.3)
28
+ actionview (= 7.1.3.3)
29
+ activejob (= 7.1.3.3)
30
+ activesupport (= 7.1.3.3)
31
31
  mail (~> 2.5, >= 2.5.4)
32
32
  net-imap
33
33
  net-pop
34
34
  net-smtp
35
35
  rails-dom-testing (~> 2.2)
36
- actionpack (7.1.3.2)
37
- actionview (= 7.1.3.2)
38
- activesupport (= 7.1.3.2)
36
+ actionpack (7.1.3.3)
37
+ actionview (= 7.1.3.3)
38
+ activesupport (= 7.1.3.3)
39
39
  nokogiri (>= 1.8.5)
40
40
  racc
41
41
  rack (>= 2.2.4)
@@ -43,35 +43,35 @@ GEM
43
43
  rack-test (>= 0.6.3)
44
44
  rails-dom-testing (~> 2.2)
45
45
  rails-html-sanitizer (~> 1.6)
46
- actiontext (7.1.3.2)
47
- actionpack (= 7.1.3.2)
48
- activerecord (= 7.1.3.2)
49
- activestorage (= 7.1.3.2)
50
- activesupport (= 7.1.3.2)
46
+ actiontext (7.1.3.3)
47
+ actionpack (= 7.1.3.3)
48
+ activerecord (= 7.1.3.3)
49
+ activestorage (= 7.1.3.3)
50
+ activesupport (= 7.1.3.3)
51
51
  globalid (>= 0.6.0)
52
52
  nokogiri (>= 1.8.5)
53
- actionview (7.1.3.2)
54
- activesupport (= 7.1.3.2)
53
+ actionview (7.1.3.3)
54
+ activesupport (= 7.1.3.3)
55
55
  builder (~> 3.1)
56
56
  erubi (~> 1.11)
57
57
  rails-dom-testing (~> 2.2)
58
58
  rails-html-sanitizer (~> 1.6)
59
- activejob (7.1.3.2)
60
- activesupport (= 7.1.3.2)
59
+ activejob (7.1.3.3)
60
+ activesupport (= 7.1.3.3)
61
61
  globalid (>= 0.3.6)
62
- activemodel (7.1.3.2)
63
- activesupport (= 7.1.3.2)
64
- activerecord (7.1.3.2)
65
- activemodel (= 7.1.3.2)
66
- activesupport (= 7.1.3.2)
62
+ activemodel (7.1.3.3)
63
+ activesupport (= 7.1.3.3)
64
+ activerecord (7.1.3.3)
65
+ activemodel (= 7.1.3.3)
66
+ activesupport (= 7.1.3.3)
67
67
  timeout (>= 0.4.0)
68
- activestorage (7.1.3.2)
69
- actionpack (= 7.1.3.2)
70
- activejob (= 7.1.3.2)
71
- activerecord (= 7.1.3.2)
72
- activesupport (= 7.1.3.2)
68
+ activestorage (7.1.3.3)
69
+ actionpack (= 7.1.3.3)
70
+ activejob (= 7.1.3.3)
71
+ activerecord (= 7.1.3.3)
72
+ activesupport (= 7.1.3.3)
73
73
  marcel (~> 1.0)
74
- activesupport (7.1.3.2)
74
+ activesupport (7.1.3.3)
75
75
  base64
76
76
  bigdecimal
77
77
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -85,7 +85,7 @@ GEM
85
85
  public_suffix (>= 2.0.2, < 6.0)
86
86
  ast (2.4.2)
87
87
  base64 (0.2.0)
88
- bigdecimal (3.1.7)
88
+ bigdecimal (3.1.8)
89
89
  builder (3.2.4)
90
90
  capybara (3.40.0)
91
91
  addressable
@@ -106,11 +106,11 @@ GEM
106
106
  erubi (1.12.0)
107
107
  globalid (1.2.1)
108
108
  activesupport (>= 6.1)
109
- i18n (1.14.4)
109
+ i18n (1.14.5)
110
110
  concurrent-ruby (~> 1.0)
111
111
  io-console (0.7.2)
112
- irb (1.11.2)
113
- rdoc
112
+ irb (1.13.1)
113
+ rdoc (>= 4.0.0)
114
114
  reline (>= 0.4.2)
115
115
  json (2.7.2)
116
116
  language_server-protocol (3.17.0.3)
@@ -122,37 +122,37 @@ GEM
122
122
  net-imap
123
123
  net-pop
124
124
  net-smtp
125
- marcel (1.0.2)
125
+ marcel (1.0.4)
126
126
  matrix (0.4.2)
127
127
  mini_mime (1.1.5)
128
- minitest (5.22.3)
128
+ minitest (5.23.0)
129
129
  mutex_m (0.2.0)
130
- net-imap (0.4.10)
130
+ net-imap (0.4.11)
131
131
  date
132
132
  net-protocol
133
133
  net-pop (0.1.2)
134
134
  net-protocol
135
135
  net-protocol (0.2.2)
136
136
  timeout
137
- net-smtp (0.4.0.1)
137
+ net-smtp (0.5.0)
138
138
  net-protocol
139
- nio4r (2.7.0)
140
- nokogiri (1.16.2-x86_64-darwin)
139
+ nio4r (2.7.3)
140
+ nokogiri (1.16.5-x86_64-darwin)
141
141
  racc (~> 1.4)
142
- nokogiri (1.16.2-x86_64-linux)
142
+ nokogiri (1.16.5-x86_64-linux)
143
143
  racc (~> 1.4)
144
144
  nokogiri-diff (0.3.0)
145
145
  nokogiri (~> 1.5)
146
146
  tdiff (~> 0.4)
147
147
  parallel (1.24.0)
148
- parser (3.3.0.5)
148
+ parser (3.3.1.0)
149
149
  ast (~> 2.4.1)
150
150
  racc
151
151
  psych (5.1.2)
152
152
  stringio
153
153
  public_suffix (5.0.4)
154
- racc (1.7.3)
155
- rack (3.0.10)
154
+ racc (1.8.0)
155
+ rack (3.0.11)
156
156
  rack-session (2.0.0)
157
157
  rack (>= 3.0.0)
158
158
  rack-test (2.1.0)
@@ -160,20 +160,20 @@ GEM
160
160
  rackup (2.1.0)
161
161
  rack (>= 3)
162
162
  webrick (~> 1.8)
163
- rails (7.1.3.2)
164
- actioncable (= 7.1.3.2)
165
- actionmailbox (= 7.1.3.2)
166
- actionmailer (= 7.1.3.2)
167
- actionpack (= 7.1.3.2)
168
- actiontext (= 7.1.3.2)
169
- actionview (= 7.1.3.2)
170
- activejob (= 7.1.3.2)
171
- activemodel (= 7.1.3.2)
172
- activerecord (= 7.1.3.2)
173
- activestorage (= 7.1.3.2)
174
- activesupport (= 7.1.3.2)
163
+ rails (7.1.3.3)
164
+ actioncable (= 7.1.3.3)
165
+ actionmailbox (= 7.1.3.3)
166
+ actionmailer (= 7.1.3.3)
167
+ actionpack (= 7.1.3.3)
168
+ actiontext (= 7.1.3.3)
169
+ actionview (= 7.1.3.3)
170
+ activejob (= 7.1.3.3)
171
+ activemodel (= 7.1.3.3)
172
+ activerecord (= 7.1.3.3)
173
+ activestorage (= 7.1.3.3)
174
+ activesupport (= 7.1.3.3)
175
175
  bundler (>= 1.15.0)
176
- railties (= 7.1.3.2)
176
+ railties (= 7.1.3.3)
177
177
  rails-dom-testing (2.2.0)
178
178
  activesupport (>= 5.0.0)
179
179
  minitest
@@ -181,9 +181,9 @@ GEM
181
181
  rails-html-sanitizer (1.6.0)
182
182
  loofah (~> 2.21)
183
183
  nokogiri (~> 1.14)
184
- railties (7.1.3.2)
185
- actionpack (= 7.1.3.2)
186
- activesupport (= 7.1.3.2)
184
+ railties (7.1.3.3)
185
+ actionpack (= 7.1.3.3)
186
+ activesupport (= 7.1.3.3)
187
187
  irb
188
188
  rackup (>= 1.0.0)
189
189
  rake (>= 12.2)
@@ -191,12 +191,13 @@ GEM
191
191
  zeitwerk (~> 2.6)
192
192
  rainbow (3.1.1)
193
193
  rake (13.2.1)
194
- rdoc (6.6.2)
194
+ rdoc (6.6.3.1)
195
195
  psych (>= 4.0.0)
196
- regexp_parser (2.9.0)
197
- reline (0.4.2)
196
+ regexp_parser (2.9.2)
197
+ reline (0.5.7)
198
198
  io-console (~> 0.5)
199
- rexml (3.2.6)
199
+ rexml (3.2.8)
200
+ strscan (>= 3.0.9)
200
201
  rspec (3.13.0)
201
202
  rspec-core (~> 3.13.0)
202
203
  rspec-expectations (~> 3.13.0)
@@ -210,7 +211,7 @@ GEM
210
211
  diff-lcs (>= 1.2.0, < 2.0)
211
212
  rspec-support (~> 3.13.0)
212
213
  rspec-support (3.13.1)
213
- rubocop (1.62.1)
214
+ rubocop (1.63.5)
214
215
  json (~> 2.3)
215
216
  language_server-protocol (>= 3.17.0)
216
217
  parallel (~> 1.10)
@@ -221,25 +222,25 @@ GEM
221
222
  rubocop-ast (>= 1.31.1, < 2.0)
222
223
  ruby-progressbar (~> 1.7)
223
224
  unicode-display_width (>= 2.4.0, < 3.0)
224
- rubocop-ast (1.31.2)
225
- parser (>= 3.3.0.4)
225
+ rubocop-ast (1.31.3)
226
+ parser (>= 3.3.1.0)
226
227
  rubocop-capybara (2.20.0)
227
228
  rubocop (~> 1.41)
228
229
  rubocop-factory_bot (2.25.1)
229
230
  rubocop (~> 1.41)
230
- rubocop-rails (2.24.1)
231
+ rubocop-rails (2.25.0)
231
232
  activesupport (>= 4.2.0)
232
233
  rack (>= 1.1)
233
234
  rubocop (>= 1.33.0, < 2.0)
234
235
  rubocop-ast (>= 1.31.1, < 2.0)
235
236
  rubocop-rake (0.6.0)
236
237
  rubocop (~> 1.0)
237
- rubocop-rspec (2.29.1)
238
+ rubocop-rspec (2.29.2)
238
239
  rubocop (~> 1.40)
239
240
  rubocop-capybara (~> 2.17)
240
241
  rubocop-factory_bot (~> 2.22)
241
242
  rubocop-rspec_rails (~> 2.28)
242
- rubocop-rspec_rails (2.28.2)
243
+ rubocop-rspec_rails (2.28.3)
243
244
  rubocop (~> 1.40)
244
245
  ruby-progressbar (1.13.0)
245
246
  simplecov (0.22.0)
@@ -249,8 +250,9 @@ GEM
249
250
  simplecov-html (0.12.3)
250
251
  simplecov_json_formatter (0.1.4)
251
252
  stringio (3.1.0)
253
+ strscan (3.1.0)
252
254
  tdiff (0.4.0)
253
- thor (1.3.0)
255
+ thor (1.3.1)
254
256
  timeout (0.4.1)
255
257
  tzinfo (2.0.6)
256
258
  concurrent-ruby (~> 1.0)
@@ -262,7 +264,7 @@ GEM
262
264
  xpath (3.2.0)
263
265
  nokogiri (~> 1.8)
264
266
  yard (0.9.36)
265
- zeitwerk (2.6.13)
267
+ zeitwerk (2.6.14)
266
268
 
267
269
  PLATFORMS
268
270
  x86_64-darwin-19
@@ -276,8 +278,8 @@ DEPENDENCIES
276
278
  nokogiri-diff (~> 0.3.0)
277
279
  rake (~> 13.2)
278
280
  rspec (~> 3.13)
279
- rubocop (~> 1.62)
280
- rubocop-rails (~> 2.24)
281
+ rubocop (~> 1.63)
282
+ rubocop-rails (~> 2.25)
281
283
  rubocop-rake (~> 0.6)
282
284
  rubocop-rspec (~> 2.29)
283
285
  simplecov (~> 0.21)
data/README.md CHANGED
@@ -14,6 +14,7 @@ The following table shows the version of CCS Frontend Helpers that you should us
14
14
 
15
15
  | CCS Frontend Helpers Version | Target GOV.UK Frontend Version |
16
16
  | ----------------------------- | ------------------------------ |
17
+ | [0.4.0](https://github.com/tim-s-ccs/ccs-frontend_helpers/releases/tag/v0.4.0) | [5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) |
17
18
  | [0.3.0](https://github.com/tim-s-ccs/ccs-frontend_helpers/releases/tag/v0.3.0) | [5.3.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.0) |
18
19
  | [0.2.0](https://github.com/tim-s-ccs/ccs-frontend_helpers/releases/tag/v0.2.0) | [5.2.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.2.0) |
19
20
  | [0.1.2](https://github.com/tim-s-ccs/ccs-frontend_helpers/releases/tag/v0.1.2) | [4.7.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.7.0) |
@@ -31,7 +31,7 @@ module CCS
31
31
  # @option options [String] :classes additional CSS classes for the error summary HTML
32
32
  # @option options [Hash] :attributes ({}) any additional attributes that will be added as part of the HTML
33
33
 
34
- def initialize(title:, error_summary_items:, description: nil, **options)
34
+ def initialize(title:, error_summary_items: [], description: nil, **options)
35
35
  super(**options)
36
36
 
37
37
  @title = title
@@ -51,9 +51,11 @@ module CCS
51
51
  concat(tag.h2(title, class: 'govuk-error-summary__title'))
52
52
  concat(tag.div(class: 'govuk-error-summary__body') do
53
53
  concat(tag.p(description)) if description
54
- concat(tag.ul(class: 'govuk-list govuk-error-summary__list') do
55
- error_summary_items.each { |error_summary_item| concat(error_summary_item.render) }
56
- end)
54
+ if error_summary_items.any?
55
+ concat(tag.ul(class: 'govuk-list govuk-error-summary__list') do
56
+ error_summary_items.each { |error_summary_item| concat(error_summary_item.render) }
57
+ end)
58
+ end
57
59
  end)
58
60
  end
59
61
  end
@@ -19,7 +19,7 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::ErrorSummary#render)
21
21
 
22
- def govuk_error_summary(title, error_summary_items, description = nil, **options)
22
+ def govuk_error_summary(title, error_summary_items = [], description = nil, **options)
23
23
  Components::GovUK::ErrorSummary.new(context: self, title: title, error_summary_items: error_summary_items, description: description, **options).render
24
24
  end
25
25
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CCS
4
4
  module FrontendHelpers
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "author": "CCS",
6
6
  "license": "MIT",
7
7
  "devDependencies": {
8
- "govuk-frontend": "^5.3.0"
8
+ "govuk-frontend": "^5.4.0"
9
9
  }
10
10
  }
data/yarn.lock CHANGED
@@ -2,7 +2,7 @@
2
2
  # yarn lockfile v1
3
3
 
4
4
 
5
- govuk-frontend@^5.3.0:
6
- version "5.3.0"
7
- resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.3.0.tgz#f9a2b405925beada90d074e17939f9d8ddcd256e"
8
- integrity sha512-w6yaaDU3nqhVmWJFnOuJKRIUEB/2RrTFGzoA3z5n4cTG9h292EseT/q+JJA/LYTf5IYzeTIVAUbE5fFjUxefiQ==
5
+ govuk-frontend@^5.4.0:
6
+ version "5.4.0"
7
+ resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.4.0.tgz#8f2e0b55ef7c7552a1efe68c7b40ff1b4a393e72"
8
+ integrity sha512-F3YwQYrYQqIPfNxsoph6O78Ey1unCB6cy6omx8KeWY9G504lWZFBSIaiUCma1jNLw9bOUU7Ui+tXG09jjqy0Mw==
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.3.0
4
+ version: 0.4.0
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: 2024-04-12 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails