-
Notifications
You must be signed in to change notification settings - Fork 0
/
authlogic.rb
27 lines (21 loc) · 994 Bytes
/
authlogic.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Install Gems
gem 'authlogic-oid', :lib => 'authlogic_openid'
gem 'ruby-openid', :lib => 'openid'
gem 'authlogic'
rake("gems:install", :sudo => true)
#Initialize user and session scaffolds
generate(:nifty_scaffold, "user username:string email:string password:string new edit")
rake ("db:migrate")
generate(:session, "user_session")
generate(:nifty_scaffold, "user_session --skip-model username:string password:string new destroy")
#Add open id
plugin "open_id_authentication", :git => "git://github.com/rails/open_id_authentication.git", :submodule => true
#Initialize open id
rake("open_id_authentication:db:create")
generate(:migration, "add_openid_identifier_to_users openid_identifier:string")
rake("db:migrate")
#Add Routes
route 'map.login "login", :controller => "user_sessions", :action => "new"'
route 'map.logout "logout", :controller => "user_sessions", :action => "destroy"'
route 'map.resources :user_sessions'
route 'map.resources :users'