Skip to content

Commit f6d341a

Browse files
authored
Update Ruby to 4.0.0 as the default version (#61)
* Update Ruby to 4.0.0 as the default version - Update .ruby-version to 4.0.0 - Update CI matrix to use stable Ruby 4.0 (removing preview2) - Move coverage runs from Ruby 3.4 to Ruby 4.0 - Update yard-lint job to use Ruby 4.0.0 - Update Dockerfile to use ruby:4.0-alpine - Remove the preview-specific Gemfile.lock removal step - Keep older Ruby versions (3.4, 3.3, 3.2) supported * Add ruby platform to Gemfile.lock for Ruby 4.0 compatibility Nokogiri precompiled gems don't support Ruby 4.0 yet, so we need the ruby platform to compile from source on Ruby 4.0. * Force ruby platform for Ruby 4.0 jobs Nokogiri precompiled gems don't support Ruby 4.0 yet, so we need to force the ruby platform to compile native extensions from source. * Use BUNDLE_FORCE_RUBY_PLATFORM env var for Ruby 4.0 jobs Set the environment variable before setup-ruby runs so bundler uses the ruby platform when installing gems for Ruby 4.0. * Use ruby platform only in Gemfile.lock for Ruby 4.0 compatibility Remove platform-specific gem variants and keep only the ruby platform so that native extensions are compiled from source on all Ruby versions. * Update unicode-emoji to 4.2.0 for Ruby 4.0 support
1 parent 4f49ccb commit f6d341a

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,18 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
ruby:
26-
- '4.0.0-preview2'
26+
- '4.0'
2727
- '3.4'
2828
- '3.3'
2929
- '3.2'
3030
include:
31-
- ruby: '3.4'
31+
- ruby: '4.0'
3232
coverage: 'true'
3333
steps:
3434
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
3535
with:
3636
fetch-depth: 0
3737

38-
- name: Remove Gemfile.lock for Ruby preview versions
39-
if: contains(matrix.ruby, 'preview')
40-
run: rm -f Gemfile.lock
41-
4238
- name: Set up Ruby
4339
uses: ruby/setup-ruby@ae195bbe749a7cef685ac729197124a48305c1cb # v1.276.0
4440
with:
@@ -67,7 +63,7 @@ jobs:
6763
- name: Set up Ruby
6864
uses: ruby/setup-ruby@ae195bbe749a7cef685ac729197124a48305c1cb # v1.276.0
6965
with:
70-
ruby-version: '3.4.8'
66+
ruby-version: '4.0.0'
7167
bundler-cache: true
7268
- name: Run yard-lint
7369
run: bundle exec yard-lint lib/

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.8
1+
4.0.0

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Creates a minimal Docker image (~50MB) for running the CLI without Ruby installation
55

66
# Stage 1: Builder
7-
FROM ruby:3.4-alpine AS builder
7+
FROM ruby:4.0-alpine AS builder
88

99
# Install build dependencies
1010
RUN apk add --no-cache \
@@ -36,7 +36,7 @@ RUN bundle config set --local without 'development test' && \
3636
RUN gem build llm-docs-builder.gemspec
3737

3838
# Stage 2: Runtime
39-
FROM ruby:3.4-alpine
39+
FROM ruby:4.0-alpine
4040

4141
# Install runtime dependencies only
4242
RUN apk add --no-cache \

Gemfile.lock

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ GEM
1616
language_server-protocol (3.17.0.5)
1717
lint_roller (1.1.0)
1818
method_source (1.1.0)
19-
nokogiri (1.18.10-x86_64-linux-gnu)
19+
mini_portile2 (2.8.9)
20+
nokogiri (1.18.10)
21+
mini_portile2 (~> 2.8.2)
2022
racc (~> 1.4)
2123
parallel (1.27.0)
2224
parser (3.3.10.0)
@@ -66,15 +68,15 @@ GEM
6668
simplecov_json_formatter (0.1.4)
6769
unicode-display_width (3.2.0)
6870
unicode-emoji (~> 4.1)
69-
unicode-emoji (4.1.0)
71+
unicode-emoji (4.2.0)
7072
yard (0.9.38)
7173
yard-lint (1.3.0)
7274
yard (~> 0.9)
7375
zeitwerk (~> 2.6)
7476
zeitwerk (2.7.3)
7577

7678
PLATFORMS
77-
x86_64-linux
79+
ruby
7880

7981
DEPENDENCIES
8082
bundler

0 commit comments

Comments
 (0)