Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Merb plugin that provides support for Sequel and Sequel::Model.
Ruby
tree: b7ff56de1d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Generators
LICENSE
README.rdoc
Rakefile
TODO

README.rdoc

merb_sequel

A plug-in for the Merb framework that provides support for Sequel models.

This is fork of the code in the official merb-plugins (github.com/wycats/merb-plugins) repository. I did separate repository and Gem to allow faster and more independent release cycle to keep up with the Sequel monthly releases.

Plug-in should be compatible with Merb 0.9.9 and higher and Sequel 1.4.0 and higher including 2.x and incoming 3.x.

Any issues please report to github.com/pk/merb_sequel/issues.

Install

gem install pk-merb_sequel --source http://gems.github.com

In Merb, add it as a dependency to your config/dependencies.rb:

dependency 'pk-merb_sequel', :require_as => 'merb_sequel'

Connection options

Merb Sequel plug-in uses config/database.yml for connection configuration.

Options are:

  • adapter. :sqlite is assumed by default.

  • database, default is “hey_dude_configure_your_database”. This should be either :memory: or file path for SQLite.

  • db_type: default is nil. Use “mssql” to connect to MSSQL using ODBC.

  • encoding or charset, default is utf8.

  • host. localhost is assumed by default.

  • logger default is Merb.logger

  • password. WARNING: default password is an empty string.

  • socket Use socket to connect to DB.

  • username or user, default is an empty string

Generators

After you install the plug-in, merb-gen can generate Sequel models for you:

merb-gen model --orm=sequel Article

same with the resources

merb-gen resource --orm=sequel Article

*Note that if you have specified that you use Sequel in init.rb or environment specific init file (for instance, environments/development.rb) via _use_orm :sequel_, you don't need to specify –orm option explicitly when using merb-gen*.

Contributors

Originally written by Duane Johnson (canadaduane at gmail.com).

Contributions by:

  • Wayne E. Seguin

  • Lance Carlson

  • Jacob Dunphy

  • Lori Holden

  • Pavel Kunc

  • e-mac

  • Piotr Usewicz

Maintained by Pavel Kunc (pavel.kunc at gmail.com)

Something went wrong with that request. Please try again.