generates string from application name, env[:symbol] or current branch name, for use as the database name.
Add this line to your application's Gemfile:
gem 'dbname', git: "git://github.com/1syo/dbname.git"
And then execute:
$ bundle
Write your config/database.yml
defaults: &defaults
adapter: postgresql
encoding: unicode
pool: 5
host: 127.0.0.1
port: 5432
username: username
password: password
development: &development
<<: *defaults
database: <%= Dbname.env[:development] %>
test:
<<: *defaults
database: <%= Dbname.env[:test] %>
- 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