use a dedicated directory (~/.foreman/templates) to store the templates

This commit is contained in:
Khaja Minhajuddin
2011-06-30 22:23:38 +05:30
parent 8cef71766c
commit 64338c5a09
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ 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))
elsif File.exist?(file_path = File.join("~/.foreman/templates", file))
File.read(file_path)
else
File.read(File.expand_path("../../../../data/export/#{exporter}/#{file}", __FILE__))
+1 -1
View File
@@ -38,7 +38,7 @@ describe Foreman::Export::Upstart do
end
context "with alternate templates from home dir" do
let(:default_template_root) {File.expand_path("~/.foreman")}
let(:default_template_root) {File.expand_path("~/.foreman/templates")}
before do
FileUtils.mkdir_p default_template_root