Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from panupan/master

Update to Rails 3.2.8
  • Loading branch information...
commit f6f46d0c7f508d453287f54875afbd0d3c6519cf 2 parents 3d7bb20 + eb40b9d
@gautamrege gautamrege authored
View
1  .gitignore
@@ -2,3 +2,4 @@
db/*.sqlite3
log/*.log
tmp/**/*
+*.swp
View
2  Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', '3.2.6'
+gem 'rails', '3.2.8'
gem 'sqlite3'
group :assets do
View
92 Gemfile.lock
@@ -1,64 +1,64 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (3.2.6)
- actionpack (= 3.2.6)
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
mail (~> 2.4.4)
- actionpack (3.2.6)
- activemodel (= 3.2.6)
- activesupport (= 3.2.6)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- journey (~> 1.0.1)
+ journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
- activemodel (3.2.6)
- activesupport (= 3.2.6)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
builder (~> 3.0.0)
- activerecord (3.2.6)
- activemodel (= 3.2.6)
- activesupport (= 3.2.6)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.6)
- activemodel (= 3.2.6)
- activesupport (= 3.2.6)
- activesupport (3.2.6)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
- builder (3.0.0)
+ builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
- coffee-script-source (1.3.3)
+ coffee-script-source (1.4.0)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
- faraday (0.8.1)
+ faraday (0.8.4)
multipart-post (~> 1.1)
hashie (1.2.0)
hike (1.2.1)
- httpauth (0.1)
- i18n (0.6.0)
+ httpauth (0.2.0)
+ i18n (0.6.1)
journey (1.0.4)
- jquery-rails (2.0.2)
- railties (>= 3.2.0, < 5.0)
+ jquery-rails (2.1.3)
+ railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
- json (1.7.3)
- jwt (0.1.4)
- json (>= 1.2.4)
+ json (1.7.5)
+ jwt (0.1.5)
+ multi_json (>= 1.0)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
- multi_json (1.3.6)
+ multi_json (1.3.7)
multipart-post (1.1.5)
oauth2 (0.8.0)
faraday (~> 0.8)
@@ -66,10 +66,10 @@ GEM
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
- omniauth (1.1.0)
+ omniauth (1.1.1)
hashie (~> 1.2)
rack
- omniauth-oauth2 (1.1.0)
+ omniauth-oauth2 (1.1.1)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
polyglot (0.3.3)
@@ -78,19 +78,19 @@ GEM
rack (>= 0.4)
rack-ssl (1.3.2)
rack
- rack-test (0.6.1)
+ rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.6)
- actionmailer (= 3.2.6)
- actionpack (= 3.2.6)
- activerecord (= 3.2.6)
- activeresource (= 3.2.6)
- activesupport (= 3.2.6)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
bundler (~> 1.0)
- railties (= 3.2.6)
- railties (3.2.6)
- actionpack (= 3.2.6)
- activesupport (= 3.2.6)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -98,7 +98,7 @@ GEM
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
- sass (3.1.20)
+ sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
@@ -108,15 +108,15 @@ GEM
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
- thor (0.15.4)
+ thor (0.16.0)
tilt (1.3.3)
- treetop (1.4.10)
+ treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.33)
- uglifier (1.2.6)
+ tzinfo (0.3.34)
+ uglifier (1.3.0)
execjs (>= 0.3.0)
- multi_json (~> 1.3)
+ multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
ruby
@@ -126,7 +126,7 @@ DEPENDENCIES
jquery-rails
omniauth
omniauth-oauth2
- rails (= 3.2.6)
+ rails (= 3.2.8)
sass-rails (~> 3.2.3)
sqlite3
uglifier (>= 1.0.3)
View
5 README.rdoc
@@ -14,7 +14,10 @@ for single sign on between multiple applications.
On the *Provider*, register this client application:
rails c
- > Client.create!(:app_id => 'some key', :app_secret => 'some secret')
+ > @client = Client.new
+ > @client.app_id = 'some key'
+ > @client.app_secret = 'some secret'
+ > @client.save
Copy these same values in the *Client* config/initializers/omniauth.rb
View
11 app/controllers/user_sessions_controller.rb
@@ -11,10 +11,13 @@ def create
user = User.find_by_uid(omniauth['uid'])
if not user
# New user registration
- user = User.create!(:uid => omniauth['uid'],
- :first_name => omniauth['extra']['first_name'],
- :last_name => omniauth['extra']['last_name'])
- end
+ user = User.new(:uid => omniauth['uid'])
+ end
+ user.first_name = omniauth['extra']['first_name']
+ user.last_name = omniauth['extra']['last_name']
+ user.save
+
+ #p omniauth
# Currently storing all the info
session[:user_id] = omniauth
View
4 lib/josh_id.rb
@@ -15,14 +15,14 @@ class JoshId < OmniAuth::Strategies::OAuth2
info do
{
- :name => raw_info['name'],
:email => raw_info['email']
}
end
extra do
{
- 'raw_info' => raw_info
+ :first_name => raw_info['extra']['first_name'],
+ :last_name => raw_info['extra']['last_name']
}
end

0 comments on commit f6f46d0

Please sign in to comment.
Something went wrong with that request. Please try again.