From 6d100c8033468e34c96a6cd8161a89b149201e94 Mon Sep 17 00:00:00 2001 From: Mike Delaney Date: Tue, 30 Sep 2014 08:54:03 -0400 Subject: [PATCH] MODULES-1384 - idempotency for wsgi_script_aliases When parsing wsgi_aliases, sort the keys then generate the underlying template. --- templates/vhost/_wsgi.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/vhost/_wsgi.erb b/templates/vhost/_wsgi.erb index a0d4ded65..9f01d4091 100644 --- a/templates/vhost/_wsgi.erb +++ b/templates/vhost/_wsgi.erb @@ -13,9 +13,9 @@ WSGIProcessGroup <%= @wsgi_process_group %> <% end -%> <% if @wsgi_script_aliases and ! @wsgi_script_aliases.empty? -%> - <%- @wsgi_script_aliases.each do |a, p| -%> - <%- if a != '' and p != ''-%> - WSGIScriptAlias <%= a %> "<%= p %>" + <%- @wsgi_script_aliases.keys.sort.each do |key| -%> + <%- if key != '' and @wsgi_script_aliases[key] != ''-%> + WSGIScriptAlias <%= key %> "<%= @wsgi_script_aliases[key] %>" <%- end -%> <%- end -%> <% end -%>