module CrashAnalysis

Main

Constants

VERSION

Public Class Methods

new() click to toggle source
# File lib/crash_analysis.rb, line 6
def initialize()
end
run() click to toggle source
# File lib/crash_analysis.rb, line 9
def self.run()
puts "input logs_dir_path: "
  logs_dir_path = gets.chomp
if logs_dir_path.empty? || logs_dir_path.nil? || !File.directory?(logs_dir_path)
  puts "invalid logs_dir_path"
  return
end
puts "input log_file_suffix(log, crash, txt etc.): "
  log_file_suffix = gets.chomp
if log_file_suffix.empty? || log_file_suffix.nil?
  puts "invalid log_file_suffix"
  return
end

puts "init settings..."
output = []
r, io = IO.pipe
fork do
  system("find /Applications/Xcode.app -name symbolicatecrash -type f", out: io, err: :out)
end
io.close
r.each_line{|l| puts l; output << l.chomp}
symbolicatecrash_path = output[0]

puts "running..."
analysis = Analysis.new()
analysis.run(logs_dir_path, log_file_suffix, symbolicatecrash_path)

end