No commit activity in last 3 years
No release in over 3 years
Play a selection from Die Fledermaus with every request.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
~> 3.1.0

Runtime

~> 0.4.0
>= 0
 Project Readme

Rack::Deflatermaus

A drop-in replacement for Rack::Deflater that plays a selection from the operetta Die Fledermaus on your server before every request.

This may slow down your application significantly.

Installation

Rack::Deflatermaus uses the audite gem, which requires portaudio and mpg123. Refer to audite's installation instructions to find out how to install those on your system.

Add this line to your application's Gemfile:

gem "rack-deflatermaus"

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack-deflatermaus

Usage

Rack::Deflatermaus is a drop-in replacement for Rack::Deflater. You can use it anywhere you'd use Rack::Deflater.

In Rails:

# config/application.rb, or
# config/environments/development.rb if you lack conviction

config.middleware.use Rack::Deflatermaus

In any Rack application:

# config.ru
use Rack::Deflatermaus

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.

Done? Great.

It plays five minutes of Die Fledermaus, and you should probably...not use Rack::Timeout with this.

Contributing

  1. Fork it: https://github.com/gabebw/rack-deflatermaus/fork
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Create a new Pull Request