aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorre4k <re4k@re4k.info>2013-03-26 17:54:34 +0900
committerre4k <re4k@re4k.info>2013-03-26 17:55:13 +0900
commit9e05ce53b550ab05d06268bd0c2ae26ad294d0ab (patch)
treea431e3e1811e32e465a872c3ea9481106b83b2f7 /config
parent22b478cd66a419c30ab28471fbd495019810469e (diff)
downloadaclog-9e05ce53b550ab05d06268bd0c2ae26ad294d0ab.tar.gz
Add favs_from/rts_from
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/environments/development.rb4
-rw-r--r--config/routes.rb22
3 files changed, 21 insertions, 7 deletions
diff --git a/config/application.rb b/config/application.rb
index 68cbb89..00a77a1 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -25,5 +25,7 @@ module Aclog
config.exceptions_app = -> env do
ErrorsController.action(:render_error).call(env)
end
+
+ config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)
end
end
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 5089ff4..4d9bb15 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -10,7 +10,7 @@ Aclog::Application.configure do
config.eager_load = false
# Show full error reports and disable caching.
- config.consider_all_requests_local = false#true
+ config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
@@ -25,5 +25,5 @@ Aclog::Application.configure do
# Expands the lines which load the assets.
config.assets.debug = true
- # config.cache_store = :dalli_store
+ config.cache_store = :dalli_store
end
diff --git a/config/routes.rb b/config/routes.rb
index 3b65357..1d697db 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -5,29 +5,36 @@ Aclog::Application.routes.draw do
:screen_name => /[a-zA-Z0-9_]{1,20}/,
:page => /[0-9]+/,
:count => /[0-9]+/,
- :tweets => /(all|favorite|retweet)/
+ :tweets => /(all|fav(orite[sd]?|(or)?ed|s)?|re?t(weet(s|ed)?|s)?)/,
+ :order => /(fav(orite[sd]?|(or)?ed|s)?|re?t(weet(s|ed)?|s)?)/,
}
root :to => "main#index"
+ # internals
+ get "/i" => redirect("/")
get "/i/callback" => "sessions#callback"
get "/i/logout" => "sessions#destroy"
+ # other
+ get "/i/show" => "i#show", :constraints => constraints
+
get "/i/best" => "i#best"
get "/i/recent" => "i#recent"
+ get "/i/timeline" => "i#timeline"
+ get "/i/:id" => "i#show", :constraints => constraints
- get "/i/show" => "i#show", :constraints => constraints
+ # user
get "/users/best" => "users#best", :constraints => constraints
get "/users/recent" => "users#recent", :constraints => constraints
get "/users/timeline" => "users#timeline", :constraints => constraints
get "/users/discovered" => "users#discovered", :constraints => constraints
- get "/i/:id" => "i#show", :constraints => constraints
-
get "/:screen_name(/:page)" => "users#best", :constraints => constraints
- get "/:screen_name/best" => redirect("/%{screen_name}")
+ get "/:screen_name/:order(/:page)" => "users#best", :constraints => constraints
get "/:screen_name/recent(/:page)" => "users#recent", :constraints => constraints
+ get "/:screen_name/recent/:order(/:page)" => "users#recent", :constraints => constraints
get "/:screen_name/timeline(/:page)" => "users#timeline", :constraints => constraints
get "/:screen_name/timeline/:tweets(/:page)" => "users#timeline", :constraints => constraints
@@ -35,6 +42,11 @@ Aclog::Application.routes.draw do
get "/:screen_name/discovered(/:page)" => "users#discovered", :constraints => constraints
get "/:screen_name/discovered/:tweets(/:page)" => "users#discovered", :constraints => constraints
+ get "/:screen_name/info" => "users#info", :constraints => constraints
+ get "/:screen_name/favs_from" => "users#from", :constraints => constraints, :defaults => {:event => "favorite"}
+ get "/:screen_name/rts_from" => "users#from", :constraints => constraints, :defaults => {:event => "retweet"}
+
+ # redirects
get "/(users)/:screen_name/status(es)/:id" => redirect("/i/%{id}")
get "/users/:screen_name" => redirect("/%{screen_name}")
get "/users/:screen_name/discovered" => redirect("/%{screen_name}/discovered")