Class: Inferno::CLI::Suite
- Inherits:
-
Thor
- Object
- Thor
- Inferno::CLI::Suite
- Defined in:
- lib/inferno/apps/cli/suite.rb
Instance Method Summary collapse
Instance Method Details
#describe(suite_id) ⇒ Object
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? = "No suite found with id `#{suite_id}`. Run `inferno suites` to see a list of available suites" puts TTY::Markdown.parse() return end description = '' description += "# #{suite.title}\n" description += "#{suite.description}\n" if suite.description if suite..present? description += "***\n\n" description += "# Suite Options\n\n" suite..each do |option| description += "* `#{option.id}`: #{option.title}\n" option..each do |list_option| description += " * `#{list_option[:value]}`: #{list_option[:label]}\n" end end end puts TTY::Markdown.parse(description) end |
#input_template(suite_id) ⇒ Object
16 17 18 19 |
# File 'lib/inferno/apps/cli/suite.rb', line 16 def input_template(suite_id) ENV['NO_DB'] = 'true' SuiteInputTemplate.new.run(suite_id, ) end |
#lock_short_ids(suite_id) ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/inferno/apps/cli/suite.rb', line 60 def lock_short_ids(suite_id) ENV['NO_DB'] = 'true' Inferno::Application.start(:suites) suite = Inferno::Repositories::TestSuites.new.find(suite_id) if suite.blank? = "No suite found with id `#{suite_id}`. Run `inferno suites` to see a list of available suites" puts TTY::Markdown.parse() return end File.write(suite.short_id_file_path, suite.current_short_id_map.to_yaml) puts "Short ID map saved to #{suite.short_id_file_path}" end |