henry-container 0.1.45 → 0.1.46

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: 13d6548ea945776b404a8f76cb43101d7f30d88f
4
- data.tar.gz: 151ef19153f25da385b6d9d747825c31b823737a
3
+ metadata.gz: 818704fd2d6c4635eb865c01e2e61be880c04aee
4
+ data.tar.gz: dd41f95783269992028b9123ba84a2689bdd655a
5
5
  SHA512:
6
- metadata.gz: b8db4fd8024670a28060b5ace9dc547541c890def59e4ed5b5b2b7e473c31576b2fbf9dafe92f1a820d16e7493f2a38f74efa4bf1339971867b630380eb41ac4
7
- data.tar.gz: 0409f3853fc1474f80134e0a45f6f83bb82a59cc144dc3da7125a12948d878082b292d4c9543dbc545148e81f5649eb9634ab19cbe7f986ccf30a6f4cb7862dd
6
+ metadata.gz: 68f2fd61d71666a0e966a236a1f786db359c862d9951a89fdd52bb1391544bf519b6e7fa36f1b0af846bb4ab043d0ff4c4231839f5c40b071d7e4cdfcc898dda
7
+ data.tar.gz: 368d3edd6d63cdce284bc9cd21ee680ff311038d782acda8c220633972719598041228d2bd4977e87a924052f9b0e100d96329d28937c8c00d2ccb6a15fe043c
data/lib/henry/config.rb CHANGED
@@ -5,7 +5,16 @@ module Henry
5
5
  class Config < Henry::Input
6
6
 
7
7
  # ENV key where the Config will be exported to/imported from.
8
- @@export_key = 'HENRY_CONFIG'
8
+ #
9
+ # @return [String] the env config key.
10
+ EXPORT_KEY = 'HENRY_CONFIG'
11
+
12
+ # ENV key where the Config will be exported to/imported from.
13
+ #
14
+ # @return [String] the env config key.
15
+ def self.export_key
16
+ Henry::Config::EXPORT_KEY
17
+ end
9
18
 
10
19
  end
11
20
 
@@ -3,7 +3,7 @@ module Henry
3
3
  class Container
4
4
 
5
5
  # Current Gem version
6
- VERSION = '0.1.45'
6
+ VERSION = '0.1.46'
7
7
 
8
8
  end
9
9
 
data/lib/henry/input.rb CHANGED
@@ -4,8 +4,17 @@ module Henry
4
4
  class Input
5
5
  attr_reader :params
6
6
 
7
- # ENV key where the Input will be exported to/imported from.
8
- @@export_key = 'HENRY_INPUT'
7
+ # ENV key where the Config will be exported to/imported from.
8
+ #
9
+ # @return [String] the env config key.
10
+ EXPORT_KEY = 'HENRY_INPUT'
11
+
12
+ # ENV key where the Config will be exported to/imported from.
13
+ #
14
+ # @return [String] the env config key.
15
+ def self.export_key
16
+ Henry::Input::EXPORT_KEY
17
+ end
9
18
 
10
19
  # Initialize the Input with the given params or empty.
11
20
  #
@@ -26,7 +35,7 @@ module Henry
26
35
  #
27
36
  # @return [Input]
28
37
  def export!
29
- ENV[@@export_key] = JSON.dump(@params)
38
+ ENV[self.export_key] = JSON.dump(@params)
30
39
  self
31
40
  end
32
41
 
@@ -41,8 +50,8 @@ module Henry
41
50
  #
42
51
  # @return [Input]
43
52
  def import!
44
- if ENV[@@export_key]
45
- @params = JSON.parse(ENV[@@export_key])
53
+ if ENV[self.export_key]
54
+ @params = JSON.parse(ENV[self.export_key])
46
55
  else
47
56
  warn("Could not load the execution params.\nAre you running this Task via the henry-ruby-container? You should!".red)
48
57
  end
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.1.45
4
+ version: 0.1.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Decurnex