Sha256: b29e3db10e79f7988b8eb0685ee93a8fb8d25b233b37c1da33b51bd224ed6865
Contents?: true
Size: 1.77 KB
Versions: 1
Compression:
Stored size: 1.77 KB
Contents
#!/usr/bin/env ruby require "optparse" require "lucid_report" options = { :json_path => nil, :report_path => 'lucid-report', :report_types => [:html], :report_tabs => [:overview, :features], :report_title => 'Lucid Results', :compress_images => false, :additional_info => {} } opt_parser = OptionParser.new do |opts| opts.banner = "Usage: \n lucid_report [options]" opts.separator 'Configuration options:' opts.on('-s','--source x,y,z', Array, 'List of json path or files') do |list| options[:json_path] = list end opts.on('-o', '--out [PATH]NAME', String, 'Report path with name without extension') do |report_path| options[:report_path] = report_path end opts.on('-f','--format x,y,z', Array, 'List of report format - html,json') do |list| options[:report_types] = list end opts.on('-t','--tabs x,y,z', Array, 'List of report tabs - overview,features,scenarios,errors') do |list| options[:report_tabs] = list end opts.on('-c', '--compress', 'Reduce report size if embedding images') do |compress| options[:compress_images] = compress end opts.on('-T', '--title TITLE', String, 'Report title') do |report_title| options[:report_title] = report_title end opts.on('-I','--info a:x,b:y,c:z', Array, 'List of additional info') do |list| list.each do |i| key, value = i.split(':') options[:additional_info][key] = value end end opts.separator 'Common options:' opts.on_tail('-h', '--help', 'Show help') do puts opts exit end opts.on_tail('-v','--version', 'Show version') do puts 'LucidReport v' + Gem.loaded_specs['lucid_report'].version.to_s rescue puts "Something want wrong. \nUse 'gem list lucid_report'" exit end end opt_parser.parse!(ARGV) LucidReport.build_report(options)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lucid_report-0.1.0 | exe/lucid_report |