For structured code like this (requires, includes, extends.. code that
spreads multiple files..) I'd suggest moving it out to a Ruby Gem and
using the chef_gem installation method / compile time access.
As Jay mentioned, the libraries are shipped from the server and
evaluated as they are received (IIRC) so you can have potential
ordering issues there when requiring a file that doesn't exist, or
relying on a file to be autoloaded, etc.
Here's an additional example:
http://rubygems.org/gems/flock_of_chefs
https://github.com/chrisroberts/flock_of_chefs/
https://github.com/chrisroberts/cookbook-flock_of_chefs/blob/master/recipes/default.rb
Cheers,
--AJ
Archive powered by MHonArc 2.6.16.