Permalink
Browse files

fix routing for update.rb, cause to 06b5289

  • Loading branch information...
1 parent 0276440 commit d3df7675936011d9c8bc9e3d90a7f084bc46be56 @hsbt hsbt committed Aug 19, 2012
Showing with 20 additions and 20 deletions.
  1. +20 −20 config.ru
View
@@ -10,26 +10,6 @@ use Rack::Reloader
base_dir = ''
-map "#{base_dir}/" do
- use TDiary::Rack::HtmlAnchor
- use TDiary::Rack::ValidRequestPath
- run Rack::Cascade.new([
- Rack::File.new("./public/"),
- TDiary::Application.new(:index)
- ])
-end
-
-map "#{base_dir}/assets" do
- environment = Sprockets::Environment.new
- %w(js theme).each {|path| environment.append_path path }
-
- # if you need to auto compilation for CoffeeScript
- # require 'tdiary/rack/assets/precompile'
- # use TDiary::Rack::Assets::Precompile, environment
-
- run environment
-end
-
# OmniAuth settings
use Rack::Session::Pool, :expire_after => 2592000
use OmniAuth::Builder do
@@ -53,6 +33,26 @@ map "#{base_dir}/update.rb" do
run TDiary::Application.new(:update)
end
+map "#{base_dir}/assets" do
+ environment = Sprockets::Environment.new
+ %w(js theme).each {|path| environment.append_path path }
+
+ # if you need to auto compilation for CoffeeScript
+ # require 'tdiary/rack/assets/precompile'
+ # use TDiary::Rack::Assets::Precompile, environment
+
+ run environment
+end
+
+map "#{base_dir}/" do
+ use TDiary::Rack::HtmlAnchor
+ use TDiary::Rack::ValidRequestPath
+ run Rack::Cascade.new([
+ Rack::File.new("./public/"),
+ TDiary::Application.new(:index)
+ ])
+end
+
# Local Variables:
# mode: ruby
# indent-tabs-mode: t

0 comments on commit d3df767

Please sign in to comment.