lib/helper-run-class.rb in canzea-0.1.33 vs lib/helper-run-class.rb in canzea-0.1.34
- old
+ new
@@ -20,22 +20,20 @@
def enrich (params)
# If there is context information, then merge them into the parameters before calling the helper
if (ENV.has_key?('WORK_DIR') and File.exists?ENV['WORK_DIR'] + "/context.json")
context = JSON.parse(File.read(ENV['WORK_DIR'] + "/context.json"))
- context.keys.each do |key|
- params[key] = context[key]
- end
+ result = JSON.parse(params).merge(context)
+ return JSON.generate(result)
end
+ return params
end
def run (solution, action, parameters, status = false)
type = "ruby"
- self.enrich(params)
-
- #parameters = JSON.generate(parameters)
+ parameters = self.enrich(parameters)
envPush = PrepareEnvironment.new
begin
envScript = "#{@basePath}/helpers/#{solution}/environment.json"