Skip to content

Commit

Permalink
adding support for ruby 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
HoneyryderChuck committed Jan 2, 2025
1 parent 999d86a commit 1700384
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 9 deletions.
17 changes: 11 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ cache:
- vendor

lint rubocop code:
image: "ruby:3.3"
image: "ruby:3.4"
variables:
BUNDLE_WITHOUT: test:coverage:assorted
before_script:
- bundle install
script:
- bundle exec rake rubocop
lint rubocop wiki:
image: "ruby:3.3"
image: "ruby:3.4"
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
variables:
Expand All @@ -61,7 +61,7 @@ lint rubocop wiki:
- rubocop-md
AllCops:
TargetRubyVersion: 3.3
TargetRubyVersion: 3.4
DisabledByDefault: true
FILE
script:
Expand Down Expand Up @@ -98,13 +98,18 @@ test ruby 3/3:
<<: *yjit_matrix
script:
./spec.sh ruby 3.3
test ruby 3/4:
<<: *test_settings
<<: *yjit_matrix
script:
./spec.sh ruby 3.4
test truffleruby:
<<: *test_settings
script:
./spec.sh truffleruby latest
allow_failure: true
regression tests:
image: "ruby:3.3"
image: "ruby:3.4"
variables:
BUNDLE_WITHOUT: lint:assorted
CI: 1
Expand All @@ -125,7 +130,7 @@ coverage:
variables:
BUNDLE_WITHOUT: lint:test:assorted

image: "ruby:3.3"
image: "ruby:3.4"
script:
- gem install simplecov --no-doc
# this is a workaround, because simplecov doesn't support relative paths.
Expand All @@ -147,7 +152,7 @@ pages:
stage: deploy
needs:
- coverage
image: "ruby:3.3"
image: "ruby:3.4"
before_script:
- gem install hanna-nouveau
script:
Expand Down
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gem "rake", "~> 13.0"

group :test do
if RUBY_VERSION >= "3.2.0"
gem "datadog", "~> 2.0.0"
gem "datadog", "~> 2.0"
else
gem "ddtrace"
end
Expand All @@ -36,6 +36,11 @@ group :test do
gem "rbs"
gem "yajl-ruby", require: false
end

if RUBY_VERSION >= "3.4.0"
# TODO: remove this once websocket-driver-ruby declares this as dependency
gem "base64"
end
end

platform :mri, :truffleruby do
Expand Down
23 changes: 23 additions & 0 deletions docker-compose-ruby-3.4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3'
services:
httpx:
image: ruby:3.4
environment:
- HTTPBIN_COALESCING_HOST=another
- HTTPX_RESOLVER_URI=https://doh/dns-query
depends_on:
- doh

doh:
image: registry.gitlab.com/os85/httpx/nghttp2:1
depends_on:
- doh-proxy
entrypoint: /usr/local/bin/nghttpx
volumes:
- ./test/support/ci:/home
command: --conf /home/doh-nghttp.conf --no-ocsp --frontend '*,443'

doh-proxy:
image: publicarray/doh-proxy
environment:
- "UNBOUND_SERVICE_HOST=127.0.0.11"
2 changes: 1 addition & 1 deletion test/options_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def option_foo(value)
end
end
ex = assert_raises(NoMethodError) { custom_opt_class.new(foo: "bar") }
assert_match("undefined method `is_a'", ex.message)
assert_match(/undefined method .+is_a/, ex.message)
end

def test_options_headers
Expand Down
2 changes: 1 addition & 1 deletion test/support/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if [[ "$RUBY_ENGINE" = "ruby" ]]; then
COVERAGE_KEY="$RUBY_ENGINE-$RUBY_VERSION-integration-tests" bundle exec rake integration_tests
fi

if [[ ${RUBY_VERSION:0:3} = "3.3" ]] && [[ "$RUBY_ENGINE" = "ruby" ]]; then
if [[ ${RUBY_VERSION:0:3} = "3.4" ]] && [[ "$RUBY_ENGINE" = "ruby" ]]; then
# regression tests
# Testing them only with main ruby
# COVERAGE_KEY="$RUBY_ENGINE-$RUBY_VERSION-regression-tests" bundle exec rake regression_tests
Expand Down

0 comments on commit 1700384

Please sign in to comment.