On 09/25/2012 07:02 PM, Julien Vehent wrote:
Thanks. I updated the cookbook: http://community.opscode.com/cookbooks/afw
One thing that I'm not 100% comfortable with (despite the great help on #chef)
is how to export a single function from a given module to other cookbooks. In
this case, I have AFW.create_rule() that simply calls the internal function
AFWCore.process_rule(). I'm guessing this could be done better, but being
primarily a sysadmin/security and not really a rubyist, I'm not sure how.
That's totally fine. I only did a quick scan of the code, but if I read it
correctly, create_rule() is just a wrapper for some sanity checking and then
adding the rule to the node object, right?
That's completely reasonable. That all then gets added a compile time, and at
runtime when your template is processed all the data is there.
Again, I only did a very quick glance at the code, but it seems good in
general.
Archive powered by MHonArc 2.6.16.