Sha256: c273c11cbcd7362369caeb3edaa8c7f92c39e059a07bba9edf399d92eda4339f
Contents?: true
Size: 1.56 KB
Versions: 3
Compression:
Stored size: 1.56 KB
Contents
#!/usr/bin/ruby require File.dirname(__FILE__) + '/../lib/request_log_analyzer' require File.dirname(__FILE__) + '/../lib/command_line/arguments' puts "Request log analyzer, by Willem van Bergen and Bart ten Brinke\n\n" # Parse the arguments given via commandline begin arguments = CommandLine::Arguments.parse do |command_line| #command_line.flag(:install, :alias => :i) # command_line.command(:install) command_line.flag(:format, :default => 'rails') command_line.flag(:aggregator, :alias => :a, :multiple => true) command_line.flag(:database, :alias => :d) command_line.switch(:combined_requests, :c) command_line.switch(:colorize, :z) #command_line.switch(:estimate_database_time, :e) #command_line.switch(:fast, :f) # end rescue CommandLine::Error => e puts "ARGUMENT ERROR: " + e.message puts load File.dirname(__FILE__) + "/../output/usage.rb" exit(0) end # if arguments[:install] # if arguments[:install] == 'rails' # require 'ftools' # if File.directory?('./lib/tasks/') # File.copy(File.dirname(__FILE__) + '/../tasks/request_log_analyzer.rake', './lib/tasks/request_log_analyze.rake') # puts "Installed rake tasks." # puts "To use, run: rake log:analyze" # else # puts "Cannot find /lib/tasks folder. Are you in your Rails directory?" # puts "Installation aborted." # end # else # raise "Cannot perform this install type!" # end # exit(0) # end # Run the request_log_analyzer! request_log_analyzer = RequestLogAnalyzer::Controller.build(arguments).run!
Version data entries
3 entries across 3 versions & 1 rubygems