Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update to OmniAuth 1.0

  • Loading branch information...
commit 64e982ecca9936d5d21e45c4dc6adcfeaed41c62 1 parent dbefd12
Daniel Kehoe DanielKehoe authored
Showing with 62 additions and 114 deletions.
  1. +7 −6 Gemfile
  2. +52 −104 Gemfile.lock
  3. +3 −4 app/models/user.rb
13 Gemfile
View
@@ -6,13 +6,14 @@ group :assets do
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
-gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
+gem "rspec-rails", ">= 2.8.0.rc1", :group => [:development, :test]
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
-gem "factory_girl_rails", ">= 1.2.0", :group => :test
-gem "cucumber-rails", ">= 1.1.1", :group => :test
+gem "factory_girl_rails", ">= 1.3.0", :group => :test
+gem "cucumber-rails", ">= 1.2.0", :group => :test
gem "capybara", ">= 1.1.1", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
-gem "bson_ext", ">= 1.4.0"
-gem "mongoid", ">= 2.3.0"
-gem "omniauth", ">= 0.3.0"
+gem "bson_ext", ">= 1.3.1"
+gem "mongoid", ">= 2.3.3"
+gem "omniauth", ">= 1.0.0"
+gem "omniauth-twitter"
156 Gemfile.lock
View
@@ -1,8 +1,6 @@
GEM
remote: http://rubygems.org/
specs:
- XMLCanonicalizer (1.0.1)
- log4r (>= 1.0.4)
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
@@ -33,8 +31,8 @@ GEM
multi_json (~> 1.0)
addressable (2.2.6)
arel (2.2.1)
- bson (1.4.0)
- bson_ext (1.4.0)
+ bson (1.4.1)
+ bson_ext (1.4.1)
builder (3.0.0)
capybara (1.1.1)
mime-types (>= 1.16)
@@ -52,113 +50,70 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.1.2)
- cucumber (1.1.0)
+ cucumber (1.1.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
- gherkin (~> 2.5.0)
+ gherkin (~> 2.6.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
- cucumber-rails (1.1.1)
+ cucumber-rails (1.2.0)
capybara (>= 1.1.1)
- cucumber (>= 1.1.0)
+ cucumber (>= 1.1.1)
nokogiri (>= 1.5.0)
database_cleaner (0.6.7)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.9)
multi_json (~> 1.0)
- factory_girl (2.1.2)
+ factory_girl (2.2.0)
activesupport
- factory_girl_rails (1.2.0)
- factory_girl (~> 2.1.0)
+ factory_girl_rails (1.3.0)
+ factory_girl (~> 2.2.0)
railties (>= 3.0.0)
- faraday (0.7.5)
- addressable (~> 2.2.6)
- multipart-post (~> 1.1.3)
- rack (>= 1.1.0, < 2)
ffi (1.0.9)
- gherkin (2.5.1)
+ gherkin (2.6.2)
json (>= 1.4.6)
+ hashie (1.2.0)
hike (1.2.1)
i18n (0.6.0)
- jquery-rails (1.0.14)
+ jquery-rails (1.0.16)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
json_pure (1.6.1)
launchy (2.0.5)
addressable (~> 2.2.6)
- log4r (1.1.9)
- macaddr (1.4.0)
- systemu (~> 2.2.0)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.16)
- mongo (1.4.0)
- bson (= 1.4.0)
- mongoid (2.3.0)
+ mime-types (1.17.2)
+ mongo (1.4.1)
+ bson (= 1.4.1)
+ mongoid (2.3.3)
activemodel (~> 3.1)
- mongo (~> 1.4)
+ mongo (~> 1.3)
tzinfo (~> 0.3.22)
mongoid-rspec (1.4.4)
mongoid (~> 2.0)
rspec (~> 2)
multi_json (1.0.3)
- multi_xml (0.4.1)
- multipart-post (1.1.3)
- net-ldap (0.2.2)
nokogiri (1.5.0)
- oa-basic (0.3.0)
- oa-core (= 0.3.0)
- rest-client (~> 1.6.0)
- oa-core (0.3.0)
- oa-enterprise (0.3.0)
- XMLCanonicalizer (~> 1.0.1)
- addressable (~> 2.2.6)
- net-ldap (~> 0.2.2)
- nokogiri (~> 1.5.0)
- oa-core (= 0.3.0)
- pyu-ruby-sasl (~> 0.0.3.1)
- rubyntlm (~> 0.1.1)
- uuid
- oa-more (0.3.0)
- multi_json (~> 1.0.0)
- oa-core (= 0.3.0)
- rest-client (~> 1.6.0)
- oa-oauth (0.3.0)
- faraday (~> 0.7.3)
- multi_json (~> 1.0.0)
- multi_xml (~> 0.4.0)
- oa-core (= 0.3.0)
- oauth (~> 0.4.0)
- oauth2 (~> 0.5.0)
- oa-openid (0.3.0)
- oa-core (= 0.3.0)
- rack-openid (~> 1.3.1)
- ruby-openid-apps-discovery (~> 1.2.0)
oauth (0.4.5)
- oauth2 (0.5.1)
- faraday (~> 0.7.4)
- multi_json (~> 1.0.3)
- omniauth (0.3.0)
- oa-basic (= 0.3.0)
- oa-core (= 0.3.0)
- oa-enterprise (= 0.3.0)
- oa-more (= 0.3.0)
- oa-oauth (= 0.3.0)
- oa-openid (= 0.3.0)
- polyglot (0.3.2)
- pyu-ruby-sasl (0.0.3.3)
- rack (1.3.4)
+ omniauth (1.0.0)
+ hashie (~> 1.2)
+ rack
+ omniauth-oauth (1.0.0)
+ oauth
+ omniauth (~> 1.0)
+ omniauth-twitter (0.0.6)
+ omniauth-oauth (~> 1.0)
+ polyglot (0.3.3)
+ rack (1.3.5)
rack-cache (1.1)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
- rack-openid (1.3.1)
- rack (>= 1.1.0)
- ruby-openid (>= 2.1.8)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
@@ -178,27 +133,22 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
- rake (0.9.2)
- rdoc (3.9.4)
- rest-client (1.6.7)
- mime-types (>= 1.16)
- rspec (2.6.0)
- rspec-core (~> 2.6.0)
- rspec-expectations (~> 2.6.0)
- rspec-mocks (~> 2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
+ rake (0.9.2.2)
+ rdoc (3.11)
+ json (~> 1.4)
+ rspec (2.8.0.rc1)
+ rspec-core (= 2.8.0.rc1)
+ rspec-expectations (= 2.8.0.rc1)
+ rspec-mocks (= 2.8.0.rc1)
+ rspec-core (2.8.0.rc1)
+ rspec-expectations (2.8.0.rc1)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.6.0)
- rspec-rails (2.6.1)
+ rspec-mocks (2.8.0.rc1)
+ rspec-rails (2.8.0.rc1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
- rspec (~> 2.6.0)
- ruby-openid (2.1.8)
- ruby-openid-apps-discovery (1.2.0)
- ruby-openid (>= 2.1.7)
- rubyntlm (0.1.1)
+ rspec (= 2.8.0.rc1)
rubyzip (0.9.4)
sass (3.1.10)
sass-rails (3.1.4)
@@ -207,28 +157,25 @@ GEM
sass (>= 3.1.4)
sprockets (~> 2.0.0)
tilt (~> 1.3.2)
- selenium-webdriver (2.8.0)
+ selenium-webdriver (2.10.0)
childprocess (>= 0.2.1)
- ffi (>= 1.0.7)
+ ffi (= 1.0.9)
json_pure
rubyzip
- sprockets (2.0.2)
+ sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- systemu (2.2.0)
- term-ansicolor (1.0.6)
+ term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.30)
- uglifier (1.0.3)
+ tzinfo (0.3.31)
+ uglifier (1.0.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
- uuid (2.3.4)
- macaddr (~> 1.0)
xpath (0.1.4)
nokogiri (~> 1.3)
@@ -236,18 +183,19 @@ PLATFORMS
ruby
DEPENDENCIES
- bson_ext (>= 1.4.0)
+ bson_ext (>= 1.3.1)
capybara (>= 1.1.1)
coffee-rails (~> 3.1.1)
- cucumber-rails (>= 1.1.1)
+ cucumber-rails (>= 1.2.0)
database_cleaner (>= 0.6.7)
- factory_girl_rails (>= 1.2.0)
+ factory_girl_rails (>= 1.3.0)
jquery-rails
launchy (>= 2.0.5)
- mongoid (>= 2.3.0)
+ mongoid (>= 2.3.3)
mongoid-rspec (>= 1.4.4)
- omniauth (>= 0.3.0)
+ omniauth (>= 1.0.0)
+ omniauth-twitter
rails (= 3.1.1)
- rspec-rails (>= 2.6.1)
+ rspec-rails (>= 2.8.0.rc1)
sass-rails (~> 3.1.4)
uglifier (>= 1.0.3)
7 app/models/user.rb
View
@@ -10,9 +10,9 @@ def self.create_with_omniauth(auth)
create! do |user|
user.provider = auth['provider']
user.uid = auth['uid']
- if auth['user_info']
- user.name = auth['user_info']['name'] if auth['user_info']['name'] # Twitter, Google, Yahoo, GitHub
- user.email = auth['user_info']['email'] if auth['user_info']['email'] # Google, Yahoo, GitHub
+ if auth['info']
+ user.name = auth['info']['name'] if auth['info']['name'] # Twitter, Google, Yahoo, GitHub
+ user.email = auth['info']['email'] if auth['info']['email'] # Google, Yahoo, GitHub
end
if auth['extra'] && auth['extra']['user_hash']
user.name = auth['extra']['user_hash']['name'] if auth['extra']['user_hash']['name'] # Facebook
@@ -22,4 +22,3 @@ def self.create_with_omniauth(auth)
end
end
-
Please sign in to comment.
Something went wrong with that request. Please try again.