Skip to content

Commit 89dd808

Browse files
authored
Merge pull request #625 from alphagov/upgrade-to-rails-8.1.2
[SCH-1782] Upgrade rails gem to 8.1.2
2 parents 847197b + d4d7a74 commit 89dd808

File tree

6 files changed

+43
-25
lines changed

6 files changed

+43
-25
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
source "https://rubygems.org"
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

4-
RAILS_GEMS_VERSION = "8.0.1".freeze
4+
RAILS_GEMS_VERSION = "8.1.2".freeze
55
gem "actionpack", RAILS_GEMS_VERSION
66
gem "activemodel", RAILS_GEMS_VERSION
77
gem "activesupport", RAILS_GEMS_VERSION
88
gem "railties", RAILS_GEMS_VERSION
99

10+
gem "benchmark"
1011
gem "bootsnap", require: false
1112
gem "connection_pool"
1213
gem "csv"

Gemfile.lock

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actionpack (8.0.1)
5-
actionview (= 8.0.1)
6-
activesupport (= 8.0.1)
4+
actionpack (8.1.2)
5+
actionview (= 8.1.2)
6+
activesupport (= 8.1.2)
77
nokogiri (>= 1.8.5)
88
rack (>= 2.2.4)
99
rack-session (>= 1.0.1)
1010
rack-test (>= 0.6.3)
1111
rails-dom-testing (~> 2.2)
1212
rails-html-sanitizer (~> 1.6)
1313
useragent (~> 0.16)
14-
actionview (8.0.1)
15-
activesupport (= 8.0.1)
14+
actionview (8.1.2)
15+
activesupport (= 8.1.2)
1616
builder (~> 3.1)
1717
erubi (~> 1.11)
1818
rails-dom-testing (~> 2.2)
1919
rails-html-sanitizer (~> 1.6)
20-
activemodel (8.0.1)
21-
activesupport (= 8.0.1)
22-
activesupport (8.0.1)
20+
activemodel (8.1.2)
21+
activesupport (= 8.1.2)
22+
activesupport (8.1.2)
2323
base64
24-
benchmark (>= 0.3)
2524
bigdecimal
2625
concurrent-ruby (~> 1.0, >= 1.3.1)
2726
connection_pool (>= 2.2.5)
2827
drb
2928
i18n (>= 1.6, < 2)
29+
json
3030
logger (>= 1.4.2)
3131
minitest (>= 5.1)
3232
securerandom (>= 0.3)
@@ -432,13 +432,14 @@ GEM
432432
rails-html-sanitizer (1.6.2)
433433
loofah (~> 2.21)
434434
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)
435-
railties (8.0.1)
436-
actionpack (= 8.0.1)
437-
activesupport (= 8.0.1)
435+
railties (8.1.2)
436+
actionpack (= 8.1.2)
437+
activesupport (= 8.1.2)
438438
irb (~> 1.13)
439439
rackup (>= 1.0.0)
440440
rake (>= 12.2)
441441
thor (~> 1.0, >= 1.2.2)
442+
tsort (>= 0.2)
442443
zeitwerk (~> 2.6)
443444
rainbow (3.1.1)
444445
rake (13.3.1)
@@ -569,9 +570,10 @@ PLATFORMS
569570
x86_64-linux
570571

571572
DEPENDENCIES
572-
actionpack (= 8.0.1)
573-
activemodel (= 8.0.1)
574-
activesupport (= 8.0.1)
573+
actionpack (= 8.1.2)
574+
activemodel (= 8.1.2)
575+
activesupport (= 8.1.2)
576+
benchmark
575577
bootsnap
576578
brakeman
577579
climate_control
@@ -587,7 +589,7 @@ DEPENDENCIES
587589
loofah
588590
prometheus-client
589591
pry-byebug
590-
railties (= 8.0.1)
592+
railties (= 8.1.2)
591593
redis
592594
redlock
593595
rspec-rails

bin/rubocop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require "rubygems"
33
require "bundler/setup"
44

5-
# explicit rubocop config increases performance slightly while avoiding config confusion.
5+
# Explicit RuboCop config increases performance slightly while avoiding config confusion.
66
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
77

88
load Gem.bin_path("rubocop", "rubocop")

config/application.rb

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,26 @@
1212

1313
module SearchApiV2
1414
class Application < Rails::Application
15-
config.load_defaults 8.0
15+
# Initialize configuration defaults for originally generated Rails version.
16+
config.load_defaults 8.1
17+
18+
# Please, add to the `ignore` list any other `lib` subdirectories that do
19+
# not contain `.rb` files, or that should not be reloaded or eager loaded.
20+
# Common ones are `templates`, `generators`, or `middleware`, for example.
21+
config.autoload_lib(ignore: %w[assets tasks])
22+
23+
# Configuration for the application, engines, and railties goes here.
24+
#
25+
# These settings can be overridden in specific environments using the files
26+
# in config/environments, which are processed later.
27+
1628
config.govuk_time_zone = "London"
29+
# config.time_zone = "Central Time (US & Canada)"
30+
# config.eager_load_paths << Rails.root.join("extras")
31+
32+
# Only loads a smaller set of middleware suitable for API only apps.
33+
# Middleware like session, flash, cookies can be added back manually.
34+
# Skip views, helpers and assets when generating a new resource.
1735
config.api_only = true
1836

1937
# Google Discovery Engine configuration

config/environments/development.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
# Print deprecation notices to the Rails logger.
3030
config.active_support.deprecation = :log
3131

32+
# Highlight code that triggered redirect in logs.
33+
config.action_dispatch.verbose_redirect_logs = true
34+
3235
# Raises error for missing translations.
3336
# config.i18n.raise_on_missing_translations = true
3437

@@ -41,6 +44,3 @@
4144
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
4245
config.generators.apply_rubocop_autocorrect_after_generate!
4346
end
44-
45-
# TODO: remove this workaround once GovukPrometheusExporter initialisation is fixed in govuk_app_config.
46-
ENV["GOVUK_PROMETHEUS_EXPORTER"] = "force"

config/environments/test.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,3 @@
4646
config.discovery_engine_default_collection_name = "[collection]"
4747
config.discovery_engine_default_location_name = "[location]"
4848
end
49-
50-
# TODO: remove this workaround once GovukPrometheusExporter initialisation is fixed in govuk_app_config.
51-
ENV["GOVUK_PROMETHEUS_EXPORTER"] = "force"

0 commit comments

Comments
 (0)