artem-sidorenko / chef-cups

Chef cookbook for CUPS management
Apache License 2.0
2 stars 9 forks source link

['cups']['printers'] attribute structure #5

Closed chuhn closed 9 years ago

chuhn commented 9 years ago

['cups']['printers'] is an array of hashes, one hash per printer. What's the reason for that? Order shouldn't matter here, so it could simply be a single hash ie.;

{ 'printer1' => { ... }, 'printer2' => { ... }, ... }

instead of

[ { 'printer1' => { ... } }, { 'printer2' => { ... } }, ... ]

Cheers, Christopher

troyready commented 9 years ago

Yeah, that's a good idea. If you wanted to put together a PR to make the transition, we could definitely pull that in and move the cookbook to v1 (or perhaps include backwards compatibility to leave it < v1).

Otherwise, I'll look at implementing this at some point.