Sha256: 29185176806abf09aee6c533ead4a242e7ae11ef80ab49f36a57baa5e7b61c25

Contents?: true

Size: 496 Bytes

Versions: 4

Compression:

Stored size: 496 Bytes

Contents

#!/usr/bin/env ruby

require 'load_tracer'
require 'optparse'

options = { format: :json }

opt_parse = OptionParser.new do |opt|
  opt.banner = 'Usage: rutrace programfile'
  opt.on('-f', '-f format', 'specify output format.') { |format| options[:format] = format.to_sym }

  opt.parse!(ARGV)
end

if ARGV.first.nil?
  puts opt_parse
else
  path = File.expand_path(ARGV.first, Dir.pwd)

  puts LoadTracer.trace(format: options[:format], exclude_files: ['rutrace']) { require_relative path }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
load_tracer-0.6.1 exe/rutrace
load_tracer-0.6.0 exe/rutrace
load_tracer-0.4.0 exe/rutrace
load_tracer-0.3.0 exe/rutrace