Merged
Conversation
Add .ruby-version as single source of truth for CI workflows. Update devbox, Dockerfile, and CI workflows for Ruby 4.0. Expand integration test matrix to include Ruby 3.4 and 4.0. Add formerly-default gems as explicit dependencies for Ruby 4.0 compatibility (cgi, date, logger, net-http, tempfile, time, uri). Wrap rdoc/task require for Ruby 4.0 where rdoc is no longer a default gem.
The previous pin (v1.242.0) predates Ruby 4.0 and does not include it in its available versions list.
The sanity stub's Gemfile.lock specifies BUNDLED WITH 2.2.33 which is incompatible with Ruby 3.4+ (DidYouMean::SPELL_CHECKERS removed). By removing bundler-cache, the default bundler shipped with each Ruby version is used instead. The next step already runs bundle install.
The sanity stub's Gemfile.lock on main specifies BUNDLED WITH 2.2.33. Bundler downgrades itself to that version which is incompatible with Ruby 3.4+ (DidYouMean::SPELL_CHECKERS removed). Removing the lockfile lets the default bundler resolve dependencies fresh.
There was a problem hiding this comment.
Pull request overview
This PR updates the project to support Ruby 4.0 while keeping Ruby 3.x compatibility, mainly by making Ruby-version selection consistent across dev/CI tooling and explicitly depending on stdlib gems that are no longer default in Ruby 4.
Changes:
- Add explicit runtime gem dependencies (e.g.,
cgi,date,logger,net-http,tempfile,time,uri) to avoid Ruby 4 LoadErrors. - Introduce
.ruby-versionand update CI workflows to rely on it; expand the integration matrix to include Ruby 3.4 and 4.0. - Update devbox and Docker setup to Ruby 4.0, and adjust Rake tasks to tolerate
rdocbeing absent.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
zitadel-client.gemspec |
Adds explicit runtime dependencies for stdlib gems removed from Ruby 4’s default set. |
Gemfile.lock |
Updates locked dependency graph to reflect new runtime deps and Bundler version. |
Gemfile |
Adds securerandom for test/integration specs that require it under Ruby 4. |
Rakefile |
Makes rdoc task optional when rdoc isn’t installed. |
Dockerfile |
Switches base image to Ruby 4.0. |
.ruby-version |
Establishes Ruby 4.0 as the repo’s default Ruby version. |
devbox.json / devbox.lock |
Updates devbox environment to Ruby 4.0 and adds clang tooling. |
.github/workflows/typecheck.yml |
Uses ruby/setup-ruby without hardcoding Ruby 3.0 (implicitly relies on .ruby-version). |
.github/workflows/test.yml |
Same as typecheck: relies on .ruby-version instead of hardcoding. |
.github/workflows/linting.yml |
Same: relies on .ruby-version and bumps setup-ruby action pin. |
.github/workflows/release.yml |
Same: relies on .ruby-version and bumps setup-ruby action pin. |
.github/workflows/integration.yml |
Expands Ruby matrix to 3.0–4.0; removes lockfile before bundle install in sanity project. |
spec/spec_helper.rb |
Removes trailing blank lines. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-actions bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
# [4.1.0](v4.0.0...v4.1.0) (2026-03-17) ### Bug Fixes * **build:** enable the pipeline to also run the commitlint checks ([95ab583](95ab583)) * **build:** fix the name of the docker-related dependabot updates [skip ci] ([0ce8340](0ce8340)) * **build:** include Gemfile.lock in semantic-release git assets ([7ad9a82](7ad9a82)) * **build:** Remove and ignore Gemfile.lock for library development ([37253a5](37253a5)) * **build:** trigger pipeline only on all branches for push [skip ci] ([c7be885](c7be885)) * **ci:** disable bundler frozen mode in release workflow ([44db79b](44db79b)) * **test:** fixed the user-agent regex so that it matches the new rc versions ([d777ae5](d777ae5)) ### Features * add better_coverage reporter for Jest-style coverage output ([70056dd](70056dd)) * add Ruby 3.4 and 4.0 support ([#78](#78)) ([1fc12bb](1fc12bb)) * add TransportOptions for configuring TLS, proxy, and default headers ([#79](#79)) ([441dd2a](441dd2a)) * initial beta sdk release for Zitadel v4.0.0-rc.1 ([7085e13](7085e13)) * **sdk:** generate SDK for version v4.0.0 ([#65](#65)) ([bd58225](bd58225)) * **sdk:** generate SDK for version v4.1.3 ([#70](#70)) ([5775f26](5775f26)) * **sdk:** generate SDK for version v4.11.0 ([#77](#77)) ([10e4778](10e4778)) * **sdk:** generate SDK for version v4.2.0 ([#71](#71)) ([df5a05c](df5a05c)) * **sdk:** generate SDK for version v4.3.0 ([#73](#73)) ([10cea79](10cea79))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for Ruby 4.
Description
This pull-request adds support for Ruby 4.0 while maintaining backward compatibility with Ruby 3.x. It introduces a
.ruby-versionfile as the single source of truth for CI workflows, updates devbox and the Dockerfile to Ruby 4.0, and expands the integration test matrix to include Ruby 3.4 and 4.0. Gems removed from the Ruby 4.0 default set (cgi, date, logger, net-http, tempfile, time, uri) are now declared as explicit runtime dependencies.Related Issue
No related issue.
Motivation and Context
Ruby 4.0 has been released and this project needs to support both Ruby 3.x and 4.x. Several gems were removed from the Ruby 4.0 default set and must now be declared explicitly to avoid LoadError at runtime. The CI workflows previously hardcoded Ruby 3.0 and the integration matrix did not cover Ruby 3.4 or 4.0.
How Has This Been Tested?
All tests pass locally on Ruby 4.0 via devbox (32/32 tests, 0 RuboCop offenses, no Steep type errors). The gem was verified to build and load correctly on Docker containers for ruby:3.0, ruby:3.4, and ruby:4.0. The integration matrix now covers Ruby 3.0 through 4.0.
Documentation:
No documentation changes required.
Checklist: