hanami / router

Ruby/Rack HTTP router
http://hanamirb.org
MIT License
362 stars 92 forks source link

change Middleware to be a class not a module #178

Closed GustavoCaso closed 6 years ago

GustavoCaso commented 6 years ago

When updating the hanami project to use the new router middleware for parsing the body, I got an error:

Failure/Error: require 'hanami/middleware/body_parser'

TypeError: Middleware is not a module

I understand is because in the hanami project there is already a Hanami::Middleware namespace and Middleware is a class, not a module.

https://github.com/hanami/hanami/blob/master/lib/hanami/middleware.rb#L9

This PR changes that.