public
Description: Detect and show a maintenance page
Homepage: http://daviddollar.org
Clone URL: git://github.com/ddollar/rack-maintenance.git
name age message
file .document Fri Aug 28 13:41:57 -0700 2009 Initial commit to rack-maintenance. [David Dollar]
file .gitignore Fri Aug 28 13:41:57 -0700 2009 Initial commit to rack-maintenance. [David Dollar]
file LICENSE Fri Aug 28 13:41:57 -0700 2009 Initial commit to rack-maintenance. [David Dollar]
file README.rdoc Sun Aug 30 11:21:20 -0700 2009 doc changes [David Dollar]
file Rakefile Mon Aug 31 18:46:01 -0700 2009 rack not rake [David Dollar]
file VERSION Mon Aug 31 18:46:05 -0700 2009 Version bump to 0.3.0 [David Dollar]
directory lib/ Sun Aug 30 11:08:02 -0700 2009 headers need to be strings [David Dollar]
file rack-maintenance.gemspec Mon Aug 31 18:46:08 -0700 2009 Regenerated gemspec for version 0.3.0 [David Dollar]
directory spec/ Fri Aug 28 13:41:57 -0700 2009 Initial commit to rack-maintenance. [David Dollar]
README.rdoc

rack-maintenance

Rack::Maintenance is a simple Rack middleware to detect the existence of a maintenance.html page and display that instead of incoming requests.

Installation

 sudo gem install rack-maintenance

Usage

 # config/environment.rb
 config.middleware.use 'Rack::Maintenance',
   :file => Rails.root.join('public', 'maintenance.html'),
   :env  => 'MAINTENANCE'

If :env is specified, all requests will be shown the maintenance page if the environment variable is set.

If :env is not specified, the maintenance page will be shown if it exists.

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don’t break it in a future version unintentionally.
  • Commit, do not mess with Rakefile or VERSION (do that in a separate commit if you want a local version)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright © 2009 David Dollar. See LICENSE for details.