google_drive_dotenv 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google_drive_dotenv/cli.rb +7 -1
- data/lib/google_drive_dotenv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0080152a157515721e1fc361dee01a5284ad4ecd9503b6803821d3540313972
|
4
|
+
data.tar.gz: b73b9dd0c4bee50c550b05008ccce0085ad1b7b82954d4460c43272d9786d57d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e8b7e051e6f69e9ac78c2df5ba9c438352389ec12cefd52aed628defac7f3bd7558bac4f409d2158f9f735289fbd120ef203bf76a870ac978fdb4bbe563e04a
|
7
|
+
data.tar.gz: 47ca776356c91459628ad908cd3408c55b993a5f360c51dbc979ef7185e980e39034331aa62e98250467b359a50efda353c95313eb92554b5baee961cf6d2ff3
|
@@ -5,7 +5,13 @@ module GoogleDriveDotenv
|
|
5
5
|
class CLI < Thor
|
6
6
|
desc "export [key]", "Export Spreadsheet to env file"
|
7
7
|
def export(key)
|
8
|
-
|
8
|
+
config_path = File.expand_path("~/google_config.json")
|
9
|
+
|
10
|
+
unless File.exist?(config_path)
|
11
|
+
raise "Please put #{config_path}"
|
12
|
+
end
|
13
|
+
|
14
|
+
session = GoogleDrive::Session.from_config(config_path)
|
9
15
|
|
10
16
|
sheet = session.spreadsheet_by_key(key).worksheets[0]
|
11
17
|
File.open('.env', 'wb') do |file|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_drive_dotenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- adorechic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|