diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-03-11 11:49:31 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-03-11 11:49:31 -0700 |
commit | 66015ba654469f4dacfd78d40b02aafee52bbf1b (patch) | |
tree | b00d0de111d18980f446b006ac63ef599eea8108 /lib/chef/resource.rb | |
parent | 4037976199b728d4bdc18fd428e8d40a84c97e2b (diff) | |
download | chef-66015ba654469f4dacfd78d40b02aafee52bbf1b.tar.gz |
Extract Action Collection from Data Collector
See the PR for details on this change.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index c857d76c02..e08b2b0bc3 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -140,6 +140,7 @@ class Chef @guard_interpreter = nil @default_guard_interpreter = :default @elapsed_time = 0 + @executed_by_runner = false end # @@ -453,6 +454,11 @@ class Chef attr_reader :elapsed_time # + # @return [Boolean] If the resource was executed by the runner + # + attr_accessor :executed_by_runner + + # # The guard interpreter that will be used to process `only_if` and `not_if` # statements. If left unset, the #default_guard_interpreter will be used. # @@ -1184,8 +1190,10 @@ class Chef # Internal Resource Interface (for Chef) # - FORBIDDEN_IVARS = [:@run_context, :@logger, :@not_if, :@only_if, :@enclosing_provider, :@description, :@introduced, :@examples, :@validation_message, :@deprecated, :@default_description, :@skip_docs].freeze - HIDDEN_IVARS = [:@allowed_actions, :@resource_name, :@source_line, :@run_context, :@logger, :@name, :@not_if, :@only_if, :@elapsed_time, :@enclosing_provider, :@description, :@introduced, :@examples, :@validation_message, :@deprecated, :@default_description, :@skip_docs].freeze + # FORBIDDEN_IVARS do not show up when the resource is converted to JSON (ie. hidden from data_collector and sending to the chef server via #to_json/to_h/as_json/inspect) + FORBIDDEN_IVARS = [:@run_context, :@logger, :@not_if, :@only_if, :@enclosing_provider, :@description, :@introduced, :@examples, :@validation_message, :@deprecated, :@default_description, :@skip_docs, :@executed_by_runner].freeze + # HIDDEN_IVARS do not show up when the resource is displayed to the user as text (ie. in the error inspector output via #to_text) + HIDDEN_IVARS = [:@allowed_actions, :@resource_name, :@source_line, :@run_context, :@logger, :@name, :@not_if, :@only_if, :@elapsed_time, :@enclosing_provider, :@description, :@introduced, :@examples, :@validation_message, :@deprecated, :@default_description, :@skip_docs, :@executed_by_runner].freeze include Chef::Mixin::ConvertToClassName extend Chef::Mixin::ConvertToClassName |