lib/henry/container.rb in henry-container-0.1.54 vs lib/henry/container.rb in henry-container-0.1.55

- old
+ new

@@ -37,11 +37,11 @@ tasks_results_set = [] self.tasks.select {|task| task.enabled?}.each do |task| task_params = (params['all'] || {}).merge(params[task.name] || {}) - task.configure(task_params,self.task_extended_context(task.name)) + task.configure(task_params,self.task_extended_context(task_params)) task.export_params(task_params) task.export_config({output_directory:task.data.system[:output_directory]}) task.execution.params = task_params task.before_execute self.execute_task(task) @@ -217,22 +217,22 @@ end # Retrun the custom extended_context fo the given task. # @note default_extended_context will be used for undefined keys. # - # @param [String] task_name the target Task name. + # @param [Hash] task_params the params of the target Task. # @return [Hash] the Task custom extended context. - def extended_context(task_name) - {}['extended_context'] + def extended_context(task_params) + task_params['extended_context'] end # Returns the custom execution_context for the given task. # @note default_execution_context will be used for undefined keys. # - # @param [String] task_name the target Task name. + # @param [Hash] task_params the params of the target Task. # @return [Hash] the Task custom execution_context. - def task_extended_context(task_name) - self.default_extended_context.merge(self.extended_context(task_name) || {}) + def task_extended_context(task_params) + self.default_extended_context.merge(self.extended_context(task_params) || {}) end # Returns de task hints (tasks to be executed) or an empty array if they are not defined. #