Skip to content

Commit

Permalink
Merge pull request #17 from dobbymoodge/ruby187_specfix
Browse files Browse the repository at this point in the history
Fix ruby 1.8.7 quirks
  • Loading branch information
dobbymoodge committed Sep 22, 2015
2 parents 87949b5 + fd44d95 commit 408dad6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/type/acl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def self.pick_default_perms(perms)
}
Set.new((non_default + default).map { |perm|
key = perm.split(':')[0..1].join(':')
matching_default = default.reject { |perm| perm !~ /^#{key}:/ }
matching_default = default.reject { |tmp_perm| tmp_perm !~ /^#{key}:/ }
if (matching_default.length > 0)
matching_default
else
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/puppet/type/acl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@
advanced_perms = ['user:foo:rwx', 'group:foo:rwx', 'default:user:foo:---']
advanced_perms_results = ['user:foo:---', 'group:foo:rwx']
it 'should not do anything with no defaults' do
expect(acl_type.pick_default_perms(basic_perms)).to eq(basic_perms)
expect(acl_type.pick_default_perms(basic_perms)).to match_array(basic_perms)
end
it 'should override defaults' do
expect(acl_type.pick_default_perms(advanced_perms)).to eq(advanced_perms_results)
expect(acl_type.pick_default_perms(advanced_perms)).to match_array(advanced_perms_results)
end
end

Expand Down

0 comments on commit 408dad6

Please sign in to comment.