README.md in capistrano-env-0.1.2 vs README.md in capistrano-env-0.2.0

- old
+ new

@@ -1,9 +1,18 @@ -# Capistrano::Env +[![Build Status](https://travis-ci.org/masarakki/capistrano-env.svg?branch=master)](https://travis-ci.org/masarakki/capistrano-env?branch=master) +[![Dependency Status](https://gemnasium.com/masarakki/capistrano-env.svg)](https://gemnasium.com/masarakki/capistrano-env) +[![Coverage Status](https://img.shields.io/coveralls/masarakki/capistrano-env.svg)](https://coveralls.io/r/masarakki/capistrano-env?branch=master) +# Capistrano::Env Capistrano with Env via file +## Notice! + +`ruby_formatter` will deprecated at `0.2.x` and it will be removed at next version (`>= 0.3`). +Now `dotenv_formatter` is avaiable, it create `.env` file instead of `capenv.rb` file, +and use `dotenv` or `dotenv-rails` gem to read `.env` file. + ## Installation Add this line to your application's Gemfile: gem 'capistrano-env' @@ -27,20 +36,21 @@ env.add /^MYAPP_/ do |key| key.gsub /^MYAPP_/, '' # replace keyname like MYAPP_DATABASE_URL => DATABASE_URL end env.add 'UNICORN_PROCESSES' env.add 'HOGE', 'hage' + env.formatter = :dotenv #=> default is :ruby, but it is deprecated now. end ``` #### 2. deploy ``` bundle exec cap production deploy ``` -- automaticaly create #{current_path}/capenv.rb -- automaticaly load #{current_path}/capenv.rb in rails boot +- automaticaly create #{current_path}/.env +- automaticaly load #{current_path}/.env if you use dotenv-rails - you should load manualy in other framework - you can use ENV['ENV_NAME'] in application ## Contributing