render_erb 'nginx/nginx.launchd.erb',
:to => '/Library/LaunchDaemons/org.nginx.plist',
:sudo => true,
:comment => '<!--',
:comment_suffix => '-->'
The core problem here is that I haven't documented #render_erb properly. I've been working hard on docs over the last week or so: http://babushka.me -- but there's rdoc work to do too.
Patches welcome :)
- Ben
> --
> To post, email babush...@googlegroups.com
> To unsubscribe, email babushka_app...@googlegroups.com
> ~
> http://babushka.me
> http://github.com/benhoskings/babushka
> http://groups.google.com/group/babushka_app
But that's pretty hacky. I'd recommend figuring out the proper babushka way.
Cheers,
Chris
met? { Babushka::Renderable.new(config_filename).from?(dependency.load_path.parent / "rabbit_config.erb") }
meet { render_erb "rabbit_config.erb", :to => config_filename, :sudo => true }
(The syntax is still a bit wordy. I'll fix that soon.)
Here's how it works: the line written to the top of the rendered file includes two hashes. One is of the template the file was rendered from, and one is of the output file (excluding that top line).
So, babushka can use those hashes to tell if the file was rendered from the template as it stands now, and also if the rendered file has since been altered.
Ben