henry-container 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/henry/container.rb +7 -3
- data/lib/henry/container/version.rb +1 -1
- metadata +2 -2
data/lib/henry/container.rb
CHANGED
@@ -101,18 +101,22 @@ module Henry
|
|
101
101
|
|
102
102
|
# Returns the execution params.
|
103
103
|
#
|
104
|
-
# @return [{String => String}]
|
104
|
+
# @return [<{String => String}>] collection of execution params.
|
105
105
|
def params
|
106
106
|
@params ||= self.load_params
|
107
107
|
end
|
108
108
|
|
109
109
|
# Loads and parses the @opts[:in] params, if they exists.
|
110
110
|
#
|
111
|
-
# @return [{String => String}]
|
111
|
+
# @return [<{String => String}>] collection of execution params.
|
112
112
|
def load_params
|
113
113
|
return [{}] unless File.exists?(self.input_file_path)
|
114
114
|
|
115
|
-
JSON.parse(File.read(self.input_file_path))
|
115
|
+
params = JSON.parse(File.read(self.input_file_path))
|
116
|
+
|
117
|
+
return [{}] if params.empty?
|
118
|
+
|
119
|
+
params
|
116
120
|
end
|
117
121
|
|
118
122
|
# Returns the default params.
|
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.
|
4
|
+
version: 0.1.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|