Rack::DenyIE
===
12.04.09
- v1.1.2 ~ Fixed issue with ERB binding
12.03.09
- v1.1.1 ~ Removed an unnecessary class / Cleaned up some of the code
- v1.1 ~ Fixed CSS issues with IE 4/5 / Rewrote Tests
What?
===
- Rack middleware that denies specified versions of IE.
- Use the default template, a custom template or redirect users to another location.
Why?
===
- Because progressive enhancement only goes so far.
How?
===
Install:
[sudo] gem install rack-denyie
Use:
require 'rack-denyie'
With default options: (Allows IE 7 or higher and displays the default template)
use Rack::DenyIE
With custom template and modified minimum version:
use Rack::DenyIE, { :min_version => 8, # Allow IE 8 and higher :template => "/full/path/to/your/template.html" # Custom HTML template }
With redirection set:
use Rack::DenyIE, { :redirect_url => "http://browsehappy.com/" }
With all options:
use Rack::DenyIE, { :min_version => 6, # Minimum Version :: Allows IE 6 and higher :template => '/full/path/to/your/template.erb', # Custom template :: ERB or HTML :headline => 'Sorry, old browser alert!', # Replaces "Your version of Internet Explorer is not supported." :site_name => "My Website" # Site Name :: Replaces the default "this site" with your site name. }
Any key/value you pass in will be available to your ERB template.
use Rack::DenyIE, { :my_key => "my value" }
<%= @my_key %> #=> "my value"
Todo
===
- Allow HAML templates
- More Tests
Copyright
Copyright (c) 2009 Brad Whitcomb, Digitalstar Studios. See LICENSE for details.