summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrajakta Purohit <prajakta@opscode.com>2014-01-31 16:35:49 -0800
committerPrajakta Purohit <prajakta@opscode.com>2014-01-31 16:35:49 -0800
commitf80d9ffe02ab89d56d1e94262b3168403eb210c4 (patch)
tree0f7925b5f9b45e2d76632d071abe721a3cb08370
parent3ec8fe22b2ce7a64fead70eb32f0e0ec8d378dd1 (diff)
downloadchef-f80d9ffe02ab89d56d1e94262b3168403eb210c4.tar.gz
Making sure that the resource_name and resource_id while being sent to reporting are always strings.
-rw-r--r--lib/chef/resource_reporter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource_reporter.rb b/lib/chef/resource_reporter.rb
index d29949086e..04f4ee26de 100644
--- a/lib/chef/resource_reporter.rb
+++ b/lib/chef/resource_reporter.rb
@@ -50,8 +50,8 @@ class Chef
def for_json
as_hash = {}
as_hash["type"] = new_resource.class.dsl_name
- as_hash["name"] = new_resource.name
- as_hash["id"] = new_resource.identity
+ as_hash["name"] = new_resource.name.to_s
+ as_hash["id"] = new_resource.identity.to_s
as_hash["after"] = state(new_resource)
as_hash["before"] = current_resource ? state(current_resource) : {}
as_hash["duration"] = (elapsed_time * 1000).to_i.to_s