errbit/errbit — pull request #442 by danielbeardsley (2013-03-21 08:15:58+00:00)
Title: Notice API: properly transform <var> tags

`` tags with blank values were ending up completely wrong in the
resulting hash.

This: (a user with a blank name)

123

Gets parsed by hoptoad_notifier into this:

{
'key' => 'user',
'var' => [{
'key' => 'id',
'__content__' => '123'
},{
'key' => 'name'
}]
}

Which when passed through the "rekey" method, ended up like this:

{
'user' => {
'id' => '123',
'key' => 'name' # bad and wrong
}
}

If there were multiple blank values, they would overwrite each-other, each using the same `'key' => ...`.

Now, after these changes, it *correctly* comes through as:

{
'user' => {
'id' => '123',
'name' => nil # much better!
}
}