henry-container 0.0.47 → 0.0.48
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/henry/container/version.rb +1 -1
- data/lib/henry/container.rb +12 -0
- metadata +1 -1
data/lib/henry/container.rb
CHANGED
@@ -70,6 +70,13 @@ module Henry
|
|
70
70
|
def hints_file_path
|
71
71
|
"#{@opts[:"hints-dir"]}/#{@opts[:hints]}"
|
72
72
|
end
|
73
|
+
|
74
|
+
# Returns the task hints patched file path based on the given options.
|
75
|
+
#
|
76
|
+
# @return [String] the task hints file path.
|
77
|
+
def hints_file_patched_path
|
78
|
+
"#{@opts[:"in-dir"]}/#{@opts[:hints]}"
|
79
|
+
end
|
73
80
|
|
74
81
|
# Executes required validations before execution.
|
75
82
|
def before_execution
|
@@ -132,6 +139,11 @@ module Henry
|
|
132
139
|
#
|
133
140
|
# @return [Hash] the hints:w
|
134
141
|
def load_hints
|
142
|
+
# To be removed once that the Worker starts using the --hints-path
|
143
|
+
if File.exists?(self.hints_file_patched_path)
|
144
|
+
return JSON.parse(File.read(self.hints_file_patched_path))
|
145
|
+
end
|
146
|
+
|
135
147
|
return {} unless File.exists?(self.hints_file_path)
|
136
148
|
|
137
149
|
JSON.parse(File.read(self.hints_file_path))
|