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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c990a97488eb9a624d354641edf8491a102f52e4
4
- data.tar.gz: 80d099be27784b8387da4ae0b7959fcf4f5afa40
3
+ metadata.gz: 4e3cd0a6c5d2f9581c04e6ad7bb3e8918a9d21c6
4
+ data.tar.gz: 40c5277c08b825bfde665d9f7c1d6369979b9b70
5
5
  SHA512:
6
- metadata.gz: 6e91414391559c34a04aa8179357316f8237d723b07eb1e995f054987c55f73e910798f35c5be0b5564f8952f75a31d1f7ec91ed97450305e554031a041dfc8f
7
- data.tar.gz: 5f6dc33bf0ec4a3a976ff89fa88849570e3f365e58b2bf495ecc5966ba4203beae33b64ca4265ad3ad7f3c943ae3a087be6047f1678dc3873da94bc86aed6cf2
6
+ metadata.gz: 60b44da1927bbf2fa8dce08b473ba5f15d8973488fb367a48af523700f52b2111e8fb6de2a66e5c18c419ab2b9e65ea14ebe652037e59d1c9d113511974b71e6
7
+ data.tar.gz: de266bca91373f6fe53f3244f2ca7db1dd6118e60df68398ebb441abb74915924d515ec8fbfbaa36d2df05a82354d3771d72c0d613af4abf3ca90419d0a048db
@@ -3,7 +3,7 @@ module Henry
3
3
  class Container
4
4
 
5
5
  # Current Gem version
6
- VERSION = '0.1.34'
6
+ VERSION = '0.1.36'
7
7
 
8
8
  end
9
9
 
@@ -1,6 +1,5 @@
1
- require_relative 'container/version'
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
@@ -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
- # @return [Task]
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.34
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-15 00:00:00.000000000 Z
11
+ date: 2013-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake