async-dns 1.2.6 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/releases.md ADDED
@@ -0,0 +1,21 @@
1
+ # Releases
2
+
3
+ ## v1.4.0
4
+
5
+ - Minimum Ruby version is now v3.1.
6
+ - Drop dependency on `Async::IO` and refactor internal network code to use `IO::Endpoint` and `Socket` directly.
7
+ - Introduce `Async::DNS::Endpoint` for getting the default endpoint for a given name server.
8
+ - Remove old hacks for IPv6 on Ruby v2.3.
9
+ - Introduce `Async::DNS::Cache` for caching DNS lookups.
10
+ - Remove `logger` as an option and instance variable in favour of using `Console.logger` directly. This is a breaking change.
11
+ - Update error logging to include more details.
12
+ - Use keyword arguments `**options` where possible. This is a breaking change.
13
+ - `Async::DNS::StreamHandler` and `Async::DNS::DatagramHandler` have been refactored to use `IO::Endpoint` and have minor breaking interface changes.
14
+ - `Async::DNS::Resolver.default` should be used to get a default resolver instance.
15
+ - The resolver now supports `ndots:` when resolving names.
16
+ - `Async::DNS::Resolver#fully_qualified_name` is replaced by `Async::DNS::Resolver#fully_qualified_names` and can yield multiple names.
17
+ - If the host system supports IPv6, the resolver will also try to resolve IPv6 addresses.
18
+ - `Async::DNS::Server::DEFAULT_ENDPOINTS` is removed and replaced by `Async::DNS::Server.default_endpoint(port = 53)`.
19
+ - `Async::DNS::Server#fire` is removed with no replacement.
20
+ - The default `Async::DNS::Server#process` fails with `NXDomain` instead of `NotImplementedError`.
21
+ - `Async::DNS::System` implementation is updated to support IPv6 and `resolv.conf` options.
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,151 +1,92 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ - Tony Arcieri
9
+ - Olle Jonsson
10
+ - Greg Thornton
11
+ - Hal Brodigan
12
+ - Hendrik Beskow
13
+ - Mike Perham
14
+ - Sean Dilda
15
+ - Stefan Wrobel
9
16
  bindir: bin
10
- cert_chain: []
11
- date: 2021-05-08 00:00:00.000000000 Z
17
+ cert_chain:
18
+ - |
19
+ -----BEGIN CERTIFICATE-----
20
+ MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
21
+ ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
22
+ CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
23
+ MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
24
+ MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
25
+ bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
26
+ igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
27
+ 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
28
+ sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
29
+ e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
30
+ XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
31
+ RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
32
+ tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
33
+ zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
34
+ xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
35
+ BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
36
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
37
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
38
+ cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
39
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
40
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
41
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
42
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
43
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
44
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
45
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
46
+ -----END CERTIFICATE-----
47
+ date: 2025-02-15 00:00:00.000000000 Z
12
48
  dependencies:
13
49
  - !ruby/object:Gem::Dependency
14
- name: async-io
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.15'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.15'
27
- - !ruby/object:Gem::Dependency
28
- name: async-rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.0'
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: covered
50
+ name: io-endpoint
57
51
  requirement: !ruby/object:Gem::Requirement
58
52
  requirements:
59
53
  - - ">="
60
54
  - !ruby/object:Gem::Version
61
55
  version: '0'
62
- type: :development
56
+ type: :runtime
63
57
  prerelease: false
64
58
  version_requirements: !ruby/object:Gem::Requirement
65
59
  requirements:
66
60
  - - ">="
67
61
  - !ruby/object:Gem::Version
68
62
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: process-daemon
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rspec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '3.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '3.0'
97
- - !ruby/object:Gem::Dependency
98
- name: rspec-files
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.0'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec-memory
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '1.0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '1.0'
125
- description:
126
- email:
127
63
  executables: []
128
64
  extensions: []
129
65
  extra_rdoc_files: []
130
66
  files:
131
67
  - lib/async/dns.rb
68
+ - lib/async/dns/cache.rb
132
69
  - lib/async/dns/chunked.rb
70
+ - lib/async/dns/endpoint.rb
133
71
  - lib/async/dns/extensions/resolv.rb
134
72
  - lib/async/dns/extensions/string.rb
135
73
  - lib/async/dns/handler.rb
136
- - lib/async/dns/message.rb
137
- - lib/async/dns/replace.rb
138
74
  - lib/async/dns/resolver.rb
139
75
  - lib/async/dns/server.rb
140
76
  - lib/async/dns/system.rb
141
77
  - lib/async/dns/transaction.rb
142
78
  - lib/async/dns/transport.rb
143
79
  - lib/async/dns/version.rb
80
+ - license.md
81
+ - readme.md
82
+ - releases.md
144
83
  homepage: https://github.com/socketry/async-dns
145
84
  licenses:
146
85
  - MIT
147
- metadata: {}
148
- post_install_message:
86
+ metadata:
87
+ documentation_uri: https://socketry.github.io/async-dns/
88
+ funding_uri: https://github.com/sponsors/ioquatix/
89
+ source_code_uri: https://github.com/socketry/async-dns.git
149
90
  rdoc_options: []
150
91
  require_paths:
151
92
  - lib
@@ -153,15 +94,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
94
  requirements:
154
95
  - - ">="
155
96
  - !ruby/object:Gem::Version
156
- version: '0'
97
+ version: '3.1'
157
98
  required_rubygems_version: !ruby/object:Gem::Requirement
158
99
  requirements:
159
100
  - - ">="
160
101
  - !ruby/object:Gem::Version
161
102
  version: '0'
162
103
  requirements: []
163
- rubygems_version: 3.2.3
164
- signing_key:
104
+ rubygems_version: 3.6.2
165
105
  specification_version: 4
166
106
  summary: An easy to use DNS client resolver and server for Ruby.
167
107
  test_files: []
metadata.gz.sig ADDED
Binary file
@@ -1,53 +0,0 @@
1
- # Copyright, 2009, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
20
-
21
- require 'stringio'
22
- require 'resolv'
23
-
24
- require 'base64'
25
-
26
- require_relative 'extensions/resolv'
27
-
28
- module Async::DNS
29
- UDP_TRUNCATION_SIZE = 512
30
-
31
- # The DNS message container.
32
- Message = ::Resolv::DNS::Message
33
- DecodeError = ::Resolv::DNS::DecodeError
34
-
35
- # Decodes binary data into a {Message}.
36
- def self.decode_message(data)
37
- # Otherwise the decode process might fail with non-binary data.
38
- if data.respond_to? :force_encoding
39
- data.force_encoding("BINARY")
40
- end
41
-
42
- begin
43
- return Message.decode(data)
44
- rescue DecodeError
45
- raise
46
- rescue StandardError => error
47
- new_error = DecodeError.new(error.message)
48
- new_error.set_backtrace(error.backtrace)
49
-
50
- raise new_error
51
- end
52
- end
53
- end
@@ -1,54 +0,0 @@
1
- # Copyright, 2015, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
20
-
21
- require 'resolv'
22
- require 'resolv-replace'
23
-
24
- module Async::DNS
25
- module Replace
26
- class << self
27
- attr_accessor :resolver
28
-
29
- def resolver?
30
- resolver != nil
31
- end
32
-
33
- def get_address(host)
34
- begin
35
- resolver.addresses_for(host).sample.to_s
36
- rescue ResolutionFailure
37
- raise SocketError, "Hostname not known: #{host}"
38
- end
39
- end
40
- end
41
- end
42
-
43
- class << IPSocket
44
- @@resolver = nil
45
-
46
- def getaddress(host)
47
- if Replace.resolver?
48
- Replace.get_address(host)
49
- else
50
- original_resolv_getaddress(host)
51
- end
52
- end
53
- end
54
- end