Skip to content

Commit 1a79060

Browse files
authored
Feature/ruby 3855 carbon calcs changed message (#1149)
https://eaflood.atlassian.net/browse/RUBY-3855
1 parent 0ecd05a commit 1a79060

File tree

15 files changed

+288
-107
lines changed

15 files changed

+288
-107
lines changed

.rubocop.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ Naming/PredicateMethod:
3737
- app/services/pafs_core/spreadsheet/contributors/coerce/boolean.rb
3838
- app/steps/pafs_core/*_step.rb
3939

40+
# Allow "for" in context names
41+
RSpec/ContextWording:
42+
Prefixes:
43+
- when
44+
- with
45+
- without
46+
- if
47+
- unless
48+
- for
49+
4050
RSpec/DescribeClass:
4151
Exclude:
4252
# This cop is n/a for rake tasks
@@ -46,6 +56,11 @@ RSpec/DescribeClass:
4656
RSpec/IndexedLet:
4757
Enabled: false
4858

59+
RSpec/NestedGroups:
60+
Exclude:
61+
# Extra nesting tolerated as hexdigest behaviour is conditional on multiple factors.
62+
- spec/controllers/pafs_core/projects_controller_spec.rb
63+
4964
# This is required in app/services/pafs_core/download/base.rb
5065
# but adding a disable directive there causes rubocop to complain
5166
# about an unnecessary disable directive, so disabling it here instead.

Gemfile.lock

Lines changed: 86 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -29,66 +29,68 @@ PATH
2929
GEM
3030
remote: https://rubygems.org/
3131
specs:
32-
actioncable (7.2.2.2)
33-
actionpack (= 7.2.2.2)
34-
activesupport (= 7.2.2.2)
32+
actioncable (7.2.3)
33+
actionpack (= 7.2.3)
34+
activesupport (= 7.2.3)
3535
nio4r (~> 2.0)
3636
websocket-driver (>= 0.6.1)
3737
zeitwerk (~> 2.6)
38-
actionmailbox (7.2.2.2)
39-
actionpack (= 7.2.2.2)
40-
activejob (= 7.2.2.2)
41-
activerecord (= 7.2.2.2)
42-
activestorage (= 7.2.2.2)
43-
activesupport (= 7.2.2.2)
38+
actionmailbox (7.2.3)
39+
actionpack (= 7.2.3)
40+
activejob (= 7.2.3)
41+
activerecord (= 7.2.3)
42+
activestorage (= 7.2.3)
43+
activesupport (= 7.2.3)
4444
mail (>= 2.8.0)
45-
actionmailer (7.2.2.2)
46-
actionpack (= 7.2.2.2)
47-
actionview (= 7.2.2.2)
48-
activejob (= 7.2.2.2)
49-
activesupport (= 7.2.2.2)
45+
actionmailer (7.2.3)
46+
actionpack (= 7.2.3)
47+
actionview (= 7.2.3)
48+
activejob (= 7.2.3)
49+
activesupport (= 7.2.3)
5050
mail (>= 2.8.0)
5151
rails-dom-testing (~> 2.2)
52-
actionpack (7.2.2.2)
53-
actionview (= 7.2.2.2)
54-
activesupport (= 7.2.2.2)
52+
actionpack (7.2.3)
53+
actionview (= 7.2.3)
54+
activesupport (= 7.2.3)
55+
cgi
5556
nokogiri (>= 1.8.5)
5657
racc
57-
rack (>= 2.2.4, < 3.2)
58+
rack (>= 2.2.4, < 3.3)
5859
rack-session (>= 1.0.1)
5960
rack-test (>= 0.6.3)
6061
rails-dom-testing (~> 2.2)
6162
rails-html-sanitizer (~> 1.6)
6263
useragent (~> 0.16)
63-
actiontext (7.2.2.2)
64-
actionpack (= 7.2.2.2)
65-
activerecord (= 7.2.2.2)
66-
activestorage (= 7.2.2.2)
67-
activesupport (= 7.2.2.2)
64+
actiontext (7.2.3)
65+
actionpack (= 7.2.3)
66+
activerecord (= 7.2.3)
67+
activestorage (= 7.2.3)
68+
activesupport (= 7.2.3)
6869
globalid (>= 0.6.0)
6970
nokogiri (>= 1.8.5)
70-
actionview (7.2.2.2)
71-
activesupport (= 7.2.2.2)
71+
actionview (7.2.3)
72+
activesupport (= 7.2.3)
7273
builder (~> 3.1)
74+
cgi
7375
erubi (~> 1.11)
7476
rails-dom-testing (~> 2.2)
7577
rails-html-sanitizer (~> 1.6)
76-
activejob (7.2.2.2)
77-
activesupport (= 7.2.2.2)
78+
activejob (7.2.3)
79+
activesupport (= 7.2.3)
7880
globalid (>= 0.3.6)
79-
activemodel (7.2.2.2)
80-
activesupport (= 7.2.2.2)
81-
activerecord (7.2.2.2)
82-
activemodel (= 7.2.2.2)
83-
activesupport (= 7.2.2.2)
81+
activemodel (7.2.3)
82+
activesupport (= 7.2.3)
83+
activerecord (7.2.3)
84+
activemodel (= 7.2.3)
85+
activesupport (= 7.2.3)
8486
timeout (>= 0.4.0)
85-
activestorage (7.2.2.2)
86-
actionpack (= 7.2.2.2)
87-
activejob (= 7.2.2.2)
88-
activerecord (= 7.2.2.2)
89-
activesupport (= 7.2.2.2)
87+
activestorage (7.2.3)
88+
actionpack (= 7.2.3)
89+
activejob (= 7.2.3)
90+
activerecord (= 7.2.3)
91+
activesupport (= 7.2.3)
9092
marcel (~> 1.0)
91-
activesupport (7.2.2.2)
93+
activesupport (7.2.3)
9294
base64
9395
benchmark (>= 0.3)
9496
bigdecimal
@@ -108,19 +110,19 @@ GEM
108110
rbtree3 (~> 0.6)
109111
ast (2.4.3)
110112
aws-eventstream (1.4.0)
111-
aws-partitions (1.1175.0)
112-
aws-sdk-core (3.234.0)
113+
aws-partitions (1.1180.0)
114+
aws-sdk-core (3.236.0)
113115
aws-eventstream (~> 1, >= 1.3.0)
114116
aws-partitions (~> 1, >= 1.992.0)
115117
aws-sigv4 (~> 1.9)
116118
base64
117119
bigdecimal
118120
jmespath (~> 1, >= 1.6.1)
119121
logger
120-
aws-sdk-kms (1.115.0)
122+
aws-sdk-kms (1.116.0)
121123
aws-sdk-core (~> 3, >= 3.234.0)
122124
aws-sigv4 (~> 1.5)
123-
aws-sdk-s3 (1.201.0)
125+
aws-sdk-s3 (1.202.0)
124126
aws-sdk-core (~> 3, >= 3.234.0)
125127
aws-sdk-kms (~> 1)
126128
aws-sigv4 (~> 1.5)
@@ -141,12 +143,13 @@ GEM
141143
rack-test (>= 0.6.3)
142144
regexp_parser (>= 1.5, < 3.0)
143145
xpath (~> 3.2)
146+
cgi (0.5.0)
144147
clamav-client (3.2.0)
145148
climate_control (1.2.0)
146149
coderay (1.1.3)
147150
concurrent-ruby (1.3.5)
148151
connection_pool (2.5.4)
149-
crack (1.0.0)
152+
crack (1.0.1)
150153
bigdecimal
151154
rexml
152155
crass (1.0.6)
@@ -156,7 +159,7 @@ GEM
156159
activerecord (>= 5.a)
157160
database_cleaner-core (~> 2.0)
158161
database_cleaner-core (2.0.1)
159-
date (3.4.1)
162+
date (3.5.0)
160163
defra_ruby_alert (2.2.1)
161164
airbrake
162165
defra_ruby_style (0.4.1)
@@ -165,7 +168,7 @@ GEM
165168
docile (1.4.1)
166169
dotenv (3.1.8)
167170
drb (2.2.3)
168-
erb (5.0.2)
171+
erb (5.1.3)
169172
erubi (1.13.1)
170173
factory_bot (6.5.5)
171174
activesupport (>= 6.1.0)
@@ -206,7 +209,7 @@ GEM
206209
i18n (1.14.7)
207210
concurrent-ruby (~> 1.0)
208211
io-console (0.8.1)
209-
irb (1.15.2)
212+
irb (1.15.3)
210213
pp (>= 0.6.0)
211214
rdoc (>= 4.0.0)
212215
reline (>= 0.4.2)
@@ -235,7 +238,8 @@ GEM
235238
loofah (2.24.1)
236239
crass (~> 1.0.2)
237240
nokogiri (>= 1.12.0)
238-
mail (2.8.1)
241+
mail (2.9.0)
242+
logger
239243
mini_mime (>= 0.1.1)
240244
net-imap
241245
net-pop
@@ -250,7 +254,7 @@ GEM
250254
multi_json (1.17.0)
251255
net-http (0.6.0)
252256
uri
253-
net-imap (0.5.10)
257+
net-imap (0.5.12)
254258
date
255259
net-protocol
256260
net-pop (0.1.2)
@@ -259,19 +263,19 @@ GEM
259263
timeout
260264
net-smtp (0.5.1)
261265
net-protocol
262-
nio4r (2.7.4)
266+
nio4r (2.7.5)
263267
nokogiri (1.18.10)
264268
mini_portile2 (~> 2.8.2)
265269
racc (~> 1.4)
266270
octokit (4.25.1)
267271
faraday (>= 1, < 3)
268272
sawyer (~> 0.9)
269273
parallel (1.27.0)
270-
parser (3.3.9.0)
274+
parser (3.3.10.0)
271275
ast (~> 2.4.1)
272276
racc
273277
pg (1.6.2)
274-
pp (0.6.2)
278+
pp (0.6.3)
275279
prettyprint
276280
prettyprint (0.2.0)
277281
prism (1.6.0)
@@ -285,7 +289,7 @@ GEM
285289
stringio
286290
public_suffix (6.0.2)
287291
racc (1.8.1)
288-
rack (2.2.20)
292+
rack (2.2.21)
289293
rack-cors (2.0.2)
290294
rack (>= 2.0.0)
291295
rack-session (1.0.2)
@@ -295,20 +299,20 @@ GEM
295299
rackup (1.0.1)
296300
rack (< 3)
297301
webrick
298-
rails (7.2.2.2)
299-
actioncable (= 7.2.2.2)
300-
actionmailbox (= 7.2.2.2)
301-
actionmailer (= 7.2.2.2)
302-
actionpack (= 7.2.2.2)
303-
actiontext (= 7.2.2.2)
304-
actionview (= 7.2.2.2)
305-
activejob (= 7.2.2.2)
306-
activemodel (= 7.2.2.2)
307-
activerecord (= 7.2.2.2)
308-
activestorage (= 7.2.2.2)
309-
activesupport (= 7.2.2.2)
302+
rails (7.2.3)
303+
actioncable (= 7.2.3)
304+
actionmailbox (= 7.2.3)
305+
actionmailer (= 7.2.3)
306+
actionpack (= 7.2.3)
307+
actiontext (= 7.2.3)
308+
actionview (= 7.2.3)
309+
activejob (= 7.2.3)
310+
activemodel (= 7.2.3)
311+
activerecord (= 7.2.3)
312+
activestorage (= 7.2.3)
313+
activesupport (= 7.2.3)
310314
bundler (>= 1.15.0)
311-
railties (= 7.2.2.2)
315+
railties (= 7.2.3)
312316
rails-controller-testing (1.0.5)
313317
actionpack (>= 5.0.1.rc1)
314318
actionview (>= 5.0.1.rc1)
@@ -320,20 +324,23 @@ GEM
320324
rails-html-sanitizer (1.6.2)
321325
loofah (~> 2.21)
322326
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
323-
railties (7.2.2.2)
324-
actionpack (= 7.2.2.2)
325-
activesupport (= 7.2.2.2)
327+
railties (7.2.3)
328+
actionpack (= 7.2.3)
329+
activesupport (= 7.2.3)
330+
cgi
326331
irb (~> 1.13)
327332
rackup (>= 1.0.0)
328333
rake (>= 12.2)
329334
thor (~> 1.0, >= 1.2.2)
335+
tsort (>= 0.2)
330336
zeitwerk (~> 2.6)
331337
rainbow (3.1.1)
332-
rake (13.3.0)
338+
rake (13.3.1)
333339
rbtree3 (0.7.1)
334-
rdoc (6.14.2)
340+
rdoc (6.15.1)
335341
erb
336342
psych (>= 4.0.0)
343+
tsort
337344
regexp_parser (2.11.3)
338345
reline (0.6.2)
339346
io-console (~> 0.5)
@@ -361,7 +368,7 @@ GEM
361368
rspec-retry (0.6.2)
362369
rspec-core (> 3.3)
363370
rspec-support (3.13.6)
364-
rubocop (1.81.6)
371+
rubocop (1.81.7)
365372
json (~> 2.3)
366373
language_server-protocol (~> 3.17.0.2)
367374
lint_roller (~> 1.1.0)
@@ -398,17 +405,17 @@ GEM
398405
rubocop (~> 1.72, >= 1.72.1)
399406
rubocop-rspec (~> 3.5)
400407
ruby-progressbar (1.13.0)
401-
rubyXL (3.4.33)
408+
rubyXL (3.4.34)
402409
nokogiri (>= 1.10.8)
403-
rubyzip (>= 1.3.0)
410+
rubyzip (~> 2.4)
404411
rubyzip (2.4.1)
405412
sawyer (0.9.3)
406413
addressable (>= 2.3.5)
407414
faraday (>= 0.17.3, < 3)
408415
secure_headers (7.1.0)
409416
securerandom (0.4.1)
410-
shoulda-matchers (6.5.0)
411-
activesupport (>= 5.2.0)
417+
shoulda-matchers (7.0.1)
418+
activesupport (>= 7.1)
412419
simplecov (0.22.0)
413420
docile (~> 1.1)
414421
simplecov-html (~> 0.11)
@@ -427,17 +434,18 @@ GEM
427434
stringio (3.1.7)
428435
thor (1.4.0)
429436
timecop (0.9.10)
430-
timeout (0.4.3)
437+
timeout (0.4.4)
438+
tsort (0.2.0)
431439
tzinfo (2.0.6)
432440
concurrent-ruby (~> 1.0)
433441
unicode-display_width (3.2.0)
434442
unicode-emoji (~> 4.1)
435443
unicode-emoji (4.1.0)
436-
uri (1.0.4)
444+
uri (1.1.1)
437445
useragent (0.16.11)
438446
vcr (6.3.1)
439447
base64
440-
webmock (3.25.1)
448+
webmock (3.26.1)
441449
addressable (>= 2.8.0)
442450
crack (>= 0.3.2)
443451
hashdiff (>= 0.4.0, < 2.0.0)

app/helpers/pafs_core/projects_helper.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -228,17 +228,5 @@ def search_result_label(search_string, result)
228228
def file_extension(file_name)
229229
file_name.split(".").last.upcase
230230
end
231-
232-
# def key_date_field(f, attr)
233-
# # expecting attr to end with either '_month' or '_year'
234-
# date_type = attr.to_s.split("_").last
235-
# range = date_type == "month" ? 1..12 : 2000..2099
236-
# length = date_type == "month" ? 2 : 4
237-
#
238-
# content_tag(:div, class: "form-group form-group-#{date_type}") do
239-
# concat(f.label(attr, t(".#{date_type}_label"), class: "form-label"))
240-
# concat(f.number_field(attr, in: range, maxlength: length, class: "form-control form-#{date_type}"))
241-
# end
242-
# end
243231
end
244232
end

0 commit comments

Comments
 (0)