sheetsapi 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sheetsAPI.rb +8 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d82998e8f9048279359e419890f35fa882b7e16
|
4
|
+
data.tar.gz: 027e5065f4cd75e9b8afed205efd8624114bd37c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 224db0ea7d32eb52d2ec0ed33d87b975378ea54cfa9d09b83ea67a5b51a9b7a241dbef5dbb0d029fb8970593679b4767fdb826b61ccb922794fb067be875fccf
|
7
|
+
data.tar.gz: 3b7bd1f46dbe0f72a6841026a47a96da80ab8ae70162dfce985ea1d4cdee15aeb83ea1bde2e87cfb080e6ec5688ba1a5998acc4b35105724ad7629103f943385
|
data/lib/sheetsAPI.rb
CHANGED
@@ -25,14 +25,16 @@ module SheetsAPI
|
|
25
25
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "#{Dir.pwd}/GoogleAPICredentials.json"
|
26
26
|
end
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
if ENV["GOOGLE_APPLICATION_CREDENTIALS"]
|
29
|
+
scopes = ['https://www.googleapis.com/auth/drive']
|
30
|
+
authorization = Google::Auth.get_application_default(scopes)
|
30
31
|
|
31
|
-
|
32
|
-
|
32
|
+
SheetService = Google::Apis::SheetsV4::SheetsService.new
|
33
|
+
SheetService.authorization = authorization
|
33
34
|
|
34
|
-
|
35
|
-
|
35
|
+
DriveService = Google::Apis::DriveV3::DriveService.new
|
36
|
+
DriveService.authorization = authorization
|
37
|
+
end
|
36
38
|
|
37
39
|
class << self
|
38
40
|
# This will raise if the document cannot be opened
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sheetsapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phusion B.V.
|
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
56
|
rubyforge_project:
|
57
|
-
rubygems_version: 2.
|
57
|
+
rubygems_version: 2.5.2.1
|
58
58
|
signing_key:
|
59
59
|
specification_version: 4
|
60
60
|
summary: A simple API for writing to Google Sheets
|