henry-container 0.1.57 → 0.1.58

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a2883f630faa5ac5100219a1aa4bc8ac06479ec
4
- data.tar.gz: dc0bc045ffb80fde95ecb2972b38b788771e9014
3
+ metadata.gz: d820eb7cc8df7229c435ef14cd6459a8f2c8848e
4
+ data.tar.gz: 2e8166a51a118947ba06bb6a57a3f1f148addce4
5
5
  SHA512:
6
- metadata.gz: 33ac005cc11bcbbdb13edc840402e14f3be18e7c014f6692c80be098b06d786e1073c71b491af117463ecb91e380abc9f0b531ace2011ee4ce2da2005439e1df
7
- data.tar.gz: be0d3e9b7cde611523ef9dcf799e949382b32959bff680167067b85908ebe2f4e2b8de68d6cd673628ec3de89cd3dc9ce4faaec70208908fd8087dd20bca79e6
6
+ metadata.gz: 0fcb44539fc4185c98935bad2ac4d9d5f048109035a66077757ecba438fd4b768190c55f6af8055564423cdb3447003de452856af89eb96a97edca75fbf9c5fc
7
+ data.tar.gz: e0cafb86e38b5ddcc401b27fb8600a5d09d9f122a6c002842695bdc27c0bcb39ada7c6642d1e3eb7b976f6320e988fcb1aaae4048ecf3c83595d94c6096b7c14
@@ -3,7 +3,7 @@ module Henry
3
3
  class Container
4
4
 
5
5
  # Current Gem version
6
- VERSION = ENV['gem_version'] || '0.1.57'
6
+ VERSION = ENV['gem_version'] || '0.1.58'
7
7
 
8
8
  end
9
9
 
@@ -33,10 +33,16 @@ module Henry
33
33
  def execute
34
34
  self.before_execution
35
35
 
36
+ enabled_tasks = self.tasks.select {|task| task.enabled?}
37
+
38
+ self.alert(:init, :tasks => enabled_tasks, :params => self.params)
39
+
36
40
  self.params.each_with_index do |params, index|
37
41
  tasks_results_set = []
38
-
39
- self.tasks.select {|task| task.enabled?}.each do |task|
42
+
43
+ enabled_tasks.each_with_index do |task, task_index|
44
+ self.alert(:task, :index => task_index+task_index*index+1, :total => enabled_tasks.count*self.params.count)
45
+
40
46
  task_params = (params['all'] || {}).merge(params[task.name] || {})
41
47
 
42
48
  task.configure(task_params,self.task_extended_context(task_params))
@@ -55,6 +61,8 @@ module Henry
55
61
 
56
62
  self.update_results
57
63
 
64
+ self.alert(:result)
65
+
58
66
  self.dump_results
59
67
  end
60
68
 
@@ -82,6 +90,38 @@ module Henry
82
90
  json_parse_error: 'templates/errors/json_parse_error.json'
83
91
  }
84
92
 
93
+ def alert(type, data={})
94
+ case type
95
+ when :init then
96
+ puts <<LOGO
97
+ ___ ___
98
+ / | \\ _____ ___________ ___ __
99
+ / ~ \\/ __ \\ / \\_ __ < | |
100
+ \\ Y /\\ ___/| | \\ | \\/\\___ |
101
+ \\___|_ / \\___ >___| /__| / ____|
102
+ \\/ \\/ \\/ \\/
103
+
104
+ henry-ruby-container #{Henry::Container::VERSION} (http://henry.despegar.com/doc)
105
+
106
+ ------------------------------------------------------------------------
107
+ --- [ Starting ]
108
+ --- [ Tasks: #{data[:tasks].collect(&:name).join(', ')} ]
109
+ --- [ Parameter set count: #{data[:params].count} ]
110
+ LOGO
111
+ when :result then
112
+ puts <<RESULT
113
+ --- [ Result: #{self.results[:summary][:breakdownByStatusCode]['ERROR'].zero? ? 'OK' : 'ERROR' } ]
114
+ --- [ Finish ]
115
+ --- [ Final Result: #{self.results[:summary][:breakdownByStatusCode]}]
116
+ ------------------------------------------------------------------------
117
+ RESULT
118
+ when :task then
119
+ puts <<TASK
120
+ --- [Task Execution #{data[:index]}/#{data[:total]} ]
121
+ TASK
122
+ end
123
+ end
124
+
85
125
  def default_task_system_context
86
126
  {
87
127
  output_directory: self.output_directory
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: henry-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.57
4
+ version: 0.1.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Decurnex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-21 00:00:00.000000000 Z
11
+ date: 2013-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake