Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple generator for datamapper files

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG.rdoc
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 dm-gen.gemspec


dm-gen is a collection of generators for DataMapper, to allieviate the need to type boilerplate code to get started on a project. dm-gen uses templater as a base.

The Generators


The one file generator generates a single file, which sets up a connection to an in memory sqlite3 database, along with debug logging and a example model, which it then automigrates. One file scripts are great to use as demonstration, either of a bug, or just how to do something.

dm-gen one_file validations_example


The is generator generates an 'is' plugin structure, appropriate for plugins such as dm-is-list, dm-is-remixable etc. A complete plugin structure is generated, including a Rakefile and spec suite skeleton.

dm-gen is example


The adapter generator generates an adapter structure, appropriate for adapters to new data-sources, such as couchdb, YAML files, or anything else. A complete plugin structure is generated. The adapter file generated comes with a lot of documentation explaining the arguments and returns of the 4 methods in the DM adaptor API.

dm-gen adapter example

NB: This generates adapters with the 1.0 API, so make sure you're running that


Copyright © 2008-2010 Jonathan Stott. See LICENSE for details.

Something went wrong with that request. Please try again.