alexdalitz / dnsruby

Dnsruby is a feature-complete DNS(SEC) client for Ruby, as used by many of the world's largest DNS registries and the OpenDNSSEC project
Other
194 stars 77 forks source link

Use default port (53) in Dnsruby::DNS when :port is nil #154

Closed smlsml closed 4 years ago

smlsml commented 4 years ago

This occurs when DNS is initialized with nil such as DNS.new(:port => nil) or when configuration is automatically detected (but there is no network connection so port is nil).

Fixes: https://github.com/alexdalitz/dnsruby/issues/153 ArgumentError (invalid port config: nil) on Dns.new() with no network connection

Also:

$ rake test
Running online tests. These tests send UDP packets - some may be lost.
If you get the odd timeout error with these tests, try running them again.
It may just be that some UDP packets got lost the first time...
-----------------------------------------------------------------------
OpenSSL not present (with full functionality) - skipping DS digest test
-----------------------------------------------------------------------
Run options: --seed 31421

# Running:

Minitest::Result | ................................................................
                 | ................................................................
                 | ................................................................
                 | ..
                 | 42.55 s
Slowest tests:
6.56 s  Minitest::Result#test_TCP_pipelining_timeout
6.23 s  Minitest::Result#test_TCP_pipelining_timeout_in_send
3.02 s  Minitest::Result#test_cache
3.00 s  Minitest::Result#test_TCP_pipelining_socket_eof
2.86 s  Minitest::Result#test_reverse_lookup
2.58 s  Minitest::Result#test_queue_timeout
Slowest suites:
42.64 s Minitest::Result

Finished in 42.675147s, 4.5460 runs/s, 40.3045 assertions/s.
194 runs, 1720 assertions, 0 failures, 0 errors, 0 skips
coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.4%) to 77.6% when pulling 5299caad05326c32f733bac9db144020092bb226 on cloudvolumes:master into 06303437027149fafe78fd09249677ac55d4db34 on alexdalitz:master.

smlsml commented 4 years ago

$ gem install bundler YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0). Fetching: bundler-2.0.2.gem (100%) ERROR: Error installing bundler: The last version of bundler (>= 0) to support your Ruby & RubyGems was 1.17.3. Try installing it with gem install bundler -v 1.17.3 bundler requires Ruby version >= 2.3.0. The current ruby version is 2.0.0.

alexdalitz commented 4 years ago

Thanks for this! Sorry about the problems with Travis - I've replaced the 2.0.0 build with 2.6.3 now, so it should be happier. As it happens, I'm about to push some changes, so I've added the changes in your PR to this. Thanks!