From ee76bd10d7062e9bbd9358977e8039b02fb246cb Mon Sep 17 00:00:00 2001 From: Callum Knights Date: Fri, 27 Oct 2023 09:11:44 +0100 Subject: [PATCH 1/3] Upgrade Ruby to 3.2.2 --- .ruby-version | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index ef538c281..be94e6f53 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.2 +3.2.2 diff --git a/Dockerfile b/Dockerfile index 128a9b6be..693edd2e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG ruby_version=3.1.2 +ARG ruby_version=3.2.2 ARG base_image=ghcr.io/alphagov/govuk-ruby-base:$ruby_version ARG builder_image=ghcr.io/alphagov/govuk-ruby-builder:$ruby_version From 98213940ec9f9728109d337385a349e565e4bc88 Mon Sep 17 00:00:00 2001 From: Callum Knights Date: Fri, 27 Oct 2023 09:12:58 +0100 Subject: [PATCH 2/3] Upgrade Jsonnet to latest, 0.4.0 incompatible with Ruby 3.2.2 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 7e1cb6361..bb487b434 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ gem "govuk_app_config" gem "govuk_document_types" gem "govuk_schemas" gem "govuk_sidekiq" -gem "jsonnet", "~>0.4.0" # 0.5 (current latest) does not currently compile on our CI machines +gem "jsonnet" gem "json-schema", require: false gem "oj" gem "pg" diff --git a/Gemfile.lock b/Gemfile.lock index 323384e3d..296727644 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -243,7 +243,7 @@ GEM json (2.6.3) json-schema (4.1.1) addressable (>= 2.8) - jsonnet (0.4.0) + jsonnet (0.5.3) mini_portile2 (>= 2.2.0) jwt (2.7.1) kramdown (2.4.0) @@ -782,7 +782,7 @@ DEPENDENCIES govuk_sidekiq govuk_test json-schema - jsonnet (~> 0.4.0) + jsonnet listen oj pact From 8cc2b5a559b664a1a5760cbc6ce593002d337963 Mon Sep 17 00:00:00 2001 From: Callum Knights Date: Fri, 27 Oct 2023 11:14:43 +0100 Subject: [PATCH 3/3] Change organisation UUID test case to string Regex implementation has changed in Ruby 3.2.2, so `=~` comparisons against Integers now produce an error. --- spec/models/access_limit_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/access_limit_spec.rb b/spec/models/access_limit_spec.rb index d0d762193..c0b13215e 100644 --- a/spec/models/access_limit_spec.rb +++ b/spec/models/access_limit_spec.rb @@ -30,8 +30,8 @@ it { is_expected.to be_valid } end - context "where users has an array with an integer" do - let(:organisations) { [123] } + context "where users has an array with an invalid UUID" do + let(:organisations) { %w[123] } it { is_expected.to be_invalid } end end