google_spreadsheet_fetcher 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cff3e92433c66cea9ef0c7b38034a0a1dc8b60147d23b79b8fdd8c63b75d410b
|
4
|
+
data.tar.gz: 3990a45e68356829594c4efe28ca5e5d22930e960276a66787c85e8746aef0a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a89913bd36f9d02448d8705e5b28e901306ab65d7abaa56879d1bfd961939e5a7978a4169a9e9b49ceee0b90b38fda03435e230fe00a25c3cfd05487161e7c18
|
7
|
+
data.tar.gz: 1378109ec133abfbb2caed2022cd3b31fe472a4ca9ec1ee7a9c4c3532df045f70c917e3adc38c00d47d4d56519aefc96f8d0a065d019de8c568163ab35f20cc2
|
@@ -5,7 +5,8 @@ module GoogleSpreadsheetFetcher
|
|
5
5
|
include ActiveSupport::Configurable
|
6
6
|
|
7
7
|
config_accessor :client_secrets_file
|
8
|
-
config_accessor :credential_store_file
|
8
|
+
config_accessor :credential_store_file # required if token_store not set
|
9
|
+
config_accessor :token_store # required if credential_store_file not set
|
9
10
|
config_accessor :scopes
|
10
11
|
|
11
12
|
def self.default_config
|
@@ -14,6 +14,7 @@ module GoogleSpreadsheetFetcher
|
|
14
14
|
@user_id = user_id
|
15
15
|
@config = config || GoogleSpreadsheetFetcher.config
|
16
16
|
@application_name = application_name
|
17
|
+
@token_store = config.token_store || Google::Auth::Stores::FileTokenStore.new(file: @config.credential_store_file)
|
17
18
|
end
|
18
19
|
|
19
20
|
def build
|
@@ -27,8 +28,7 @@ module GoogleSpreadsheetFetcher
|
|
27
28
|
|
28
29
|
def fetch_credentials
|
29
30
|
client_id = Google::Auth::ClientId.from_file(@config.client_secrets_file)
|
30
|
-
|
31
|
-
authorizer = Google::Auth::UserAuthorizer.new(client_id, @config.scopes, token_store)
|
31
|
+
authorizer = Google::Auth::UserAuthorizer.new(client_id, @config.scopes, @token_store)
|
32
32
|
|
33
33
|
credentials = authorizer.get_credentials(@user_id)
|
34
34
|
return credentials if credentials.present?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_spreadsheet_fetcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro Ooishi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-11-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-api-client
|