tweaked the upstart export code so that it looks for templates in ~/.foreman if no template_root is specified.

This commit is contained in:
Khaja Minhajuddin
2011-06-30 21:50:12 +05:30
parent a2ba079665
commit 8cef71766c
2 changed files with 18 additions and 0 deletions
+2
View File
@@ -26,6 +26,8 @@ private ######################################################################
def export_template(exporter, file, template_root)
if template_root && File.exist?(file_path = File.join(template_root, file))
File.read(file_path)
elsif File.exist?(file_path = File.join("~/.foreman/", file))
File.read(file_path)
else
File.read(File.expand_path("../../../../data/export/#{exporter}/#{file}", __FILE__))
end