This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 3e5171265f2cf3e4495fe5824b63e8a3cae79e3c
tree 082b3455504721d7894ed07ada9f0e18ac09007f
parent 063c2574a7ffa41473f802effa92b1a41089593f parent a319ad0c8480bc10225909d7f97898dfd3989e4f
tree 082b3455504721d7894ed07ada9f0e18ac09007f
parent 063c2574a7ffa41473f802effa92b1a41089593f parent a319ad0c8480bc10225909d7f97898dfd3989e4f
merb / merb-gen
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
.gitignore | Fri Jan 18 11:25:19 -0800 2008 | |
| |
LICENSE | Mon Sep 22 22:30:22 -0700 2008 | |
| |
README | Thu Oct 09 16:45:42 -0700 2008 | |
| |
Rakefile | ||
| |
TODO | Thu Jun 26 04:23:27 -0700 2008 | |
| |
bin/ | Thu Oct 09 00:34:34 -0700 2008 | |
| |
lib/ | ||
| |
spec/ |
merb-gen/README
==== merb-gen
merb-gen is a part of the Merb More package. It provides application, plugin, and component
generators for Merb.
==== Usage
To generate directory structure for a new merb app, run merb-gen app <app-name>.
For instance, <tt>merb-gen app foo</tt> would create a new foo merb stack application
inside of the foo directory. Merb stack sets up commonly used Merb and DataMapper gems
to quickly get you started.
Use <tt>merb-gen core</tt> to generate minimal merb-core application with full layout.
Use <tt>merb-gen flat</tt> to generate a flattened application (very simple directory structure)
and <tt>merb-gen very-flat</tt> to generate a single file application.
To generate a new merb plugin, run merb-gen plugin <plugin_name>.
To see what generators are available, run merb-gen generators.
==== Custom generators
There are two ways of adding generators, depending on how the generators are intended to be used. The first way is by
adding adding the generator via Merb.add_generators, and specifying the location of any generators.
Merb.add_generators File.join(File.dirname(__FILES__), 'generators', 'my_generator.rb')
This method has some advantages:
- it allows you to load generators only when your plugin is required in the application
- it allows you to load generators from inside the application itself
However, it also has a disadvantage: it is impossible this way to add generators whether the plugin is loaded or not,
just by virtue of the gem being installed. This is where the second way comes in: A 'Generators' file is added to the
root of the project (like a Rakefile), it should look something like this:
scope "merb-gen" do
Merb.add_generators File.join(File.dirname(__FILES__), 'generators', 'my_generator.rb')
end







