Commit ac53aa1e authored by André Kerkhoff's avatar André Kerkhoff
Browse files

Allow foswiki_dir to evaluate nested Foswiki parameters

parent 7fdca423
......@@ -15,7 +15,18 @@ module Foswiki
return nil if dir.nil?
dir = dir.dup
while dir =~ /\$Foswiki::cfg{/
dir.gsub!(/\$Foswiki::cfg{(\w+)}/, node_obj['foswiki'][$1])
dir.gsub!(/\$Foswiki::cfg{([\w}{]+)}/) do |_|
full_key = Regexp.last_match[1]
value = node_obj['foswiki']['config']
full_key.split('}{').each do |key|
value = value[key]
if value.nil?
Chef::Log.error "Can not evaluate {#{full_key}} in #{name} dir"
return dir
end
end
value.to_s
end
end
dir.gsub(/{install}/, node_obj['foswiki']['install_dir'])
end
......
......@@ -3,7 +3,7 @@ maintainer 'HPC'
maintainer_email 'hpc@gsi.de'
license 'All rights reserved'
description 'Installs/Configures Foswiki'
version '2.2.11'
version '2.2.12'
depends 'apache2', '< 6.0'
supports 'debian'
supports 'ubuntu'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment