lib/polytrix/runners/middleware/feature_executor.rb in polytrix-0.0.1 vs lib/polytrix/runners/middleware/feature_executor.rb in polytrix-0.1.0.pre

- old
+ new

@@ -1,20 +1,21 @@ module Polytrix module Runners module Middleware class FeatureExecutor + include Polytrix::Core::FileSystemHelper def initialize(app) @app = app end def call(env) challenge_runner = env[:challenge_runner] env_file = env[:env_file] source_file = env[:source_file] - relative_source_file = source_file.relative_path_from env[:basedir] + relative_source_file = relativize(source_file, env[:basedir]) command = challenge_runner.challenge_command(env_file, relative_source_file) - process = challenge_runner.run_command command - env[:result] = Result.new(process: process, source: env[:source_file]) + execution_result = challenge_runner.run_command command + env[:result] = Result.new(execution_result: execution_result, source_file: env[:source_file].to_s) @app.call env env[:result] end end end