Sha256: 252895e5b1327bf7ce6278e0ca8833d5d8767428aab0695f1a89b3ba6ea307b5

Contents?: true

Size: 552 Bytes

Versions: 1

Compression:

Stored size: 552 Bytes

Contents

#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), '..', 'lib', 'slow_actions')

@sa = SlowActions.new
ARGV.select{|arg| arg[0,2] != "--"}.each do |file|
  @sa.parse_file(file)
end

output = []
if (ARGV.include? "--actions")
  output << @sa.print_actions
end
if (ARGV.include? "--controllers")
  output << @sa.print_controller_tree
end
if (ARGV.include? "--sessions")
  output << @sa.print_sessions
end


if output.size == 0
  puts "Usage: slow-actions (--actions | --controllers | --sessions) log_file"
else
  puts output.join("\n\n")
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ngauthier-slow-actions-0.2.4 bin/slow-actions