Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Application templating in ruby. Define beautiful patterns and cut them out.

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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.

Something went wrong with that request. Please try again.