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:
@ -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
|
||||
|
Reference in New Issue
Block a user