henry-container 0.1.34 → 0.1.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/henry/container/version.rb +1 -1
- data/lib/henry/container.rb +11 -3
- data/lib/henry/execution.rb +19 -2
- data/lib/henry/task.rb +3 -1
- data/lib/henry.rb +0 -10
- 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: 4e3cd0a6c5d2f9581c04e6ad7bb3e8918a9d21c6
|
4
|
+
data.tar.gz: 40c5277c08b825bfde665d9f7c1d6369979b9b70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60b44da1927bbf2fa8dce08b473ba5f15d8973488fb367a48af523700f52b2111e8fb6de2a66e5c18c419ab2b9e65ea14ebe652037e59d1c9d113511974b71e6
|
7
|
+
data.tar.gz: de266bca91373f6fe53f3244f2ca7db1dd6118e60df68398ebb441abb74915924d515ec8fbfbaa36d2df05a82354d3771d72c0d613af4abf3ca90419d0a048db
|
data/lib/henry/container.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require 'date'
|
2
|
+
require 'drb/drb'
|
4
3
|
require 'colorize'
|
5
4
|
require 'fileutils'
|
6
5
|
require 'json'
|
@@ -8,6 +7,15 @@ require 'ostruct'
|
|
8
7
|
require 'rake'
|
9
8
|
require 'yaml'
|
10
9
|
|
10
|
+
require_relative 'email_client'
|
11
|
+
require_relative 'task'
|
12
|
+
require_relative 'execution'
|
13
|
+
require_relative 'input'
|
14
|
+
require_relative 'logger'
|
15
|
+
require_relative 'logger_service'
|
16
|
+
|
17
|
+
require_relative 'container/version'
|
18
|
+
|
11
19
|
module Henry
|
12
20
|
|
13
21
|
# Henry Container
|
data/lib/henry/execution.rb
CHANGED
@@ -14,15 +14,32 @@ module Henry
|
|
14
14
|
name: self.task_name,
|
15
15
|
code: self.code,
|
16
16
|
message: self.message,
|
17
|
-
returnedData: {
|
17
|
+
returnedData: self.map.merge({
|
18
18
|
output: self.output,
|
19
19
|
backtrace: self.backtrace
|
20
|
-
},
|
20
|
+
}),
|
21
21
|
log: self.log,
|
22
22
|
worker: `hostname`.strip,
|
23
23
|
parameters: self.params
|
24
24
|
}
|
25
25
|
end
|
26
|
+
|
27
|
+
# Sets the given value under the map key.
|
28
|
+
#
|
29
|
+
# @param [Symbol,String] key map key to store the given value.
|
30
|
+
# @param [String,Integer] value the value to be stored.
|
31
|
+
def set(key,value)
|
32
|
+
self.map[key.to_sym] = value
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
# Returns the internal map of custom execution values.
|
38
|
+
#
|
39
|
+
# @return [Hash] the user custom map execution values.
|
40
|
+
def map
|
41
|
+
@map ||= {}
|
42
|
+
end
|
26
43
|
|
27
44
|
end
|
28
45
|
|
data/lib/henry/task.rb
CHANGED
@@ -11,7 +11,9 @@ module Henry
|
|
11
11
|
# Returns an instance of the target Task class.
|
12
12
|
# @note Factory to create X Task instances.
|
13
13
|
#
|
14
|
-
# @
|
14
|
+
# @param [String] name the name of the task.
|
15
|
+
# @param [Hash] data task attrbutes (class_name MUST be included).
|
16
|
+
# @return [Henry::Task] the new task instance
|
15
17
|
def self.create(name, data)
|
16
18
|
return Kernel.eval(data['class_name']).new(name, data)
|
17
19
|
end
|
data/lib/henry.rb
CHANGED
@@ -1,14 +1,4 @@
|
|
1
|
-
require 'date'
|
2
|
-
require 'drb/drb'
|
3
|
-
require 'colorize'
|
4
|
-
|
5
|
-
require_relative 'henry/email_client'
|
6
|
-
require_relative 'henry/task'
|
7
1
|
require_relative 'henry/container'
|
8
|
-
require_relative 'henry/execution'
|
9
|
-
require_relative 'henry/input'
|
10
|
-
require_relative 'henry/logger'
|
11
|
-
require_relative 'henry/logger_service'
|
12
2
|
|
13
3
|
# Henry
|
14
4
|
module Henry
|
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.36
|
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-05-
|
11
|
+
date: 2013-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|