chore!: modernize gem for v5.0.0#45
Merged
Merged
Conversation
Drop Ruby < 3.2, migrate CI from Travis to GitHub Actions, update all dev dependencies to latest versions (RuboCop 1.84, SimpleCov 0.22, WebMock 3.26), modernize gemspec with MFA metadata, move dev deps to Gemfile, add community files (CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, issue/PR templates), rewrite CHANGELOG in Keep a Changelog format, and apply RuboCop auto-fixes from the 0.80 → 1.84 upgrade. BREAKING CHANGE: minimum Ruby version raised from 2.5 to 3.2
- Switch constructor and request methods to keyword arguments, giving ArgumentError on typos for free and removing UnknownKeyError/Util - Replace fragile const_get lookups with frozen hash tables (HTTP_METHODS, HEADERS_FOR_REQUEST_TYPE) - Inline Util.query_to_hash/hash_to_query as direct URI calls, delete util.rb - Rename private methods: set_* → apply_*, get_response → perform_request - Add write_timeout to connection setup - Fix AJAX_JSON_HEADER to use merge instead of dup.merge!
Cover previously untested code paths: multipart form data, string body, verify_cert: false, PUT with body, and constructor kwargs. Add WEBrick-based integration tests exercising real HTTP/HTTPS requests including redirects, cookies, headers, and basic auth.
Remove nonexistent SOAP methods, fix HTTPWrapper typo, update UnknownKeyError → ArgumentError to match kwargs behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Utilmodule, update gemspec metadata, add GitHub Actions CI replacing Travis CIHTTPWrapperandRequestclasses now use keyword arguments; constants use lowercase header names; cleanerdefine_methodblocksverify_cert: false, PUT with body, and constructor kwargs; add WEBrick-based integration test suite exercising real HTTP/HTTPS requestsBreaking changes
HTTPWrapper::Utilremoved — useHTTPWrapperdirectlyTest plan
bundle exec rspec— 47 examples, 0 failuresCOVERAGE=1 bundle exec rspec— 100% line coverage (137/137)bundle exec rubocop— 0 offenses