0.0
No commit activity in last 3 years
No release in over 3 years
A rack middleware to configure rack env.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
>= 0
>= 0

Runtime

>= 0
 Project Readme

rack-config_env

Build Status Coverage Status

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2014 Naotoshi Seo. See LICENSE.txt for details.