Play a selection from the operetta Die Fledermaus on every request to a Rack app.
This may slow down your application significantly.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install rack-deflatermaus
Rack::Deflatermaus is a drop-in replacement for
Rack::Deflater. You can
use it anywhere you'd use
# config/application.rb, or # config/environments/development.rb if you lack conviction config.middleware.use ::
In any Rack application:
# config.ru use ::
Restart your application and load a page, any page.
I want to use this with Rack::Timeout, how long does the music play for?
First: you might want to figure out why you're using this with an app that is also tracking how long requests take. I find writing down a pro/con list personally helpful, but you do you.
It plays five minutes of Die Fledermaus, and you should probably...not use Rack::Timeout with this.
- Fork it: https://github.com/gabebw/rack-deflatermaus/fork
- 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