Sha256: 52b8b0d50174c39ad6fe7415319c4facab758bc577cd1e8ea5d27f5d67e3e1a8
Contents?: true
Size: 586 Bytes
Versions: 5
Compression:
Stored size: 586 Bytes
Contents
require "safe_yaml" module CC module Analyzer class EngineRegistry def initialize(dev_mode = false) @path = File.expand_path("../../../../config/engines.yml", __FILE__) @config = YAML.safe_load_file(@path) @dev_mode = dev_mode end def [](engine_name) if dev_mode? { "image" => "codeclimate/codeclimate-#{engine_name}:latest" } else @config[engine_name] end end def list @config end private def dev_mode? @dev_mode end end end end
Version data entries
5 entries across 5 versions & 1 rubygems