lib/murlsh/dispatch.rb in murlsh-1.0.0 vs lib/murlsh/dispatch.rb in murlsh-1.1.0
- old
+ new
@@ -1,11 +1,9 @@
-%w{
-active_record
-rack
+require 'active_record'
+require 'rack'
-murlsh
-}.each { |m| require m }
+require 'murlsh'
module Murlsh
# Dispatch requests.
class Dispatch
@@ -49,14 +47,14 @@
dispatch(req).call(req).finish
end
# Called if the request is not found.
def not_found(req)
- Rack::Response.new("<p>#{req.url} not found</p>
+ Rack::Response.new "<p>#{req.url} not found</p>
<p><a href=\"#{@config['root_url']}\">root<a></p>
",
- 404, { 'Content-Type' => 'text/html' })
+ 404, { 'Content-Type' => 'text/html' }
end
end
end