Skip to content

Commit 41418a4

Browse files
authored
add release_info and channel_versions to CC::EngineRegistry::EngineDetails (qltysh#1094)
* add release_info and channel_versions to CC::EngineRegistry::EngineDetails struct to allow for updated engines.yml metadata * change release_info to source_library for consistency in CC::EngineRegistry::EngineDetails
1 parent ab27dba commit 41418a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/cc/engine_registry.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class EngineRegistry
66
DEFAULT_COMMAND = nil
77
DEFAULT_MANIFEST_PATH = File.expand_path("../../../config/engines.yml", __FILE__)
88

9-
EngineDetails = Struct.new(:image, :command, :description, :memory)
9+
EngineDetails = Struct.new(:image, :command, :description, :memory, :source_library, :channel_versions)
1010
EngineDetailsNotFoundError = Class.new(StandardError)
1111

1212
def initialize(path = DEFAULT_MANIFEST_PATH, prefix = nil)
@@ -38,6 +38,8 @@ def fetch_engine_details(engine, development: false)
3838
metadata.fetch("command", DEFAULT_COMMAND),
3939
metadata.fetch("description", "(No description available)"),
4040
memory_limit(metadata["minimum_memory_limit"]),
41+
metadata.fetch("source-library", {}),
42+
metadata.fetch("channel-versions", {}),
4143
)
4244
end
4345
rescue KeyError

0 commit comments

Comments
 (0)