From 225ce88e3e3fc327d39ad79da2c01ccbca37dc92 Mon Sep 17 00:00:00 2001 From: Chris Doherty Date: Tue, 26 Jan 2016 12:11:05 -0800 Subject: DataNormalizer: Uniqify the list of actors, to satisfy pedant :acl specs (possibly the list shouldn't repeat to start with, but no one will ever know. --- lib/chef_zero/chef_data/data_normalizer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef_zero/chef_data/data_normalizer.rb b/lib/chef_zero/chef_data/data_normalizer.rb index 9a6d1ae..95f3daa 100644 --- a/lib/chef_zero/chef_data/data_normalizer.rb +++ b/lib/chef_zero/chef_data/data_normalizer.rb @@ -8,7 +8,7 @@ module ChefZero def self.normalize_acls(acls) ChefData::DefaultCreator::PERMISSIONS.each do |perm| acls[perm] ||= {} - acls[perm]['actors'] ||= [] + (acls[perm]['actors'] ||= []).uniq! # this gets doubled sometimes, for reasons. acls[perm]['groups'] ||= [] end acls -- cgit v1.2.1