Skip to content

fix(ruby): remove integer empty check #4698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 2, 2025
Merged

Conversation

lucas-aragno
Copy link
Contributor

🧭 What and Why

Maybe I'm missing something but after upgrading to the latest version of the gem my timeout settings started breaking:

::Algolia::SearchClient.create(
    app_id,
    api_key,
    {
      connect_timeout: 5_000
    }
  )

The error seemed to be caused by the new empty? checks that were added previous to the client initialization. Why are we now checking for both nil? and empty? is the idea to use strings now? that doesn't seem to be the case since the default seem to be numbers. So let me know if this was an error or maybe we need to update the documentation on how to set up timeouts.

Thanks!

🎟 JIRA Ticket: N/A

Changes included:

  • List changes
    • Removing .empty? checks on integer settings

🧪 Test

@lucas-aragno lucas-aragno requested a review from a team as a code owner April 2, 2025 15:09
@millotp
Copy link
Collaborator

millotp commented Apr 2, 2025

Hey, thanks for your contribution, this is a miss indeed !
The files under clients/algoliasearch-client-ruby are generated from the template, can you remove them from your PR pls ?

@lucas-aragno
Copy link
Contributor Author

@millotp done!

Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

looks good !

@millotp millotp merged commit 345e830 into algolia:main Apr 2, 2025
10 of 12 checks passed
algolia-bot added a commit that referenced this pull request Apr 2, 2025
algolia-bot added a commit to algolia/algoliasearch-client-ruby that referenced this pull request Apr 2, 2025
algolia/api-clients-automation#4698

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Lucas Aragno <[email protected]>
Co-authored-by: Lucas Aragno <[email protected]>
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