redding/deas — pull request #121 by kellyredding (2014-06-26 02:45:15+00:00)
Title: normalize param values in test and sinatra runners

We want to normalize the param values so we can make some assumptions
about the params that are coming in:

* they will have string keys
* they will not have `nil` values
* any value that is not an array, hash, or file will be a string

The test runner has been normalizing like this for a while, however
the sinatra runner has not been. This updates the sinatra runner
to normalize like the test runner.

The sinatra runner was already normalizing to string keys, but not
accounting for param values. Particularly, crafted requests could
cause `nil` param values. This in turn causes "not defined for
NilClass" exceptions in our app b/c we are not expecting the browser
to send `nil` values - only `""` values. This fixes that issue.

Note: I also updated how the route builds and run the runner. I
now want to log normalized params but to do that I have to build
them before logging. This meant I needed to build the runner first,
set its params value to the env, then do the logging, and then
running the runner. This removed the `run` class method from use
(it wasn't even tested anyway).

@jcredding ready for review.