summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-08-07 14:30:11 +0300
committerSteve Kemp <steve@steve.org.uk>2015-08-07 14:30:11 +0300
commitbc17ed3dec538e8124606bccaab3b33bf1b94665 (patch)
tree567671d96d6cbb09a0d20b6c1c3d6b0f20c480bb /lib
parent21c55f59318a677d56b9a73581619a5f8cae02a3 (diff)
Ensure that we correctly parse bogus macro-definitions.
We've always had an implicit rule in macro-definitions, that they end with a period. This meant that the first line is valid: FOO is bar.vm.bytemark.co.uk. However we'd expect this to fail: FOO is bar.vm.bytemark.co.uk A similar issue would arise if a macro-definition involved more than one host, only the first would be valid. We've fixed this now, such that the trailing period is optional.
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/parser.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/custodian/parser.rb b/lib/custodian/parser.rb
index 1f59d26..a0f24c1 100644
--- a/lib/custodian/parser.rb
+++ b/lib/custodian/parser.rb
@@ -141,7 +141,7 @@ module Custodian
val.push(line) if line.length > 0
end
- elsif line =~ /\s(is|are)\s+(.*)\.+$/
+ elsif line =~ /\s(is|are)\s+(.*)\.*$/
#
# Literal list of hosts