Nested quotes are not escaped
When I send a value like "param=value" Scrolls wraps the whole string in its own quotes, but doesn't escape the quotes given. The output is something like query_string=""param=value"". Those nested quotes should probably be escaped.
Trying to figure out why you are seeing that behavior?
projects/scrolls master! : irb -Ilib
irb(main):001:0> require 'scrolls'
=> true
irb(main):002:0> Scrolls.log({"query_string" => "param=value"})
query_string="param=value"
It shouldn't be wrapping that in quotes at all.
You're not sending any quotes in the param=value string. The most likely way this would happen is by calling inspect on a string.
>> require 'scrolls'
=> false
>> Scrolls.log(:query_string => "hello there".inspect)
now=2013-09-26T13:38:56-0700 app=haystack env=development query_string='"hello there"'
=> nil
>> Scrolls.log(:query_string => "hello=there".inspect)
now=2013-09-26T13:39:03-0700 app=haystack env=development query_string=""hello=there""
=> nil
I see Scrolls tries to do the right thing by switching quote types, but doesn't do that when there's an equals.
Some other cases:
>> Scrolls.log(:query_string => "'hello there'".inspect)
now=2013-09-26T13:41:12-0700 app=haystack env=development query_string="\"'hello there'\""
=> nil
>> Scrolls.log(:query_string => "'hello=there'".inspect)
now=2013-09-26T13:41:50-0700 app=haystack env=development query_string=""'hello=there'""
=> nil
>> Scrolls.log(:query_string => "\"hello there\"".inspect)
now=2013-09-26T13:41:36-0700 app=haystack env=development query_string='"\\"hello there\\""'
=> nil
Ah I see now. Hmm, let me take a look.
Alright, I see the issue and have a fix for your first failure case. The next three are interesting, I'll have to work on those a bit.