summaryrefslogtreecommitdiff
path: root/lib/chef/data_collector
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:09:07 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:09:07 -0700
commit7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (patch)
tree1e390cd535b38368d091cbb33e5d419408d5ce00 /lib/chef/data_collector
parent77f8739a4741e2370e40ec39345a92a6ea393a1a (diff)
downloadchef-7a1a6c8ef26c787e4b6dd1602f3d158b37e81720.tar.gz
fix Layout/EmptyLineAfterGuardClause
i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/data_collector')
-rw-r--r--lib/chef/data_collector/run_end_message.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/data_collector/run_end_message.rb b/lib/chef/data_collector/run_end_message.rb
index 70a0b59650..341df5694f 100644
--- a/lib/chef/data_collector/run_end_message.rb
+++ b/lib/chef/data_collector/run_end_message.rb
@@ -85,12 +85,14 @@ class Chef
# @return [Integer] the number of resources successfully updated in the chef-client run
def updated_resource_count(action_collection)
return 0 if action_collection.nil?
+
action_collection.filtered_collection(up_to_date: false, skipped: false, unprocessed: false, failed: false).count
end
# @return [Array<Chef::ActionCollection::ActionRecord>] list of all action_records for all resources
def action_records(action_collection)
return [] if action_collection.nil?
+
action_collection.action_records
end