Skip to content

Commit aef1ba9

Browse files
Ithanilfarhatahmad
andauthored
Upgrade to Rails 7.2, Ruby 3.3, Alpine 3.20 (#5976)
* bump ruby to 3.3 and alpine to 3.20 * bump rails to 7.2 * merge in changes from rails update and rake db:schema:dump * bump rspec-rails and explicitly add nkf (will be removed from default gems in Ruby 3.4) * switch to Rails 7.2 defaults * update data_migrate to fix error on db:migrate:with_data * resolve magick-related Rspec failures on Github CI * address deprecation / upcoming removal of mutex_m from default gems (in Ruby 3.4) * bump some gems and resolve remaining deprecations for Rails 8.0 * amazonlinux build with Ruby 3.3 * pin ruby image to 3.3 in Dockerfile --------- Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>
1 parent 5e1dbb4 commit aef1ba9

28 files changed

+1215
-957
lines changed

.github/workflows/ci.build.prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
env:
2-
RUBY_VERSION: 3.1
2+
RUBY_VERSION: 3.3
33

44
name: CI Build Pre-Release
55
on:

.github/workflows/ci.build.push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
env:
2-
RUBY_VERSION: 3.1
2+
RUBY_VERSION: 3.3
33

44
name: CI Build Push
55
on:

.github/workflows/ci.build.release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
env:
2-
RUBY_VERSION: 3.1
2+
RUBY_VERSION: 3.3
33

44
name: CI Build Release
55
on:
@@ -13,7 +13,7 @@ jobs:
1313
DOCKER_REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }}
1414
DOCKER_BUILD_ENABLED: ${{ secrets.DOCKER_BUILD_ENABLED }}
1515
DOCKER_BUILD_ALTERNATE_ENABLED: ${{ secrets.DOCKER_BUILD_ALTERNATE_ENABLED }}
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-24.04
1717
steps:
1818
- name: Checkout
1919
if: contains(env.DOCKER_BUILD_ENABLED, 'true')

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
env:
2-
RUBY_VERSION: 3.1.0
2+
RUBY_VERSION: 3.3
33
DATABASE_URL: postgres://postgres:postgres@localhost/greenlight-actions
44
RAILS_ENV: test
55

@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
test:
1313
name: Rubocop + RSpec + ESLint + License Header Check
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-24.04
1515

1616
services:
1717
postgres:
@@ -37,6 +37,9 @@ jobs:
3737
with:
3838
ruby-version: ${{ env.RUBY_VERSION }}
3939

40+
- name: Install imagemagick
41+
run: sudo apt-get install -y imagemagick
42+
4043
- name: Bundle cache
4144
uses: actions/cache@v2
4245
with:

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ AllCops:
1414
- 'vendor/bundle/**/*'
1515
- 'config/routes.rb'
1616
DisabledByDefault: false
17-
TargetRubyVersion: 3.1
17+
TargetRubyVersion: 3.3
1818
NewCops: enable
1919

2020
# Document classes and non-namespace modules.

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:alpine3.17 AS base
1+
FROM ruby:3.3-alpine3.20 AS base
22

33
ARG RAILS_ROOT=/usr/src/app
44
ENV RAILS_ROOT=${RAILS_ROOT}

Gemfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@
33
source 'https://rubygems.org'
44
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
55

6-
ruby '>= 3.0'
6+
ruby '>= 3.3'
77

8-
gem 'active_model_serializers', '>= 0.10.14'
9-
gem 'active_storage_validations', '>= 1.1.0'
8+
gem 'active_model_serializers', '>= 0.10.15'
9+
gem 'active_storage_validations', '>= 1.3.4'
1010
gem 'aws-sdk-s3', require: false
1111
gem 'bcrypt', '~> 3.1.7'
1212
gem 'bigbluebutton-api-ruby', '1.9.1'
1313
gem 'bootsnap', require: false
1414
gem 'clamby', '~> 1.6.10'
1515
gem 'cssbundling-rails', '>= 1.3.3'
16-
gem 'data_migrate', '>= 9.4.0'
16+
gem 'data_migrate', '>= 11.2'
1717
gem 'dotenv-rails'
1818
gem 'google-cloud-storage', '~> 1.44', require: false
1919
gem 'hcaptcha'
20-
gem 'hiredis', '~> 0.6.0'
2120
gem 'i18n-language-mapping'
2221
gem 'image_processing', '~> 1.2'
23-
gem 'jbuilder'
22+
gem 'jbuilder', '>= 2.12'
2423
gem 'jsbundling-rails', '>= 1.2.2'
2524
gem 'jwt'
2625
gem 'mini_magick', '>= 4.9.5'
26+
gem 'nkf', '~> 0.2.0'
2727
gem 'omniauth', '~> 2.1.2'
2828
gem 'omniauth_openid_connect', '>= 0.6.1'
2929
gem 'omniauth-rails_csrf_protection', '~> 1.0.2'
3030
gem 'pagy', '~> 6.0', '>= 6.0.0'
3131
gem 'pg'
32-
gem 'puma', '~> 5.6'
33-
gem 'rails', '~> 7.1.4', '>= 7.1.4.1'
34-
gem 'redis', '~> 4.0'
32+
gem 'puma', '~> 6.4'
33+
gem 'rails', '~> 7.2.2'
34+
gem 'redis', '~> 4.8.0'
3535
gem 'sprockets-rails', '>= 3.5.0'
3636
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
3737

@@ -54,11 +54,11 @@ group :test do
5454
gem 'factory_bot', '>= 6.4.1'
5555
gem 'factory_bot_rails', '>= 6.4.3'
5656
gem 'faker'
57-
gem 'rspec-rails', '>= 6.0.4'
57+
gem 'rspec-rails', '~> 7.1'
5858
gem 'selenium-webdriver'
5959
gem 'shoulda-matchers', '~> 5.0'
6060
gem 'webdrivers'
61-
gem 'webmock'
61+
gem 'webmock', '>= 3.23.1'
6262
end
6363

6464
group :production do

0 commit comments

Comments
 (0)