Revision b4984838
Added by Matthias Dellweg about 5 years ago
test/unit/foreman/renderer/snapshot_source.rb | ||
---|---|---|
end
|
||
|
||
def find_snippet(name)
|
||
snippet_path = Rails.root.join('app', 'views', 'unattended', 'provisioning_templates', 'snippet', "_#{name}.erb")
|
||
snippet_path = Rails.root.join('app', 'views', 'unattended', 'provisioning_templates', 'snippet', "#{name}.erb")
|
||
return unless File.file?(snippet_path)
|
||
content = File.read(snippet_path)
|
||
Template.new(name: name, template: content, snippet: true)
|
Also available in: Unified diff
Fixes #26590 - Rename template snippets
Rename provisioning template snippets to not start with '_' as rails
template partials. This will match better, what we see in
community-templates, and will allow to do a directory comparison via diff.
Script used:
for i in $(ls *.erb); do mv $i ${i#_}; done