summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjib Dey <ranjib@pagerduty.com>2015-06-24 18:14:29 -0700
committerKartik Null Cating-Subramanian <ksubramanian@chef.io>2015-06-25 13:05:01 -0400
commitab092ceb3e68337dbc2fc5e58d00a8311ef8478b (patch)
tree79de0be47264338272e6c3f65ea5314be94bf38c
parentcb0a6ce775bd9039cc2b892f55cf146ea554c56f (diff)
downloadchef-ab092ceb3e68337dbc2fc5e58d00a8311ef8478b.tar.gz
count skipped resources in among total resources
-rw-r--r--CHANGELOG.md2
-rw-r--r--lib/chef/formatters/doc.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 808688a28f..df15462289 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,6 @@
## 12.5.0
+* [**Ranjib Dey**](https://github.com/ranjib):
+ [pr#3588](https://github.com/chef/chef/pull/3588) Count skipped resources among total resources in doc formatter
## 12.4.0
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index e76a940c38..5ea9823d78 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -22,6 +22,7 @@ class Chef
@failed_audits = 0
@start_time = Time.now
@end_time = @start_time
+ @skipped_resources = 0
end
def elapsed_time
@@ -33,7 +34,7 @@ class Chef
end
def total_resources
- @up_to_date_resources + @updated_resources
+ @up_to_date_resources + @updated_resources + @skipped_resources
end
def total_audits
@@ -236,6 +237,7 @@ class Chef
# Called when a resource action has been skipped b/c of a conditional
def resource_skipped(resource, action, conditional)
+ @skipped_resources += 1
# TODO: more info about conditional
puts " (skipped due to #{conditional.short_description})", :stream => resource
unindent