add-vault-tokens 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
  SHA1:
3
- metadata.gz: c2ea61f5ded8622f219284aa593c3bf3eadffc4f
4
- data.tar.gz: a942ee2017815d29029d7ccec464e00fa8257dd3
3
+ metadata.gz: 98551be20acddbdf09ca21784850d0ff19f797d2
4
+ data.tar.gz: 8f3abf2605ea0f8ecdc3883f1c8e5e7df6b7da5d
5
5
  SHA512:
6
- metadata.gz: 6e7a3201cf312533813f87dd2a3ccb9b1eef0136b0f1ea1b16c63b6e750ec0012f9da0bb503fda9f461c11d2053953f56f6a1c50113338c22dfab8d7158377e4
7
- data.tar.gz: eb1ae0b74599ae7201ac2629478210e72461506a9eacf39658ba110594a049f3cb5a30def389cc262bc1c635dff92c4213207520961d79b616d5b7971925b882
6
+ metadata.gz: 03ba730cb989129fd8c18750ce384d9221c1fa67858f0083f8893a0f7d5cfefc7443d2738055a4ccad987786b45ec81978f9681d8b3e4cd18e3a7e9720890669
7
+ data.tar.gz: 209c0682a099a106505fd2212c387ced75ab010c9f85a6daaee4cd3308f232b91be895f6b7bd8fe3253038e3bc48b6853eb1019d85ad883bd7c8e7ac00c75b6c
data/exe/add-vault-tokens CHANGED
@@ -5,7 +5,7 @@ require "psych"
5
5
  require "add_vault_tokens"
6
6
 
7
7
  # Set up command-line option defaults.
8
- options = { prefix: '' }
8
+ options = { prefix: '', renew: true }
9
9
  options[:prefix] = "#{ENV.fetch('VAULT_ENV')}-" if ENV.has_key?('VAULT_ENV')
10
10
 
11
11
  # Parse our command-line.
@@ -15,6 +15,10 @@ OptionParser.new do |opts|
15
15
  opts.on("-p", "--prefix", "Prefix to add to each app name") do |p|
16
16
  options[:prefix] = p
17
17
  end
18
+
19
+ opts.on(nil, "--no-renew", "Do not renew our master token") do |nr|
20
+ options[:renew] = false
21
+ end
18
22
  end.parse!
19
23
  paths = ARGV
20
24
 
@@ -22,8 +26,10 @@ paths = ARGV
22
26
  AddVaultTokens.connect
23
27
 
24
28
  # Renew our master token.
25
- STDERR.puts("Renewing VAULT_MASTER_TOKEN")
26
- AddVaultTokens.renew_master_token
29
+ if options[:renew]
30
+ STDERR.puts("Renewing VAULT_MASTER_TOKEN")
31
+ AddVaultTokens.renew_master_token
32
+ end
27
33
 
28
34
  # For each input file, add the appropriate tokens to each app.
29
35
  paths.each do |path|
@@ -1,3 +1,3 @@
1
1
  module AddVaultTokens
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: add-vault-tokens
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
  - Eric Kidd
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-26 00:00:00.000000000 Z
11
+ date: 2015-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vault