aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-10-15 11:22:25 -0700
committerelijah <elijah@riseup.net>2013-10-15 11:22:25 -0700
commitf2746ddc5a4cdf104970d3998ad33303a2af74fb (patch)
treec769dec38daaadf26a6b93d5f145b94b2f395ca9 /lib
parentb342e7e4a81e0bb6186a29a634c3aa4d979fe143 (diff)
downloadleap_cli-f2746ddc5a4cdf104970d3998ad33303a2af74fb.tar.gz
leap_cli-f2746ddc5a4cdf104970d3998ad33303a2af74fb.tar.bz2
fix `compile zone` (contacts.default is now always an array)
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/commands/compile.rb2
1 files changed, 1 insertions, 1 deletions
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 == ''