Sha256: eb0fb3246cbb887990256da70070c3cb57d99f551a56e2f9a01308ba3c459a97
Contents?: true
Size: 813 Bytes
Versions: 69
Compression:
Stored size: 813 Bytes
Contents
require_relative '../../utils/preset_template_generator' module Inferno module CLI class SuiteInputTemplate def run(suite_id, options) require_relative '../../../inferno' Inferno::Application.start(:suites) suite = Inferno::Repositories::TestSuites.new.find(suite_id) if suite.nil? puts "No Test Suite found with id: #{suite_id}" return 1 end output = JSON.pretty_generate(Inferno::Utils::PresetTemplateGenerator.new(suite).generate) if options[:filename].present? path = File.join(Dir.pwd, 'config', 'presets', options[:filename]) FileUtils.mkdir_p(File.dirname(path)) File.open(path, 'w') { |f| f.puts(output) } else puts output end end end end end
Version data entries
69 entries across 69 versions & 1 rubygems