rack-config_env
A rack middleware to configure rack env
Installation
Add the following to your Gemfile
:
gem 'rack-config_env'
And then execute:
$ bundle
How to Use
This gem provides a rack middleware Rack::ConfigEnv
which enables to configure rack's env.
Rails
# config/application.rb
require 'logger'
require 'rack-config_env'
class Application < Rails::Application
config.middleware.insert_after(0, Rack::ConfigEnv, {
'action_dispatch.logger' => Logger.new(STDOUT)
})
end
Middleware check.
bundle exec rake middleware
Sinatra
# config.ru
require 'rack-config_env'
use Rack::ConfigEnv, { 'rack.errors' => STDERR }
run App
ChangeLog
See CHANGELOG.md for details.
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
Copyright
Copyright (c) 2014 Naotoshi Seo. See LICENSE.txt for details.