From: elijah Date: Tue, 15 Oct 2013 18:22:25 +0000 (-0700) Subject: fix `compile zone` (contacts.default is now always an array) X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f2746ddc5a4cdf104970d3998ad33303a2af74fb;p=leap%2Fleap_cli.git fix `compile zone` (contacts.default is now always an array) --- diff --git a/lib/leap_cli/commands/compile.rb b/lib/leap_cli/commands/compile.rb index 8d0c9de..8ef7c6b 100644 --- a/lib/leap_cli/commands/compile.rb +++ b/lib/leap_cli/commands/compile.rb @@ -52,7 +52,7 @@ module LeapCli def compile_zone_file hosts_seen = {} f = $stdout - f.puts ZONE_HEADER % {:domain => provider.domain, :ns => provider.domain, :contact => provider.contacts.default.sub('@','.')} + f.puts ZONE_HEADER % {:domain => provider.domain, :ns => provider.domain, :contact => provider.contacts.default.first.sub('@','.')} max_width = manager.nodes.values.inject(0) {|max, node| [max, relative_hostname(node.domain.full).length].max } put_line = lambda do |host, line| host = '@' if host == ''