Fix rails4 compatibility 

This gem does not work in Rails4 since the Rack::Lock middleware has been removed in rails4.

My suggested fix is to use app.config.middleware.use instead of app.config.middleware.insert_after ::Rack::Lock.