From d568934312bd199de9fdfa7a90f8af50f3df0e6f Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Mon, 12 Feb 2024 10:43:00 +0000 Subject: [PATCH 1/3] Update to Ruby 3.3. Ruby 3.3 requires govuk_app_config 9.8.2. --- .ruby-version | 2 +- Dockerfile | 2 +- Gemfile.lock | 82 +++++++++++++++++++++++++-------------------------- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.ruby-version b/.ruby-version index be94e6f..15a2799 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.2 +3.3.0 diff --git a/Dockerfile b/Dockerfile index f2cff8d..f38e97f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG ruby_version=3.2 +ARG ruby_version=3.3 ARG base_image=ghcr.io/alphagov/govuk-ruby-base:$ruby_version ARG builder_image=ghcr.io/alphagov/govuk-ruby-builder:$ruby_version diff --git a/Gemfile.lock b/Gemfile.lock index 16c5d1d..0d212dc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,7 +83,7 @@ GEM ci_reporter (~> 2.0) rspec (>= 2.14, < 4) climate_control (1.2.0) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) crack (0.4.5) rexml crass (1.0.6) @@ -115,13 +115,13 @@ GEM warden-oauth2 (~> 0.0.1) globalid (1.2.1) activesupport (>= 6.1) - google-protobuf (3.25.1) + google-protobuf (3.25.2) googleapis-common-protos-types (1.11.0) google-protobuf (~> 3.18) - govuk_app_config (9.7.0) + govuk_app_config (9.8.2) logstasher (~> 2.1) opentelemetry-exporter-otlp (>= 0.25, < 0.27) - opentelemetry-instrumentation-all (>= 0.39.1, < 0.52.0) + opentelemetry-instrumentation-all (>= 0.39.1, < 0.57.0) opentelemetry-sdk (~> 1.2) plek (>= 4, < 6) prometheus_exporter (~> 2.0) @@ -152,7 +152,7 @@ GEM method_source (1.0.0) mini_mime (1.1.5) mini_portile2 (2.8.5) - minitest (5.20.0) + minitest (5.22.2) mongo (2.15.1) bson (>= 4.8.2, < 5.0.0) mongoid (7.5.4) @@ -188,38 +188,38 @@ GEM omniauth-oauth2 (1.8.0) oauth2 (>= 1.4, < 3) omniauth (~> 2.0) - opentelemetry-api (1.2.3) - opentelemetry-common (0.20.0) + opentelemetry-api (1.2.4) + opentelemetry-common (0.20.1) opentelemetry-api (~> 1.0) - opentelemetry-exporter-otlp (0.26.1) + opentelemetry-exporter-otlp (0.26.3) google-protobuf (~> 3.14) googleapis-common-protos-types (~> 1.3) opentelemetry-api (~> 1.1) opentelemetry-common (~> 0.20) opentelemetry-sdk (~> 1.2) opentelemetry-semantic_conventions - opentelemetry-instrumentation-action_pack (0.7.1) + opentelemetry-instrumentation-action_pack (0.9.0) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-rack (~> 0.21) - opentelemetry-instrumentation-action_view (0.6.1) + opentelemetry-instrumentation-action_view (0.7.0) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-active_support (~> 0.1) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-active_job (0.6.1) + opentelemetry-instrumentation-active_job (0.7.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-active_model_serializers (0.20.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-active_record (0.6.3) + opentelemetry-instrumentation-active_record (0.7.0) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) ruby2_keywords - opentelemetry-instrumentation-active_support (0.4.4) + opentelemetry-instrumentation-active_support (0.5.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-all (0.51.1) + opentelemetry-instrumentation-all (0.56.0) opentelemetry-instrumentation-active_model_serializers (~> 0.20.1) opentelemetry-instrumentation-aws_sdk (~> 0.5.0) opentelemetry-instrumentation-bunny (~> 0.21.0) @@ -227,10 +227,10 @@ GEM opentelemetry-instrumentation-dalli (~> 0.25.0) opentelemetry-instrumentation-delayed_job (~> 0.22.0) opentelemetry-instrumentation-ethon (~> 0.21.1) - opentelemetry-instrumentation-excon (~> 0.21.1) + opentelemetry-instrumentation-excon (~> 0.22.0) opentelemetry-instrumentation-faraday (~> 0.23.1) opentelemetry-instrumentation-grape (~> 0.1.3) - opentelemetry-instrumentation-graphql (~> 0.26.2) + opentelemetry-instrumentation-graphql (~> 0.27.0) opentelemetry-instrumentation-gruf (~> 0.1.0) opentelemetry-instrumentation-http (~> 0.23.1) opentelemetry-instrumentation-http_client (~> 0.22.1) @@ -242,8 +242,8 @@ GEM opentelemetry-instrumentation-pg (~> 0.26.0) opentelemetry-instrumentation-que (~> 0.7.0) opentelemetry-instrumentation-racecar (~> 0.3.0) - opentelemetry-instrumentation-rack (~> 0.23.1) - opentelemetry-instrumentation-rails (~> 0.28.0) + opentelemetry-instrumentation-rack (~> 0.24.0) + opentelemetry-instrumentation-rails (~> 0.30.0) opentelemetry-instrumentation-rake (~> 0.2.1) opentelemetry-instrumentation-rdkafka (~> 0.4.0) opentelemetry-instrumentation-redis (~> 0.25.1) @@ -252,14 +252,14 @@ GEM opentelemetry-instrumentation-ruby_kafka (~> 0.21.0) opentelemetry-instrumentation-sidekiq (~> 0.25.0) opentelemetry-instrumentation-sinatra (~> 0.23.1) - opentelemetry-instrumentation-trilogy (~> 0.57.0) - opentelemetry-instrumentation-aws_sdk (0.5.0) + opentelemetry-instrumentation-trilogy (~> 0.58.0) + opentelemetry-instrumentation-aws_sdk (0.5.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-base (0.22.3) opentelemetry-api (~> 1.0) opentelemetry-registry (~> 0.1) - opentelemetry-instrumentation-bunny (0.21.1) + opentelemetry-instrumentation-bunny (0.21.2) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-concurrent_ruby (0.21.2) @@ -276,7 +276,7 @@ GEM opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-excon (0.21.3) + opentelemetry-instrumentation-excon (0.22.0) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) @@ -288,7 +288,7 @@ GEM opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-rack (~> 0.21) - opentelemetry-instrumentation-graphql (0.26.8) + opentelemetry-instrumentation-graphql (0.27.0) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-gruf (0.1.1) @@ -327,17 +327,17 @@ GEM opentelemetry-instrumentation-racecar (0.3.0) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-rack (0.23.5) + opentelemetry-instrumentation-rack (0.24.0) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-rails (0.28.1) + opentelemetry-instrumentation-rails (0.30.0) opentelemetry-api (~> 1.0) - opentelemetry-instrumentation-action_pack (~> 0.7.0) - opentelemetry-instrumentation-action_view (~> 0.6.0) - opentelemetry-instrumentation-active_job (~> 0.6.0) - opentelemetry-instrumentation-active_record (~> 0.6.1) - opentelemetry-instrumentation-active_support (~> 0.4.1) + opentelemetry-instrumentation-action_pack (~> 0.9.0) + opentelemetry-instrumentation-action_view (~> 0.7.0) + opentelemetry-instrumentation-active_job (~> 0.7.0) + opentelemetry-instrumentation-active_record (~> 0.7.0) + opentelemetry-instrumentation-active_support (~> 0.5.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-rake (0.2.1) opentelemetry-api (~> 1.0) @@ -350,7 +350,7 @@ GEM opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-resque (0.5.0) + opentelemetry-instrumentation-resque (0.5.1) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-restclient (0.22.3) @@ -360,7 +360,7 @@ GEM opentelemetry-instrumentation-ruby_kafka (0.21.0) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-sidekiq (0.25.0) + opentelemetry-instrumentation-sidekiq (0.25.2) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) @@ -369,13 +369,13 @@ GEM opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-instrumentation-rack (~> 0.21) - opentelemetry-instrumentation-trilogy (0.57.0) + opentelemetry-instrumentation-trilogy (0.58.0) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-semantic_conventions (>= 1.8.0) opentelemetry-registry (0.3.0) opentelemetry-api (~> 1.1) - opentelemetry-sdk (1.3.1) + opentelemetry-sdk (1.4.0) opentelemetry-api (~> 1.1) opentelemetry-common (~> 0.20) opentelemetry-registry (~> 0.2) @@ -387,7 +387,7 @@ GEM ast (~> 2.4.1) racc plek (5.0.0) - prometheus_exporter (2.0.8) + prometheus_exporter (2.1.0) webrick public_suffix (5.0.4) puma (6.4.2) @@ -433,7 +433,7 @@ GEM rainbow (3.1.1) rake (13.1.0) regexp_parser (2.8.3) - request_store (1.5.1) + request_store (1.6.0) rack (>= 1.4) rexml (3.2.6) rspec (3.12.0) @@ -492,10 +492,10 @@ GEM rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - sentry-rails (5.15.0) + sentry-rails (5.16.1) railties (>= 5.0) - sentry-ruby (~> 5.15.0) - sentry-ruby (5.15.0) + sentry-ruby (~> 5.16.1) + sentry-ruby (5.16.1) concurrent-ruby (~> 1.0, >= 1.0.2) simplecov (0.22.0) docile (~> 1.1) @@ -525,7 +525,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.12) + zeitwerk (2.6.13) PLATFORMS ruby @@ -550,4 +550,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.4.22 + 2.5.6 From d74b0d5243793058e520a132d1cde2db1067c1f1 Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Mon, 12 Feb 2024 10:44:10 +0000 Subject: [PATCH 2/3] Update dependencies. Generated with `bundle update`. --- Gemfile.lock | 103 +++++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0d212dc..4af45c0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,9 +70,11 @@ GEM public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) base64 (0.2.0) - bootsnap (1.17.0) + bigdecimal (3.1.6) + bootsnap (1.18.3) msgpack (~> 1.2) - brakeman (6.1.0) + brakeman (6.1.2) + racc bson (4.15.0) builder (3.2.4) byebug (11.1.3) @@ -84,7 +86,8 @@ GEM rspec (>= 2.14, < 4) climate_control (1.2.0) concurrent-ruby (1.2.3) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) database_cleaner-core (2.0.1) @@ -92,20 +95,19 @@ GEM database_cleaner-core (~> 2.0.0) mongoid date (3.3.4) - diff-lcs (1.5.0) + diff-lcs (1.5.1) docile (1.4.0) erubi (1.12.0) - factory_bot (6.4.2) + factory_bot (6.4.6) activesupport (>= 5.0.0) - factory_bot_rails (6.4.2) + factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) - faraday (2.7.12) - base64 - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-net_http (3.0.2) - gds-sso (18.1.0) + faraday (2.9.0) + faraday-net_http (>= 2.0, < 3.2) + faraday-net_http (3.1.0) + net-http + gds-sso (19.0.0) oauth2 (~> 2.0) omniauth (~> 2.1) omniauth-oauth2 (~> 1.8) @@ -130,7 +132,7 @@ GEM sentry-rails (~> 5.3) sentry-ruby (~> 5.3) statsd-ruby (~> 1.5) - hashdiff (1.0.1) + hashdiff (1.1.0) hashie (5.0.0) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -161,14 +163,16 @@ GEM ruby2_keywords (~> 0.0.5) msgpack (1.7.2) multi_xml (0.6.0) - net-imap (0.4.7) + net-http (0.4.1) + uri + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.4.0.1) net-protocol nio4r (2.7.0) nokogiri (1.16.2) @@ -181,7 +185,7 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - omniauth (2.1.1) + omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection @@ -382,8 +386,8 @@ GEM opentelemetry-semantic_conventions opentelemetry-semantic_conventions (1.10.0) opentelemetry-api (~> 1.0) - parallel (1.23.0) - parser (3.2.2.4) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) racc plek (5.0.0) @@ -396,7 +400,8 @@ GEM rack (2.2.8) rack-handlers (0.7.3) rack - rack-protection (3.1.0) + rack-protection (3.2.0) + base64 (>= 0.1.0) rack (~> 2.2, >= 2.2.4) rack-proxy (0.7.7) rack @@ -432,23 +437,23 @@ GEM zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.1.0) - regexp_parser (2.8.3) + regexp_parser (2.9.0) request_store (1.6.0) rack (>= 1.4) rexml (3.2.6) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.1.0) + rspec-support (~> 3.13.0) + rspec-rails (6.1.1) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) @@ -456,38 +461,39 @@ GEM rspec-expectations (~> 3.12) rspec-mocks (~> 3.12) rspec-support (~> 3.12) - rspec-support (3.12.1) - rubocop (1.55.0) + rspec-support (3.13.0) + rubocop (1.60.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-capybara (2.19.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-factory_bot (2.24.0) - rubocop (~> 1.33) - rubocop-govuk (4.12.0) - rubocop (= 1.55.0) - rubocop-ast (= 1.29.0) - rubocop-rails (= 2.20.2) + rubocop-govuk (4.14.0) + rubocop (= 1.60.2) + rubocop-ast (= 1.30.0) + rubocop-rails (= 2.23.1) rubocop-rake (= 0.6.0) - rubocop-rspec (= 2.22.0) - rubocop-rails (2.20.2) + rubocop-rspec (= 2.26.1) + rubocop-rails (2.23.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.22.0) - rubocop (~> 1.33) + rubocop-rspec (2.26.1) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) @@ -512,12 +518,13 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) + uri (0.13.0) version_gem (1.1.3) warden (1.2.9) rack (>= 2.0.9) warden-oauth2 (0.0.1) warden - webmock (3.19.1) + webmock (3.20.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) From b4474ebe798726d35bde86f5ab515df89de51214 Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Mon, 12 Feb 2024 10:49:32 +0000 Subject: [PATCH 3/3] rubocop -A --- lib/tasks/backend.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/backend.rake b/lib/tasks/backend.rake index 9633616..c45e9e1 100644 --- a/lib/tasks/backend.rake +++ b/lib/tasks/backend.rake @@ -26,7 +26,7 @@ namespace :backend do search_string = args[:search_string] replace_string = args[:replace_string] - Backend.all.each do |backend| + Backend.all.find_each do |backend| old_url = backend.backend_url new_url = old_url.gsub(search_string, replace_string)