Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
804d044632 | ||
|
|
813b171d26 | ||
|
|
7a0ce1c04d | ||
|
|
49ea9ab9fa | ||
|
|
60e0d52ab4 | ||
|
|
e3ec56210b | ||
|
|
315d3d6499 | ||
|
|
0763265be1 |
@@ -1,7 +1,10 @@
|
||||
sudo: false
|
||||
language: ruby
|
||||
rvm:
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
- 2.1.7
|
||||
- 2.2.3
|
||||
addons:
|
||||
code_climate:
|
||||
repo_token:
|
||||
|
||||
@@ -98,6 +98,8 @@ When it downloads a file, it gets added to `Zanzifile.resolved`. And next time
|
||||
`resolved` file, it will not attempt to re-download. `zanzibar update` will attempt
|
||||
to re-download all secrets.
|
||||
|
||||
Subdirectories under the root directory `secret_dir` can be created for individual keys by specifying a `prefix` path for that secret. Secrets will default to be downloaded to the root `secret_dir` directory otherwise.
|
||||
|
||||
Note: `zanzibar get` can fetch passwords or files, but `zanzibar bundle` can
|
||||
only operate on secret files.
|
||||
|
||||
@@ -114,6 +116,7 @@ secrets:
|
||||
ssh_key:
|
||||
id: 249
|
||||
label: Private Key
|
||||
prefix: ssh/
|
||||
encryption_key:
|
||||
id: 483
|
||||
label: Attachment
|
||||
|
||||
@@ -67,6 +67,7 @@ module Zanzibar
|
||||
def prompt_for_password
|
||||
puts "Please enter password for #{@@username}:"
|
||||
STDIN.noecho(&:gets).chomp
|
||||
puts "Using password to login..."
|
||||
end
|
||||
|
||||
## Gets the wsdl document location if none is provided in the constructor
|
||||
|
||||
@@ -47,9 +47,11 @@ module Zanzibar
|
||||
## Make sure the directory exists and that a .gitignore is there to ignore it
|
||||
if @settings['secret_dir']
|
||||
FileUtils.mkdir_p(@settings['secret_dir'])
|
||||
File.open("#{@settings['secret_dir']}/.gitignore", 'w') do |file|
|
||||
file.puts '*'
|
||||
file.puts '!.gitignore'
|
||||
if !File.exist? "#{@settings['secret_dir']}/.gitignore"
|
||||
File.open("#{@settings['secret_dir']}/.gitignore", 'w') do |file|
|
||||
file.puts '*'
|
||||
file.puts '!.gitignore'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,8 +26,6 @@ module Zanzibar
|
||||
def fetch_secret(scrt_id, label = nil)
|
||||
scrt = ::Zanzibar::Zanzibar.new(@zanzibar_options)
|
||||
|
||||
puts @zanzibar_options
|
||||
|
||||
if label
|
||||
scrt.download_secret_file(scrt_id: scrt_id,
|
||||
type: label)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# The version of the gem
|
||||
module Zanzibar
|
||||
VERSION = '0.1.19'
|
||||
VERSION = '0.1.21'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user