chef-vault 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +5 -1
- data/.travis.yml +5 -1
- data/Changelog.md +36 -3
- data/KNIFE_EXAMPLES.md +49 -74
- data/README.md +166 -104
- data/THEORY.md +4 -2
- data/bin/chef-vault +2 -2
- data/chef-vault.gemspec +2 -2
- data/features/clean_on_refresh.feature +28 -0
- data/features/isvault.feature +24 -0
- data/features/itemtype.feature +25 -0
- data/features/step_definitions/chef-databag.rb +4 -0
- data/features/step_definitions/chef-vault.rb +21 -0
- data/features/step_definitions/chef_databagitem.rb +9 -0
- data/features/vault_show_vaultname.feature +22 -0
- data/features/vault_update.feature +1 -1
- data/features/verify_id_matches.feature +11 -0
- data/lib/chef-vault/certificate.rb +1 -1
- data/lib/chef-vault/exceptions.rb +3 -0
- data/lib/chef-vault/item.rb +161 -18
- data/lib/chef-vault/user.rb +1 -1
- data/lib/chef-vault/version.rb +1 -1
- data/lib/chef/knife/decrypt.rb +1 -1
- data/lib/chef/knife/encrypt_create.rb +1 -1
- data/lib/chef/knife/encrypt_delete.rb +1 -1
- data/lib/chef/knife/encrypt_remove.rb +1 -1
- data/lib/chef/knife/encrypt_rotate_keys.rb +1 -1
- data/lib/chef/knife/encrypt_update.rb +1 -1
- data/lib/chef/knife/vault_base.rb +22 -0
- data/lib/chef/knife/vault_create.rb +0 -1
- data/lib/chef/knife/vault_decrypt.rb +1 -1
- data/lib/chef/knife/vault_isvault.rb +43 -0
- data/lib/chef/knife/vault_itemtype.rb +43 -0
- data/lib/chef/knife/vault_list.rb +7 -18
- data/lib/chef/knife/vault_refresh.rb +6 -12
- data/lib/chef/knife/vault_rotate_all_keys.rb +1 -1
- data/lib/chef/knife/vault_show.rb +15 -1
- data/lib/chef/knife/vault_update.rb +1 -1
- data/spec/chef-vault/certificate_spec.rb +9 -2
- data/spec/chef-vault/item_spec.rb +164 -3
- data/spec/chef-vault/user_spec.rb +9 -2
- metadata +14 -6
@@ -6,6 +6,12 @@ RSpec.describe ChefVault::User do
|
|
6
6
|
allow(ChefVault::Item).to receive(:load).with("foo", "bar"){ item }
|
7
7
|
allow(item).to receive(:[]).with("id"){ "bar" }
|
8
8
|
allow(item).to receive(:[]).with("password"){ "baz" }
|
9
|
+
@orig_stdout = $stdout
|
10
|
+
$stdout = File.open(File::NULL, 'w')
|
11
|
+
end
|
12
|
+
|
13
|
+
after do
|
14
|
+
$stdout = @orig_stdout
|
9
15
|
end
|
10
16
|
|
11
17
|
describe '#new' do
|
@@ -22,8 +28,9 @@ RSpec.describe ChefVault::User do
|
|
22
28
|
|
23
29
|
describe 'decrypt_password' do
|
24
30
|
it 'echoes warning' do
|
25
|
-
expect
|
26
|
-
|
31
|
+
expect { user.decrypt_password }
|
32
|
+
.to output("WARNING: This method is deprecated, please switch to item['value'] calls\n")
|
33
|
+
.to_stdout
|
27
34
|
end
|
28
35
|
|
29
36
|
it 'returns items password' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Moser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.2'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec-its
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
103
|
+
version: '0.30'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0.
|
110
|
+
version: '0.30'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: chef
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,15 +148,21 @@ files:
|
|
148
148
|
- bin/chef-vault
|
149
149
|
- chef-vault.gemspec
|
150
150
|
- features/clean.feature
|
151
|
+
- features/clean_on_refresh.feature
|
151
152
|
- features/clean_unknown_clients.feature
|
153
|
+
- features/isvault.feature
|
154
|
+
- features/itemtype.feature
|
152
155
|
- features/step_definitions/chef-databag.rb
|
153
156
|
- features/step_definitions/chef-repo.rb
|
154
157
|
- features/step_definitions/chef-vault.rb
|
158
|
+
- features/step_definitions/chef_databagitem.rb
|
155
159
|
- features/support/env.rb
|
156
160
|
- features/vault_create.feature
|
157
161
|
- features/vault_list.feature
|
158
162
|
- features/vault_show.feature
|
163
|
+
- features/vault_show_vaultname.feature
|
159
164
|
- features/vault_update.feature
|
165
|
+
- features/verify_id_matches.feature
|
160
166
|
- features/wrong_private_key.feature
|
161
167
|
- lib/chef-vault.rb
|
162
168
|
- lib/chef-vault/certificate.rb
|
@@ -182,6 +188,8 @@ files:
|
|
182
188
|
- lib/chef/knife/vault_delete.rb
|
183
189
|
- lib/chef/knife/vault_download.rb
|
184
190
|
- lib/chef/knife/vault_edit.rb
|
191
|
+
- lib/chef/knife/vault_isvault.rb
|
192
|
+
- lib/chef/knife/vault_itemtype.rb
|
185
193
|
- lib/chef/knife/vault_list.rb
|
186
194
|
- lib/chef/knife/vault_refresh.rb
|
187
195
|
- lib/chef/knife/vault_remove.rb
|