From d1365b67bd75db9e42f499f2cedf6a7ecdfc9132 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Tue, 30 Jul 2024 09:49:40 +0100 Subject: [PATCH] Drop support for Ruby 3.0 Fixes #8031 --- .github/workflows/ci.yml | 1 - .github/workflows/rubocop.yml | 2 +- .ruby-style.yml | 2 +- README.md | 1 - doc/CHANGES.md | 4 ++++ docker-compose.yml | 2 +- docker/Dockerfile | 2 +- gems/excel_analyzer/excel_analyzer.gemspec | 2 +- lib/tasks/config_files.rake | 8 ++++---- 9 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2550d0ad6b..a9164f85ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,6 @@ jobs: fail-fast: false matrix: include: - - { ruby: '3.0', postgres: 13.5 } - { ruby: '3.1', postgres: 13.5 } - { ruby: '3.2', postgres: 13.5 } diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 0f732cab36..3a0c56f579 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -18,7 +18,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.0 + ruby-version: 3.1 - name: Run RuboCop linter uses: reviewdog/action-rubocop@v2.14.0 diff --git a/.ruby-style.yml b/.ruby-style.yml index 1ca36320c2..9d65691cc6 100644 --- a/.ruby-style.yml +++ b/.ruby-style.yml @@ -5,7 +5,7 @@ require: - "./lib/custom_cops/empty_lines_around_rescued_exceptions.rb" AllCops: - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.1 RubyInterpreters: - ruby - rake diff --git a/README.md b/README.md index 455a6b5088..4db688dfad 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,6 @@ see [the project website](http://alaveteli.org) for instructions on installing A Every Alaveteli commit is tested by GitHub Actions on the [following Ruby platforms](https://github.com/mysociety/alaveteli/blob/develop/.github/workflows/ci.yml#L27-L29) -* ruby-3.0 * ruby-3.1 * ruby-3.2 diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 3106efa4b2..5a0822f0a9 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -2,6 +2,7 @@ ## Highlighted Features +* Drop support for Ruby 3.0 (Graeme Porteous) * Allow projects owners to publish datasets (Graeme Porteous) * Add comment deletion (Helen Cross, Graeme Porteous, Gareth Rees) * Show and allow creation of citations from info request batch pages (Graeme @@ -83,6 +84,9 @@ ## Upgrade Notes +* _Required:_ This upgrade requires upgrading Ruby from 3.0 to 3.1 or later. + We recommend upgrading to the Ruby 3.2. + * _Required:_ To migrate to the new `Category` feature, please run: bin/rails temp:migrate_public_body_categories diff --git a/docker-compose.yml b/docker-compose.yml index d827d5cda6..f092d28622 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: context: . dockerfile: docker/Dockerfile args: - RUBY_VERSION: '${RUBY_VERSION:-3.0}' + RUBY_VERSION: '${RUBY_VERSION:-3.1}' command: bundle exec sidekiq volumes: - ./:/alaveteli diff --git a/docker/Dockerfile b/docker/Dockerfile index c2b7f245e0..aa658ad685 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG RUBY_VERSION=3.0 +ARG RUBY_VERSION=3.1 FROM ruby:${RUBY_VERSION}-bullseye ENV DOCKER 1 diff --git a/gems/excel_analyzer/excel_analyzer.gemspec b/gems/excel_analyzer/excel_analyzer.gemspec index efd5355ad8..5731f6c5dc 100644 --- a/gems/excel_analyzer/excel_analyzer.gemspec +++ b/gems/excel_analyzer/excel_analyzer.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.summary = "File analysers for ActiveStorage" spec.description = "Extra ActiveStorage Analysers for Alaveteli" spec.homepage = "https://alaveteli.org" - spec.required_ruby_version = ">= 3.0.0" + spec.required_ruby_version = ">= 3.1.0" spec.metadata["homepage_uri"] = spec.homepage diff --git a/lib/tasks/config_files.rake b/lib/tasks/config_files.rake index 3161c7758f..aa2bd8a0d7 100644 --- a/lib/tasks/config_files.rake +++ b/lib/tasks/config_files.rake @@ -29,7 +29,7 @@ namespace :config_files do cpus: ENV.fetch('CPUS') { '1' }, mailto: ENV.fetch('MAILTO') { "#{ ENV['DEPLOY_USER'] }@localhost" }, rails_env: ENV.fetch('RAILS_ENV') { 'development' }, - ruby_version: ENV.fetch('RUBY_VERSION') { '3.0.4' }, + ruby_version: ENV.fetch('RUBY_VERSION') { '3.1.5' }, site: ENV.fetch('SITE') { 'foi' }, user: ENV.fetch('DEPLOY_USER') { 'alaveteli' }, vcspath: ENV.fetch('VCSPATH') { 'alaveteli' }, @@ -123,7 +123,7 @@ namespace :config_files do 'VCSPATH=alaveteli ' \ 'SITE=alaveteli ' \ 'SCRIPT_FILE=config/sysvinit-thin.example ' \ - 'RUBY_VERSION=3.0.4 ' \ + 'RUBY_VERSION=3.1.5 ' \ 'USE_RBENV=false ' check_for_env_vars(%w[DEPLOY_USER VHOST_DIR SCRIPT_FILE], example) @@ -147,7 +147,7 @@ namespace :config_files do 'VCSPATH=alaveteli ' \ 'SITE=alaveteli ' \ 'DAEMON=alert-tracks.service ' \ - 'RUBY_VERSION=3.0.4 ' \ + 'RUBY_VERSION=3.1.5 ' \ 'USE_RBENV=false ' check_for_env_vars(%w[DEPLOY_USER VHOST_DIR DAEMON], example) @@ -167,7 +167,7 @@ namespace :config_files do 'VHOST_DIR=/dir/above/alaveteli VCSPATH=alaveteli ' \ 'SITE=alaveteli CRONTAB=config/crontab-example ' \ 'MAILTO=cron-alaveteli@example.org ' \ - 'RUBY_VERSION=3.0.4 ' \ + 'RUBY_VERSION=3.1.5 ' \ 'USE_RBENV=false ' check_for_env_vars(%w[DEPLOY_USER VHOST_DIR VCSPATH SITE CRONTAB], example) convert_erb(ENV['CRONTAB'], **default_replacements)