Skip to content

Rails 8.1 / Ruby 4.0.5 support (omniauth 1→2)#5

Draft
lleirborras wants to merge 2 commits into
masterfrom
upgrade/rails-8.1-ruby-4
Draft

Rails 8.1 / Ruby 4.0.5 support (omniauth 1→2)#5
lleirborras wants to merge 2 commits into
masterfrom
upgrade/rails-8.1-ruby-4

Conversation

@lleirborras

Copy link
Copy Markdown
Member

Summary

Brings the IFAD omniauth-cas fork up to omniauth 2 / Rack 3 / Ruby 4.0.5 for the fleet upgrade. Draft — opened for review/CI while its consumers (noobs, orms) are on their own staircases.

What changed

  • omniauth ~> 1.2~> 2.0 — omniauth 1.x is incompatible with Rack 3.
  • Loosen nokogiri >= 1.10, addressable >= 2.3.
  • CI runs the smoke (test/smoke.rb) across Ruby 2.6 / 2.7 / 3.0 / 3.4 / 4.0.5 via each Ruby's official Docker image. required_ruby_version >= 2.6.

Ruby coverage

Covers the fork's consumers — noobs (Ruby 2.6) and orms (3.0) — through to 4.0.5. omniauth ~> 2.0 resolves omniauth 2.1.x, which runs on Ruby 2.6 (verified green).

Consider before merge: retire the fork?

Only noobs and orms use this IFAD fork; imf and ldapr already use the released rubygems omniauth-cas. If the public gem's current 3.x covers noobs/orms' CAS needs, the cleaner end state is to retire this fork and switch noobs/orms to the released gem (same pattern as the sentry-legacy fork). This PR keeps the fork working in the meantime.

How to test

docker run --rm -v "$PWD":/gem -w /gem -e BUNDLE_GEMFILE=test/Gemfile.ci \
  -e BUNDLE_FORCE_RUBY_PLATFORM=true ruby:2.6 \
  bash -c 'rm -f test/*.lock && bundle install --quiet && bundle exec ruby test/smoke.rb'

Verified green on 2.6 and 4.0.5.

lleirborras and others added 2 commits June 19, 2026 13:59
The gem pinned `omniauth ~> 1.2`, which is incompatible with Rack 3. Bump it to
`~> 2.0` and loosen `nokogiri` (>= 1.10) and `addressable` (>= 2.3). The CAS
strategy uses the standard OmniAuth::Strategy DSL and runs on omniauth 2 / Rack 3
unchanged; the single-sign-out callback already returns a Rack 3-compatible
response.

Add a self-contained smoke harness (test/smoke.rb) that boots an OmniAuth::Builder
app with the CAS provider and drives the request phase (302 redirect to the CAS
login URL), plus a CI matrix over Ruby 4.0.5/3.4/3.2. Verified green on Ruby
4.0.5 and 3.4 with omniauth 2.1.4 / Rack 3.

Note: omniauth 2 defaults the request phase to POST-only — consuming apps need
omniauth-rails_csrf_protection (an app-side change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover the fork's consumers — noobs (Ruby 2.6) and orms (3.0) — up to the 4.0.5
target. omniauth ~> 2.0 resolves omniauth 2.1.x, which runs on 2.6 (verified
green). Run the smoke in each Ruby's official Docker image (GitHub-hosted runners
can't install <= 2.6) with BUNDLE_FORCE_RUBY_PLATFORM. required_ruby_version >= 2.6.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant