Rack::HonouredDeceased
A simple gem to include X-Clacks-Overhead headers for those lost but not forgotten into any rack (rails, sinatra, etc) application.
Inspired by this thread on reddit.
Installation
Add this line to your application's Gemfile:
gem 'rack-honoured_deceased'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack-honoured_deceased
Usage
Stand Alone Rack App
# config.ru
require 'rack'
require 'rack/honoured_deceased'
use Rack::HonouredDeceased, ["Terry Pratchett"]
app = proc do |env|
[ 200, {'Content-Type' => 'text/plain'}, ["Your webapp"] ]
end
Then run
rackup
Sinatra
require 'sinatra'
require 'rack/honoured_deceased'
use Rack::HonouredDeceased, ["Terry Pratchett"]
get '/' do
'Your webapp'
end
Rails
# Add it to your Gemfile
gem 'rack-honoured_deceased'
# In config/application.rb
config.middleware.use Rack::HonouredDeceased, ["Terry Pratchett"]
or
# In config.ru
use Rack::HonouredDeceased, ["Terry Pratchett"]
Testing
rspec
Contributing
- Fork it ( https://github.com/jphastings/rack-honoured_deceased/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
GNU Terry Pratchett