
Refactor the installer to use Templater
Reported by Simon Rozet | March 19th, 2009 @ 09:17 PM
http://github.com/jnicklas/templater/tree/master
module MyGenerators
extend Templater::Manifold
class BlogGenerator < Templater::Generator
# directory this generator uses as source root when searching
# for files, directories, templates
def self.source_root
File.join(File.dirname(__FILE__), 'templates')
end
# uses blog.rbt template (note conventional trailing t)
# placing resulting file to blog.rb relatively to
# destination root
template :blog, 'blog.rb'
# does simple copy of me.jpg placing resulting file to me.jpg relatively to
# destination root
file :me, 'me.jpg'
# creates empty directory public/javascripts relatively to
# destination root
empty_directory :javascripts, File.join("public", "javascripts")
end
end
Comments and changes to this ticket
-
Simon Rozet March 19th, 2009 @ 10:36 PM
- Assigned user cleared.
-
Simon Rozet October 21st, 2009 @ 08:23 PM
- State changed from new to wontfix
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Automated continuous integration server that doesn't suck.