Fixup validation for Puppet 2.6.8

Anonymous arrays and comparing booleans does not work in 2.6.8 like they
do in master.  In 2.6.8 we cannot compare a true / false variable to a
string inside of Ruby without forcing the function argument to be a
string.
This commit is contained in:
Jeff McCune
2011-05-25 16:07:10 -07:00
parent 5bcc4df0c3
commit 993b2e5e4c

View File

@@ -17,8 +17,11 @@ class java(
$version='1.6.0_25-fcs'
) {
validate_re($jre, [ '^true$', '^false$' ])
validate_re($jdk, [ '^true$', '^false$' ])
# Cannot pass anonymous arrays to functions in 2.6.8
$v_true_false = [ '^true$', '^false$' ]
# Must compare string values, not booleans.
validate_re("$jre", $v_true_false)
validate_re("$jdk", $v_true_false)
validate_re($version, '^[._0-9a-zA-Z:-]+$')
$jre_real = $jre