disable addition of "#generated by babushka" on erbs

20 views
Skip to first unread message

alex...@99designs.com

unread,
Apr 22, 2013, 7:29:54 PM4/22/13
to babush...@googlegroups.com
Is there any way to disable the comment generated when running render_erb?
I am currently working with a configuration file which doesn't recognize the "#" character as start of comment.


Thanks,

Alex

Ben Hoskings

unread,
Apr 22, 2013, 8:06:37 PM4/22/13
to babush...@googlegroups.com
There's no provision for disabling it, but you can customise the comment char:

    meet {
      render_erb "source.conf.erb", :to => "/etc/dest.conf, :comment => ';'
    }

You can also pass :comment_suffix if required.

This won't work for XML though, because the first line has to be a doctype, not babushka's metadata. I haven't got around to fixing that; I don't XML, myself :)

(Also, if you find you do need to bypass babushka's renderer, you could add a helper to the dep to render erb directly:

    def yolo_render src, dest
      dest.p.write(ERB.new(src.p.read).result(binding))
    end

- 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
 
---
You received this message because you are subscribed to the Google Groups "babushka_app" group.
To unsubscribe from this group and stop receiving emails from it, send an email to babushka_app...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Cheers
Ben

alex...@99designs.com

unread,
Apr 23, 2013, 4:50:26 PM4/23/13
to babush...@googlegroups.com, alex...@99designs.com
awesome, thank you so much for the info!
Reply all
Reply to author
Forward
0 new messages