Skip to content

Instantly share code, notes, and snippets.

@presidentbeef
Created December 23, 2011 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save presidentbeef/1512567 to your computer and use it in GitHub Desktop.
Save presidentbeef/1512567 to your computer and use it in GitHub Desktop.
Process routes with Brakeman::RoutesProcessor
$LOAD_PATH.unshift "/home/justin/work/brakeman/lib"
require 'brakeman'
require 'ruby_parser/ruby_parser'
require 'brakeman/tracker'
require 'brakeman/processors/route_processor'
tracker = Brakeman::Tracker.new
tracker.options[:rails3] = true
route_processor = Brakeman::RoutesProcessor.new tracker
route_processor.process_routes Ruby19Parser.new.parse(File.read ARGV[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment