Skip to content

Commit 6fa1703

Browse files
authored
(RST-6954) Main rails upgrade along with database cleaner (#1653)
1 parent 891f87e commit 6fa1703

20 files changed

+1354
-153
lines changed

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem 'jbuilder', '~> 2.10'
1010
gem 'jquery-rails', '~> 4.4'
1111

1212
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
13-
gem 'rails', '7.1.4.1'
13+
gem 'rails', '7.2.2'
1414
gem 'responders', '~> 3.0'
1515

1616
# Azure deployment so we need this
@@ -42,6 +42,8 @@ gem 'govuk_notify_rails', git: 'https://github.com/hmcts/govuk_notify_rails.git'
4242
# bundle exec rake doc:rails generates the API under doc/api.
4343
# gem 'sdoc', '~> 0.4.0', group: :doc
4444

45+
gem 'rackup', '1.0.0', require: false
46+
4547
group :development, :test do
4648
gem 'awesome_print', '~> 1.9'
4749
gem 'better_errors', '~> 2.9'

Gemfile.lock

Lines changed: 86 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -65,56 +65,51 @@ GIT
6565
GEM
6666
remote: https://rubygems.org/
6767
specs:
68-
actioncable (7.1.4.1)
69-
actionpack (= 7.1.4.1)
70-
activesupport (= 7.1.4.1)
68+
actioncable (7.2.2)
69+
actionpack (= 7.2.2)
70+
activesupport (= 7.2.2)
7171
nio4r (~> 2.0)
7272
websocket-driver (>= 0.6.1)
7373
zeitwerk (~> 2.6)
74-
actionmailbox (7.1.4.1)
75-
actionpack (= 7.1.4.1)
76-
activejob (= 7.1.4.1)
77-
activerecord (= 7.1.4.1)
78-
activestorage (= 7.1.4.1)
79-
activesupport (= 7.1.4.1)
80-
mail (>= 2.7.1)
81-
net-imap
82-
net-pop
83-
net-smtp
84-
actionmailer (7.1.4.1)
85-
actionpack (= 7.1.4.1)
86-
actionview (= 7.1.4.1)
87-
activejob (= 7.1.4.1)
88-
activesupport (= 7.1.4.1)
89-
mail (~> 2.5, >= 2.5.4)
90-
net-imap
91-
net-pop
92-
net-smtp
74+
actionmailbox (7.2.2)
75+
actionpack (= 7.2.2)
76+
activejob (= 7.2.2)
77+
activerecord (= 7.2.2)
78+
activestorage (= 7.2.2)
79+
activesupport (= 7.2.2)
80+
mail (>= 2.8.0)
81+
actionmailer (7.2.2)
82+
actionpack (= 7.2.2)
83+
actionview (= 7.2.2)
84+
activejob (= 7.2.2)
85+
activesupport (= 7.2.2)
86+
mail (>= 2.8.0)
9387
rails-dom-testing (~> 2.2)
94-
actionpack (7.1.4.1)
95-
actionview (= 7.1.4.1)
96-
activesupport (= 7.1.4.1)
88+
actionpack (7.2.2)
89+
actionview (= 7.2.2)
90+
activesupport (= 7.2.2)
9791
nokogiri (>= 1.8.5)
9892
racc
99-
rack (>= 2.2.4)
93+
rack (>= 2.2.4, < 3.2)
10094
rack-session (>= 1.0.1)
10195
rack-test (>= 0.6.3)
10296
rails-dom-testing (~> 2.2)
10397
rails-html-sanitizer (~> 1.6)
104-
actiontext (7.1.4.1)
105-
actionpack (= 7.1.4.1)
106-
activerecord (= 7.1.4.1)
107-
activestorage (= 7.1.4.1)
108-
activesupport (= 7.1.4.1)
98+
useragent (~> 0.16)
99+
actiontext (7.2.2)
100+
actionpack (= 7.2.2)
101+
activerecord (= 7.2.2)
102+
activestorage (= 7.2.2)
103+
activesupport (= 7.2.2)
109104
globalid (>= 0.6.0)
110105
nokogiri (>= 1.8.5)
111-
actionview (7.1.4.1)
112-
activesupport (= 7.1.4.1)
106+
actionview (7.2.2)
107+
activesupport (= 7.2.2)
113108
builder (~> 3.1)
114109
erubi (~> 1.11)
115110
rails-dom-testing (~> 2.2)
116111
rails-html-sanitizer (~> 1.6)
117-
activeadmin (3.2.2)
112+
activeadmin (3.2.5)
118113
arbre (~> 1.2, >= 1.2.1)
119114
csv
120115
formtastic (>= 3.1)
@@ -124,33 +119,35 @@ GEM
124119
kaminari (>= 1.2.1)
125120
railties (>= 6.1)
126121
ransack (>= 4.0)
127-
activejob (7.1.4.1)
128-
activesupport (= 7.1.4.1)
122+
activejob (7.2.2)
123+
activesupport (= 7.2.2)
129124
globalid (>= 0.3.6)
130-
activemodel (7.1.4.1)
131-
activesupport (= 7.1.4.1)
132-
activerecord (7.1.4.1)
133-
activemodel (= 7.1.4.1)
134-
activesupport (= 7.1.4.1)
125+
activemodel (7.2.2)
126+
activesupport (= 7.2.2)
127+
activerecord (7.2.2)
128+
activemodel (= 7.2.2)
129+
activesupport (= 7.2.2)
135130
timeout (>= 0.4.0)
136-
activerecord-nulldb-adapter (1.0.1)
137-
activerecord (>= 5.2.0, < 7.2)
138-
activestorage (7.1.4.1)
139-
actionpack (= 7.1.4.1)
140-
activejob (= 7.1.4.1)
141-
activerecord (= 7.1.4.1)
142-
activesupport (= 7.1.4.1)
131+
activerecord-nulldb-adapter (1.1.1)
132+
activerecord (>= 6.0, < 8.1)
133+
activestorage (7.2.2)
134+
actionpack (= 7.2.2)
135+
activejob (= 7.2.2)
136+
activerecord (= 7.2.2)
137+
activesupport (= 7.2.2)
143138
marcel (~> 1.0)
144-
activesupport (7.1.4.1)
139+
activesupport (7.2.2)
145140
base64
141+
benchmark (>= 0.3)
146142
bigdecimal
147-
concurrent-ruby (~> 1.0, >= 1.0.2)
143+
concurrent-ruby (~> 1.0, >= 1.3.1)
148144
connection_pool (>= 2.2.5)
149145
drb
150146
i18n (>= 1.6, < 2)
147+
logger (>= 1.4.2)
151148
minitest (>= 5.1)
152-
mutex_m
153-
tzinfo (~> 2.0)
149+
securerandom (>= 0.3)
150+
tzinfo (~> 2.0, >= 2.0.5)
154151
addressable (2.8.7)
155152
public_suffix (>= 2.0.2, < 7.0)
156153
arbre (1.7.0)
@@ -161,6 +158,7 @@ GEM
161158
base32_pure (0.1.0)
162159
base64 (0.2.0)
163160
bcrypt (3.1.20)
161+
benchmark (0.4.0)
164162
better_errors (2.10.1)
165163
erubi (>= 1.0.0)
166164
rack (>= 0.9.0)
@@ -202,13 +200,13 @@ GEM
202200
cuprite (0.15)
203201
capybara (~> 3.0)
204202
ferrum (~> 0.14.0)
205-
database_cleaner (2.0.2)
203+
database_cleaner (2.1.0)
206204
database_cleaner-active_record (>= 2, < 3)
207-
database_cleaner-active_record (2.1.0)
205+
database_cleaner-active_record (2.2.0)
208206
activerecord (>= 5.a)
209207
database_cleaner-core (~> 2.0.0)
210208
database_cleaner-core (2.0.1)
211-
date (3.3.4)
209+
date (3.4.0)
212210
debug_inspector (1.2.0)
213211
devise (4.9.3)
214212
bcrypt (~> 3.0)
@@ -310,7 +308,8 @@ GEM
310308
listen (3.9.0)
311309
rb-fsevent (~> 0.10, >= 0.10.3)
312310
rb-inotify (~> 0.9, >= 0.9.10)
313-
loofah (2.22.0)
311+
logger (1.6.1)
312+
loofah (2.23.1)
314313
crass (~> 1.0.2)
315314
nokogiri (>= 1.12.0)
316315
mail (2.8.1)
@@ -322,11 +321,10 @@ GEM
322321
matrix (0.4.2)
323322
method_source (1.0.0)
324323
mini_mime (1.1.5)
325-
mini_portile2 (2.8.7)
324+
mini_portile2 (2.8.8)
326325
minitest (5.25.1)
327326
multi_json (1.15.0)
328-
mutex_m (0.2.0)
329-
net-imap (0.5.0)
327+
net-imap (0.5.1)
330328
date
331329
net-protocol
332330
net-pop (0.1.2)
@@ -335,7 +333,7 @@ GEM
335333
timeout
336334
net-smtp (0.5.0)
337335
net-protocol
338-
nio4r (2.7.3)
336+
nio4r (2.7.4)
339337
nokogiri (1.16.7)
340338
mini_portile2 (~> 2.8.2)
341339
racc (~> 1.4)
@@ -366,7 +364,7 @@ GEM
366364
method_source (~> 1.0)
367365
pry-rails (0.3.9)
368366
pry (>= 0.10.4)
369-
psych (5.1.2)
367+
psych (5.2.0)
370368
stringio
371369
public_suffix (6.0.1)
372370
puma (6.4.3)
@@ -384,20 +382,20 @@ GEM
384382
rackup (1.0.0)
385383
rack (< 3)
386384
webrick
387-
rails (7.1.4.1)
388-
actioncable (= 7.1.4.1)
389-
actionmailbox (= 7.1.4.1)
390-
actionmailer (= 7.1.4.1)
391-
actionpack (= 7.1.4.1)
392-
actiontext (= 7.1.4.1)
393-
actionview (= 7.1.4.1)
394-
activejob (= 7.1.4.1)
395-
activemodel (= 7.1.4.1)
396-
activerecord (= 7.1.4.1)
397-
activestorage (= 7.1.4.1)
398-
activesupport (= 7.1.4.1)
385+
rails (7.2.2)
386+
actioncable (= 7.2.2)
387+
actionmailbox (= 7.2.2)
388+
actionmailer (= 7.2.2)
389+
actionpack (= 7.2.2)
390+
actiontext (= 7.2.2)
391+
actionview (= 7.2.2)
392+
activejob (= 7.2.2)
393+
activemodel (= 7.2.2)
394+
activerecord (= 7.2.2)
395+
activestorage (= 7.2.2)
396+
activesupport (= 7.2.2)
399397
bundler (>= 1.15.0)
400-
railties (= 7.1.4.1)
398+
railties (= 7.2.2)
401399
rails-controller-testing (1.0.5)
402400
actionpack (>= 5.0.1.rc1)
403401
actionview (>= 5.0.1.rc1)
@@ -409,29 +407,29 @@ GEM
409407
rails-html-sanitizer (1.6.0)
410408
loofah (~> 2.21)
411409
nokogiri (~> 1.14)
412-
railties (7.1.4.1)
413-
actionpack (= 7.1.4.1)
414-
activesupport (= 7.1.4.1)
415-
irb
410+
railties (7.2.2)
411+
actionpack (= 7.2.2)
412+
activesupport (= 7.2.2)
413+
irb (~> 1.13)
416414
rackup (>= 1.0.0)
417415
rake (>= 12.2)
418416
thor (~> 1.0, >= 1.2.2)
419417
zeitwerk (~> 2.6)
420418
rainbow (3.1.1)
421419
rake (13.2.1)
422-
ransack (4.1.1)
420+
ransack (4.2.1)
423421
activerecord (>= 6.1.5)
424422
activesupport (>= 6.1.5)
425423
i18n
426424
rb-fsevent (0.11.2)
427425
rb-inotify (0.10.1)
428426
ffi (~> 1.0)
429-
rdoc (6.7.0)
427+
rdoc (6.8.1)
430428
psych (>= 4.0.0)
431429
redcarpet (3.6.0)
432430
redis (4.8.1)
433431
regexp_parser (2.9.0)
434-
reline (0.5.10)
432+
reline (0.5.11)
435433
io-console (~> 0.5)
436434
responders (3.1.1)
437435
actionpack (>= 5.2)
@@ -498,6 +496,7 @@ GEM
498496
ruby-progressbar (1.13.0)
499497
ruby2_keywords (0.0.5)
500498
rubyzip (2.3.2)
499+
securerandom (0.3.2)
501500
selenium-webdriver (4.10.0)
502501
rexml (~> 3.2, >= 3.2.5)
503502
rubyzip (>= 1.2.2, < 3.0)
@@ -545,11 +544,11 @@ GEM
545544
spring (4.1.3)
546545
stimulus-rails (1.3.3)
547546
railties (>= 6.0.0)
548-
stringio (3.1.1)
547+
stringio (3.1.2)
549548
temple (0.10.3)
550549
thor (1.3.2)
551550
tilt (2.3.0)
552-
timeout (0.4.1)
551+
timeout (0.4.2)
553552
turbolinks (5.2.1)
554553
turbolinks-source (~> 5.2)
555554
turbolinks-source (5.2.0)
@@ -561,6 +560,7 @@ GEM
561560
execjs (>= 0.3.0, < 3)
562561
uk_postcode (2.1.8)
563562
unicode-display_width (2.5.0)
563+
useragent (0.16.10)
564564
warden (1.2.9)
565565
rack (>= 2.0.9)
566566
webdrivers (5.3.1)
@@ -576,7 +576,7 @@ GEM
576576
rack-proxy (>= 0.6.1)
577577
railties (>= 5.2)
578578
semantic_range (>= 2.3.0)
579-
webrick (1.8.2)
579+
webrick (1.9.0)
580580
websocket (1.2.10)
581581
websocket-driver (0.7.6)
582582
websocket-extensions (>= 0.1.0)
@@ -633,7 +633,8 @@ DEPENDENCIES
633633
pry-rails (~> 0.3)
634634
puma (~> 6.3)
635635
rack-attack (~> 6.7)
636-
rails (= 7.1.4.1)
636+
rackup (= 1.0.0)
637+
rails (= 7.2.2)
637638
rails-controller-testing (~> 1.0)
638639
redcarpet (~> 3.5)
639640
responders (~> 3.0)

bin/brakeman

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env ruby
2+
require "rubygems"
3+
require "bundler/setup"
4+
5+
ARGV.unshift("--ensure-latest")
6+
7+
load Gem.bin_path("brakeman", "brakeman")

bin/rubocop

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
require "rubygems"
3+
require "bundler/setup"
4+
5+
# explicit rubocop config increases performance slightly while avoiding config confusion.
6+
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
7+
8+
load Gem.bin_path("rubocop", "rubocop")

bin/setup

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env ruby
22
require "fileutils"
33

4-
# path to your application root.
54
APP_ROOT = File.expand_path('..', __dir__)
5+
APP_NAME = 'app'
66

77
def system!(*args)
88
system(*args, exception: true)
@@ -33,4 +33,8 @@ FileUtils.chdir APP_ROOT do
3333

3434
puts "\n== Restarting application server =="
3535
system! 'bin/rails restart'
36+
37+
# puts "\n== Configuring puma-dev =="
38+
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
39+
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
3640
end

0 commit comments

Comments
 (0)