google_drive_dotenv 0.2.1 → 0.3.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: a2870299832e936e38d8520b06065e017bd47918ec65ea92e0ac16a2d5422710
4
- data.tar.gz: b04a96d15da4d0f082392b9048eafd553156f9606e1306f32735d7b5a79f5d46
3
+ metadata.gz: 9f1f1301b0ccab8d3d313e1191bd6981b57df72b4ceda55de8def0bc2838c375
4
+ data.tar.gz: 0acfbde9b338fd5ec46a50994e8774c7120ba8fec169255bc06c64ea88980b0e
5
5
  SHA512:
6
- metadata.gz: 157ed9d9790b6d631aefd242dfb418066542d888ab4393e2442af5a776b4102774d06863677d4e23f36e02c34ae5baad02c8ea4c46468860299658f6f8c65273
7
- data.tar.gz: 248fb359560b5caf7190801137318bcf5af19a340dcbd3df8105828242ae10d8b073b7ac2b2a0e439f95aa6c58b0a6be8ee921f21c772d98b2fa3980836179cd
6
+ metadata.gz: 32c420b15ad226514c3897e2bd19f3f4232f558c85ee811d7724198b43ba503ebca862d2546c5f894ce58333400c7e54ec91bfef119fda193822e2046ce9eb70
7
+ data.tar.gz: 93115793354066506019e246fd38e768b3ef5dee6370c2b0b59a02b9beb9f6bbd5c49b3b7e9a80d9d53e208bfc14f261215dac7db03b6ee9128f5601de86af43
data/README.md CHANGED
@@ -4,9 +4,17 @@ Welcome to your new gem! In this directory, you'll find the files you need to be
4
4
 
5
5
  ## Usage
6
6
  ```
7
+ Commands:
8
+ google_drive_dotenv export [key] # Export Spreadsheet to env file
9
+ google_drive_dotenv help [COMMAND] # Describe available commands or one specific command
10
+
7
11
  Usage:
8
12
  google_drive_dotenv export [key]
9
13
 
14
+ Options:
15
+ o, [--output=OUTPUT]
16
+ # Default: .env
17
+
10
18
  Export Spreadsheet to env file
11
19
  ```
12
20
 
@@ -4,6 +4,7 @@ require 'google_drive'
4
4
  module GoogleDriveDotenv
5
5
  class CLI < Thor
6
6
  desc "export [key]", "Export Spreadsheet to env file"
7
+ option "output", aliases: "o", type: :string, default: ".env"
7
8
  def export(key)
8
9
  config_path = File.expand_path("~/google_config.json")
9
10
 
@@ -14,7 +15,7 @@ module GoogleDriveDotenv
14
15
  session = GoogleDrive::Session.from_config(config_path)
15
16
 
16
17
  sheet = session.spreadsheet_by_key(key).worksheets[0]
17
- File.open('.env', 'wb') do |file|
18
+ File.open(options['output'], 'wb') do |file|
18
19
  (1..sheet.num_rows).each do |row|
19
20
  key = sheet[row, 1]
20
21
  value = sheet[row, 2]
@@ -1,3 +1,3 @@
1
1
  module GoogleDriveDotenv
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.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.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - adorechic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-20 00:00:00.000000000 Z
11
+ date: 2020-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor