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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23c2ef85b11ddf9ee00a29b2b08bdf9c93c07a418e6f9472f60e213154a565dc
4
- data.tar.gz: c5adfb915c2b887a45655bfcdb3afcf7f54b43416c84b8539a35af4b2f5aa0f3
3
+ metadata.gz: b0080152a157515721e1fc361dee01a5284ad4ecd9503b6803821d3540313972
4
+ data.tar.gz: b73b9dd0c4bee50c550b05008ccce0085ad1b7b82954d4460c43272d9786d57d
5
5
  SHA512:
6
- metadata.gz: bf3f7a98bd5ae812e0749191d2327ce2947de3894160ccc0916b5681ef7501f996490cfb6062d006b3c388a1e7444a4fd09fdabf1db30f31696d6026f1ba9788
7
- data.tar.gz: 3a7b9f4b0a9925f94aeac1c0f34db89405a0492a7e7290a5fa9f731ef6c9a25bc5824899e860a866291f1e3ac24e16374e0a80d63b76db02f7c41b336ad63cce
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
- session = GoogleDrive::Session.from_config(File.expand_path("~/google_config.json"))
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|
@@ -1,3 +1,3 @@
1
1
  module GoogleDriveDotenv
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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: 2019-12-12 00:00:00.000000000 Z
11
+ date: 2020-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor