lib/odex/app.rb in odex-0.0.3 vs lib/odex/app.rb in odex-0.0.4
- old
+ new
@@ -150,12 +150,12 @@
# Odex Base
class Base
include Odex::Init
METHODS = [:options, :patch, :post, :put, :trace, :delete, :get, :head]
-
- inheritable :builder, Odex::OdexBuilder.new
+
+ init_methods :builder, Odex::OdexBuilder.new
init_methods :c, Class.new(Req)
init_methods :route_defs, []
init_methods :hook_before, []
init_methods :hook_after, []
init_methods :default_constraints, {}
@@ -197,16 +197,14 @@
end
end
def group(url, app=nil, &block)
scope = self.c
-
app ||= Class.new(self.superclass) do
self.c = scope
class_eval(&block)
end
-
map[url] = app
end
def before_proc(&block)
hook_before << Proc.new(&block)
@@ -240,10 +238,10 @@
end
class App < Base
class << self
def go!(port = 1453)
- Rack::Handler.pick(['webrick']).run new, :Port => port
+ Rack::Handler.pick(['thin','webrick']).run new, :Port => port
end
end
end
end