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 +4 -4
- data/exe/add-vault-tokens +9 -3
- data/lib/add_vault_tokens/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98551be20acddbdf09ca21784850d0ff19f797d2
|
4
|
+
data.tar.gz: 8f3abf2605ea0f8ecdc3883f1c8e5e7df6b7da5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
26
|
-
|
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|
|
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.
|
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-
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vault
|