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

Add WEBrick dependency #668

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add WEBrick dependency #668

wants to merge 2 commits into from

Conversation

voxik
Copy link

@voxik voxik commented Jan 14, 2021

Because WEBrick was removed from Ruby 3.0.

Because WEBrick was removed from Ruby 3.0.
@voxik
Copy link
Author

voxik commented Jan 14, 2021

And there is one more issue:

+ rspec spec
#<Thread:0x000055583c885240 /builddir/build/BUILD/typhoeus-1.4.0/usr/share/gems/gems/typhoeus-1.4.0/spec/support/localhost_server.rb:75 run> terminated with exception (report_on_exception is true):
/usr/share/gems/gems/rack-2.2.3/lib/rack/handler/webrick.rb:26:in `run': wrong number of arguments (given 2, expected 1) (ArgumentError)
	from /builddir/build/BUILD/typhoeus-1.4.0/usr/share/gems/gems/typhoeus-1.4.0/spec/support/localhost_server.rb:46:in `boot'
	from /builddir/build/BUILD/typhoeus-1.4.0/usr/share/gems/gems/typhoeus-1.4.0/spec/support/localhost_server.rb:29:in `block in initialize'
	from /builddir/build/BUILD/typhoeus-1.4.0/usr/share/gems/gems/typhoeus-1.4.0/spec/support/localhost_server.rb:75:in `block in concurrently'

Not really sure if the fix is compatible with older Ruby.

@voxik
Copy link
Author

voxik commented Jan 14, 2021

Apparently, this breaks Ruby 1.9.3 and older, but does anybody care these days? Even on RHEL7, there is at least Ruby 2.0.0.

@Kjarrigan
Copy link
Member

In the line just below where you added the webrick gem there is an if clause that checks for Ruby >= 1.9.0 Can you please add such a wrapper around webrick for >= 2.0. Although I agree that Ruby 1.9.3 is already EOL for a while it is an easy "fix" to keep the compatibility.

@voxik
Copy link
Author

voxik commented Jan 15, 2021

I have moved WEBrick down to the section you have referred to (although the issues is not WEBrick incompatibility) and added version guard around the call. Lets see if it helps to keep the compatibility.

@voxik
Copy link
Author

voxik commented Jan 15, 2021

Hm, it is reported by parser as syntax error 😠 Not really sure how to deal with this in backward compatible manner

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.

None yet

2 participants