henry-container 0.0.69 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Henry
3
3
  class Container
4
4
 
5
5
  # Current Gem version
6
- VERSION = '0.0.69'
6
+ VERSION = '0.1.0'
7
7
 
8
8
  end
9
9
 
@@ -21,17 +21,22 @@ module Henry
21
21
  # Executes the loaded tasks and stores their results.
22
22
  def execute
23
23
  self.before_execution
24
+
25
+ self.params.each_with_index do |params, index|
26
+ tasks_results_set = []
24
27
 
25
- self.tasks.select {|task| task.enabled?}.each do |task|
26
- task.configure({},self.task_extended_context(task.name))
27
- self.task_params(task.name).each do |task_params|
28
- task.export_params(task_params)
28
+ self.tasks.select {|task| task.enabled?}.each do |task|
29
+ task.configure({},self.task_extended_context(task.name))
30
+ task.export_params(self.task_params(task.name)[index])
29
31
  task.before_execute
30
32
  task.execute
31
33
  task.after_execute
32
- self.tasks_results << task.report
33
- end
34
+ tasks_results_set << task.report
35
+ end
36
+
37
+ self.tasks_results << tasks_results_set
34
38
  end
39
+
35
40
  self.update_results
36
41
 
37
42
  self.dump_results
@@ -224,7 +229,7 @@ module Henry
224
229
  self.results[:tasks]
225
230
  end
226
231
 
227
- # Serts the tasks_results node of the results hash.
232
+ # Sets the tasks_results node of the results hash.
228
233
  #
229
234
  # @param [Array] results the tasks_results collection.
230
235
  def tasks_results=(results)
@@ -233,10 +238,12 @@ module Henry
233
238
 
234
239
  # Updates the results attributes based on the task_results.
235
240
  def update_results
236
- self.tasks_results.each do |task_results|
237
- self.results[:summary][:total] += 1
241
+ self.tasks_results.each do |task_results_set|
242
+ task_results_set.each do |task_results|
243
+ self.results[:summary][:total] += 1
238
244
 
239
- self.results[:summary][:breakdownByStatusCode][task_results[:code]] += 1
245
+ self.results[:summary][:breakdownByStatusCode][task_results[:code]] += 1
246
+ end
240
247
  end
241
248
  end
242
249
 
@@ -15,8 +15,8 @@ module Henry
15
15
  code: self.code,
16
16
  message: self.message,
17
17
  returnedData: {
18
- output: '', # self.output,
19
- backtrace: '' # self.backtrace
18
+ output: self.output,
19
+ backtrace: self.backtrace
20
20
  },
21
21
  log: self.log
22
22
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: henry-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.69
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-12 00:00:00.000000000 Z
12
+ date: 2012-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake