From 5f84f04f0fc12fc004610238c94fc2ef5b0860ad Mon Sep 17 00:00:00 2001 From: Max Wilhelm Date: Fri, 4 Aug 2017 11:16:31 +0200 Subject: [PATCH] fixed match.erb template indentation --- spec/fixtures/files/match_copy.conf | 22 +++--- spec/fixtures/files/match_secure_forward.conf | 18 ++--- templates/match.erb | 68 +++++++++---------- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/spec/fixtures/files/match_copy.conf b/spec/fixtures/files/match_copy.conf index 7a45925..6359617 100644 --- a/spec/fixtures/files/match_copy.conf +++ b/spec/fixtures/files/match_copy.conf @@ -1,13 +1,13 @@ - type copy - - type elasticsearch - logstashformat true - hosts 172.20.10.17:9200 - flush_interval 30s - - - type file - path /tmp/td-agent-debug.log - + type copy + + type elasticsearch + logstashformat true + hosts 172.20.10.17:9200 + flush_interval 30s + + + type file + path /tmp/td-agent-debug.log + diff --git a/spec/fixtures/files/match_secure_forward.conf b/spec/fixtures/files/match_secure_forward.conf index 1218ba0..c843099 100644 --- a/spec/fixtures/files/match_secure_forward.conf +++ b/spec/fixtures/files/match_secure_forward.conf @@ -1,11 +1,11 @@ - flush_interval 30s - type secure_forward - secure yes - shared_key my_shared_key - self_hostname instance.test.com - ca_cert_path /path/to/ca.cert - - host test.server.com - + flush_interval 30s + type secure_forward + secure yes + shared_key my_shared_key + self_hostname instance.test.com + ca_cert_path /path/to/ca.cert + + host test.server.com + diff --git a/templates/match.erb b/templates/match.erb index 25e1a0c..f623894 100644 --- a/templates/match.erb +++ b/templates/match.erb @@ -1,39 +1,39 @@ > <% @config.each do |key, val| -%> - <%- if val.is_a?( Hash ) -%> - <<%= key -%>> - <%- val.each do |key, val| -%> - <%= key -%> <%= val %> - <%- end -%> - > - <%- elsif val.is_a?( Array ) -%> - <%- val.each do |k, v| -%> - <<%= key -%>> - <%- if k.is_a?( Hash ) -%> - <%- k.each do |x, y| -%> - <%- if y.is_a?( Array ) -%> - <%- y.each do |a, b| -%> - <<%= x -%>> - <%- if a.is_a?( Hash ) -%> - <%- a.each do |c, d| -%> - <%= c -%> <%= d %> - <%- end -%> - <%- else -%> - <%= a -%> <%= b %> - <%- end -%> - > - <%- end -%> - <%- else -%> - <%= x -%> <%= y %> - <%- end -%> - <%- end -%> - <%- else -%> - <%= k -%> <%= v %> - <%- end -%> - > - <%- end -%> - <%- else -%> - <%= key -%> <%= val %> + <%- if val.is_a?( Hash ) -%> + <<%= key -%>> + <%- val.each do |key, val| -%> + <%= key -%> <%= val %> + <%- end -%> + > + <%- elsif val.is_a?( Array ) -%> + <%- val.each do |k, v| -%> + <<%= key -%>> + <%- if k.is_a?( Hash ) -%> + <%- k.each do |x, y| -%> + <%- if y.is_a?( Array ) -%> + <%- y.each do |a, b| -%> + <<%= x -%>> + <%- if a.is_a?( Hash ) -%> + <%- a.each do |c, d| -%> + <%= c -%> <%= d %> + <%- end -%> + <%- else -%> + <%= a -%> <%= b %> + <%- end -%> + > <%- end -%> + <%- else -%> + <%= x -%> <%= y %> + <%- end -%> + <%- end -%> + <%- else -%> + <%= k -%> <%= v %> + <%- end -%> + > + <%- end -%> + <%- else -%> + <%= key -%> <%= val %> + <%- end -%> <% end -%>