Drop the ActiveSupport dependency and load on Faraday 2 - #8
Merged
Conversation
jguecaimburu
force-pushed
the
rails-8-support
branch
from
August 27, 2026 15:22
548ed95 to
f58b7f9
Compare
jguecaimburu
force-pushed
the
rails-8-support
branch
from
August 27, 2026 16:07
f58b7f9 to
74b85fc
Compare
ActiveSupport was used for three string inflections: camelize for endpoint module names, lower camelcase for request keys and underscore for response keys. TransformHash implements them with the rules ActiveSupport applies when no acronyms are configured, so the wire format does not depend on the host application inflections or on the ActiveSupport version. Faraday 2 removed Faraday::Middleware.dependency and Faraday::Response::Middleware, and the gemspec allows faraday below 3.0, so the middleware no longer uses either. Faraday::Middleware dispatches on_complete from 1.2.0, so that is the new floor. The gem requires oj itself since dependency was what loaded it.
The client raises ResourceNotFound on 404. Cleanup hooks that delete a resource the example already deleted tolerate that error, and the two irretrievable examples assert it. The create_pipeline and create_deal_stage hooks read the id from the wrong response key, so they only ever requested a delete with a blank id; they are removed. The recorded cassettes are unchanged.
jguecaimburu
force-pushed
the
rails-8-support
branch
from
August 27, 2026 16:45
74b85fc to
5494d55
Compare
It ran on Ruby 2.6, where bundler can no longer be installed, so it has not executed rubocop or reek in years and only reports a failure on every push.
jguecaimburu
commented
Aug 27, 2026
jguecaimburu
commented
Aug 27, 2026
| @@ -1,7 +1,5 @@ | |||
| # frozen_string_literal: true | |||
|
|
|||
| require 'active_support/core_ext/string' | |||
Author
There was a problem hiding this comment.
We are blocked from upgrading because the gem uses a couple of methods to format strings. It's really a huge overkill
jguecaimburu
commented
Aug 27, 2026
Comment on lines
+70
to
+78
| # | ||
| # Changes the case of a string | ||
| # | ||
| # @param [String] string the string to change | ||
| # @param [Symbol] style `:underscore` or `:camelcase` | ||
| # @param [Symbol] first_letter `:upper` or `:lower`, only used by `:camelcase` | ||
| # | ||
| # @return [String] | ||
| # |
Author
There was a problem hiding this comment.
This is all we need to avoid that dependency.
This gem has been abandoned for +2 years, at some point it might be a lot easier to simply refactor it into a client we own with a lot fewer moving parts. Leaving that for future adventures.
jguecaimburu
commented
Aug 27, 2026
Comment on lines
+3
to
+4
| # The client raises ResourceNotFound on 404, and cleanup hooks often delete a | ||
| # resource the example itself already deleted. |
Author
There was a problem hiding this comment.
We made this change on the fork long time ago and never fixed specs
glenn33
approved these changes
Aug 28, 2026
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.
Implementation
TransformHashimplements them. Removes theactivesupport < 8.0bound blocking Rails 8.dependency 'oj'andFaraday::Response::Middleware; requireoj; floorfaraday >= 1.2.spec/support/cleanup.rblets 7 cleanup hooks tolerate a 404 on already-deleted resources; 2 examples assert the 404; 2 dead hooks removed. Cassettes unchanged.Verification
active_campaignfor Rails 8.SparkLoop
bundle lock --update active_campaignafter merge. No code changes.