berkshelf / ridley

A reliable Chef API client with a clean syntax
Other
231 stars 84 forks source link

Fixes node.all missing names #344

Closed dannypurcell closed 8 years ago

dannypurcell commented 8 years ago

With version 4.5.1, ridley Resource.all silently fails to set the resource chef_id/name since the representation.chef_id field returns a symbol and dotted-paths#dig expects a string.

expected

ridley.node.all.map{|n| n.name}
=> ["node1.testdomain",
"node2.testdomain",
"node3.testdomain",
"node4.testdomain",
 ...

actual

ridley.node.all.map{|n| n.name}
=> [nil,
 nil,
 nil,
 nil,
 ...

Converting to_s gets the expected result for nodes, roles, and data bags. I also checked cookbook.all but that appears to be a separate code path.

zhitongLBN commented 8 years ago

@reset please have this fixed, without this nice .all, i have to use .search(:node) and parse it everytime which is not so easy.

reset commented 8 years ago

@dannypurcell thank you!