fbdoorman 0.7.9 → 0.7.9.1

Sign up to get free protection for your applications and to get access to all the features.
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.7.9"
21
+ gem.version = "0.7.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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.9
1
+ 0.7.9.1
@@ -1,14 +1,31 @@
1
1
  <div id="fb-root"></div>
2
- <script src="http://connect.facebook.net/en_US/all.js"></script>
3
2
  <script>
4
- FB.init({appId: '<%=FB_APP_ID%>', status: true, cookie: true, xfbml: true, oauth: true});
5
- FB.Event.subscribe('auth.sessionChange', function(response) {
6
- if (response.session) {
7
- // A user has logged in, and a new cookie has been saved
8
- window.location="<%=FB_CALLBACK_URL%>";
9
- } else {
10
- // The user has logged out, and the cookie has been cleared
3
+ window.fbAsyncInit = function() {
4
+ FB.init({
5
+ appId : '<%=FB_APP_ID%>', // App ID
6
+ channelUrl : '<%= FB[:base_url].gsub("http:", '').gsub('https:','') %>/channel.html', // Channel File
7
+ status : true, // check login status
8
+ cookie : true, // enable cookies to allow the server to access the session
9
+ xfbml : true // parse XFBML
10
+ });
11
+
12
+ // Additional initialization code here
13
+ FB.Event.subscribe('auth.login', function(response) {
14
+ window.location="<%=FB_CALLBACK_URL%>";
15
+ });
16
+
17
+ FB.Event.subscribe('auth.logout', function(response) {
18
+ // The user has logged out, and the cookie has been cleared
11
19
  window.location="<%=FB_CLOSED_URL%>";
12
- }
13
- });
20
+ });
21
+
22
+ };
23
+
24
+ // Load the SDK Asynchronously
25
+ (function(d){
26
+ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
27
+ js = d.createElement('script'); js.id = id; js.async = true;
28
+ js.src = "//connect.facebook.net/en_US/all.js";
29
+ d.getElementsByTagName('head')[0].appendChild(js);
30
+ }(document));
14
31
  </script>
@@ -0,0 +1,14 @@
1
+ <div id="fb-root"></div>
2
+ <script src="http://connect.facebook.net/en_US/all.js"></script>
3
+ <script>
4
+ FB.init({appId: '<%=FB_APP_ID%>', status: true, cookie: true, xfbml: true, oauth: true});
5
+ FB.Event.subscribe('auth.sessionChange', function(response) {
6
+ if (response.session) {
7
+ // A user has logged in, and a new cookie has been saved
8
+ window.location="<%=FB_CALLBACK_URL%>";
9
+ } else {
10
+ // The user has logged out, and the cookie has been cleared
11
+ window.location="<%=FB_CLOSED_URL%>";
12
+ }
13
+ });
14
+ </script>
@@ -0,0 +1 @@
1
+ <script src="//connect.facebook.net/en_US/all.js"></script>
@@ -36,6 +36,9 @@ module Clearance
36
36
  map.sign_up 'sign_up',
37
37
  :controller => 'clearance/users',
38
38
  :action => 'new'
39
+ map.connect 'channel.html',
40
+ :controller => 'clearance/sessions',
41
+ :action => 'channel'
39
42
  map.sign_in 'sign_in',
40
43
  :controller => 'clearance/sessions',
41
44
  :action => 'new'
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.7.9
4
+ version: 0.7.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -37,9 +37,11 @@ files:
37
37
  - app/views/clearance_mailer/confirmation.html.erb
38
38
  - app/views/facebook/_fbjs.html.erb
39
39
  - app/views/facebook/closed.html.erb
40
+ - app/views/facebook/old_fbjs.html.erb
40
41
  - app/views/passwords/edit.html.erb
41
42
  - app/views/passwords/fbuser.html.erb
42
43
  - app/views/passwords/new.html.erb
44
+ - app/views/sessions/channel.html.erb
43
45
  - app/views/sessions/new.html.erb
44
46
  - app/views/users/_form.html.erb
45
47
  - app/views/users/new.html.erb