README.md in rack-env-0.0.1 vs README.md in rack-env-0.0.2

- old
+ new

@@ -1,9 +1,16 @@ # rack-env +[![Build Status](https://secure.travis-ci.org/banyan/rack-env.png)](http://travis-ci.org/banyan/rack-env) +[<img src="https://gemnasium.com/banyan/rack-env.png" />](https://gemnasium.com/banyan/rack-env) -Sets .env variables +Sets .env variables (`ENV['KEY']` pattern). +Some of the PaaS (such as [Heroku](http://www.heroku.com/) and [Sqale](http://sqale.jp)) are using configuration with .env. + +This gem helps you while you are in development mode. + + ## Installation Add this line to your application's Gemfile: gem 'rack-env' @@ -16,10 +23,40 @@ $ gem install rack-env ## Usage -TODO: Write usage instructions here +``` +require 'rack/env' +``` + +### Rails + +``` +group :development, :test do + gem 'rack-env' +end +``` + +### Rack + +``` +# config.ru +Rack::Builder.new + use Rack::Env if ENV['RACK_ENV'] == 'development' + run MyApplication.new +end +``` + +* Enable to change .env path like as below. + +``` +# config.ru +Rack::Builder.new + use Rack::Env, envfile: 'config/.env' if ENV['RACK_ENV'] == 'development' + run MyApplication.new +end +``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)