summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-03-06 19:06:23 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2017-03-06 19:06:23 -0800
commit3e9b626b750fa7fd91c5cdad169992a606120d7b (patch)
tree5eb550341009b8c5ec43c2680f5d52773a8c8db5 /lib/chef/resource.rb
parent29c39b56764a52945609b0eeb0f6068da6ed0041 (diff)
downloadchef-3e9b626b750fa7fd91c5cdad169992a606120d7b.tar.gz
remove most of supports API
still there on service (where it makes some sense) also still on mount (because i have no idea if that is actively being used or if it makes any sense at all). converts it to a property on mount + service as well. also removed setting it as an array -- did we ever document that and/or does anyone use it? i'm not religiously against that way of setting it, but if nobody ever used it i'd rather remove the YAGNI. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 40911cd2cc..f9fb5926aa 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -138,7 +138,6 @@ class Chef
@action = self.class.default_action
@updated = false
@updated_by_last_action = false
- @supports = {}
@ignore_failure = false
@retries = 0
@retry_delay = 2
@@ -955,29 +954,6 @@ class Chef
end
#
- # Sets a list of capabilities of the real resource. For example, `:remount`
- # (for filesystems) and `:restart` (for services).
- #
- # TODO Calling resource.supports({}) will not set this to empty; it will do
- # a get instead. That's wrong.
- #
- # @param args Hash{Symbol=>Boolean} If non-empty, sets the capabilities of
- # this resource. Default: {}
- # @return Hash{Symbol=>Boolean} An array of things this resource supports.
- #
- def supports(args = {})
- if args.any?
- @supports = args
- else
- @supports
- end
- end
-
- def supports=(args)
- supports(args)
- end
-
- #
# A hook called after a resource is created. Meant to be overriden by
# subclasses.
#