Skip to content

Commit e033b3d

Browse files
authored
Bump rails to 7.2.2.2 [NIT-636] (#156)
Updated application configuration files to match Rails 7.2 defaults Bump rexml to 3.4.4
1 parent 04687b3 commit e033b3d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+308
-118
lines changed

Gemfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ source 'https://rubygems.org'
66
# README) is available at:
77
# https://github.com/NHSDigital/activemodel-caution.git
88

9-
gem 'activemodel-caution', '7.1.5.0' # Supports rails ~> 7.1.5.0
10-
gem 'rails', '~> 7.1.5', '>= 7.1.5.1'
9+
gem 'activemodel-caution', '7.2.2.0' # Supports rails ~> 7.2.2.0
10+
gem 'rails', '~> 7.2.2', '>= 7.2.2.2'
1111
# Fixes uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger on Rails 7.0x
1212
# and earlier. See https://github.com/rails/rails/issues/54260.
1313
gem 'concurrent-ruby', '1.3.4'
@@ -64,9 +64,6 @@ gem 'will_paginate'
6464
# net-imap (via ndr_error) requires date. Puma needs us to stick to the ruby default version.
6565
gem 'date', '3.1.3' # Lock to Ruby 3.0 version of gem for live service
6666

67-
# TODO: 2023-09-03: Updating mail to 2.8.1 causes tests failures on Rails 6.1
68-
gem 'mail', '>= 2.1.1', '< 2.8.0' # mail 2.8.0 and 2.8.0.1 have major hidden bugs
69-
7067
gem 'ndr_authenticate', '~> 0.3', '>= 0.3.3'
7168
gem 'ndr_error', '~> 2.0'
7269
gem 'ndr_import'

Gemfile.lock

Lines changed: 75 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -2,89 +2,83 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
Ascii85 (2.0.1)
5-
actioncable (7.1.5.2)
6-
actionpack (= 7.1.5.2)
7-
activesupport (= 7.1.5.2)
5+
actioncable (7.2.2.2)
6+
actionpack (= 7.2.2.2)
7+
activesupport (= 7.2.2.2)
88
nio4r (~> 2.0)
99
websocket-driver (>= 0.6.1)
1010
zeitwerk (~> 2.6)
11-
actionmailbox (7.1.5.2)
12-
actionpack (= 7.1.5.2)
13-
activejob (= 7.1.5.2)
14-
activerecord (= 7.1.5.2)
15-
activestorage (= 7.1.5.2)
16-
activesupport (= 7.1.5.2)
17-
mail (>= 2.7.1)
18-
net-imap
19-
net-pop
20-
net-smtp
21-
actionmailer (7.1.5.2)
22-
actionpack (= 7.1.5.2)
23-
actionview (= 7.1.5.2)
24-
activejob (= 7.1.5.2)
25-
activesupport (= 7.1.5.2)
26-
mail (~> 2.5, >= 2.5.4)
27-
net-imap
28-
net-pop
29-
net-smtp
11+
actionmailbox (7.2.2.2)
12+
actionpack (= 7.2.2.2)
13+
activejob (= 7.2.2.2)
14+
activerecord (= 7.2.2.2)
15+
activestorage (= 7.2.2.2)
16+
activesupport (= 7.2.2.2)
17+
mail (>= 2.8.0)
18+
actionmailer (7.2.2.2)
19+
actionpack (= 7.2.2.2)
20+
actionview (= 7.2.2.2)
21+
activejob (= 7.2.2.2)
22+
activesupport (= 7.2.2.2)
23+
mail (>= 2.8.0)
3024
rails-dom-testing (~> 2.2)
31-
actionpack (7.1.5.2)
32-
actionview (= 7.1.5.2)
33-
activesupport (= 7.1.5.2)
25+
actionpack (7.2.2.2)
26+
actionview (= 7.2.2.2)
27+
activesupport (= 7.2.2.2)
3428
nokogiri (>= 1.8.5)
3529
racc
36-
rack (>= 2.2.4)
30+
rack (>= 2.2.4, < 3.2)
3731
rack-session (>= 1.0.1)
3832
rack-test (>= 0.6.3)
3933
rails-dom-testing (~> 2.2)
4034
rails-html-sanitizer (~> 1.6)
41-
actiontext (7.1.5.2)
42-
actionpack (= 7.1.5.2)
43-
activerecord (= 7.1.5.2)
44-
activestorage (= 7.1.5.2)
45-
activesupport (= 7.1.5.2)
35+
useragent (~> 0.16)
36+
actiontext (7.2.2.2)
37+
actionpack (= 7.2.2.2)
38+
activerecord (= 7.2.2.2)
39+
activestorage (= 7.2.2.2)
40+
activesupport (= 7.2.2.2)
4641
globalid (>= 0.6.0)
4742
nokogiri (>= 1.8.5)
48-
actionview (7.1.5.2)
49-
activesupport (= 7.1.5.2)
43+
actionview (7.2.2.2)
44+
activesupport (= 7.2.2.2)
5045
builder (~> 3.1)
5146
erubi (~> 1.11)
5247
rails-dom-testing (~> 2.2)
5348
rails-html-sanitizer (~> 1.6)
54-
activejob (7.1.5.2)
55-
activesupport (= 7.1.5.2)
49+
activejob (7.2.2.2)
50+
activesupport (= 7.2.2.2)
5651
globalid (>= 0.3.6)
57-
activemodel (7.1.5.2)
58-
activesupport (= 7.1.5.2)
59-
activemodel-caution (7.1.5.0)
60-
actionpack (~> 7.1.5.0)
61-
activemodel (~> 7.1.5.0)
62-
activerecord (~> 7.1.5.0)
63-
activesupport (~> 7.1.5.0)
64-
railties (~> 7.1.5.0)
65-
activerecord (7.1.5.2)
66-
activemodel (= 7.1.5.2)
67-
activesupport (= 7.1.5.2)
52+
activemodel (7.2.2.2)
53+
activesupport (= 7.2.2.2)
54+
activemodel-caution (7.2.2.0)
55+
actionpack (~> 7.2.2.0)
56+
activemodel (~> 7.2.2.0)
57+
activerecord (~> 7.2.2.0)
58+
activesupport (~> 7.2.2.0)
59+
railties (~> 7.2.2.0)
60+
activerecord (7.2.2.2)
61+
activemodel (= 7.2.2.2)
62+
activesupport (= 7.2.2.2)
6863
timeout (>= 0.4.0)
69-
activestorage (7.1.5.2)
70-
actionpack (= 7.1.5.2)
71-
activejob (= 7.1.5.2)
72-
activerecord (= 7.1.5.2)
73-
activesupport (= 7.1.5.2)
64+
activestorage (7.2.2.2)
65+
actionpack (= 7.2.2.2)
66+
activejob (= 7.2.2.2)
67+
activerecord (= 7.2.2.2)
68+
activesupport (= 7.2.2.2)
7469
marcel (~> 1.0)
75-
activesupport (7.1.5.2)
70+
activesupport (7.2.2.2)
7671
base64
7772
benchmark (>= 0.3)
7873
bigdecimal
79-
concurrent-ruby (~> 1.0, >= 1.0.2)
74+
concurrent-ruby (~> 1.0, >= 1.3.1)
8075
connection_pool (>= 2.2.5)
8176
drb
8277
i18n (>= 1.6, < 2)
8378
logger (>= 1.4.2)
8479
minitest (>= 5.1)
85-
mutex_m
8680
securerandom (>= 0.3)
87-
tzinfo (~> 2.0)
81+
tzinfo (~> 2.0, >= 2.0.5)
8882
addressable (2.8.7)
8983
public_suffix (>= 2.0.2, < 7.0)
9084
afm (0.2.2)
@@ -254,8 +248,11 @@ GEM
254248
crass (~> 1.0.2)
255249
nokogiri (>= 1.12.0)
256250
lumberjack (1.2.10)
257-
mail (2.7.1)
251+
mail (2.8.1)
258252
mini_mime (>= 0.1.1)
253+
net-imap
254+
net-pop
255+
net-smtp
259256
marcel (1.0.4)
260257
matrix (0.4.2)
261258
method_source (1.1.0)
@@ -269,7 +266,6 @@ GEM
269266
msworddoc-extractor (0.2.0)
270267
ruby-ole
271268
multi_json (1.15.0)
272-
mutex_m (0.3.0)
273269
ndr_authenticate (0.3.4)
274270
devise
275271
devise_saml_authenticatable (~> 1.9)
@@ -411,7 +407,7 @@ GEM
411407
puma (>= 5.0)
412408
rack
413409
racc (1.8.1)
414-
rack (3.2.0)
410+
rack (3.1.16)
415411
rack-mini-profiler (3.3.1)
416412
rack (>= 1.2.0)
417413
rack-proxy (0.7.7)
@@ -424,31 +420,31 @@ GEM
424420
rackup (2.2.1)
425421
rack (>= 3)
426422
railroady (1.6.0)
427-
rails (7.1.5.2)
428-
actioncable (= 7.1.5.2)
429-
actionmailbox (= 7.1.5.2)
430-
actionmailer (= 7.1.5.2)
431-
actionpack (= 7.1.5.2)
432-
actiontext (= 7.1.5.2)
433-
actionview (= 7.1.5.2)
434-
activejob (= 7.1.5.2)
435-
activemodel (= 7.1.5.2)
436-
activerecord (= 7.1.5.2)
437-
activestorage (= 7.1.5.2)
438-
activesupport (= 7.1.5.2)
423+
rails (7.2.2.2)
424+
actioncable (= 7.2.2.2)
425+
actionmailbox (= 7.2.2.2)
426+
actionmailer (= 7.2.2.2)
427+
actionpack (= 7.2.2.2)
428+
actiontext (= 7.2.2.2)
429+
actionview (= 7.2.2.2)
430+
activejob (= 7.2.2.2)
431+
activemodel (= 7.2.2.2)
432+
activerecord (= 7.2.2.2)
433+
activestorage (= 7.2.2.2)
434+
activesupport (= 7.2.2.2)
439435
bundler (>= 1.15.0)
440-
railties (= 7.1.5.2)
436+
railties (= 7.2.2.2)
441437
rails-dom-testing (2.2.0)
442438
activesupport (>= 5.0.0)
443439
minitest
444440
nokogiri (>= 1.6)
445441
rails-html-sanitizer (1.6.1)
446442
loofah (~> 2.21)
447443
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)
448-
railties (7.1.5.2)
449-
actionpack (= 7.1.5.2)
450-
activesupport (= 7.1.5.2)
451-
irb
444+
railties (7.2.2.2)
445+
actionpack (= 7.2.2.2)
446+
activesupport (= 7.2.2.2)
447+
irb (~> 1.13)
452448
rackup (>= 1.0.0)
453449
rake (>= 12.2)
454450
thor (~> 1.0, >= 1.2.2)
@@ -472,7 +468,7 @@ GEM
472468
responders (3.1.1)
473469
actionpack (>= 5.2)
474470
railties (>= 5.2)
475-
rexml (3.3.9)
471+
rexml (3.4.4)
476472
roo (2.10.1)
477473
nokogiri (~> 1)
478474
rubyzip (>= 1.3.0, < 3.0.0)
@@ -564,6 +560,7 @@ GEM
564560
tzinfo (2.0.6)
565561
concurrent-ruby (~> 1.0)
566562
unicode-display_width (2.6.0)
563+
useragent (0.16.11)
567564
warden (1.2.9)
568565
rack (>= 2.0.9)
569566
web-console (4.2.1)
@@ -597,7 +594,7 @@ PLATFORMS
597594
x86_64-linux
598595

599596
DEPENDENCIES
600-
activemodel-caution (= 7.1.5.0)
597+
activemodel-caution (= 7.2.2.0)
601598
bootstrap-table-rails (~> 1.20.2)
602599
byebug
603600
cancancan (~> 3.0)
@@ -621,7 +618,6 @@ DEPENDENCIES
621618
jquery-rails
622619
jquery-ui-rails (>= 7.0.0)
623620
loofah (>= 2.3.1)
624-
mail (>= 2.1.1, < 2.8.0)
625621
mini_racer (~> 0.14)
626622
minitest
627623
mocha
@@ -646,7 +642,7 @@ DEPENDENCIES
646642
puma-daemon
647643
rack-mini-profiler
648644
railroady
649-
rails (~> 7.1.5, >= 7.1.5.1)
645+
rails (~> 7.2.2, >= 7.2.2.2)
650646
rainbow
651647
regexp-examples
652648
sass-rails

app/models/communication.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Communication < ApplicationRecord
1515

1616
has_paper_trail
1717

18-
enum medium: { email: 1, phone: 2, letter: 3, in_person: 4 }
18+
enum :medium, { email: 1, phone: 2, letter: 3, in_person: 4 }
1919

2020
validates :medium, presence: true
2121
validates :contacted_at, presence: true

app/models/dataset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Dataset < ApplicationRecord
1616

1717
delegate :name, to: :dataset_type, prefix: true, allow_nil: true
1818

19-
enum cas_type: { cas_defaults: 1, cas_extras: 2 }
19+
enum :cas_type, { cas_defaults: 1, cas_extras: 2 }
2020

2121
DATASET_BROWSER_TYPES = %w[xml non_xml].freeze
2222

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 = 'mbis'.freeze
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

config/application.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TIME_PROCESS_STARTED = Time.now
1+
TIME_PROCESS_STARTED = Time.now # rubocop:disable Rails/TimeZone
22

33
require_relative 'boot'
44

@@ -11,14 +11,15 @@
1111
require 'ndr_error/middleware/public_exceptions'
1212

1313
module Mbis
14+
# Global application configurations
1415
class Application < Rails::Application
1516
# Initialize configuration defaults for originally generated Rails version.
1617
config.load_defaults 7.1
1718

1819
# Please, add to the `ignore` list any other `lib` subdirectories that do
1920
# not contain `.rb` files, or that should not be reloaded or eager loaded.
2021
# Common ones are `templates`, `generators`, or `middleware`, for example.
21-
config.autoload_lib(ignore: %w(assets tasks))
22+
config.autoload_lib(ignore: %w[assets tasks])
2223

2324
# Configuration for the application, engines, and railties goes here.
2425
#
@@ -66,6 +67,14 @@ class Application < Rails::Application
6667
config.i18n.fallbacks = true
6768
config.i18n.available_locales = %i[en en-odr]
6869

70+
# Configuration for the application, engines, and railties goes here.
71+
#
72+
# These settings can be overridden in specific environments using the files
73+
# in config/environments, which are processed later.
74+
#
75+
# config.time_zone = "Central Time (US & Canada)"
76+
# config.eager_load_paths << Rails.root.join("extras")
77+
6978
# TODO: Would be nice to push this out to a YAML file and access via `config_for`
7079
# so that we can avoid hardcoding...
7180
config.x.user.internal_domains = ['phe.gov.uk', 'ukhsa.gov.uk']

0 commit comments

Comments
 (0)