Skip to content

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

TooManyBees
Copy link
Contributor

@Copilot Copilot AI review requested due to automatic review settings April 10, 2025 21:36
@TooManyBees TooManyBees requested a review from a team as a code owner April 10, 2025 21:36
Copy link

@Copilot Copilot AI left a 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).

Comment on lines +46 to +54
: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
Copy link
Preview

Copilot AI Apr 10, 2025

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.

Copy link
Contributor Author

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
Copy link
Preview

Copilot AI Apr 10, 2025

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
Copy link
Preview

Copilot AI Apr 10, 2025

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.

Suggested change
:nameserver => nameservers
nameserver: nameservers

Copilot uses AI. Check for mistakes.

@TooManyBees TooManyBees merged commit 7fd28c4 into master Apr 10, 2025
6 checks passed
@TooManyBees TooManyBees deleted the dnsruby-resolver-config branch April 10, 2025 23:43
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.

3 participants