Removing rest-client as a dependency & using native NET:HTTP
Replace Deprecated rest-client Dependency with Native Net::HTTP in ChargeBee Ruby SDK
Description:
This PR refactors the ChargeBee Ruby SDK to use Ruby's native Net::HTTP library, replacing the deprecated rest-client dependency. The rest-client gem, which ChargeBee Ruby previously relied on, has been deprecated and is no longer actively maintained. By switching to Net::HTTP, this update:
- Removes an outdated dependency (rest-client) from the SDK, reducing potential security and maintenance concerns.
- Utilizes
Net::HTTPfor HTTP requests, providing a more modern and lightweight solution aligned with Ruby's core library. - Maintains existing functionality and ensures compatibility for current users, without changes to the external API of the SDK.
Changes:
- All instances of
rest-clienthave been replaced withNet::HTTPfor making HTTP requests. - Updated error handling and response parsing to match the behavior of
rest-client. - Adjusted headers and request options for compatibility with
Net::HTTP.
Testing and Validation:
- Verified successful execution of all existing test cases to confirm that the migration does not impact current functionality.
- This update is intended to be backward-compatible and should not require any changes for existing users of the ChargeBee Ruby SDK.
All good and green ✅ on around here. Thanks. 👍
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
This branch works on our end for the handful of Chargebee API calls we leverage.
Hi @jamescook , thank you for your efforts on this! We're planning to roll this out soon and are reviewing your PRs. Please bear with us as we take some time to look into them.
@cb-alish this one can be closed, we no longer use rest-client on this gem.
Sure @sobrinho, closing this 🙌