summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-09 10:18:07 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-09 10:18:07 -0700
commit94aedd4deecb55df5e7176f10cf1921099e343f5 (patch)
tree5b0048a779bc8721c7ce4ac45f0ccc770dc6f53d /lib/chef/resource
parentd75c5b69de9ec183a0ba1c90c6dc5e3c58799301 (diff)
downloadchef-94aedd4deecb55df5e7176f10cf1921099e343f5.tar.gz
Revert "Remove appending :actions and :valid_actions"
This reverts commit 4aec038d42eae5c3c3bac50aa211d2b69cf54019.
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/lwrp_base.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb
index 5b67941a8b..0c016695db 100644
--- a/lib/chef/resource/lwrp_base.rb
+++ b/lib/chef/resource/lwrp_base.rb
@@ -112,10 +112,21 @@ class Chef
if action_names.empty?
defined?(@actions) ? @actions : from_superclass(:actions, []).dup
else
- @actions = action_names
+ # BC-compat way for checking if actions have already been defined
+ if defined?(@actions)
+ @actions.push(*action_names)
+ else
+ @actions = action_names
+ end
end
end
+ # @deprecated
+ def self.valid_actions(*args)
+ Chef::Log.warn("`valid_actions' is deprecated, please use actions `instead'!")
+ actions(*args)
+ end
+
# Set the run context on the class. Used to provide access to the node
# during class definition.
def self.run_context=(run_context)