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

No test coverage for ipaddr in HTTP.start #188

Open
collimarco opened this issue Nov 4, 2024 · 0 comments
Open

No test coverage for ipaddr in HTTP.start #188

collimarco opened this issue Nov 4, 2024 · 0 comments

Comments

@collimarco
Copy link

We use a code like this:

request = Net::HTTP::Get.new(uri.request_uri)

Net::HTTP.start(uri.hostname, uri.port, ipaddr: ip, use_ssl: true) do |http|
  http.request(request)
end

What I have noticed is that it is difficult to see if ipaddr is actually used for the request... If there is a change in the future the ipaddr param may be just ignored and nobody will notice.

Furthermore I have noticed that in the code of this gem there is no test coverage for the ipaddr parameter passed to HTTP.start.

  • Is there a more "solid" and "future-proof" solution to set the ipaddr in the above code?
  • Can you add test coverage for this parameter so that it won't break in future versions?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant