sociable 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sociable.rb +3 -3
- data/lib/sociable/model/authorization.rb +2 -1
- data/lib/sociable/model/facebook.rb +2 -1
- data/lib/sociable/model/twitter.rb +2 -0
- data/lib/version.rb +1 -1
- metadata +3 -2
data/lib/sociable.rb
CHANGED
@@ -34,11 +34,11 @@ module Sociable
|
|
34
34
|
|
35
35
|
Devise.setup do |config|
|
36
36
|
|
37
|
-
config.send(:omniauth, *@twitter_omniauth_settings)
|
37
|
+
config.send(:omniauth, *@twitter_omniauth_settings) if @twitter_omniauth_settings
|
38
38
|
|
39
|
-
config.send(:omniauth, *@facebook_omniauth_settings)
|
39
|
+
config.send(:omniauth, *@facebook_omniauth_settings) if @facebook_omniauth_settings
|
40
40
|
|
41
|
-
config.send(:omniauth, *@linkedin_omniauth_settings)
|
41
|
+
config.send(:omniauth, *@linkedin_omniauth_settings) if @linkedin_omniauth_settings
|
42
42
|
|
43
43
|
end
|
44
44
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'omniauth-facebook'
|
1
2
|
module Sociable
|
2
3
|
module Profile
|
3
4
|
module Facebook
|
@@ -25,6 +26,7 @@ module Sociable
|
|
25
26
|
user = users_criteria.first
|
26
27
|
user.credentials ||= {}
|
27
28
|
user.credentials.merge!(facebook: access_token.credentials)
|
29
|
+
user.profile_image_url ||= data.image
|
28
30
|
user.update_attributes(facebook_user_name: data.nickname,
|
29
31
|
facebook_data: access_token.extra.raw_info,
|
30
32
|
facebook_image_url: data.image) unless (user.facebook_user_name)
|
@@ -38,7 +40,6 @@ module Sociable
|
|
38
40
|
name: data.name,
|
39
41
|
email: data.email,
|
40
42
|
facebook_data: access_token.extra.raw_info,
|
41
|
-
credentials: credentials
|
42
43
|
)
|
43
44
|
user.save!
|
44
45
|
user
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'omniauth-twitter'
|
1
2
|
module Sociable
|
2
3
|
module Profile
|
3
4
|
module Twitter
|
@@ -21,6 +22,7 @@ module Sociable
|
|
21
22
|
if users_criteria.count > 0
|
22
23
|
user = users_criteria.first
|
23
24
|
user.credentials ||= {}
|
25
|
+
user.profile_image_url ||= data.image
|
24
26
|
user.credentials.merge!(twitter: access_token.credentials)
|
25
27
|
user.update_attributes(twitter_handle: data.nickname,
|
26
28
|
twitter_data: access_token.extra.raw_info,
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sociable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Sergey Zelvenskiy
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-07-10 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: devise
|
@@ -115,3 +115,4 @@ specification_version: 3
|
|
115
115
|
summary: This gem will make your rails app social in 30 seconds or less.
|
116
116
|
test_files: []
|
117
117
|
|
118
|
+
has_rdoc: false
|