require 'evrone/ci/common' require 'pathname' module Evrone module CI module Worker class Local include Common::Helper::Middlewares attr_reader :job, :path_prefix middlewares do use LogJob use UpdateJobStatus use LocalCreateDirs use LocalScript end def initialize(job, path_prefix) @job = job @path_prefix = Pathname.new(path_prefix).expand_path end def perform env = OpenStruct.new job: job, path_prefix: path_prefix run_middlewares(env){ |_| 0 } end end end end end