lib/cc/engine_registry.rb in codeclimate-0.90.0 vs lib/cc/engine_registry.rb in codeclimate-0.91.0

- old
+ new

@@ -4,11 +4,11 @@ DEFAULT_MEMORY_LIMIT = 1_024_000_000 DEFAULT_COMMAND = nil DEFAULT_MANIFEST_PATH = File.expand_path("../../../config/engines.yml", __FILE__) - EngineDetails = Struct.new(:image, :command, :description, :memory) + EngineDetails = Struct.new(:image, :command, :description, :memory, :source_library, :channel_versions) EngineDetailsNotFoundError = Class.new(StandardError) def initialize(path = DEFAULT_MANIFEST_PATH, prefix = nil) @yaml = YAML.safe_load(File.read(path)) @prefix = prefix || ENV["CODECLIMATE_PREFIX"] || "" @@ -36,9 +36,11 @@ EngineDetails.new( [prefix, channels.fetch(engine.channel)].join, metadata.fetch("command", DEFAULT_COMMAND), metadata.fetch("description", "(No description available)"), memory_limit(metadata["minimum_memory_limit"]), + metadata.fetch("source-library", {}), + metadata.fetch("channel-versions", {}), ) end rescue KeyError raise EngineDetailsNotFoundError, not_found_message(engine, channels) end