Rack::Hackery
A set of small Rack middlewares collected from here and there...
Installation
Add this line to your application's Gemfile:
gem 'rack-hackery'
And then execute:
bundle
Or install it yourself as:
gem install rack-hackery
What's included
- A modified version of
Rack::ETagthat's supposed to fix the ugly Safari 7/8 ETag caching problem. - A JSON response prettifier.
Usage
Rack::Hackery::Etag
In either config/application.rb or config/environments/{development,production}.rb:
config.middleware.swap Rack::ETag, Rack::Hackery::ETag
Rack::Hackery::PrettyJsonResponse
In either config/application.rb or config/environments/{development,production}.rb:
config.middleware.use Rack::Hackery::PrettyJsonResponse
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new pull request