http_router icon indicating copy to clipboard operation
http_router copied to clipboard

Fix many ruby warnings

Open cllns opened this issue 8 years ago • 6 comments

Addresses most of #44.

Fixing warning: URI.escape is obsolete and warning: URI.unescape is obsolete required adding a dependency, on Addressable. I hope that's OK!

All the tests pass (except for examples/static/config.ru doesn't run for me, regardless of these changes, see: #46).

Note: this doesn't fix all the Ruby warnings in this project, but rather the ones that hanami-router hits in its test suite. I tried to fix others, but they weren't easy fixes (instance_eval redefining a method). To run the tests with warnings enabled, you can do: RUBYOPT=w bundle exec rake test

Also, I couldn't fix one of the warnings that hanami-router hits: lib/http_router/route_helper.rb:99: warning: assigned but unused variable - params, because the local variable is referenced in the eval call a couple lines down, in one of the tests :/

cllns avatar May 08 '16 18:05 cllns