gdrivestrg 0.0.4 → 0.0.5

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.
@@ -67,6 +67,17 @@ class GdriveStrg < CloudStrg::CloudStorage
67
67
  session[:plugin_name] = self.class.to_s.split('Strg')[0].downcase
68
68
  return session, auth_url
69
69
  end
70
+
71
+ begin
72
+ @client.execute!(:api_method => @auth_api.userinfo.get)
73
+ rescue Exception => e
74
+ session.delete(:gdrive_access_token)
75
+ user_params.refresh_token = nil
76
+ user_params.expires_in = nil
77
+ user_params.issued_at = nil
78
+ user_params.save()
79
+ return config params
80
+ end
70
81
  return session, false
71
82
  end
72
83
 
@@ -64,8 +64,20 @@ class GdriveStrg < CloudStrg::CloudStorage
64
64
  if not authorized?
65
65
  #user.gdrive_refresh_token = @client.authorization.refresh_token
66
66
  #user.save
67
+ session[:plugin_name] = self.class.to_s.split('Strg')[0].downcase
67
68
  return session, auth_url
68
69
  end
70
+
71
+ begin
72
+
73
+ rescue Exception => e
74
+ session.delete(:gdrive_access_token)
75
+ user_params.refresh_token = nil
76
+ user_params.expires_in = nil
77
+ user_params.issued_at = nil
78
+ user_params.save()
79
+ return config params
80
+ end
69
81
  return session, false
70
82
  end
71
83
 
@@ -1,3 +1,3 @@
1
1
  module Gdrivestrg
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
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.4
4
+ version: 0.0.5
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: 2012-11-28 00:00:00.000000000 Z
12
+ date: 2012-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails