Skip to content

Commit

Permalink
MODULES-1680 - sort php_* hashes for idempotency
Browse files Browse the repository at this point in the history
They were already being sorted in templates/vhost/_php*.erb, but not in
templates/vhost/_directories.erb
  • Loading branch information
Morgan Haskel committed Jan 22, 2015
1 parent dd06847 commit cc36364
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/vhost/_directories.erb
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,24 @@
PassengerEnabled <%= directory['passenger_enabled'] %>
<%- end -%>
<%- if directory['php_flags'] and ! directory['php_flags'].empty? -%>
<%- directory['php_flags'].each do |flag,value| -%>
<%- directory['php_flags'].sort.each do |flag,value| -%>
<%- value = if value =~ /true|yes|on|1/i then 'on' else 'off' end -%>
php_flag <%= "#{flag} #{value}" %>
<%- end -%>
<%- end -%>
<%- if directory['php_values'] and ! directory['php_values'].empty? -%>
<%- directory['php_values'].each do |key,value| -%>
<%- directory['php_values'].sort.each do |key,value| -%>
php_value <%= "#{key} #{value}" %>
<%- end -%>
<%- end -%>
<%- if directory['php_admin_flags'] and ! directory['php_admin_flags'].empty? -%>
<%- directory['php_admin_flags'].each do |flag,value| -%>
<%- directory['php_admin_flags'].sort.each do |flag,value| -%>
<%- value = if value =~ /true|yes|on|1/i then 'on' else 'off' end -%>
php_admin_flag <%= "#{flag} #{value}" %>
<%- end -%>
<%- end -%>
<%- if directory['php_admin_values'] and ! directory['php_admin_values'].empty? -%>
<%- directory['php_admin_values'].each do |key,value| -%>
<%- directory['php_admin_values'].sort.each do |key,value| -%>
php_admin_value <%= "#{key} #{value}" %>
<%- end -%>
<%- end -%>
Expand Down

0 comments on commit cc36364

Please sign in to comment.