Sha256: 9292118e4087026d7843351741fa507fddd550c3a2f12b3c039c6064c3d58e6a
Contents?: true
Size: 1.29 KB
Versions: 3
Compression:
Stored size: 1.29 KB
Contents
require "securerandom" module CC module Analyzer class EnginesRunner InvalidEngineName = Class.new(StandardError) NoEnabledEngines = Class.new(StandardError) def initialize(registry, formatter, source_dir, config, requested_paths = [], container_label = nil) @registry = registry @formatter = formatter @source_dir = source_dir @config = config @requested_paths = requested_paths @container_label = container_label end def run(container_listener = ContainerListener.new) raise NoEnabledEngines if engines.empty? @formatter.started engines.each { |engine| run_engine(engine, container_listener) } @formatter.finished ensure @formatter.close if @formatter.respond_to?(:close) end private attr_reader :requested_paths def engines @engines ||= EnginesBuilder.new( registry: @registry, config: @config, container_label: @container_label, source_dir: @source_dir, requested_paths: @requested_paths, ).run end def run_engine(engine, container_listener) @formatter.engine_running(engine) do engine.run(@formatter, container_listener) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
codeclimate-0.13.0 | lib/cc/analyzer/engines_runner.rb |
codeclimate-0.11.0 | lib/cc/analyzer/engines_runner.rb |
codeclimate-0.10.1 | lib/cc/analyzer/engines_runner.rb |