gdrivestrg 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  function google_login(login_url, test_url, redirect_url) {
2
2
  var left = (screen.width/2)-(640/2);
3
3
  var top = (screen.height/2)-(480/2);
4
- var win = window.open(login_url, "googlelogin", 'width=700, height=480, left='+left+', top='+top);
4
+ var win = window.open(login_url, "googlelogin", 'width=700, height=600, left='+left+', top='+top);
5
5
  var pollTimer = window.setInterval(function() {
6
6
  if (win.document.URL.indexOf(test_url) != -1) {
7
7
  window.clearInterval(pollTimer);
@@ -1,6 +1,14 @@
1
1
  function google_login(login_url, test_url, redirect_url) {
2
- var left = (screen.width/2)-(640/2);
3
- var top = (screen.height/2)-(480/2);
2
+ var left = (screen.width/2)-(800/2);
3
+ var top = (screen.height/2)-(600/2);
4
4
  var win = window.open(login_url, "googlelogin", 'width=700, height=480, left='+left+', top='+top);
5
+ var pollTimer = window.setInterval(function() {
6
+ if (win.document.URL.indexOf(test_url) != -1) {
7
+ window.clearInterval(pollTimer);
8
+ win.close();
9
+
10
+ window.location = redirect_url;
11
+ }
12
+ }, 500);
5
13
  }
6
14
 
@@ -1,5 +1,5 @@
1
1
  require "gdrivestrg/engine"
2
2
 
3
3
  module Gdrivestrg
4
- mattr_accessor :user_class, :app_name
4
+ mattr_accessor :user_class, :app_name, :client_id, :client_secret
5
5
  end
@@ -1,5 +1,5 @@
1
1
  require "gdrivestrg/engine"
2
2
 
3
3
  module Gdrivestrg
4
- mattr_accessor :user_class
4
+ mattr_accessor :user_class, :app_name
5
5
  end
@@ -3,8 +3,8 @@ require 'cloudstrg/cloudstrg'
3
3
  class GdriveStrg < CloudStrg::CloudStorage
4
4
  require 'google/api_client'
5
5
 
6
- CLIENT_ID = "203391830542.apps.googleusercontent.com"
7
- CLIENT_SECRET = "rDeCX9CGcCYgSph2w8NPsRBr"
6
+ CLIENT_ID = Gdrivestrg.client_id
7
+ CLIENT_SECRET = Gdrivestrg.client_secret
8
8
  SCOPES = [
9
9
  'https://www.googleapis.com/auth/drive',
10
10
  'https://www.googleapis.com/auth/drive.file', # we will only see the files createdby this app
@@ -3,8 +3,8 @@ require 'cloudstrg/cloudstrg'
3
3
  class GdriveStrg < CloudStrg::CloudStorage
4
4
  require 'google/api_client'
5
5
 
6
- CLIENT_ID = "867108581948.apps.googleusercontent.com"
7
- CLIENT_SECRET = "Z3TXaBvx36ex8RRD-Wu-3PGK"
6
+ CLIENT_ID = "203391830542.apps.googleusercontent.com"
7
+ CLIENT_SECRET = "rDeCX9CGcCYgSph2w8NPsRBr"
8
8
  SCOPES = [
9
9
  'https://www.googleapis.com/auth/drive',
10
10
  'https://www.googleapis.com/auth/drive.file', # we will only see the files createdby this app
@@ -1,3 +1,3 @@
1
1
  module Gdrivestrg
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Gdrivestrg
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.16"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdrivestrg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-11 00:00:00.000000000 Z
12
+ date: 2013-06-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails