Skip to content

Commit eac362c

Browse files
committed
Merge pull request #27 from hubspotdevops/sorted_hash
Ensure consistent printing of hash members in templates
2 parents a982d63 + 8a84169 commit eac362c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

templates/vhost/vhost_footer.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
include <%= file %>;
33
<% end -%><% end -%>
44

5-
<% if @vhost_cfg_append -%><% vhost_cfg_append.each do |key,value| -%>
5+
<% if @vhost_cfg_append -%><% vhost_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
66
<%= key %> <%= value %><% if key[-1,1] != '}' %>;<% end %>
77
<% end -%><% end -%>
88

templates/vhost/vhost_header.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
<% if @vhost_cfg_prepend -%><% vhost_cfg_prepend.each do |key,value| -%>
2+
<% if @vhost_cfg_prepend -%><% vhost_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %>;
44
<% end -%><% end -%>
55

templates/vhost/vhost_ssl_header.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
<% if @ssl_cfg_prepend -%><% ssl_cfg_prepend.each do |key,value| -%>
2+
<% if @ssl_cfg_prepend -%><% ssl_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
33
<%= key %> <%= value %>;
44
<% end -%><% end -%>
55
listen <%= listen_ip %>:<%= ssl_port %><% if scope.lookupvar('nginx::params::nx_spdy') == 'on' %> ssl spdy<% end %> <% if @listen_options %><%= listen_options %><% end %>;

0 commit comments

Comments
 (0)