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

Version Path
liquid-ext-3.2.0 lib/liquid/tasks/router.rake
liquid-ext-3.1.2 lib/liquid/tasks/router.rake
liquid-ext-3.1.1 lib/liquid/tasks/router.rake
liquid-ext-3.1.0 lib/liquid/tasks/router.rake
liquid-ext-3.0.0 lib/liquid/tasks/router.rake
liquid-ext-2.0.3 lib/liquid/tasks/router.rake
liquid-ext-2.0.2 lib/liquid/tasks/router.rake
liquid-ext-2.0.1 lib/liquid/tasks/router.rake
liquid-ext-2.0.0 lib/liquid/tasks/router.rake
liquid-ext-1.2.6 lib/liquid/tasks/router.rake
liquid-ext-1.2.5 lib/liquid/tasks/router.rake
liquid-ext-1.2.4 lib/liquid/tasks/router.rake
liquid-ext-1.2.2 lib/liquid/tasks/router.rake
liquid-ext-1.2.1 lib/liquid/tasks/router.rake
liquid-ext-1.2.0 lib/liquid/tasks/router.rake
liquid-ext-1.1.1 lib/liquid/tasks/router.rake
liquid-ext-1.1.0 lib/liquid/tasks/router.rake
liquid-ext-1.0.2 lib/liquid/tasks/router.rake
liquid-ext-1.0.1 lib/liquid/tasks/router.rake
liquid-ext-1.0.0 lib/liquid/tasks/router.rake