bin/xcpretty in xcpretty-0.2.2 vs bin/xcpretty in xcpretty-0.2.3
- old
+ new
@@ -37,21 +37,25 @@
end
opts.on('--tap', 'Use TAP output') do
printer_opts[:formatter] = XCPretty::TestAnything
end
opts.on('-f', '--formatter PATH', 'Use formatter returned from evaluating the specified Ruby file') do |path|
- printer_opts[:formatter] = XCPretty.load_custom_formatter(path)
+ printer_opts[:formatter] = XCPretty.load_custom_class(path)
end
- opts.on('--[no-]color', 'Use colorized output. Defaults is auto') do |value|
+ opts.on('-c', '--[no-]color', 'Use colorized output. Default is auto') do |value|
printer_opts[:colorize] = value
end
opts.on('--[no-]utf', 'Use unicode characters in output. Default is auto.') do |value|
printer_opts[:unicode] = value
end
- opts.on("-r", "--report FORMAT", "Run FORMAT reporter",
+ opts.on("-r", "--report FORMAT or PATH", "Run FORMAT or PATH reporter",
" Choices: #{report_formats.keys.join(', ')}") do |format|
- report_classes << report_formats[format]
+ if report_formats.key?(format)
+ report_classes << report_formats[format]
+ else
+ report_classes << XCPretty.load_custom_class(format)
+ end
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 specified before output path')
@@ -79,7 +83,8 @@
STDIN.each_line do |line|
printer.pretty_print(line)
reporters.each { |r| r.handle(line) }
end
+printer.finish
reporters.each(&:finish)