lib/isomorfeus/puppetmaster/server/executor_middleware.rb in isomorfeus-puppetmaster-0.6.12 vs lib/isomorfeus/puppetmaster/server/executor_middleware.rb in isomorfeus-puppetmaster-0.6.13

- old
+ new

@@ -21,9 +21,13 @@ response = Rack::Response.new(Oj.dump({ 'error' => 'wrong key given, execution denied' }), 401, 'Content-Type' => 'application/json') else begin + if Isomorfeus.respond_to?(:init_store) + Isomorfeus.init_store + Isomorfeus.store.clear! if Isomorfeus.store.respond_to?(:clear!) + end result = TOPLEVEL_BINDING.eval(request_hash['code']) if request_hash['code'] response = Rack::Response.new(Oj.dump({ 'result' => result }), 200, 'Content-Type' => 'application/json') rescue Exception => e