rubydns 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b68dbef72ac3c56cca16121d5e09ac0f50b601fb7c23660eafab7dbf1b695e1f
4
- data.tar.gz: 599604de9a1f63f192052756bd6125331a165c4bee0d704d83b931bf0b85395b
3
+ metadata.gz: 0f231019912433d5d7b2f1893111dc277348851423fcf05f9ef68b8b15a4c7d0
4
+ data.tar.gz: e7c281757e509fae5a5b04a2137f0b77567d1662f272a7261be46d524926462c
5
5
  SHA512:
6
- metadata.gz: d44d54b225808fb7ccee61327d42f1fe7b39a3e09606e279103b6bbae12ad4489b9095784123200c398983cff9d1c166b342ad51f0bbec9cf361eb7c7bc8c30d
7
- data.tar.gz: fc2e9354e124f7649b0499fa25ada6cfffc6760db970823e02a7e89cbfe2e69988e5ea2119aa78ff440a252d9e4b445f73c3c31a85f5f19664b3677f046b459a
6
+ metadata.gz: 20bbc5d4936c67f3636694ab052550231a3d5c8f57a73c781e7fd0176d4c9ac7a122c87b32b07b6f8058c5b5e820f8da432338ead8e5a527b104893b2a9c8b1e
7
+ data.tar.gz: 3c7aeae064c1c600bb0f5ee8220d33646be8bea93619d763f49bb5d81082e50641ef2793a5c818aadfb0ae015751376b20c1f135b0653acf25099e720213f973
checksums.yaml.gz.sig ADDED
Binary file
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2025, by Samuel Williams.
5
+ # Copyright, 2011, by Genki Sugawara.
6
+ # Copyright, 2014, by Zac Sprackett.
7
+ # Copyright, 2015, by Michal Cichra.
8
+
9
+ require "async/dns/server"
10
+
11
+ module RubyDNS
12
+ # Represents a single rule in the server.
13
+ class Rule
14
+ # Create a new rule with a given pattern and callback.
15
+ #
16
+ # @parameter pattern [Array] The pattern to match against.
17
+ def self.for(pattern, &block)
18
+ new(pattern, block)
19
+ end
20
+
21
+ # Create a new rule with a given pattern and callback.
22
+ #
23
+ # @parameter pattern [Array] The pattern to match against.
24
+ # @parameter callback [Proc] The callback to invoke when the pattern matches.
25
+ def initialize(pattern, callback)
26
+ @pattern = pattern
27
+ @callback = callback
28
+ end
29
+
30
+ # Returns true if the name and resource_class are sufficient:
31
+ def match(name, resource_class)
32
+ # If the pattern doesn't specify any resource classes, we implicitly pass this test:
33
+ return true if @pattern.size < 2
34
+
35
+ # Otherwise, we try to match against some specific resource classes:
36
+ if Class === @pattern[1]
37
+ @pattern[1] == resource_class
38
+ else
39
+ @pattern[1].include?(resource_class) rescue false
40
+ end
41
+ end
42
+
43
+ # Invoke the rule, if it matches the incoming request, it is evaluated and returns `true`, otherwise returns `false`.
44
+ def call(server, name, resource_class, transaction)
45
+ unless match(name, resource_class)
46
+ Console.debug "<#{transaction.query.id}> Resource class #{resource_class} failed to match #{@pattern[1].inspect}!"
47
+
48
+ return false
49
+ end
50
+
51
+ # Does this rule match against the supplied name?
52
+ case @pattern[0]
53
+ when Regexp
54
+ match_data = @pattern[0].match(name)
55
+
56
+ if match_data
57
+ Console.debug "<#{transaction.query.id}> Regexp pattern matched with #{match_data.inspect}."
58
+
59
+ @callback.call(transaction, match_data)
60
+
61
+ return true
62
+ end
63
+ when String
64
+ if @pattern[0] == name
65
+ Console.debug "<#{transaction.query.id}> String pattern matched."
66
+
67
+ @callback.call(transaction)
68
+
69
+ return true
70
+ end
71
+ else
72
+ if (@pattern[0].call(name, resource_class) rescue false)
73
+ Console.debug "<#{transaction.query.id}> Callable pattern matched."
74
+
75
+ @callback.call(transaction)
76
+
77
+ return true
78
+ end
79
+ end
80
+
81
+ Console.debug "<#{transaction.query.id}> No pattern matched."
82
+
83
+ # We failed to match the pattern.
84
+ return false
85
+ end
86
+
87
+ # Return a string representation of the rule.
88
+ def to_s
89
+ "#<#{self.class} #{@pattern}>"
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2025, by Samuel Williams.
5
+ # Copyright, 2011, by Genki Sugawara.
6
+ # Copyright, 2014, by Zac Sprackett.
7
+ # Copyright, 2015, by Michal Cichra.
8
+
9
+ require_relative "rule"
10
+
11
+ require "async/dns/server"
12
+
13
+ module RubyDNS
14
+ # Provides the core of the RubyDNS domain-specific language (DSL). It contains a list of rules which are used to match against incoming DNS questions. These rules are used to generate responses which are either DNS resource records or failures.
15
+ class Server < Async::DNS::Server
16
+ # Instantiate a server with a block
17
+ #
18
+ # server = Server.new do
19
+ # match(/server.mydomain.com/, IN::A) do |transaction|
20
+ # transaction.respond!("1.2.3.4")
21
+ # end
22
+ # end
23
+ #
24
+ def initialize(...)
25
+ super
26
+
27
+ @rules = []
28
+ @otherwise = nil
29
+ end
30
+
31
+ # This function connects a pattern with a block. A pattern is either a String or a Regex instance. Optionally, a second argument can be provided which is either a String, Symbol or Array of resource record types which the rule matches against.
32
+ #
33
+ # match("www.google.com")
34
+ # match("gmail.com", IN::MX)
35
+ # match(/g?mail.(com|org|net)/, [IN::MX, IN::A])
36
+ #
37
+ def match(*pattern, &block)
38
+ @rules << Rule.new(pattern, block)
39
+ end
40
+
41
+ # Specify a default block to execute if all other rules fail to match. This block is typially used to pass the request on to another server (i.e. recursive request).
42
+ #
43
+ # otherwise do |transaction|
44
+ # transaction.passthrough!($R)
45
+ # end
46
+ #
47
+ def otherwise(&block)
48
+ @otherwise = block
49
+ end
50
+
51
+ # If you match a rule, but decide within the rule that it isn't the correct one to use, you can call `next!` to evaluate the next rule - in other words, to continue falling down through the list of rules.
52
+ def next!
53
+ throw :next
54
+ end
55
+
56
+ # Give a name and a record type, try to match a rule and use it for processing the given arguments.
57
+ def process(name, resource_class, transaction)
58
+ Console.debug(self) {"<#{transaction.query.id}> Searching for #{name} #{resource_class.name}"}
59
+
60
+ @rules.each do |rule|
61
+ Console.debug(self) {"<#{transaction.query.id}> Checking rule #{rule}..."}
62
+
63
+ catch (:next) do
64
+ # If the rule returns true, we assume that it was successful and no further rules need to be evaluated.
65
+ return if rule.call(self, name, resource_class, transaction)
66
+ end
67
+ end
68
+
69
+ if @otherwise
70
+ @otherwise.call(transaction)
71
+ else
72
+ @logger.warn "<#{transaction.query.id}> Failed to handle #{name} #{resource_class.name}!"
73
+ end
74
+ end
75
+ end
76
+ end
@@ -1,23 +1,8 @@
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.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2025, by Samuel Williams.
20
5
 
21
6
  module RubyDNS
22
- VERSION = '2.0.2'
7
+ VERSION = "2.1.0"
23
8
  end
data/lib/rubydns.rb CHANGED
@@ -1,41 +1,42 @@
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.
1
+ # frozen_string_literal: true
20
2
 
21
- require 'async/dns'
3
+ # Released under the MIT License.
4
+ # Copyright, 2009-2025, by Samuel Williams.
5
+ # Copyright, 2014, by Peter M. Goldstein.
22
6
 
23
- require_relative 'rubydns/version'
24
- require_relative 'rubydns/rule_based_server'
7
+ require "async/dns"
25
8
 
9
+ require_relative "rubydns/version"
10
+ require_relative "rubydns/server"
11
+
12
+ # @namespace
26
13
  module RubyDNS
27
14
  # Backwards compatibility:
28
15
  Resolver = Async::DNS::Resolver
29
16
 
30
17
  # Run a server with the given rules.
31
- def self.run_server (*args, server_class: RuleBasedServer, **options, &block)
32
- if listen = options.delete(:listen)
33
- warn "Using `listen:` option is deprecated, please pass as the first argument."
34
- args.unshift(listen)
18
+ def self.run(*arguments, server_class: Server, **options, &block)
19
+ server = server_class.new(*arguments, **options)
20
+
21
+ if block_given?
22
+ server.instance_eval(&block)
35
23
  end
36
24
 
37
- server = server_class.new(*args, **options, &block)
25
+ return server.run
26
+ end
27
+
28
+ # @deprecated Use {RubyDNS.run} instead.
29
+ def self.run_server(*arguments, **options, &block)
30
+ if arguments.first.is_a?(Array)
31
+ warn "Using an array of interfaces is deprecated. Please use `Async::DNS::Endpoint` instead.", uplevel: 1
32
+
33
+ endpoints = arguments[0].map do |specification|
34
+ IO::Endpoint.public_send(*specification)
35
+ end
36
+
37
+ arguments[0] = IO::Endpoint.composite(*endpoints)
38
+ end
38
39
 
39
- server.run
40
+ self.run(*arguments, **options, &block)
40
41
  end
41
42
  end
data/license.md ADDED
@@ -0,0 +1,37 @@
1
+ # MIT License
2
+
3
+ Copyright, 2009-2025, by Samuel Williams.
4
+ Copyright, 2011, by Genki Sugawara.
5
+ Copyright, 2012, by Satoshi Takada.
6
+ Copyright, 2013, by Erran Carey.
7
+ Copyright, 2013, by Timothy Redaelli.
8
+ Copyright, 2013, by Jean-Christophe Cyr.
9
+ Copyright, 2013, by Keith Larrimore.
10
+ Copyright, 2014, by Mike Ryan.
11
+ Copyright, 2014, by Zac Sprackett.
12
+ Copyright, 2014, by Mark Van de Vyver.
13
+ Copyright, 2014, by Peter M. Goldstein.
14
+ Copyright, 2014, by Chris Cunningham.
15
+ Copyright, 2015, by Michal Cichra.
16
+ Copyright, 2015, by Alexey Pisarenko.
17
+ Copyright, 2016, by John Bachir.
18
+ Copyright, 2018, by Rob Fors.
19
+ Copyright, 2020, by Olle Jonsson.
20
+
21
+ Permission is hereby granted, free of charge, to any person obtaining a copy
22
+ of this software and associated documentation files (the "Software"), to deal
23
+ in the Software without restriction, including without limitation the rights
24
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
+ copies of the Software, and to permit persons to whom the Software is
26
+ furnished to do so, subject to the following conditions:
27
+
28
+ The above copyright notice and this permission notice shall be included in all
29
+ copies or substantial portions of the Software.
30
+
31
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,33 @@
1
+ # RubyDNS
2
+
3
+ RubyDNS is a high-performance DNS server which can be easily integrated into other projects or used as a stand-alone daemon. By default it uses rule-based pattern matching. Results can be hard-coded, computed, fetched from a remote DNS server or fetched from a local cache, depending on requirements.
4
+
5
+ [![Development Status](https://github.com/socketry/rubydns/workflows/Test/badge.svg)](https://github.com/socketry/rubydns/actions?workflow=Test)
6
+
7
+ ## Usage
8
+
9
+ There are examples in the `examples` directory which demonstrate how to use RubyDNS.
10
+
11
+ ## See Also
12
+
13
+ The majority of this gem is now implemented by `async-dns`.
14
+
15
+ - [async-dns](https://github.com/socketry/async-dns) — Asynchronous DNS resolver and server.
16
+
17
+ ## Contributing
18
+
19
+ We welcome contributions to this project.
20
+
21
+ 1. Fork it.
22
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
23
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
24
+ 4. Push to the branch (`git push origin my-new-feature`).
25
+ 5. Create new Pull Request.
26
+
27
+ ### Developer Certificate of Origin
28
+
29
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
30
+
31
+ ### Community Guidelines
32
+
33
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data/releases.md ADDED
@@ -0,0 +1,8 @@
1
+ # Releases
2
+
3
+ ## Unreleased
4
+
5
+ - Introduce `RubyDNS.run` as a slightly more modern way to run a server.
6
+ - Move `RubyDNS::RuleBasedServer` to `RubyDNS::Server`.
7
+ - Move `RubyDNS::RuleBasedServer::Rule` to `RubyDNS::Rule`.
8
+ - Remove usage of `@logger`.
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,58 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydns
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ - Peter M. Goldstein
9
+ - Erran Carey
10
+ - Keith Larrimore
11
+ - Alexey Pisarenko
12
+ - Chris Cunningham
13
+ - Genki Sugawara
14
+ - Jean-Christophe Cyr
15
+ - John Bachir
16
+ - Mark Van de Vyver
17
+ - Michal Cichra
18
+ - Mike Ryan
19
+ - Olle Jonsson
20
+ - Rob Fors
21
+ - Satoshi Takada
22
+ - Timothy Redaelli
23
+ - Zac Sprackett
9
24
  bindir: bin
10
- cert_chain: []
11
- date: 2018-06-16 00:00:00.000000000 Z
25
+ cert_chain:
26
+ - |
27
+ -----BEGIN CERTIFICATE-----
28
+ MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
29
+ ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
30
+ CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
31
+ MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
32
+ MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
33
+ bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
34
+ igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
35
+ 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
36
+ sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
37
+ e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
38
+ XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
39
+ RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
40
+ tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
41
+ zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
42
+ xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
43
+ BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
44
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
45
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
46
+ cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
47
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
48
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
49
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
50
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
51
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
52
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
53
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
54
+ -----END CERTIFICATE-----
55
+ date: 2025-02-16 00:00:00.000000000 Z
12
56
  dependencies:
13
57
  - !ruby/object:Gem::Dependency
14
58
  name: async-dns
@@ -24,107 +68,24 @@ dependencies:
24
68
  - - "~>"
25
69
  - !ruby/object:Gem::Version
26
70
  version: '1.0'
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: '1.3'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.3'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.4'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.4'
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- description: "\t\tRubyDNS provides a rule-based DSL for implementing DNS servers,
84
- built on top of `Async::DNS`.\n"
85
- email:
86
- - samuel.williams@oriontransfer.co.nz
87
- executables:
88
- - rubydns-check
71
+ executables: []
89
72
  extensions: []
90
73
  extra_rdoc_files: []
91
74
  files:
92
- - ".gitignore"
93
- - ".rspec"
94
- - ".simplecov"
95
- - ".travis.yml"
96
- - ".yardopts"
97
- - Gemfile
98
- - README.md
99
- - Rakefile
100
- - bin/rubydns-check
101
- - examples/Gemfile
102
- - examples/README.md
103
- - examples/basic-dns.rb
104
- - examples/cname.rb
105
- - examples/flakey-dns.rb
106
- - examples/fortune-dns.rb
107
- - examples/geoip-dns.rb
108
- - examples/simple.rb
109
- - examples/soa-dns.rb
110
- - examples/test-dns-1.rb
111
- - examples/test-dns-2.rb
112
- - examples/wikipedia-dns.rb
113
75
  - lib/rubydns.rb
114
- - lib/rubydns/rule_based_server.rb
76
+ - lib/rubydns/rule.rb
77
+ - lib/rubydns/server.rb
115
78
  - lib/rubydns/version.rb
116
- - rubydns.gemspec
117
- - spec/rubydns/daemon_spec.rb
118
- - spec/rubydns/hosts.txt
119
- - spec/rubydns/injected_supervisor_spec.rb
120
- - spec/rubydns/passthrough_spec.rb
121
- - spec/rubydns/rules_spec.rb
122
- - spec/spec_helper.rb
79
+ - license.md
80
+ - readme.md
81
+ - releases.md
123
82
  homepage: https://github.com/socketry/rubydns
124
83
  licenses:
125
84
  - MIT
126
- metadata: {}
127
- post_install_message:
85
+ metadata:
86
+ documentation_uri: https://github.io/socketry/rubydns/
87
+ funding_uri: https://github.com/sponsors/ioquatix/
88
+ source_code_uri: https://github.com/socketry/rubydns.git
128
89
  rdoc_options: []
129
90
  require_paths:
130
91
  - lib
@@ -132,22 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
93
  requirements:
133
94
  - - ">="
134
95
  - !ruby/object:Gem::Version
135
- version: '0'
96
+ version: '3.1'
136
97
  required_rubygems_version: !ruby/object:Gem::Requirement
137
98
  requirements:
138
99
  - - ">="
139
100
  - !ruby/object:Gem::Version
140
101
  version: '0'
141
102
  requirements: []
142
- rubyforge_project:
143
- rubygems_version: 2.7.6
144
- signing_key:
103
+ rubygems_version: 3.6.2
145
104
  specification_version: 4
146
105
  summary: An easy to use DNS server and resolver for Ruby.
147
- test_files:
148
- - spec/rubydns/daemon_spec.rb
149
- - spec/rubydns/hosts.txt
150
- - spec/rubydns/injected_supervisor_spec.rb
151
- - spec/rubydns/passthrough_spec.rb
152
- - spec/rubydns/rules_spec.rb
153
- - spec/spec_helper.rb
106
+ test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1 @@
1
+ ��qiςO>�����:ꯅç��Ⱦ����jT�����2b3�����KLp%ͪ{ �r@���s��!� � 3̲97R>��$����,La@���J����@����
data/.gitignore DELETED
@@ -1,26 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /test/tmp/
9
- /test/version_tmp/
10
- tmp
11
-
12
- /.yardoc/
13
- /_yardoc/
14
- /doc/
15
- /rdoc/
16
-
17
- /.bundle/
18
- /lib/bundler/man/
19
-
20
- Gemfile.lock
21
- .ruby-version
22
- .ruby-gemset
23
-
24
- /examples/log
25
- /examples/run
26
- /spec/rubydns/server/bind9/log/
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- --color
2
- --format documentation
3
- --warnings
4
- --require spec_helper
data/.simplecov DELETED
@@ -1,15 +0,0 @@
1
-
2
- SimpleCov.start do
3
- add_filter "/spec/"
4
- end
5
-
6
- # Work correctly across forks:
7
- pid = Process.pid
8
- SimpleCov.at_exit do
9
- SimpleCov.result.format! if Process.pid == pid
10
- end
11
-
12
- if ENV['TRAVIS']
13
- require 'coveralls'
14
- Coveralls.wear!
15
- end
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- rvm:
4
- - 2.0
5
- - 2.1
6
- - 2.2
7
- - 2.3
8
- - 2.4
9
- - ruby-head
10
- addons:
11
- apt:
12
- packages:
13
- - bind9
data/.yardopts DELETED
@@ -1 +0,0 @@
1
- --markup=markdown
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- group :development do
6
- gem "process-daemon"
7
- gem "nio4r", "~> 1.0"
8
- end
9
-
10
- group :test do
11
- gem 'simplecov'
12
- gem 'coveralls', require: false
13
- end