chef-metrics 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
1
  Gem::Specification.new do |gem|
4
2
  gem.authors = ["Sean Porter"]
5
3
  gem.email = ["portertech@gmail.com"]
@@ -10,5 +8,5 @@ Gem::Specification.new do |gem|
10
8
  gem.files = `git ls-files`.split($\)
11
9
  gem.name = "chef-metrics"
12
10
  gem.require_paths = ["lib"]
13
- gem.version = "0.0.4"
11
+ gem.version = "0.0.5"
14
12
  end
@@ -27,9 +27,11 @@ class ChefMetrics < Chef::Handler
27
27
 
28
28
  def report
29
29
  @measure_time = Time.now.to_i
30
- @metrics[:updated_resources] = run_status.updated_resources.length
31
- @metrics[:all_resources] = run_status.all_resources.length
32
- @metrics[:elapsed_time] = run_status.elapsed_time
30
+ unless run_status.all_resources.nil?
31
+ @metrics[:all_resources] = run_status.all_resources.length
32
+ @metrics[:updated_resources] = run_status.updated_resources.length
33
+ @metrics[:elapsed_time] = run_status.elapsed_time
34
+ end
33
35
  if run_status.success?
34
36
  @metrics[:success] = 1
35
37
  @metrics[:fail] = 0
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-metrics
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Porter
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-03 00:00:00 -07:00
18
+ date: 2012-11-13 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21