lib/toaster/chef/resource_inspector.rb in cloud-toaster-1.1.4 vs lib/toaster/chef/resource_inspector.rb in cloud-toaster-1.1.5

- old
+ new

@@ -45,11 +45,11 @@ param = param[0].strip param = MarkupUtil.convert_array_to_dot_notation(param) if task_or_sourcecode.kind_of?(Task) param = TaskParameter.new(task_or_sourcecode, param) else - param = TaskParameter.new(nil, param) + param = TaskParameter.new(:key => param) end exists = result.find { |p| (p.kind_of?(TaskParameter) ? p.key : p) == (param.kind_of?(TaskParameter) ? param.key : param) } #puts "exists: #{param} - #{exists}" if !exists @@ -189,14 +189,9 @@ return resource rescue Object => ex msg = ex.to_s puts msg if attempt <= 1 puts ex.backtrace if attempt <= 1 - #puts "----" - #puts resource_src - #puts "----" -# puts msg -# puts ex.backtrace if msg.match(/Cannot find a resource for/) pkg_name = msg.gsub(/.*for ([a-z0-9A-Z_]+) on.*/, '\1').to_s resource_src = "#{pkg_name} = \"initializer_for_unknown_variable_#{pkg_name}\" \n #{resource_src}" elsif msg.match(/undefined (local variable or )?method/)