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

Fix some http 5.1.1 test failures #41

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Conversation

jrafanie
Copy link
Contributor

@jrafanie jrafanie commented Oct 6, 2023

This PR fixes some test failures with http 5.0 and makes sure they pass with ruby 2.7 and 3.0.

@jrafanie jrafanie changed the title Fixe some http 5.1.1 test failures Fix some http 5.1.1 test failures Oct 6, 2023
See: https://github.com/httprb/http/pull/546/files

Note, HTTP::Response and HTTP::Request.new take options hashes, not keyword
arguments.  For ruby 3.0, we should be explicit that we're pashing hashes
since our IBMCloudSdkCore::DetailedResponse.new interface uses kwargs and is
therefore confusing.  We should probably match the options hash interface since
ruby 3.0 treats them differently.

Signed-off-by: Joe Rafaniello <[email protected]>
@pyrooka pyrooka self-requested a review October 9, 2023 11:54
@pyrooka pyrooka self-assigned this Oct 9, 2023
Copy link
Member

@pyrooka pyrooka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
Disclaimer, I am not a Ruby expert! :) I've tested the changes with both major Ruby versions and got the results below. I know those are just small "linter" issues, but could you fix them before we merge the PR?

test/unit/test_detailed_response.rb Show resolved Hide resolved
test/unit/test_detailed_response.rb Show resolved Hide resolved
@pyrooka pyrooka merged commit a9a1093 into IBM:main Oct 9, 2023
1 check passed
@jrafanie jrafanie deleted the fix_http_5_1_1 branch October 16, 2023 13:47
pyrooka pushed a commit that referenced this pull request Nov 6, 2023
This commit resolves the rubocop warnings mentioned in PR #41
- Test with ruby 2.7, 3.0, 3.1. 2.7 is end of life and all prior are also but we can possibly keep 2.7 supportable for now. See: https://www.ruby-lang.org/en/downloads/branches/
- Upgrade to bundler 2 and rubocop 1.40+
- Fix some obvious rubocop violations
- Remove all non-required .rubocop.yml settings to simplify the configuration

Signed-off-by: Joe Rafaniello <[email protected]>
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.

2 participants