Permalink
Browse files

changed the usher for http_router, liked it because it has no direct …

…dependency with rack
  • Loading branch information...
1 parent a0833ca commit f9e109ce3979514e133df16473c8a892c3552716 @devton devton committed Aug 24, 2010
View
@@ -4,16 +4,15 @@ gem 'activesupport', '3.0.0.beta3'
gem 'activemodel', '3.0.0.beta3'
gem 'cramp', :path => File.dirname(__FILE__)
-gem 'activesupport', '3.0.0.beta4'
gem 'rack', '~> 1.1.0'
gem 'eventmachine', '~> 0.12.10'
group :test do
- gem 'usher'
+ gem 'http_router'
end
group :example do
- gem 'usher'
+ gem 'http_router'
gem 'tramp', '~> 0.1'
gem 'thin', '~> 1.2.7'
end
View
@@ -5,7 +5,7 @@
require 'cramp'
require 'tramp'
-require 'usher'
+require 'http_router'
require 'thin'
Tramp.init(:username => 'root', :database => 'arel_development', :socket => '/tmp/mysql.sock')
@@ -67,7 +67,7 @@ def stop_benchmark
end
end
-routes = Usher::Interface.for(:rack) do
+routes = HttpRouter.new do
add('/users/:id').to(UsersController)
end
@@ -3,7 +3,7 @@
Bundler.setup(:default, :example)
require 'cramp'
-require 'usher'
+require 'http_router'
require 'thin'
class HomeController < Cramp::Action
@@ -25,7 +25,7 @@ def on_finish
end
-routes = Usher::Interface.for(:rack) do
+routes = HttpRouter.new do
add('/(:password)').to(HomeController)
end
View
@@ -62,7 +62,7 @@ def request
end
def params
- @params ||= request.params.update(@env['usher.params']).symbolize_keys
+ @params ||= request.params.update(@env['router.params']).symbolize_keys
end
end
@@ -32,7 +32,7 @@ def write_logs
end
- App = Usher::Interface.for(:rack) do
+ App = HttpRouter.new do
add('/:id').to(CallbackController)
end
@@ -19,7 +19,7 @@ def finish_soon
end
end
- App = Usher::Interface.for(:rack) do
+ App = HttpRouter.new do
add('/send_data').to(SendDataController)
add('/finishing_timer').to(FinishingTimerController)
end
View
@@ -6,7 +6,7 @@
require 'cramp'
require 'test/unit'
-require 'usher'
+require 'http_router'
require 'active_support/buffered_logger'
logger = ActiveSupport::BufferedLogger.new(File.join(File.dirname(__FILE__), "tests.log"))

0 comments on commit f9e109c

Please sign in to comment.