Skip to content
/ dbname Public

generates string from application name, env[:symbol] or current branch name, for use as the database name.

License

Notifications You must be signed in to change notification settings

1syo/dbname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dbname

Build Status

generates string from application name, env[:symbol] or current branch name, for use as the database name.

Installation

Add this line to your application's Gemfile:

gem 'dbname', git: "git://github.com/1syo/dbname.git"

And then execute:

$ bundle

Usage

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] %>

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

About

generates string from application name, env[:symbol] or current branch name, for use as the database name.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages