From f747741b22c0b264a00d6aeec2ea80d12df0fd3c Mon Sep 17 00:00:00 2001 From: Adam Ward Date: Thu, 18 Sep 2014 14:40:03 +1000 Subject: [PATCH 1/2] Fix generation of hash in config. Was generating with literal '\n' instead of newline --- libraries/logstash_conf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/logstash_conf.rb b/libraries/logstash_conf.rb index 958e754..4e16def 100644 --- a/libraries/logstash_conf.rb +++ b/libraries/logstash_conf.rb @@ -33,7 +33,7 @@ def self.value_to_str(v, indent = 0) when Array "[#{v.map { |e| value_to_str(e, indent) }.join(', ')}]" when Hash, Mash - '{\n' + hash_to_str(v, indent) + '\n' + indent(indent) + '}' + "{\n" + hash_to_str(v, indent) + "\n" + indent(indent) + "}" when TrueClass, FalseClass v.to_s else From d58856b8c680da931ec41e051773698ac23c81e1 Mon Sep 17 00:00:00 2001 From: Adam Ward Date: Thu, 18 Sep 2014 15:05:27 +1000 Subject: [PATCH 2/2] Fixed ruby style --- libraries/logstash_conf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/logstash_conf.rb b/libraries/logstash_conf.rb index 4e16def..888d2ae 100644 --- a/libraries/logstash_conf.rb +++ b/libraries/logstash_conf.rb @@ -33,7 +33,7 @@ def self.value_to_str(v, indent = 0) when Array "[#{v.map { |e| value_to_str(e, indent) }.join(', ')}]" when Hash, Mash - "{\n" + hash_to_str(v, indent) + "\n" + indent(indent) + "}" + "{\n" + hash_to_str(v, indent) + "\n" + indent(indent) + '}' when TrueClass, FalseClass v.to_s else