sheetsapi 0.0.4 → 0.1.0

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 +5 -5
  2. data/lib/sheetsAPI.rb +8 -21
  3. metadata +24 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 83264cab962aa7b0005c1870d296717f6874e453
4
- data.tar.gz: '009c77d659a1d531dc7552f88d680dc35073bc79'
2
+ SHA256:
3
+ metadata.gz: 5746c09f5f280ea29f798bf50b82610132e1e7d209c03b6a45550767a6d6ae4b
4
+ data.tar.gz: 7f9b2c2fba937c4e8437635ba4955f29481e8dfbcd9c7ae057cd4aad068ff03a
5
5
  SHA512:
6
- metadata.gz: 463443a4d513f9b6f005a189b4afe2b2adea589d71edd90f81e8af73c7fd452c350c1a8dd3daa424a120722b4390622adc431cf81f6d217c1551cedb710b67bd
7
- data.tar.gz: 1ca28282326cfe56ebb8f58fd2894f11bd6743e58b29b541ea5beb32b004c05cc73e748d41b045145a0f8d8308d4b3823df2d24d2cbfc9e9e87a05ac0f4c2556
6
+ metadata.gz: 446b91b708164d147f7d2628169913eccf69e417eebb961ec67f2c8d623962b7514260528b09b02edb42b64f55ce6e707aa551a471f30bf99f334b7388748762
7
+ data.tar.gz: b2596a32ac0855dbf8892ff437f5337957a19de0a2de50296fcaecedf9c7fcb29ff9f7a65274462f175a2517e82c1aa2db5edb1194d2a0fa67a50f13d93fd38d
data/lib/sheetsAPI.rb CHANGED
@@ -3,21 +3,6 @@ require 'googleauth'
3
3
  require 'google/apis/sheets_v4'
4
4
  require 'google/apis/drive_v3'
5
5
 
6
- # Uncomment this to inspect requests made to the google API
7
- module Google
8
- module Apis
9
- module Core
10
- class HttpClientAdapter
11
- alias old_call call
12
- def call(request)
13
- puts request.inspect
14
- old_call(request)
15
- end
16
- end
17
- end
18
- end
19
- end
20
-
21
6
  module SheetsAPI
22
7
  if !File.file? "#{Dir.pwd}/GoogleAPICredentials.json"
23
8
  puts "WARNING -- Missing Google API Credentials: #{Dir.pwd}/GoogleAPICredentials.json"
@@ -25,14 +10,16 @@ module SheetsAPI
25
10
  ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "#{Dir.pwd}/GoogleAPICredentials.json"
26
11
  end
27
12
 
28
- scopes = ['https://www.googleapis.com/auth/drive']
29
- authorization = Google::Auth.get_application_default(scopes)
13
+ if ENV["GOOGLE_APPLICATION_CREDENTIALS"]
14
+ scopes = ['https://www.googleapis.com/auth/drive']
15
+ authorization = Google::Auth.get_application_default(scopes)
30
16
 
31
- SheetService = Google::Apis::SheetsV4::SheetsService.new
32
- SheetService.authorization = authorization
17
+ SheetService = Google::Apis::SheetsV4::SheetsService.new
18
+ SheetService.authorization = authorization
33
19
 
34
- DriveService = Google::Apis::DriveV3::DriveService.new
35
- DriveService.authorization = authorization
20
+ DriveService = Google::Apis::DriveV3::DriveService.new
21
+ DriveService.authorization = authorization
22
+ end
36
23
 
37
24
  class << self
38
25
  # This will raise if the document cannot be opened
metadata CHANGED
@@ -1,29 +1,43 @@
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.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion B.V.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: google-api-client
14
+ name: google-apis-sheets_v4
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.3
19
+ version: 0.26.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.10.3
26
+ version: 0.26.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: google-apis-drive_v3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.44.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.44.0
27
41
  description: A simple API for writing to Google Sheets
28
42
  email:
29
43
  - info@phusion.nl
@@ -38,7 +52,7 @@ homepage: https://github.com/phusion/sheetsapi
38
52
  licenses:
39
53
  - MIT
40
54
  metadata: {}
41
- post_install_message:
55
+ post_install_message:
42
56
  rdoc_options: []
43
57
  require_paths:
44
58
  - lib
@@ -53,9 +67,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  requirements: []
56
- rubyforge_project:
57
- rubygems_version: 2.6.10
58
- signing_key:
70
+ rubygems_version: 3.4.6
71
+ signing_key:
59
72
  specification_version: 4
60
73
  summary: A simple API for writing to Google Sheets
61
74
  test_files: []