diff --git a/Gemfile b/Gemfile index 1a88250..5de1873 100644 --- a/Gemfile +++ b/Gemfile @@ -15,8 +15,10 @@ group :development, :unit_tests do gem 'puppetlabs_spec_helper', :require => false gem 'simplecov', :require => false gem 'puppet_facts', :require => false - gem 'json', :require => false + gem "json", '~> 1.8.3', :require => false + gem "json_pure", '~> 1.8.3', :require => false gem 'metadata-json-lint', :require => false + gem "rake", '< 11.0.0', :require => false end group :system_tests do diff --git a/lib/puppet/type/acl.rb b/lib/puppet/type/acl.rb index 5de3ba0..7c71cd7 100644 --- a/lib/puppet/type/acl.rb +++ b/lib/puppet/type/acl.rb @@ -157,9 +157,8 @@ def unset_insync(cur_perm) end def set_insync(cur_perm) - # Puppet.debug "permission.set_insync" - test_should = @should.map { |x| x.downcase() }.uniq - (cur_perm.sort == test_should.sort) or (provider.check_set and ((test_should - cur_perm).length == 0)) + should = @should.uniq.sort + (cur_perm.sort == should) or (provider.check_set and ((should - cur_perm).length == 0)) end def purge_insync(cur_perm) @@ -174,15 +173,14 @@ def purge_insync(cur_perm) end def insync?(is) - cur_perm = provider.permission - Puppet.debug "permission.insync? cur_perm: #{cur_perm.inspect} @should: #{@should.inspect}" + Puppet.debug "permission.insync? is: #{is.inspect} @should: #{@should.inspect}" if provider.check_purge - return purge_insync(cur_perm) + return purge_insync(is) end if provider.check_unset - return unset_insync(cur_perm) + return unset_insync(is) end - return set_insync(cur_perm) + return set_insync(is) end # Munge into normalised form