Skip to content

kenkiku1021/sequel_db_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SequelDbConfig

Database configuration class for Sequel.

Installation

Add this line to your application's Gemfile:

gem 'sequel_db_config'

And then execute:

$ bundle

Or install it yourself as:

$ gem install -l pkg/sequel_db_config-0.0.1.gem

Usage

Config file

Default configuration file is "dbconfig.yaml".

db_driver: postgres
db_host: localhost
db_name: database_name
db_user: database_user
db_password: password

Create Instance

SequelDbConfig::Config class includes Singleton module. To create instance

dbconfig = SequelDbConfig::Config.instance

Method

  • connection_string : get database connection string for Sequel.
  • load(file) : load configuration from specified YAML file.
  • migrate(path, version) : exec migration on specified path.

Contributing

  1. Fork it ( https://github.com/kenkiku1021/sequel_db_config/fork )
  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 a new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages