Skip to content

Commit

Permalink
Making provider generic (Rails 3.1.3 compatible)
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamrege committed Dec 13, 2011
1 parent e3a7867 commit e94188a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 46 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'http://rubygems.org'

gem 'rails', '3.1.2'
gem 'sqlite3'
gem 'rails', '3.1.3'
gem 'mysql2'

# asset pipeline
group :assets do
Expand Down
72 changes: 36 additions & 36 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
GIT
remote: git://github.com/plataformatec/devise.git
revision: 582f00ed95a7a226634d477b9950f5b8fb10451c
revision: b3034292f21b401fe873f720775c8ee41b9638bf
specs:
devise (1.5.0)
devise (1.5.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.1)

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.2)
actionpack (= 3.1.2)
actionmailer (3.1.3)
actionpack (= 3.1.3)
mail (~> 2.3.0)
actionpack (3.1.2)
activemodel (= 3.1.2)
activesupport (= 3.1.2)
actionpack (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.5)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.0)
activemodel (3.1.2)
activesupport (= 3.1.2)
sprockets (~> 2.0.3)
activemodel (3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.2)
activemodel (= 3.1.2)
activesupport (= 3.1.2)
activerecord (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.2)
activemodel (= 3.1.2)
activesupport (= 3.1.2)
activesupport (3.1.2)
activeresource (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
activesupport (3.1.3)
multi_json (~> 1.0)
arel (2.2.1)
bcrypt-ruby (3.0.1)
Expand All @@ -54,17 +54,18 @@ GEM
hashie (1.2.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.18)
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
json (1.6.3)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.3)
omniauth (1.0.0)
multi_json (1.0.4)
mysql2 (0.3.10)
omniauth (1.0.1)
hashie (~> 1.2)
rack
orm_adapter (0.0.5)
Expand All @@ -78,35 +79,34 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.2)
actionmailer (= 3.1.2)
actionpack (= 3.1.2)
activerecord (= 3.1.2)
activeresource (= 3.1.2)
activesupport (= 3.1.2)
rails (3.1.3)
actionmailer (= 3.1.3)
actionpack (= 3.1.3)
activerecord (= 3.1.3)
activeresource (= 3.1.3)
activesupport (= 3.1.3)
bundler (~> 1.0)
railties (= 3.1.2)
railties (3.1.2)
actionpack (= 3.1.2)
activesupport (= 3.1.2)
railties (= 3.1.3)
railties (3.1.3)
actionpack (= 3.1.3)
activesupport (= 3.1.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.11)
json (~> 1.4)
sass (3.1.10)
sass (3.1.11)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
sprockets (2.1.1)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
Expand All @@ -126,8 +126,8 @@ DEPENDENCIES
coffee-rails (~> 3.1.1)
devise!
jquery-rails
mysql2
omniauth
rails (= 3.1.2)
rails (= 3.1.3)
sass-rails (~> 3.1.5.rc.2)
sqlite3
uglifier (>= 1.0.3)
6 changes: 0 additions & 6 deletions app/controllers/auth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ def user
:provider => 'josh_id',
:id => current_user.id.to_s,
:info => {
:name => current_user.name, # change if required
:email => current_user.email, # change if required
},
:extra => {
:admin => current_user.admin?,
:first_name => current_user.first_name,
:last_name => current_user.last_name
}
}

Expand Down
6 changes: 4 additions & 2 deletions config/database.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
adapter: mysql2
database: sso-rails3-provider
username: root
password:
pool: 5
timeout: 5000

Expand Down

0 comments on commit e94188a

Please sign in to comment.