From 08e8477e9604f7067590a9a0f7e9c3fcde1ff9e8 Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Wed, 22 Jan 2014 16:53:51 -0800 Subject: [PATCH] Noop indent and cleanup the my.cnf template --- templates/my.cnf.erb | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/templates/my.cnf.erb b/templates/my.cnf.erb index db01b57..fbcb57d 100644 --- a/templates/my.cnf.erb +++ b/templates/my.cnf.erb @@ -1,21 +1,20 @@ <% @options.sort.map do |k,v| -%> -<% if v.is_a?(Hash) -%> -[<%= k %>] -<% @options[k].sort.map do |ki, vi| -%> -<% if vi == true -%> -<%= ki %> -<% elsif vi.is_a?(Array) -%> -<% vi.each do |vii| -%> -<%= ki %> = <%= vii %> -<% end -%> -<% elsif vi and vi != '' -%> -<%= ki %> = <%= vi %> -<% elsif vi -%> -<%= ki %> -<% end -%> -<% end -%> - -<% end -%> +<% if v.is_a?(Hash) -%> +[<%= k %>] +<% v.sort.map do |ki, vi| -%> +<% if vi == true -%> +<%= ki %> +<% elsif vi.is_a?(Array) -%> +<% vi.each do |vii| -%> +<%= ki %> = <%= vii %> +<% end -%> +<% elsif vi and vi != '' -%> +<%= ki %> = <%= vi %> +<% elsif vi -%> +<%= ki %> +<% end -%> +<% end -%> +<% end %> <% end -%> !includedir /etc/mysql/conf.d/