async-dns 1.2.5 → 1.2.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6979c0710ee75845aace5be1dc906bf8b3ef4b22501f2d64cd5ab8b9977039e7
4
- data.tar.gz: 3f9908e2e13855f48d8202bdb3885713f75bf1c2105e6bfde2f0207abaf85db1
3
+ metadata.gz: ea5c9c51849ba12863030e14261a5475bfa1d1ab52e39a2c845dafdf277683d7
4
+ data.tar.gz: ac45a456ef1cc82a2bd01046a549e37cb72908c42d5429bc6d6818b02ae63845
5
5
  SHA512:
6
- metadata.gz: 05fd9bfde364bae2403620d58b4a6d72aec61df907d70776ef12d7f4c8d936062e444361b8727c058a4bd3353739f1b6343570bf5d82ea761798f47423c2ea3f
7
- data.tar.gz: 9a95ab5dc73e43e6744ee7265fe8e43565b36f5bf37eccbc57f01183ed9af40218a5c043922f32dc99925e34a5f9e0ff6aacd88a12a4799d7709684349d41557
6
+ metadata.gz: b673b004c18bd79e2cea44fe66e3236e0843d3ad46ed68cec7db26302f6baa34593ae62f7f0eb826be87abe518bdb0c21035098881224aa4132239cc66091e4d
7
+ data.tar.gz: 46a55367035e353d9494cba6433bbd063c01d96675de811af4f5f6fa98d499b1e0e3cb3f0edf7773af34742c799308d5767abcd53a4002658e4f8de11eda04eb
@@ -28,7 +28,7 @@ module Async::DNS
28
28
  @server = server
29
29
  @socket = socket
30
30
 
31
- @logger = @server.logger || Async.logger
31
+ @logger = @server.logger || Console.logger
32
32
  end
33
33
 
34
34
  attr :server
@@ -46,7 +46,7 @@ module Async::DNS
46
46
  # Servers are specified in the same manor as options[:listen], e.g.
47
47
  # [:tcp/:udp, address, port]
48
48
  # In the case of multiple servers, they will be checked in sequence.
49
- def initialize(endpoints, origin: nil, logger: Async.logger, timeout: DEFAULT_TIMEOUT)
49
+ def initialize(endpoints, origin: nil, logger: Console.logger, timeout: DEFAULT_TIMEOUT)
50
50
  @endpoints = endpoints
51
51
 
52
52
  @origin = origin
@@ -36,7 +36,7 @@ module Async::DNS
36
36
  # end
37
37
  # end
38
38
  #
39
- def initialize(endpoints = DEFAULT_ENDPOINTS, origin: '.', logger: Async.logger)
39
+ def initialize(endpoints = DEFAULT_ENDPOINTS, origin: '.', logger: Console.logger)
40
40
  @endpoints = endpoints
41
41
  @origin = origin
42
42
  @logger = logger
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module DNS
23
- VERSION = '1.2.5'
23
+ VERSION = '1.2.6'
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-06 00:00:00.000000000 Z
11
+ date: 2021-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-io
@@ -39,21 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: process-daemon
42
+ name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
56
+ name: covered
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -66,51 +66,68 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  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'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rspec
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '3.6'
89
+ version: '3.0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '3.6'
96
+ version: '3.0'
83
97
  - !ruby/object:Gem::Dependency
84
- name: rake
98
+ name: rspec-files
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ">="
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: '1.0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ">="
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
97
- description: "\t\tAsync::DNS provides a high-performance DNS client resolver and server\n\t\twhich
98
- can be easily integrated into other projects or used as a stand-alone\n\t\tdaemon.\n"
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:
99
126
  email:
100
- - samuel.williams@oriontransfer.co.nz
101
127
  executables: []
102
128
  extensions: []
103
129
  extra_rdoc_files: []
104
130
  files:
105
- - ".editorconfig"
106
- - ".gitignore"
107
- - ".rspec"
108
- - ".travis.yml"
109
- - Gemfile
110
- - README.md
111
- - Rakefile
112
- - async-dns.gemspec
113
- - examples/cloudflare.rb
114
131
  - lib/async/dns.rb
115
132
  - lib/async/dns/chunked.rb
116
133
  - lib/async/dns/extensions/resolv.rb
@@ -124,32 +141,11 @@ files:
124
141
  - lib/async/dns/transaction.rb
125
142
  - lib/async/dns/transport.rb
126
143
  - lib/async/dns/version.rb
127
- - spec/async/dns/handler_spec.rb
128
- - spec/async/dns/hosts.txt
129
- - spec/async/dns/ipv6_spec.rb
130
- - spec/async/dns/junk_server_context.rb
131
- - spec/async/dns/message_spec.rb
132
- - spec/async/dns/origin_spec.rb
133
- - spec/async/dns/replace_spec.rb
134
- - spec/async/dns/resolver_performance_spec.rb
135
- - spec/async/dns/resolver_spec.rb
136
- - spec/async/dns/server/bind9/generate-local.rb
137
- - spec/async/dns/server/bind9/local.zone
138
- - spec/async/dns/server/bind9/named.conf
139
- - spec/async/dns/server/bind9/named.run
140
- - spec/async/dns/server/million.rb
141
- - spec/async/dns/server_performance_spec.rb
142
- - spec/async/dns/slow_server_spec.rb
143
- - spec/async/dns/socket_spec.rb
144
- - spec/async/dns/system_spec.rb
145
- - spec/async/dns/transaction_spec.rb
146
- - spec/async/dns/truncation_spec.rb
147
- - spec/spec_helper.rb
148
144
  homepage: https://github.com/socketry/async-dns
149
145
  licenses:
150
146
  - MIT
151
147
  metadata: {}
152
- post_install_message:
148
+ post_install_message:
153
149
  rdoc_options: []
154
150
  require_paths:
155
151
  - lib
@@ -164,29 +160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
160
  - !ruby/object:Gem::Version
165
161
  version: '0'
166
162
  requirements: []
167
- rubygems_version: 3.0.6
168
- signing_key:
163
+ rubygems_version: 3.2.3
164
+ signing_key:
169
165
  specification_version: 4
170
166
  summary: An easy to use DNS client resolver and server for Ruby.
171
- test_files:
172
- - spec/async/dns/handler_spec.rb
173
- - spec/async/dns/hosts.txt
174
- - spec/async/dns/ipv6_spec.rb
175
- - spec/async/dns/junk_server_context.rb
176
- - spec/async/dns/message_spec.rb
177
- - spec/async/dns/origin_spec.rb
178
- - spec/async/dns/replace_spec.rb
179
- - spec/async/dns/resolver_performance_spec.rb
180
- - spec/async/dns/resolver_spec.rb
181
- - spec/async/dns/server/bind9/generate-local.rb
182
- - spec/async/dns/server/bind9/local.zone
183
- - spec/async/dns/server/bind9/named.conf
184
- - spec/async/dns/server/bind9/named.run
185
- - spec/async/dns/server/million.rb
186
- - spec/async/dns/server_performance_spec.rb
187
- - spec/async/dns/slow_server_spec.rb
188
- - spec/async/dns/socket_spec.rb
189
- - spec/async/dns/system_spec.rb
190
- - spec/async/dns/transaction_spec.rb
191
- - spec/async/dns/truncation_spec.rb
192
- - spec/spec_helper.rb
167
+ test_files: []
data/.editorconfig DELETED
@@ -1,6 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- indent_size = 2
6
-
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
-
11
- /spec/**/log/
12
-
13
- # rspec failure tracking
14
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --warnings
3
- --require spec_helper
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- language: ruby
2
- dist: xenial
3
-
4
- cache: bundler
5
-
6
- addons:
7
- apt:
8
- packages:
9
- - bind9
10
-
11
- before_script:
12
- - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
13
-
14
- matrix:
15
- include:
16
- - rvm: 2.3
17
- - rvm: 2.4
18
- - rvm: 2.5
19
- - rvm: 2.6
20
- - rvm: truffleruby
21
- - rvm: jruby-head
22
- env: JRUBY_OPTS="--debug -X+O"
23
- - rvm: ruby-head
24
- allow_failures:
25
- - rvm: ruby-head
26
- - rvm: truffleruby
27
- - rvm: jruby-head
data/Gemfile DELETED
@@ -1,18 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- group :development do
6
- gem "pry"
7
- end
8
-
9
- group :test do
10
- gem 'ruby-prof', platforms: [:mri]
11
- gem "benchmark-ips"
12
-
13
- gem 'simplecov'
14
- gem 'coveralls', require: false
15
-
16
- # For comparisons:
17
- gem "nokogiri"
18
- end
data/README.md DELETED
@@ -1,148 +0,0 @@
1
- # Async::DNS
2
-
3
- Async::DNS is a high-performance DNS client resolver and server which can be easily integrated into other projects or used as a stand-alone daemon. It was forked from [RubyDNS] which is now implemented in terms of this library.
4
-
5
- [RubyDNS]: https://github.com/ioquatix/rubydns
6
-
7
- [![Build Status](https://secure.travis-ci.com/socketry/async-dns.svg)](http://travis-ci.com/socketry/async-dns)
8
- [![Code Climate](https://codeclimate.com/github/socketry/async-dns.svg)](https://codeclimate.com/github/socketry/async-dns)
9
- [![Coverage Status](https://coveralls.io/repos/socketry/async-dns/badge.svg)](https://coveralls.io/r/socketry/async-dns)
10
-
11
- ## Installation
12
-
13
- Add this line to your application's Gemfile:
14
-
15
- gem 'async-dns'
16
-
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install async-dns
24
-
25
- ## Usage
26
-
27
- ### Resolver
28
-
29
- Here is a simple example showing how to use the resolver:
30
-
31
- ```ruby
32
- Async::Reactor.run do
33
- resolver = Async::DNS::Resolver.new([[:udp, "8.8.8.8", 53], [:tcp, "8.8.8.8", 53]])
34
-
35
- addresses = resolver.addresses_for("www.google.com.")
36
-
37
- puts addresses.inspect
38
- end
39
- => [#<Resolv::IPv4 202.124.127.240>, #<Resolv::IPv4 202.124.127.216>, #<Resolv::IPv4 202.124.127.223>, #<Resolv::IPv4 202.124.127.227>, #<Resolv::IPv4 202.124.127.234>, #<Resolv::IPv4 202.124.127.230>, #<Resolv::IPv4 202.124.127.208>, #<Resolv::IPv4 202.124.127.249>, #<Resolv::IPv4 202.124.127.219>, #<Resolv::IPv4 202.124.127.218>, #<Resolv::IPv4 202.124.127.212>, #<Resolv::IPv4 202.124.127.241>, #<Resolv::IPv4 202.124.127.238>, #<Resolv::IPv4 202.124.127.245>, #<Resolv::IPv4 202.124.127.251>, #<Resolv::IPv4 202.124.127.229>]
40
- ```
41
-
42
- ### Server
43
-
44
- Here is a simple example showing how to use the server:
45
-
46
- ```ruby
47
- require 'async/dns'
48
-
49
- class TestServer < Async::DNS::Server
50
- def process(name, resource_class, transaction)
51
- @resolver ||= Async::DNS::Resolver.new([[:udp, '8.8.8.8', 53], [:tcp, '8.8.8.8', 53]])
52
-
53
- transaction.passthrough!(@resolver)
54
- end
55
- end
56
-
57
- server = TestServer.new([[:udp, '127.0.0.1', 2346]])
58
-
59
- server.run
60
- ```
61
-
62
- Then to test you could use `dig` like so:
63
-
64
- dig @localhost -p 2346 google.com
65
-
66
- ## FAQ
67
-
68
- ### File Handle Limitations
69
-
70
- I get the error `Errno::EMFILE: Too many open files - socket(2) - udp` when trying to run a server. What should I do?
71
-
72
- On some platforms (e.g. Mac OS X) the number of file descriptors is relatively low by default and should be increased by calling `ulimit -n 10000` before running tests or even before starting a server which expects a large number of concurrent incoming connections.
73
-
74
- ### Server
75
-
76
- The performance is on the same magnitude as `bind9`. Some basic benchmarks resolving 1000 names concurrently, repeated 5 times, using `Async::DNS::Resolver` gives the following:
77
-
78
- user system total real
79
- Async::DNS::Server 4.280000 0.450000 4.730000 ( 4.854862)
80
- Bind9 4.970000 0.520000 5.490000 ( 5.541213)
81
-
82
- These benchmarks are included in the unit tests. To test bind9 performance, it must be installed and `which named` must return the executable.
83
-
84
-
85
- ## Performance
86
-
87
- We welcome additional benchmarks and feedback regarding Async::DNS performance. To check the current performance results, consult the [travis build job output](https://travis-ci.org/socketry/async-dns).
88
-
89
- ### Resolver
90
-
91
- The `Async::DNS::Resolver` is highly concurrent and can resolve individual names as fast as the built in `Resolv::DNS` resolver. Because the resolver is asynchronous, when dealing with multiple names, it can work more efficiently:
92
-
93
- user system total real
94
- Async::DNS::Resolver 0.020000 0.010000 0.030000 ( 0.030507)
95
- Resolv::DNS 0.070000 0.010000 0.080000 ( 1.465975)
96
-
97
- These benchmarks are included in the unit tests.
98
-
99
- ### Server
100
-
101
- The performance is on the same magnitude as `bind9`. Some basic benchmarks resolving 1000 names concurrently, repeated 5 times, using `Async::DNS::Resolver` gives the following:
102
-
103
- user system total real
104
- Async::DNS::Server 4.280000 0.450000 4.730000 ( 4.854862)
105
- Bind9 4.970000 0.520000 5.490000 ( 5.541213)
106
-
107
- These benchmarks are included in the unit tests. To test bind9 performance, it must be installed and `which named` must return the executable.
108
-
109
- ### DNSSEC support
110
-
111
- DNSSEC is currently not supported and is [unlikely to be supported in the future](http://sockpuppet.org/blog/2015/01/15/against-dnssec/). Feel free to submit a PR.
112
-
113
- ## Contributing
114
-
115
- 1. Fork it
116
- 2. Create your feature branch (`git checkout -b my-new-feature`)
117
- 3. Commit your changes (`git commit -am 'Add some feature'`)
118
- 4. Push to the branch (`git push origin my-new-feature`)
119
- 5. Create new Pull Request
120
-
121
- ### Desired Features
122
-
123
- * Support for more features of DNS such as zone transfer.
124
- * Some kind of system level integration, e.g. registering a DNS server with the currently running system resolver.
125
-
126
- ## License
127
-
128
- Released under the MIT license.
129
-
130
- Copyright, 2015, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
131
-
132
- Permission is hereby granted, free of charge, to any person obtaining a copy
133
- of this software and associated documentation files (the "Software"), to deal
134
- in the Software without restriction, including without limitation the rights
135
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
136
- copies of the Software, and to permit persons to whom the Software is
137
- furnished to do so, subject to the following conditions:
138
-
139
- The above copyright notice and this permission notice shall be included in
140
- all copies or substantial portions of the Software.
141
-
142
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
143
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
144
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
145
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
146
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
147
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
148
- THE SOFTWARE.