mrbrdo/rack-webconsole — pull request #1 by ainame (2012-09-17 12:02:27+00:00)
Title: fix bug for can't launch console

I found a bug that we can't lauch web console.
'5f20c5c46aed410df917f0588818fe9d6a92413b' commit cause a bug
for javascript. When I use rack-webconsole by deafult setting,
Rack::Webconsole.key_code return "96". But, Rack::Webconsole
class's spec says Rack::Webconsole.key_code should return "[96]",
after setting value, or else webconsole.js has error that
following code.

if ( 96.indexOf(event.which) >= 0 ) {
...

Then, I have changed initializing of @@config to using
Rack::Webconsole.key_code and Rack::Webconsole.inject_jquery
methods at lib/rack/webconsole.rb. So, @@config[:key_code]
will initialize by Rack::Webconsole.key_code, and
Rack::Webconsole.key_code will return "[96]".