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

Use URI.open instead of open in specs to pass with Ruby3.0 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boutil
Copy link

@boutil boutil commented Nov 18, 2021

In Debian, when tring to build sham_rack with ruby3.0, we noticed the spec failures described in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996386

They are caused by the fact that in spec/sham_rack_spec.rb' opens urls with openinstead ofURI.open`, which throws errors like

1) ShamRack mounted Rack application can be accessed using open-uri
     Failure/Error: response = open("http://www.greetings.com")

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - http://www.greetings.com
     # ./spec/sham_rack_spec.rb:42:in `initialize'
     # ./spec/sham_rack_spec.rb:42:in `open'
     # ./spec/sham_rack_spec.rb:42:in `block (3 levels) in <top (required)>'

The following patch is aimed at replacing these open by URI.open.

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

1 participant