Add optional prefix option

This commit is contained in:
Calvin Leung Huang
2015-06-04 13:05:22 -04:00
parent 4951f13e4f
commit 244b9178b8
3 changed files with 12 additions and 1 deletions

View File

@@ -9,3 +9,7 @@ secrets:
ssh_key:
id: 2345
label: Private Key
prefix_ssh_key:
id: 2345
label: Private Key
prefix: ssh

View File

@@ -50,6 +50,12 @@ describe Zanzibar::Cli do
expect(FakeFS::FileTest.file? File.join('secrets', 'zanzi_key')).to be(true)
end
it 'should download a file to a prefix' do
expect(FakeFS::FileTest.file? File.join('secrets/ssh', 'zanzi_key')).to be(false)
expect { subject.bundle }.to output(/Finished downloading secrets/).to_stdout
expect(FakeFS::FileTest.file? File.join('secrets/ssh', 'zanzi_key')).to be(true)
end
it 'should create a .gitignore' do
expect(FakeFS::FileTest.file? File.join('secrets', '.gitignore')).to be(false)
expect { subject.bundle }.to output(/Finished downloading secrets/).to_stdout