Sha256: ddb33403b4dbe4fa3e3f5a8f9f2e9958a1de0941f9d7f81f3f400e52a45abc86
Contents?: true
Size: 458 Bytes
Versions: 20
Compression:
Stored size: 458 Bytes
Contents
# encoding: utf-8 require 'liquid/router' require 'terminal-table' desc "Show all ed routes" task :routes do root = File.expand_path(File.dirname(__FILE__)) router = Router.new(lambda{}) router.from_file(File.join(root, "../../../config/routes.rb")) routes = router.routes.map {|r| [r[0].inspect, r[1], r[2] ] } puts Terminal::Table.new({ rows: routes.sort_by { |route| route[0] }, headings: ['regex', 'handler', 'parameters'], }) end
Version data entries
20 entries across 20 versions & 1 rubygems