-
Notifications
You must be signed in to change notification settings - Fork 8
/
omniauth.rb
24 lines (20 loc) · 1.09 KB
/
omniauth.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
gem 'omniauth'
gem "fakeweb", :group => :cucumber
run 'bundle install'
create_file 'config/initializers/omniauth.rb', <<-FILE
Rails.application.config.middleware.use OmniAuth::Builder do
#provider :twitter, 'CONSUMER_KEY', 'CONSUMER_SECRET'
#provider :facebook, 'APP_ID', 'APP_SECRET'
#provider :linked_in, 'CONSUMER_KEY', 'CONSUMER_SECRET'
end
FILE
route "match '/auth/:provider/callback', :to => 'sessions#create'"
route "match '/logout', :to => 'sessions#destroy'"
generate "model authorization provider:string uid:string user_id:integer"
generate "model user name:string"
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/user.rb", "app/models/user.rb"
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/authorization.rb", 'app/models/authorization.rb'
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/sessions_controller.rb", "app/controllers/sessions_controller.rb"
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/application_controller.rb", "app/controllers/application_controller.rb"
git :add => '.'
git :commit => '-m "ominauth"'