app/lib/actions/base.rb in foreman-tasks-0.6.4 vs app/lib/actions/base.rb in foreman-tasks-0.6.5

- old
+ new

@@ -18,11 +18,11 @@ # This method should return humanized description of the action, e.g. "Install package" def humanized_name self.class.name.demodulize.underscore.humanize end - # This method should return String of Array<String> describing input for the task + # This method should return String or Array<String> describing input for the task def humanized_input if task_input.blank? "" else task_input.pretty_inspect @@ -38,12 +38,13 @@ else task_output.pretty_inspect end end - def humanized_error + # This method should return String or Array<String> describing the errors during the action + def humanized_errors execution_plan.steps_in_state(:skipped, :skipping, :error).map do |step| - step.error.message - end.join("\n") + step.error.message if step.error + end.compact end end end