Skip to content
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

Cast port to intrger in connection options #100

Conversation

gmcgibbon
Copy link
Contributor

@gmcgibbon gmcgibbon commented Jul 11, 2023

Support string ports to make ENV config passing easier. Other gems like mysql2 support this use-case (https://github.com/brianmario/mysql2/blob/master/lib/mysql2/client.rb#L92), so I think trilogy should too.

@adrianna-chang-shopify
Copy link
Collaborator

There's a Ruby test that asserts that establishing a connection with port passed as a String raises a TypeError. I think we ought to remove it, but let's check with the GitHub folks to ensure they don't have a use-case for this.

Support string ports to make ENV config passing easier. Other gems like
mysql2 support this use-case, so I think trilogy should too.
@gmcgibbon
Copy link
Contributor Author

Ah, yeah good catch, removed!

@adrianna-chang-shopify adrianna-chang-shopify merged commit 61a8b40 into trilogy-libraries:main Jul 17, 2023
12 checks passed
@gmcgibbon gmcgibbon deleted the cast_connection_options branch July 17, 2023 19:26
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