sheetsapi 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sheetsAPI.rb +8 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83264cab962aa7b0005c1870d296717f6874e453
4
- data.tar.gz: '009c77d659a1d531dc7552f88d680dc35073bc79'
3
+ metadata.gz: 4d82998e8f9048279359e419890f35fa882b7e16
4
+ data.tar.gz: 027e5065f4cd75e9b8afed205efd8624114bd37c
5
5
  SHA512:
6
- metadata.gz: 463443a4d513f9b6f005a189b4afe2b2adea589d71edd90f81e8af73c7fd452c350c1a8dd3daa424a120722b4390622adc431cf81f6d217c1551cedb710b67bd
7
- data.tar.gz: 1ca28282326cfe56ebb8f58fd2894f11bd6743e58b29b541ea5beb32b004c05cc73e748d41b045145a0f8d8308d4b3823df2d24d2cbfc9e9e87a05ac0f4c2556
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
- scopes = ['https://www.googleapis.com/auth/drive']
29
- authorization = Google::Auth.get_application_default(scopes)
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
- SheetService = Google::Apis::SheetsV4::SheetsService.new
32
- SheetService.authorization = authorization
32
+ SheetService = Google::Apis::SheetsV4::SheetsService.new
33
+ SheetService.authorization = authorization
33
34
 
34
- DriveService = Google::Apis::DriveV3::DriveService.new
35
- DriveService.authorization = authorization
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
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.6.10
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