powerdns_db_cli 0.0.3 → 0.0.4
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 +4 -4
- data/README.md +1 -1
- data/lib/powerdns_db_cli/cli/record.rb +5 -3
- data/powerdns_db_cli.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a50b31317da22fd03de4cf4dadb83d8b67800b74
|
4
|
+
data.tar.gz: 446cea7382b8ce0a3e0047330ba5237e00e26c67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fdddeea6c916b83b9a7c1cf12cd05d5e4ab7437335b83b69685fb73acc17e7f7de533ea29b79da43a1fc6015559462b95f651b83e3b202e4f26298dd7621ee3
|
7
|
+
data.tar.gz: d55d84efb20c03e1c948215efc71929b0ec150119373788f010e44152f693e2d146a7c0f36fd5a9aa641e7fae9ef3dc46425443801537c3d7dd1a69a38052b9a
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Usage
|
|
21
21
|
pdns domain create <name>
|
22
22
|
pdns domain remove <name>
|
23
23
|
|
24
|
-
pdns record list <domain>
|
24
|
+
pdns record list <domain> [type]
|
25
25
|
pdns record create <domain> <name> <type> <content> [prio] [ttl] [auth]
|
26
26
|
pdns record remove <domain> <name> <type> [content] [prio]
|
27
27
|
|
@@ -17,12 +17,14 @@ module PowerDNS
|
|
17
17
|
auth: auth == 'true'
|
18
18
|
end
|
19
19
|
|
20
|
-
desc 'list <domain>', 'List records of domain.'
|
21
|
-
def list(domain)
|
20
|
+
desc 'list <domain> [type]', 'List records of domain.'
|
21
|
+
def list(domain, type = nil)
|
22
22
|
d = DB::Domain.where(name: domain).first!
|
23
23
|
|
24
24
|
h = [:name, :type, :prio, :content, :ttl, :auth]
|
25
|
-
|
25
|
+
|
26
|
+
r = type.nil? ? d.records : d.records.where(type: type)
|
27
|
+
r = r.order(*h[0..1]).pluck(*h)
|
26
28
|
|
27
29
|
t = Terminal::Table.new(headings: h, rows: r)
|
28
30
|
t.align_column(0, :right)
|
data/powerdns_db_cli.gemspec
CHANGED