Skip to content

Commit 092e10c

Browse files
committed
Upgrade Rails 7.0.8 to 8.1.2 and Ruby to 4.0.1
Rails upgrades: - 7.0.8 -> 7.1.5 -> 7.2.2.1 -> 8.0.2 -> 8.1.2 - Updated config.load_defaults to 8.1 - Fixed Rakefile for Rails 7.1+ test runner - Added maildown compatibility fix for Rails 7.1+ - Configured Active Job test adapter Ruby/gem compatibility: - Updated .ruby-version to 4.0.1 - Replaced sentry-raven with sentry-ruby + sentry-rails - Fixed local-time asset path for v3.x - Fixed Mocha mock for Ruby 3.x+ keyword args - Added ostruct gem for Ruby 4.0+ CI updates: - Use ruby-version-file to read from .ruby-version - Add concurrency control - Upgrade postgres to 16
1 parent 3abba85 commit 092e10c

26 files changed

+797
-460
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ on: [push, pull_request]
44
jobs:
55
base:
66
runs-on: ubuntu-latest
7-
strategy:
8-
fail-fast: false
9-
matrix:
10-
ruby: ["3.2.9"]
11-
name: Running tests with Ruby ${{ matrix.ruby }}
7+
name: Tests
128
services:
139
postgres:
14-
image: postgres:12
10+
image: postgres:16
1511
env:
1612
POSTGRES_DB: triage_test
1713
POSTGRES_PASSWORD: password
@@ -22,12 +18,11 @@ jobs:
2218

2319
steps:
2420
- name: Checkout code
25-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2622

2723
- name: Setup Ruby
2824
uses: ruby/setup-ruby@v1
2925
with:
30-
ruby-version: ${{ matrix.ruby }}
3126
bundler-cache: true
3227
- name: Linting
3328
run: |
@@ -40,4 +35,3 @@ jobs:
4035
run: bin/rake test
4136
- name: Ensure seed task still works
4237
run: RAILS_ENV=test bin/rails db:seed
43-

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
.DS_Store
1818
.rvmrc
19-
.ruby-version
2019
.ruby-gemset
2120

2221

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.0.1

Gemfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ git_source(:github) do |repo_name|
77
"https://github.com/#{repo_name}.git"
88
end
99

10-
ruby ">= 3.1", "< 3.3"
10+
ruby file: ".ruby-version"
1111

1212
git_source :github do |name|
1313
"https://github.com/#{name}.git"
@@ -17,7 +17,7 @@ end
1717
if ENV["RAILS_MASTER"] == "1"
1818
gem "rails", git: "https://github.com/rails/rails.git"
1919
else
20-
gem "rails", "7.0.8"
20+
gem "rails", "8.1.2"
2121
end
2222

2323
# API & Networking
@@ -91,7 +91,8 @@ gem "prawn"
9191
gem "rack-mini-profiler"
9292
gem "rails-autoscale-web"
9393
gem "rbtrace"
94-
gem "sentry-raven"
94+
gem "sentry-ruby"
95+
gem "sentry-rails"
9596
gem "scout_apm"
9697
gem "skylight"
9798
gem "stackprof"
@@ -103,6 +104,7 @@ gem "sitemap_generator"
103104
gem "aws-sdk-s3"
104105

105106
# Utilities
107+
gem "ostruct" # Required for Ruby 4.0+
106108
gem "rake"
107109
gem "rrrretry"
108110

@@ -119,7 +121,7 @@ end
119121
group :test do
120122
gem "capybara"
121123
gem "launchy" # Not essential but helpful for save_and_open_page
122-
gem "minitest"
124+
gem "minitest", "< 6.0" # Pin to < 6.0 for Rails 7.1 compatibility
123125
gem "mocha", require: false
124126
gem "rails-controller-testing"
125127
gem "simplecov", require: false
@@ -133,6 +135,7 @@ group :development, :test do
133135
gem "dotenv-rails"
134136
gem "faker", require: false
135137
gem "pry"
138+
gem "standard", ">= 1.35.1"
136139
gem "standardrb", require: false
137140
gem "rubocop-performance"
138141
end

0 commit comments

Comments
 (0)