Project

dm-gen

0.0
No commit activity in last 3 years
No release in over 3 years
dm-gen is a simple commandline tool for generating DataMapper related files. It includes generators for standalone or one file examples, is plugins, adapters and may eventually be expanded to do more.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.0
 Project Readme

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 © 2008-2010 Jonathan Stott. See LICENSE for details.