sheet_reader 0.0.0.pre → 0.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/{version.rb → sheet_reader/version.rb} +1 -1
- data/lib/sheet_reader.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25486b20166698a9ffc6469e252746c8684e3da7
|
4
|
+
data.tar.gz: 8ab06c81ad521138f9c826ffab430b92bdb81201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcbb9b538e5627c4ff3cfc52f25d32377b5e19af67bbebb3bc36a2344b482cedb4830a68992a1fd4ae7f9812d08464afdcb0babc9e61e90bdcc736ff036a4af1
|
7
|
+
data.tar.gz: 2167ad32464192a953a9ffc8a15f59dd91da79a46ad500174e022436149b04f36bd2515169ee9b0ac80f3afec1e92917e8e2dd261b51b2d8f13011b4af8c0f68
|
data/lib/sheet_reader.rb
CHANGED
@@ -20,6 +20,7 @@ module SheetReader
|
|
20
20
|
|
21
21
|
def self.read(sheet_id, sheet_name = "")
|
22
22
|
raise MissingEnvVars unless required_env_vars?
|
23
|
+
ensure_valid_key_format
|
23
24
|
|
24
25
|
begin
|
25
26
|
sheets = Google::Apis::SheetsV4::SheetsService.new
|
@@ -37,6 +38,10 @@ module SheetReader
|
|
37
38
|
|
38
39
|
private
|
39
40
|
|
41
|
+
def self.ensure_valid_key_format
|
42
|
+
ENV['GOOGLE_PRIVATE_KEY'] = ENV['GOOGLE_PRIVATE_KEY'].gsub(/\\n/, "\n")
|
43
|
+
end
|
44
|
+
|
40
45
|
def self.rows_as_hashes(rows)
|
41
46
|
keys, *rest = rows
|
42
47
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sheet_reader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clearbit
|
@@ -46,7 +46,7 @@ extra_rdoc_files: []
|
|
46
46
|
files:
|
47
47
|
- lib/sheet_reader.rb
|
48
48
|
- lib/sheet_reader/errors.rb
|
49
|
-
- lib/version.rb
|
49
|
+
- lib/sheet_reader/version.rb
|
50
50
|
homepage: http://github.com/cleabit/sheet_reader
|
51
51
|
licenses:
|
52
52
|
- MIT
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: 1.3.1
|
68
68
|
requirements: []
|
69
69
|
rubyforge_project:
|
70
|
-
rubygems_version: 2.
|
70
|
+
rubygems_version: 2.6.8
|
71
71
|
signing_key:
|
72
72
|
specification_version: 4
|
73
73
|
summary: Read google spreadsheets
|