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

handle type-casting for config, even when explicitly setting values using .set method #358

Conversation

Azdaroth
Copy link
Contributor

I had a pretty unfortunate issue when directly setting the config value for heartbeat without an explicit typecasting: Hutch::Config.set(:heartbeat, ENV.fetch("HUTCH_HEARTBEAT", 30)) but the ENV var was obviously a string and it caused some failures when publishing messages. Since the type is explicitly declared on a config level, I believe the desired behaviour would be to handle type-casting inside set method as well.

@Azdaroth
Copy link
Contributor Author

Hey, any news regarding this PR? Does it look like the desired behavior?

@michaelklishin
Copy link
Member

This looks reasonable, I need to take a look at the test failure.

@michaelklishin michaelklishin merged commit 0cffda5 into ruby-amqp:master Apr 3, 2021
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