Rack::Multitenant
What?
Many web-applications want to provide a sandboxed instance for each customer, but know that this would be impractical and inefficient. To present the illusion of this, they often provide a subdomain, url prefix, different domain entirely, or something more exotic. Many of these can hamper development or make it hard to reproduce production problems.
Rack::Multitenant provides an interface to allow the application to decide which customer (or tenant) the request the for. It will assign the tenant object to the request's environment hash, meaning that all Rack compliant applications will be able to use it.
Installation
Add this line to your application's Gemfile:
gem 'rack-multitenant'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack-multitenant
Contributing
- Fork it
- 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 new Pull Request