henry-container 0.0.55 → 0.0.56

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,11 +23,13 @@ module Henry
23
23
  self.before_execution
24
24
 
25
25
  self.tasks.select {|task| task.enabled?}.each do |task|
26
- task.configure(self.task_params(task.name), self.task_extended_context(task.name))
27
- task.before_execute
28
- task.execute
29
- task.after_execute
30
- self.tasks_results << task.report
26
+ self.task_params(task.name).each do |task_params|
27
+ task.configure(task_params, self.task_extended_context(task.name))
28
+ task.before_execute
29
+ task.execute
30
+ task.after_execute
31
+ self.tasks_results << task.report
32
+ end
31
33
  end
32
34
 
33
35
  self.update_results
@@ -100,7 +102,7 @@ module Henry
100
102
  #
101
103
  # @return [{String => String}] the execution params.
102
104
  def load_params
103
- return {} unless File.exists?(self.input_file_path)
105
+ return [{}] unless File.exists?(self.input_file_path)
104
106
 
105
107
  JSON.parse(File.read(self.input_file_path))
106
108
  end
@@ -117,9 +119,11 @@ module Henry
117
119
  # @note default_params will be used for undefined keys.
118
120
  #
119
121
  # @param [String] task_name the target Task name.
120
- # @return [Hash] the Task custom params.
122
+ # @return [Array] the Task custom params.
121
123
  def task_params(task_name)
122
- self.default_params.merge(self.params[task_name] || {})
124
+ self.params.collect do |params|
125
+ (params['all'] || {}).merge(params[task_name] || {})
126
+ end
123
127
  end
124
128
 
125
129
  # Return the default extended execution.
@@ -3,7 +3,7 @@ module Henry
3
3
  class Container
4
4
 
5
5
  # Current Gem version
6
- VERSION = '0.0.55'
6
+ VERSION = '0.0.56'
7
7
 
8
8
  end
9
9
 
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.55
4
+ version: 0.0.56
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-09-05 00:00:00.000000000 Z
12
+ date: 2012-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake