joshbuddy / dressmaker
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (3)
- Wiki (1)
- Graphs
-
Branch:
master
Joshua Hull (author)
Tue Dec 01 11:26:12 -0800 2009
| name | age | message | |
|---|---|---|---|
| |
README.rdoc | Fri Nov 20 10:15:12 -0800 2009 | |
| |
Rakefile | Wed Nov 18 18:56:48 -0800 2009 | |
| |
VERSION | Wed Nov 18 18:58:42 -0800 2009 | |
| |
bin/ | Mon Nov 16 17:36:55 -0800 2009 | |
| |
dressmaker.gemspec | Tue Dec 01 11:26:12 -0800 2009 | |
| |
lib/ | Wed Nov 18 18:56:48 -0800 2009 | |
| |
spec/ | Wed Nov 18 18:56:48 -0800 2009 |
README.rdoc
Dressmaker
Beautiful templating
I wanted to do really simple application templating, and found Rubigen and Thor were both tied to a command-line interface paradigm, whereas I really just wanted to execute this stuff programmatically. I also wanted application templates to be entirely self-contained.
Usage
Inside your application
require 'dressmaker'
maker = Dressmaker.new('my-template', 'my-source')
maker.generate
And you’re done! If you need to pass in options at generate time, simply pass generate some options.
maker.generate(:database => 'mysql')
Inside the template directory is a file, called Pattern. Here is a typical Pattern:
desc "make executable"
directory.matches('/bin') do |dir|
dir.all { |f|
f.make_executable!
}
end
This would make everything inside bin executable.
Caution!
Everything here is subject to change. This is just an egg of an idea.
