-
Notifications
You must be signed in to change notification settings - Fork 43
Use correct keyword argument when creating Dnsruby::Resolver #194
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR corrects a typo in the keyword argument used when creating instances of Dnsruby::Resolver.
- Fixed the wrong keyword argument from :nameservers to :nameserver in three cases (authoritative, public, and array-based resolvers).
:nameserver => authoritative_nameservers | ||
)) | ||
when :public | ||
Dnsruby::Resolver.new(DEFAULT_RESOLVER_OPTIONS.merge( | ||
:nameservers => PUBLIC_NAMESERVERS | ||
:nameserver => PUBLIC_NAMESERVERS | ||
)) | ||
when Array | ||
Dnsruby::Resolver.new(DEFAULT_RESOLVER_OPTIONS.merge( | ||
:nameservers => nameservers | ||
:nameserver => nameservers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrects the keyword argument to :nameserver based on the official documentation for Dnsruby::Resolver.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, dude, I was there when I wrote it. 👍🏼
)) | ||
when :public | ||
Dnsruby::Resolver.new(DEFAULT_RESOLVER_OPTIONS.merge( | ||
:nameservers => PUBLIC_NAMESERVERS | ||
:nameserver => PUBLIC_NAMESERVERS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensures the correct keyword argument is used for public resolvers by changing from :nameservers to :nameserver.
Copilot uses AI. Check for mistakes.
)) | ||
when Array | ||
Dnsruby::Resolver.new(DEFAULT_RESOLVER_OPTIONS.merge( | ||
:nameservers => nameservers | ||
:nameserver => nameservers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates the array-based resolver configuration to use the :nameserver keyword, aligning with the expected API.
:nameserver => nameservers | |
nameserver: nameservers |
Copilot uses AI. Check for mistakes.
This is a typo. See https://www.rubydoc.info/gems/dnsruby/Dnsruby%2FResolver:initialize