1
0
mirror of https://github.com/cmur2/dyndnsd.git synced 2025-07-19 09:11:18 +02:00

gem: fix applicable rubocop todos

This commit is contained in:
cn
2018-02-23 12:54:43 +01:00
parent 9a7c20babb
commit 21857959b5
14 changed files with 142 additions and 401 deletions

View File

@ -14,21 +14,21 @@ module Dyndnsd
out = []
out << "$TTL #{@ttl}"
out << "$ORIGIN #{@domain}."
out << ""
out << ''
out << "@ IN SOA #{@dns} #{@email_addr} ( #{zone['serial']} 3h 5m 1w 1h )"
out << "@ IN NS #{@dns}"
out << ""
zone['hosts'].each do |hostname,ips|
out << ''
zone['hosts'].each do |hostname, ips|
ips.each do |ip|
ip = IPAddr.new(ip).native
type = ip.ipv6? ? "AAAA" : "A"
type = ip.ipv6? ? 'AAAA' : 'A'
name = hostname.chomp('.' + @domain)
out << "#{name} IN #{type} #{ip}"
end
end
out << ""
out << ''
out << @additional_zone_content
out << ""
out << ''
out.join("\n")
end
end