[rb] implement client config class#16486
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
|
Superseded by #17699, which reworks this design — the config lives on the HTTP client (the Bridge stays the command layer) and is a mutable PORO consistent with Options rather than an immutable Data. Closing in favor of that PR. |
User description
🔗 Related Issues
Addresses Ruby portion of #16269
💥 What does this PR do?
🔧 Implementation Notes
Went with a
Datainstance based on its goal of immutability. I overrode the constructor so that it only allows keywords and they are all optionalPORO seemed overkill and Struct is too loose
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Introduces
ClientConfigimmutable data class for HTTP client customizationAllows passing
client_configto driver constructors and bridge initializationImplements validation to prevent conflicting
http_clientandclient_configparametersRefactors bridge initialization with URL normalization and server URL handling
Adds comprehensive test coverage for new client config functionality
Diagram Walkthrough
File Walkthrough
4 files
Create immutable ClientConfig data classUpdate create_bridge to accept client_configRefactor initialization with client_config supportAdd server_url? predicate method1 files
Add ClientConfig require statement1 files
Add comprehensive bridge initialization tests5 files
Add type signature for ClientConfig classUpdate driver type signatures for client_configUpdate bridge type signatures with new methodsUpdate HTTP common type signaturesImprove type annotations for HTTP default