Skip to content

Conversation

@tharropoulos
Copy link
Contributor

@tharropoulos tharropoulos commented Nov 19, 2024

Change Summary

What is this?

This pull request migrates the HTTP client from Typhoeus to Faraday (#37) for improved HTTP connections and adds integration tests for the Collections API with a real Typesense server.

Changes

Added Features:

  1. Integration Tests in collections_spec.rb:
    • Added integration tests to verify the creation of collections on a real Typesense server.
    • Utilized WebMock to disable and enable network connections during tests.

Code Changes:

  1. HTTP Client Migration in api_call.rb:

    • Replaced Typhoeus with Faraday for handling HTTP requests.
    • Updated request options and response handling to use Faraday's methods.
    • Modified exception handling to accommodate Faraday's error classes.
  2. CI Configuration in tests.yml:

    • Added a Typesense service to the CI workflow for integration testing.
    • Included a step to wait for the Typesense server to be ready before running tests.
  3. Dependency Updates in typesense.gemspec and Gemfile:

    • Removed Typhoeus dependency.
    • Added Faraday dependency.
    • Added ERB dependency.

Context

  • This change is a breaking change and should be marked as a major release due to the migration from Typhoeus to Faraday.

PR Checklist

* replace typhoeus request handling with faraday for improved http connections
* update response code checks to use response.status instead of response.code
* add integration tests for collections api with real typesense server
* update gemspec to include faraday dependency
* this is a breaking change and should be marked as a major release
@jasonbosco jasonbosco merged commit 0344c0b into typesense:master Nov 20, 2024
3 checks passed
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.

2 participants