Skip to content

Comments

Update dependencies and middleware for Faraday integration#186

Open
markcmurphy wants to merge 7 commits intobigcommerce:masterfrom
markcmurphy:ANA-6765-upgrade-ruby-3.4-patch-faraday
Open

Update dependencies and middleware for Faraday integration#186
markcmurphy wants to merge 7 commits intobigcommerce:masterfrom
markcmurphy:ANA-6765-upgrade-ruby-3.4-patch-faraday

Conversation

@markcmurphy
Copy link
Member

@markcmurphy markcmurphy commented Feb 17, 2026

What?

  • Updated Faraday dependency to version >= 2.14 and removed Faraday Middleware.
  • Refactored connection and middleware classes to use the new Faraday request authorization method.
  • Adjusted tests to reflect changes in middleware expectations.

Tickets / Documentation

Screenshots (if appropriate)

Successfully ran time script:

➜  bigcommerce-api-ruby git:(ANA-6765-upgrade-ruby-3.4-patch-faraday) ✗ bundle exec ruby examples/system/time.rb

#<Bigcommerce::System time=1771450095>

- Updated Faraday dependency to version >= 2.14 and removed Faraday Middleware.
- Refactored connection and middleware classes to use the new Faraday request authorization method.
- Adjusted tests to reflect changes in middleware expectations.
- Updated the `call` method to use a new private method `option_value` for retrieving options, allowing for both symbol and string keys.
- Added tests to ensure correct header setting when options are provided with string keys.
- Updated the `parse` method to handle gzip encoded JSON responses by adding a `decode_body` method.
- Modified the `build_response_object` method to pass response headers to the `parse` method.
- Added tests to verify the correct decoding and object building for gzip encoded responses.
@markcmurphy markcmurphy marked this pull request as ready for review February 18, 2026 21:42
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2cf8fc1af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- chatgpt-codex-connector[bot]: restore gzip decoding for raw_request and delete responses
- add unit coverage for gzip decoding in delete and raw_request
Copy link
Contributor

@j05h j05h left a comment

Choose a reason for hiding this comment

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

This is likely a major version bump same as Faraday. You'll want to update the version file as well.

At a minimum, we'll be going to v 1.2.0.

- Updated version to 2.0.0 in `version.rb`.
- Added entry for the release in `CHANGELOG.md`, noting the update to Faraday 2.14 and support for Ruby 3.4.
- Added `faraday-gzip` as a dependency to enable gzip request and response compression.
- Updated the Bigcommerce connection to use gzip middleware for requests.
- Modified the request handling to simplify response body processing by removing gzip decoding logic.
- Updated tests to verify the inclusion of gzip middleware in the request pipeline.
@markcmurphy markcmurphy requested a review from j05h February 19, 2026 16:22
Copy link

@exeDog exeDog left a comment

Choose a reason for hiding this comment

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

Nice work!

Can we quickly pull this gem version into developer portal and do a confidence check that everything is working as expected?

@markcmurphy
Copy link
Member Author

Nice work!

Can we quickly pull this gem version into developer portal and do a confidence check that everything is working as expected?

Yes, but we're now blocked because bc-lightstep-ruby also needs to be patched for the Faraday vulnerability :|

@markcmurphy
Copy link
Member Author

Nice work!

Can we quickly pull this gem version into developer portal and do a confidence check that everything is working as expected?

@exeDog, I pulled this in and pinned to the updated bigcommerce-api-ruby and patched bc-lightstep-ruby. Everything worked well locally 👍

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.

3 participants