henry-container 0.1.57 → 0.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/henry/container/version.rb +1 -1
- data/lib/henry/container.rb +42 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d820eb7cc8df7229c435ef14cd6459a8f2c8848e
|
4
|
+
data.tar.gz: 2e8166a51a118947ba06bb6a57a3f1f148addce4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fcb44539fc4185c98935bad2ac4d9d5f048109035a66077757ecba438fd4b768190c55f6af8055564423cdb3447003de452856af89eb96a97edca75fbf9c5fc
|
7
|
+
data.tar.gz: e0cafb86e38b5ddcc401b27fb8600a5d09d9f122a6c002842695bdc27c0bcb39ada7c6642d1e3eb7b976f6320e988fcb1aaae4048ecf3c83595d94c6096b7c14
|
data/lib/henry/container.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
11
|
+
date: 2013-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|