Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add Ruby 3.2, 3.3, and fix builds (#195)
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 <details> 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! </details> Solution: make it possible to pick a slightly newer Rack for Ruby 3.3.
- Loading branch information