Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add Ruby 3.2, 3.3, and fix builds #195

Merged
merged 3 commits into from
Aug 28, 2024
Merged

Conversation

olleolleolle
Copy link
Contributor

@olleolleolle olleolleolle commented Aug 16, 2024

Changes

This PR adds Ruby 3.2, 3.3 to test matrix

...and updates actions/checkout to latest release.

...and adds webrick to Gemfile for testing purposes.

...and chooses rack-2.2 for Ruby 3.3.

Test failures fixed

Puma and rack and rackup are running older versions, so they're compatible with older versions of Ruby.

Here, though, we fail: when referring to this code

https://github.com/toland/patron/blob/master/spec/support/config.ru#L129-L145

In 3.3, we fail tests with this:

An error occurred while loading ./spec/header_parser_spec.rb.
Failure/Error: APP = Rack::Builder.new { eval(File.read(File.join(__dir__, 'config.ru'))) }

ArgumentError:
  wrong number of arguments (given 3, expected 1..2)
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/urlmap.rb:41:in `initialize'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/urlmap.rb:41:in `new'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/urlmap.rb:41:in `block in remap'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/urlmap.rb:28:in `each'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/urlmap.rb:28:in `map'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/urlmap.rb:28:in `remap'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/urlmap.rb:23:in `initialize'
# (eval at ./spec/support/test_server.rb:6):129:in `new'
# (eval at ./spec/support/test_server.rb:6):129:in `block in <class:PatronTestServer>'
# ./spec/support/test_server.rb:6:in `eval'
# ./spec/support/test_server.rb:6:in `block in <class:PatronTestServer>'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/builder.rb:71:in `instance_eval'
# ./vendor/bundle/ruby/3.3.0/gems/rack-2.1.4.4/lib/rack/builder.rb:71:in `initialize'
# ./spec/support/test_server.rb:6:in `new'
# ./spec/support/test_server.rb:6:in `<class:PatronTestServer>'
# ./spec/support/test_server.rb:5:in `<top (required)>'
# ./spec/spec_helper.rb:19:in `block in <top (required)>'
# ./spec/spec_helper.rb:19:in `each'
# ./spec/spec_helper.rb:19:in `<top (required)>'
# ./spec/header_parser_spec.rb:1:in `<top (required)>'

Aha, that was match = Regexp.new("^#{Regexp.quote(location).gsub('/', '/+')}(.*)", nil, 'n') in Rack::URLMap!

Solution: make it possible to pick a slightly newer Rack for Ruby 3.3.

olleolleolle and others added 3 commits August 16, 2024 13:20
...and update actions/checkout to latest release.
...in order to be able to pick them at install time.
@olleolleolle olleolleolle changed the title CI: add Ruby 3.2, 3.3 CI: add Ruby 3.2, 3.3, and fix buids Aug 16, 2024
@olleolleolle olleolleolle changed the title CI: add Ruby 3.2, 3.3, and fix buids CI: add Ruby 3.2, 3.3, and fix builds Aug 16, 2024
@olleolleolle
Copy link
Contributor Author

👋 @toland Hope this message finds you well!

@julik
Copy link
Collaborator

julik commented Aug 28, 2024

Seen 😆

@julik julik merged commit 5b3dbd0 into toland:master Aug 28, 2024
8 checks passed
@olleolleolle olleolleolle deleted the patch-1 branch August 28, 2024 14:19
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.

2 participants