fbdoorman 0.9.0 → 0.9.1
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/Rakefile +1 -1
- data/lib/facebook_helpers.rb +7 -2
- metadata +1 -1
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
gem.summary = "Rails authentication with facebook single sign-on OR email & password."
|
19
19
|
gem.description = "Painless user registration and sign-in using Facebook single sign-on with JS. Typical email login still works too."
|
20
20
|
gem.email = "pelaez89@gmail.com"
|
21
|
-
gem.version = "0.9.
|
21
|
+
gem.version = "0.9.1"
|
22
22
|
gem.homepage = "http://github.com/davidpelaez/minifb-clearance"
|
23
23
|
gem.authors = ["Fbdoorman: David Pelaez","MiniFB: Appoxy","Clearance: Thoughtbot"]
|
24
24
|
gem.files = FileList["[A-Z]*", "{app,config,generators,lib,shoulda_macros,rails}/**/*"]
|
data/lib/facebook_helpers.rb
CHANGED
@@ -39,10 +39,15 @@ def facebook_login
|
|
39
39
|
return "<fb:login-button scope='publish_stream,email'></fb:login-button>"
|
40
40
|
end
|
41
41
|
|
42
|
-
def
|
43
|
-
if
|
42
|
+
def sign_out_link(msg="Sign out")
|
43
|
+
if user_from_fb? then
|
44
|
+
return "<a href='#' onClick='javascript:FB.logout();'>#{msg}</a>"
|
45
|
+
else
|
46
|
+
return "<a href='/sign_out'>#{msg}</a>"
|
47
|
+
end
|
44
48
|
end
|
45
49
|
|
50
|
+
|
46
51
|
#TBD: Save the url in the DB. 50x50 px
|
47
52
|
def facebook_pic_url
|
48
53
|
return "http://graph.facebook.com/#{current_user.fbid}/picture?type=square"
|