Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updating to 0.3.1 API

  • Loading branch information...
commit 649a6402546cd6c05881fa8bc94dc6e56067f1b7 1 parent 40ddf14
@NoamB authored
View
95 Gemfile.lock
@@ -0,0 +1,95 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.3)
+ actionpack (= 3.0.3)
+ mail (~> 2.2.9)
+ actionpack (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.4)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.13)
+ rack-test (~> 0.5.6)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ i18n (~> 0.4)
+ activerecord (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ arel (~> 2.0.2)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ activesupport (3.0.3)
+ addressable (2.2.4)
+ arel (2.0.9)
+ bcrypt-ruby (2.1.4)
+ builder (2.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ faraday (0.5.7)
+ addressable (~> 2.2.4)
+ multipart-post (~> 1.1.0)
+ rack (< 2, >= 1.1.0)
+ i18n (0.5.0)
+ json (1.5.1)
+ mail (2.2.15)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ multi_json (0.0.5)
+ multipart-post (1.1.0)
+ mysql2 (0.2.6)
+ oauth (0.4.4)
+ oauth2 (0.1.1)
+ faraday (~> 0.5.0)
+ multi_json (~> 0.0.4)
+ polyglot (0.3.1)
+ rack (1.2.1)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.3)
+ actionmailer (= 3.0.3)
+ actionpack (= 3.0.3)
+ activerecord (= 3.0.3)
+ activeresource (= 3.0.3)
+ activesupport (= 3.0.3)
+ bundler (~> 1.0)
+ railties (= 3.0.3)
+ railties (3.0.3)
+ actionpack (= 3.0.3)
+ activesupport (= 3.0.3)
+ rake (>= 0.8.7)
+ thor (~> 0.14.4)
+ rake (0.8.7)
+ sorcery (0.3.1)
+ bcrypt-ruby (~> 2.1.4)
+ json (>= 1.5.1)
+ oauth (>= 0.4.4)
+ oauth (>= 0.4.4)
+ oauth2 (>= 0.1.1)
+ oauth2 (>= 0.1.1)
+ rails (>= 3.0.0)
+ thor (0.14.6)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.24)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ mysql2
+ rails (= 3.0.3)
+ sorcery (= 0.3.1)
View
20 app/controllers/application_controller.rb
@@ -10,19 +10,15 @@ class ApplicationController < ActionController::Base
config.external_providers = [:twitter, :facebook]
- config.twitter do |t|
- t.key = "eYVNBjBDi33aa9GkA3w"
- t.secret = "XpbeSdCoaKSmQGSeokz5qcUATClRW5u08QWNfv71N8"
- t.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter"
- t.user_info_mapping = {:email => "screen_name"}
- end
+ config.twitter.key = "eYVNBjBDi33aa9GkA3w"
+ config.twitter.secret = "XpbeSdCoaKSmQGSeokz5qcUATClRW5u08QWNfv71N8"
+ config.twitter.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter"
+ config.twitter.user_info_mapping = {:email => "screen_name"}
- config.facebook do |f|
- f.key = "34cebc81c08a521bc66e212f947d73ec"
- f.secret = "5b458d179f61d4f036ee66a497ffbcd0"
- f.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=facebook"
- f.user_info_mapping = {:email => "name"}
- end
+ config.facebook.key = "34cebc81c08a521bc66e212f947d73ec"
+ config.facebook.secret = "5b458d179f61d4f036ee66a497ffbcd0"
+ config.facebook.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=facebook"
+ config.facebook.user_info_mapping = {:email => "name"}
config.twitter.key = "eYVNBjBDi33aa9GkA3w"
config.twitter.secret = "XpbeSdCoaKSmQGSeokz5qcUATClRW5u08QWNfv71N8"
View
2  app/controllers/user_sessions_controller.rb
@@ -8,7 +8,7 @@ def new
def create
respond_to do |format|
if @user = login(params[:email],params[:password],params[:remember])
- format.html { return_or_redirect_to(:users, :notice => 'Login successfull.') }
+ format.html { redirect_back_or_to(:users, :notice => 'Login successfull.') }
format.xml { render :xml => @user, :status => :created, :location => @user }
else
format.html { flash.now[:alert] = "Login failed."; render :action => "new" }
View
2  config/application.rb
@@ -39,6 +39,6 @@ class Application < Rails::Application
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
- config.sorcery.submodules = [:user_activation, :http_basic_auth, :remember_me, :reset_password, :session_timeout, :brute_force_protection, :activity_logging, :oauth]
+ config.sorcery.submodules = [:user_activation, :http_basic_auth, :remember_me, :reset_password, :session_timeout, :brute_force_protection, :activity_logging, :external]
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.