gdrivestrg 0.0.16 → 0.0.17
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/app/assets/javascripts/gdrivestrg/google_login.js +1 -1
- data/app/assets/javascripts/gdrivestrg/google_login.js~ +10 -2
- data/lib/gdrivestrg.rb +1 -1
- data/lib/gdrivestrg.rb~ +1 -1
- data/lib/gdrivestrg/gdrivestrg.rb +2 -2
- data/lib/gdrivestrg/gdrivestrg.rb~ +2 -2
- data/lib/gdrivestrg/version.rb +1 -1
- data/lib/gdrivestrg/version.rb~ +1 -1
- metadata +2 -2
@@ -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=
|
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)-(
|
3
|
-
var top = (screen.height/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
|
|
data/lib/gdrivestrg.rb
CHANGED
data/lib/gdrivestrg.rb~
CHANGED
@@ -3,8 +3,8 @@ require 'cloudstrg/cloudstrg'
|
|
3
3
|
class GdriveStrg < CloudStrg::CloudStorage
|
4
4
|
require 'google/api_client'
|
5
5
|
|
6
|
-
CLIENT_ID =
|
7
|
-
CLIENT_SECRET =
|
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 = "
|
7
|
-
CLIENT_SECRET = "
|
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
|
data/lib/gdrivestrg/version.rb
CHANGED
data/lib/gdrivestrg/version.rb~
CHANGED
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.
|
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-
|
12
|
+
date: 2013-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|