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 -%>