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.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/facebook_helpers.rb +7 -2
  3. 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.0"
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}/**/*"]
@@ -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 fb_signed_in?
43
- if parse_fb_cookie.nil? then return false else return true end
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbdoorman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: