-
Notifications
You must be signed in to change notification settings - Fork 167
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
Support ruby 2.4 #247
Support ruby 2.4 #247
Conversation
Bump to Webmock 2.3.1 which fixed .close stubbing for ruby 2.4. Update tests using user:pass@... urls - webmock 2.x treats basic auth as a header, not url part. https://github.com/bblimke/webmock/blob/2.0/CHANGELOG.md#200
LGTM @cben 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Given that the gem supports ruby starting version 2.0, how does this PR influence users that have ruby < 2.4 ? especially given the bump of webmock which looks like has a different way of handling basic auth - won't it cause regressions? |
webmock is a develoment dependency.
|
@abonas In addition to what @cben mentioned about using kubeclient in a project already using an older webmock, the tests should pick up regressions since we now test 2.0 through 2.4. |
[1] Older webmock is not compatible with ruby 2.4 [2] webmock 2+ needs VCR 3.0.2+ [2] [3] Script from [2] to convert userinfo in uri to auth header (in cassettes) [4] An alternative script [5] thanks to cben for digging into this [1] Ruby 2.4.0 removed the closed? check in the conditional in: s.close if !s.closed? Webmock was changed to add close to StubSocket along with another change... ruby/ruby@f845a9e bblimke/webmock@8f2176a WebMock 2.3.1+ fixed the issue with ruby 2.4.0 by adding StubSocket#close. [2] vcr/vcr#570 (comment) [3] https://gist.github.com/glaszig/9170b1cf2186674faeead74a68606c5d [4] https://gist.github.com/ujh/594c99385b6cbe92e32b1bbfa8578a45 [5] ManageIQ/kubeclient#247
[1] Older webmock is not compatible with ruby 2.4 [2] webmock 2+ needs VCR 3.0.2+ [2] [3] Script from [2] to convert userinfo in uri to auth header (in cassettes) [4] An alternative script [5] thanks to cben for digging into this [6] very similar to the change for foreman_api_client [1] Ruby 2.4.0 removed the closed? check in the conditional in: s.close if !s.closed? Webmock was changed to add close to StubSocket along with another change... ruby/ruby@f845a9e bblimke/webmock@8f2176a WebMock 2.3.1+ fixed the issue with ruby 2.4.0 by adding StubSocket#close. [2] vcr/vcr#570 (comment) [3] https://gist.github.com/glaszig/9170b1cf2186674faeead74a68606c5d [4] https://gist.github.com/ujh/594c99385b6cbe92e32b1bbfa8578a45 [5] ManageIQ/kubeclient#247 [6] ManageIQ/foreman_api_client#7
Support ruby 2.4
This reverts commit 263ff40 from ManageIQ#271. Those backport changes are no longer needed: - after backporting ManageIQ#195 and ManageIQ#233, v2.x now has Kubeclient::HttpError and Kubeclient::ResourceNotFoundError. - after backporting ManageIQ#247, v2.x now tests with webmock 2.x, it takes `basic_auth` rather than user:pw in URL. - ns/namespace change was just cosmetic. In other words, v2.x branch is now closer to original ManageIQ#262.
Support ruby 2.4
This reverts commit 263ff40 from ManageIQ#271. Those backport changes are no longer needed: - after backporting ManageIQ#195 and ManageIQ#233, v2.x now has Kubeclient::HttpError and Kubeclient::ResourceNotFoundError. - after backporting ManageIQ#247, v2.x now tests with webmock 2.x, it takes `basic_auth` rather than user:pw in URL. - ns/namespace change was just cosmetic. In other words, v2.x branch is now closer to original ManageIQ#262.
Bump to Webmock 2.3.1 which fixed
.close
stubbing for ruby 2.4.(It's a dev dependency, shouldn't affect users of kubeclient.)
Update tests using user:pass@... urls — webmock 2.x treats basic auth as a header, not url part.
https://github.com/bblimke/webmock/blob/2.0/CHANGELOG.md#200
Fixes #242. @jrafanie please review.