data_bag_item() returns a plain Hash?


#1

Shouldn’t it return a Chef::DataBagItem? I just spent way too long tracking
down a recipe bug where an attribute wasn’t found because I was trying to
index into the Hash version with a Symbol, when all the Hash keys are
actually Strings. Either one works for DataBagItems (which are descended
from Mash).


Mark J. Reed markjreed@gmail.com


#2

Yo,

On 23/12/2010 9:36 AM, “Mark J. Reed” markjreed@gmail.com wrote:

Shouldn’t it return a Chef::DataBagItem? I just spent way too long
tracking down a recipe bug where an attribute wasn’t found because I was
trying to index into the Hash version with a Symbol, when all the Hash keys
are actually Strings. Either one works for DataBagItems (which are
descended from Mash).

Check the code, isolate the bug. Produce a reproduction case and open a
ticket. Sounds trivial at best.


Mark J. Reed markjreed@gmail.com

Regards,

AJ