module-nginx/templates/vhost/location_footer.erb
Carl P. Corliss fb880576a6 cleanup resultant whitespace and key/value alignment in config files
- fix tests related to whitespace changes
2014-09-13 04:13:18 -04:00

37 lines
1.1 KiB
Text

<% if @location_cfg_append -%>
<%- @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
<%- if value.is_a?(Hash) -%>
<%- value.each do |subkey,subvalue| -%>
<%- Array(subvalue).each do |asubvalue| -%>
<%= key %> <%= subkey %> <%= asubvalue %>;
<%- end -%>
<%- end -%>
<%- else -%>
<%- Array(value).each do |asubvalue| -%>
<%= key %> <%= asubvalue %>;
<%- end -%>
<%- end -%>
<%- end -%>
<% end -%>
<% if @location_custom_cfg_append -%>
<%- @location_custom_cfg_append.each do |key,value| -%>
<%- if value.is_a?(Hash) -%>
<%- value.each do |subkey,subvalue| -%>
<%- Array(subvalue).each do |asubvalue| -%>
<%= key %> <%= subkey %> <%= asubvalue %>
<%- end -%>
<%- end -%>
<%- else -%>
<%- Array(value).each do |asubvalue| -%>
<%= key %> <%= asubvalue %>
<%- end -%>
<%- end -%>
<%- end -%>
<% end -%>
<% if @raw_append && Array(@raw_append).size > 0 -%>
<%- Array(@raw_append).each do |line| -%>
<%= line %>
<%- end -%>
<% end -%>
}