diff options
author | Adam Edwards <adamed@opscode.com> | 2014-03-27 05:28:38 -0700 |
---|---|---|
committer | Adam Edwards <adamed@opscode.com> | 2014-03-29 00:21:04 -0700 |
commit | 8fef6af58a397d79de6e46642e2480f83ae77628 (patch) | |
tree | 8a18b652e239115b186fb445b42aeceab7f7ac00 /lib/chef/resource/script.rb | |
parent | fe1279f3bbabba5add37a490f3c9e098a76ed896 (diff) | |
download | chef-8fef6af58a397d79de6e46642e2480f83ae77628.tar.gz |
Guard resource new specs and spec fixes
Diffstat (limited to 'lib/chef/resource/script.rb')
-rw-r--r-- | lib/chef/resource/script.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/chef/resource/script.rb b/lib/chef/resource/script.rb index 7d56d1d0c6..5619d4e9aa 100644 --- a/lib/chef/resource/script.rb +++ b/lib/chef/resource/script.rb @@ -33,7 +33,8 @@ class Chef @interpreter = nil @flags = nil @guard_inherited_attributes = [] - append_guard_inherited_attributes( + + set_guard_inherited_attributes( [ :cwd, :environment, @@ -68,6 +69,16 @@ class Chef ) end + protected + + def set_guard_inherited_attributes(inherited_attributes) + @guard_inherited_attributes.concat(inherited_attributes).uniq + end + + def guard_inherited_attributes + @guard_inherited_attributes + end + end end end |