Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple generator for datamapper files

Fetching latest commit…

Octocat-spinner-32-eaf2f5

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
README.rdoc

dm-gen

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

one_file

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

is

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

adapter

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

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

Something went wrong with that request. Please try again.