Skip to content

Commit

Permalink
gemify
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbuddy committed Feb 22, 2009
1 parent 622f359 commit ce710f5
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions History.txt
@@ -0,0 +1,3 @@
== 0.0.1

Initial release as gem
24 changes: 24 additions & 0 deletions Manifest.txt
@@ -0,0 +1,24 @@
lib
lib/compat.rb
lib/usher
lib/usher/grapher.rb
lib/usher/interface
lib/usher/interface/rails2
lib/usher/interface/rails2/mapper.rb
lib/usher/interface/rails2.rb
lib/usher/interface.rb
lib/usher/node.rb
lib/usher/route.rb
lib/usher.rb
Manifest.txt
rails
rails/init.rb
Rakefile
README.rdoc
README.txt
spec
spec/rails
spec/rails/generate_spec.rb
spec/rails/path_spec.rb
spec/rails/recognize_spec.rb
spec/spec.opts
18 changes: 18 additions & 0 deletions README.txt
@@ -0,0 +1,18 @@
= Usher

Tree-based router for Ruby on Rails.

This is a tree-based router (based on Ilya Grigorik suggestion). Turns out looking up in a hash and following a tree is faster than Krauter's massive regex approach, so why not? I said, Heck Yes, and here we are.

== Installation

script/plugin install git://github.com/joshbuddy/usher.git

== TODO

* Make it integrate with merb
* Make it integrate with rails3

Looks about 20-50% faster than the router Rails ships with for non-trivial cases.

(Let me show you to your request)
8 changes: 8 additions & 0 deletions Rakefile
@@ -1,5 +1,13 @@
require 'hoe'
require 'spec' require 'spec'
require 'spec/rake/spectask' require 'spec/rake/spectask'
require 'lib/usher'

Hoe.new('usher', Usher::Version) do |p|
p.author = 'Joshua Hull'
p.email = 'joshbuddy@gmail.com'
p.summary = 'Tree-based router'
end


task :spec => 'spec:all' task :spec => 'spec:all'
namespace(:spec) do namespace(:spec) do
Expand Down
1 change: 1 addition & 0 deletions lib/usher.rb
Expand Up @@ -10,6 +10,7 @@ class Usher
attr_reader :tree, :named_routes, :route_count attr_reader :tree, :named_routes, :route_count


SymbolArraySorter = proc {|a,b| a.hash <=> b.hash} SymbolArraySorter = proc {|a,b| a.hash <=> b.hash}
Version = '0.0.1'


def load(file) def load(file)
reset! reset!
Expand Down

0 comments on commit ce710f5

Please sign in to comment.