Sha256: 91721845e0e4da4159d2b71ead6f06bc6377b388769f19f4d67832eb91a88321

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

#!/usr/bin/env ruby
$:.unshift File.expand_path('../../lib', __FILE__)
require 'xcpretty'
require 'optparse'

if RUBY_VERSION < '1.8.7'
  abort "error: XCPretty requires Ruby 1.8.7 or higher."
end

def printer
  @printer ||= XCPretty::Printer::Simple.new
end

OptionParser.new do |opts|
  opts.banner = "Usage: xcodebuild [options] | xcpretty"
  opts.on('-t', '--test', 'Use RSpec style output') do
    @printer = XCPretty::Printer::RSpec.new
  end
  opts.on('-s', '--simple', 'Use simple output (default)') do
    @printer = XCPretty::Printer::Simple.new
  end
  opts.on('-c', '--color', 'Use colorized output') do
    @colorize = true
  end
  opts.on('--no-utf', 'Disable unicode characters in output') do
    @unicode = false
  end
  opts.on_tail('-h', '--help', 'Show this message') { puts opts; exit }
  opts.on_tail("-v", "--version", "Show version") { puts XCPretty::VERSION; exit }
  opts.parse!
  printer.colorize = @colorize
  printer.use_unicode = @unicode || true
end

ARGF.each_line do |line|
  printer.pretty_print(line)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xcpretty-0.0.4 bin/xcpretty