bin/xcpretty in xcpretty-0.1.2 vs bin/xcpretty in xcpretty-0.1.3
- old
+ new
@@ -11,11 +11,12 @@
require 'optparse'
report_options = []
report_classes = []
report_formats = {
- "junit" => XCPretty::JUnit
+ "junit" => XCPretty::JUnit,
+ "html" => XCPretty::HTML
}
printer_opts = {
:unicode => true,
:colorize => false,
@@ -44,11 +45,11 @@
report_classes << report_formats[format]
report_options << {}
end
opts.on('-o', '--output PATH', 'Write report output to PATH') do |path|
unless opts = report_options.last
- XCPretty.exit_with_error('Expected report format to be speficied before before output path')
+ XCPretty.exit_with_error('Expected report format to be specified before before output path')
end
opts[:path] = path
end
opts.on_tail('-h', '--help', 'Show this message') { puts opts; exit }
opts.on_tail("-v", "--version", "Show version") { puts XCPretty::VERSION; exit }
@@ -61,13 +62,11 @@
printer = XCPretty::Printer.new(printer_opts)
reporters = report_classes.compact.each_with_index.map {|k,i| k.new(report_options[i])}
ARGF.each_line do |line|
- XCPretty::ExitStatus.handle(line)
printer.pretty_print(line)
reporters.each { |r| r.handle(line) }
end
reporters.each(&:finish)
-exit(XCPretty::ExitStatus.code)