Commit 2aa2d8e
committed
Fix CI matrix on Ruby 3.x + Rails 5.2/6.0/6.1: require "logger" before rails
Phase 2a's integration test scaffolding (spec/rails_helper.rb and
spec/dummy/config/application.rb) both do `require "rails"` eagerly.
ActiveSupport 5.2/6.0/6.1 references `Logger::Severity` inside
lib/active_support/logger_thread_safe_level.rb without first requiring
"logger" — this works on Ruby 2.x (Logger was more eagerly autoloaded)
but raises
NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
on Ruby 3.x. Rails 7.0+ fixed this at the ActiveSupport level; older
Rails combined with Ruby 3.x needs an explicit `require "logger"` before
any AS/Rails code runs.
Matrix cells affected (from the 0.5.0 publish cycle's CI run 24290748435):
- Ruby 2.7 x Rails 6.0, 6.1
- Ruby 3.0 x Rails 5.2, 6.0, 6.1
- Ruby 3.1 x Rails 6.0, 6.1
- Ruby 3.2 x Rails 6.1
- Ruby 3.3 x Rails 6.1
All Rails 7.0+ cells (all Ruby versions) pass unchanged.
Fix is test-support-only — `spec/rails_helper.rb` and
`spec/dummy/config/application.rb` both gain a single `require "logger"`
at the top, before their `require "rails"`. Zero runtime impact on the
shipped gems (these files are not in spec.files for either gem).
This is a pure CI cleanup for 0.5.0 — no new release needed.1 parent 38b7804 commit 2aa2d8e
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
5 | 12 | | |
6 | 13 | | |
7 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
0 commit comments