25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/inferno/apps/cli/suite.rb', line 25
def describe(suite_id)
ENV['NO_DB'] = 'true'
Inferno::Application.start(:suites)
suite = Inferno::Repositories::TestSuites.new.find(suite_id)
if suite.blank?
message = "No suite found with id `#{suite_id}`. Run `inferno suites` to see a list of available suites"
puts TTY::Markdown.parse(message)
return
end
description = ''
description += "# #{suite.title}\n"
description += "#{suite.description}\n" if suite.description
if suite.suite_options.present?
description += "***\n\n"
description += "# Suite Options\n\n"
suite.suite_options.each do |option|
description += "* `#{option.id}`: #{option.title}\n"
option.list_options.each do |list_option|
description += " * `#{list_option[:value]}`: #{list_option[:label]}\n"
end
end
end
puts TTY::Markdown.parse(description)
end
|