powerdns_pipe 1.0.1 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +3 -3
- data/lib/powerdns_pipe.rb +8 -11
- metadata +29 -49
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c6bdf68e955b60ef8898ae80c876b3a1a0719770790fbceb19f4c132e229d8ea
|
4
|
+
data.tar.gz: 645590857883ee96c5657c755a5d93726042b3199287c63279cb5b5e90337b33
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9016fb2fa8ce0586002f485f07bba981b6b76395a726cab00846fc2f6f78f4a19a0a1cced610920d949fe4d434dd256ab4a5810bfbecda39936d281e749d5366
|
7
|
+
data.tar.gz: 4a8074f7c66babb67f165937d0cf8389220b2dcc153651708b0bc0e9220c85ee8ed4251cb4ddb3d92ea7048bd67296fd8bb98193baea4b98b876e784355e97f2
|
data/README.rdoc
CHANGED
@@ -90,7 +90,7 @@ It takes the following options:
|
|
90
90
|
string for <tt>A</tt> answers, or arbitrary text
|
91
91
|
for <tt>TXT</tt> answers. For records with a
|
92
92
|
priority (like MX records) put the priority first
|
93
|
-
and then a
|
93
|
+
and then a tab and then the content, e.g: <tt>10\t
|
94
94
|
mail.example.com</tt>
|
95
95
|
|
96
96
|
[<tt>:id</tt>] An integer id for this answer. PowerDNS will remember
|
@@ -141,9 +141,9 @@ Code:
|
|
141
141
|
= More Info
|
142
142
|
|
143
143
|
Author:: John Leach (mailto:john@johnleach.co.uk)
|
144
|
-
Copyright:: Copyright (c) 2010 John Leach
|
144
|
+
Copyright:: Copyright (c) 2010-2018 John Leach
|
145
145
|
License:: MIT
|
146
|
-
Github::
|
146
|
+
Github:: https://github.com/johnl/powerdns_pipe/tree/master
|
147
147
|
|
148
148
|
See also the {ruby-pdns library}[http://code.google.com/p/ruby-pdns/]
|
149
149
|
which does things differently, with some limitations.
|
data/lib/powerdns_pipe.rb
CHANGED
@@ -20,8 +20,14 @@ module PowerDNS
|
|
20
20
|
@question = question
|
21
21
|
end
|
22
22
|
|
23
|
-
def answer(
|
24
|
-
|
23
|
+
def answer(options = {})
|
24
|
+
options = {
|
25
|
+
:ttl => 3600,
|
26
|
+
:id => -1,
|
27
|
+
:class => 'IN'
|
28
|
+
}.merge options
|
29
|
+
return unless @question.qtype == "ANY" or @question.qtype == options[:type]
|
30
|
+
@pipe.send :respond, "DATA", options[:name], options[:class], options[:type], options[:ttl], options[:id], options[:content]
|
25
31
|
end
|
26
32
|
|
27
33
|
end
|
@@ -66,15 +72,6 @@ module PowerDNS
|
|
66
72
|
err.write "EOF, terminating loop\n"
|
67
73
|
end
|
68
74
|
|
69
|
-
def answer(options = {})
|
70
|
-
options = {
|
71
|
-
:ttl => 3600,
|
72
|
-
:id => -1,
|
73
|
-
:class => 'IN'
|
74
|
-
}.merge options
|
75
|
-
|
76
|
-
respond "DATA", options[:name], options[:class], options[:type], options[:ttl], options[:id], options[:content]
|
77
|
-
end
|
78
75
|
|
79
76
|
private
|
80
77
|
|
metadata
CHANGED
@@ -1,72 +1,52 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: powerdns_pipe
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 1.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.1'
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- John Leach
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2010-08-17 00:00:00 +01:00
|
19
|
-
default_executable:
|
11
|
+
date: 2018-10-14 00:00:00.000000000 Z
|
20
12
|
dependencies: []
|
21
|
-
|
22
|
-
|
13
|
+
description: A library to allow easy development of powerdns pipe backend resolvers
|
14
|
+
in Ruby
|
23
15
|
email: john@johnleach.co.uk
|
24
16
|
executables: []
|
25
|
-
|
26
17
|
extensions: []
|
27
|
-
|
28
|
-
extra_rdoc_files:
|
18
|
+
extra_rdoc_files:
|
29
19
|
- README.rdoc
|
30
|
-
files:
|
31
|
-
- lib/powerdns_pipe.rb
|
20
|
+
files:
|
32
21
|
- README.rdoc
|
33
|
-
|
34
|
-
homepage:
|
35
|
-
licenses:
|
36
|
-
|
22
|
+
- lib/powerdns_pipe.rb
|
23
|
+
homepage: https://github.com/johnl/powerdns_pipe/tree/master
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
metadata: {}
|
37
27
|
post_install_message:
|
38
|
-
rdoc_options:
|
39
|
-
- --title
|
28
|
+
rdoc_options:
|
29
|
+
- "--title"
|
40
30
|
- PowerDNS Pipe
|
41
|
-
- --main
|
31
|
+
- "--main"
|
42
32
|
- README.rdoc
|
43
|
-
- --line-numbers
|
44
|
-
require_paths:
|
33
|
+
- "--line-numbers"
|
34
|
+
require_paths:
|
45
35
|
- lib
|
46
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
-
|
48
|
-
requirements:
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
49
38
|
- - ">="
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
version: "0"
|
55
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
-
none: false
|
57
|
-
requirements:
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
58
43
|
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
segments:
|
62
|
-
- 0
|
63
|
-
version: "0"
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
64
46
|
requirements: []
|
65
|
-
|
66
47
|
rubyforge_project:
|
67
|
-
rubygems_version:
|
48
|
+
rubygems_version: 2.7.6
|
68
49
|
signing_key:
|
69
|
-
specification_version:
|
50
|
+
specification_version: 4
|
70
51
|
summary: A Ruby abstraction of the PowerDNS pipe backend protocol
|
71
52
|
test_files: []
|
72
|
-
|