[chef-dev] Re: CHEF-3237: code review + help needed for rspec test


Chronological Thread 
  • From: Ringo De Smet < >
  • To: Nick Stielau < >, Chef Dev < >
  • Subject: [chef-dev] Re: CHEF-3237: code review + help needed for rspec test
  • Date: Tue, 5 Feb 2013 18:29:12 +0100

Nick,

On 5 February 2013 18:18, Nick Stielau < " target="_blank"> > wrote:

Re: the code, I'd keep the +initialize+ method, factor out the +initialize_plist_dirs+ method and call it from the initializer rather than the within class definition.   That way, the Plist loading takes place on object instanciation rather than class loading.  Also, I'd log something in the rescue, maybe with Chef::Log.debug, because nothing is more frustrating than tracking down errors to swallowed exceptions.

If you read the ticket comments, it was adviced against performing the plist_dirs manipulation during object instantiation. See Bryan's remarks here:


I'll add some logging though...

Ringo



Archive powered by MHonArc 2.6.16.

§