diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-09 12:28:52 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-09 12:28:52 -0700 |
commit | 34221471b5e9924ed7dd7915170245a081c9b71f (patch) | |
tree | 6b283949f1039e2c9f0b5afb477a71499844c81a /lib/chef/resource | |
parent | 5a30432e811ca53e5b94bafb0145d5cadb4f4573 (diff) | |
parent | 02a8fe0725c50d2526251fcb281aae65a84c5da5 (diff) | |
download | chef-34221471b5e9924ed7dd7915170245a081c9b71f.tar.gz |
Merge pull request #2197 from opscode/sersut/fixup-chef-1662
Keep deprecation of valid_actions until Chef 13.
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/lwrp_base.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb index 19c1aa4269..a4606be842 100644 --- a/lib/chef/resource/lwrp_base.rb +++ b/lib/chef/resource/lwrp_base.rb @@ -110,10 +110,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) |