lib/cc/engine_registry.rb in codeclimate-0.85.15 vs lib/cc/engine_registry.rb in codeclimate-0.85.17
- old
+ new
@@ -7,12 +7,12 @@
DEFAULT_MANIFEST_PATH = File.expand_path("../../../config/engines.yml", __FILE__)
EngineDetails = Struct.new(:image, :command, :description, :memory)
EngineDetailsNotFoundError = Class.new(StandardError)
- def initialize(path = DEFAULT_MANIFEST_PATH, prefix = "")
+ def initialize(path = DEFAULT_MANIFEST_PATH, prefix = nil)
@yaml = YAML.safe_load(File.read(path))
- @prefix = prefix
+ @prefix = prefix || ENV["CODECLIMATE_PREFIX"] || ""
end
def each
yaml.each do |name, metadata|
engine = Config::Engine.new(