From 6b39b72ebeae926b8f6d051e7c29b28a33038c71 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 16 May 2014 18:03:20 +0800 Subject: [PATCH] ruby script to generate the routes based on the rails PR. https://github.com/stevegraham/rails/pull/1 --- gen_routes.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 gen_routes.rb diff --git a/gen_routes.rb b/gen_routes.rb new file mode 100644 index 0000000..ff3f048 --- /dev/null +++ b/gen_routes.rb @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +arr = ["foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply"] +paths = arr.permutation(3).map { |a| "/#{a.join '/'}" } +paths.each do |path| + puts "rtree_insert_path(n, \"#{path}\", NULL);" +end