chef-vault 2.6.1 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -1
  3. data/.travis.yml +5 -6
  4. data/CONTRIBUTING.md +2 -2
  5. data/Gemfile +3 -1
  6. data/README.md +3 -3
  7. data/Rakefile +16 -20
  8. data/THEORY.md +1 -1
  9. data/UPGRADE.md +55 -0
  10. data/bin/chef-vault +8 -8
  11. data/chef-vault.gemspec +21 -21
  12. data/features/detect_and_warn_v1_vault.feature +15 -0
  13. data/features/step_definitions/chef-databag.rb +1 -1
  14. data/features/step_definitions/chef-repo.rb +7 -7
  15. data/features/step_definitions/chef-vault.rb +30 -22
  16. data/features/step_definitions/chef_databagitem.rb +2 -2
  17. data/features/support/env.rb +3 -3
  18. data/lib/chef-vault.rb +15 -15
  19. data/lib/chef-vault/chef_patch/api_client.rb +5 -5
  20. data/lib/chef-vault/chef_patch/user.rb +5 -5
  21. data/lib/chef-vault/exceptions.rb +3 -0
  22. data/lib/chef-vault/item.rb +13 -19
  23. data/lib/chef-vault/item_keys.rb +13 -13
  24. data/lib/chef-vault/mixins.rb +36 -0
  25. data/lib/chef-vault/version.rb +3 -2
  26. data/lib/chef/knife/decrypt.rb +2 -2
  27. data/lib/chef/knife/encrypt_create.rb +13 -13
  28. data/lib/chef/knife/encrypt_delete.rb +2 -2
  29. data/lib/chef/knife/encrypt_remove.rb +8 -8
  30. data/lib/chef/knife/encrypt_rotate_keys.rb +2 -2
  31. data/lib/chef/knife/encrypt_update.rb +13 -13
  32. data/lib/chef/knife/mixin/compat.rb +2 -2
  33. data/lib/chef/knife/vault_admins.rb +3 -3
  34. data/lib/chef/knife/vault_base.rb +9 -9
  35. data/lib/chef/knife/vault_create.rb +13 -13
  36. data/lib/chef/knife/vault_decrypt.rb +2 -2
  37. data/lib/chef/knife/vault_delete.rb +1 -1
  38. data/lib/chef/knife/vault_download.rb +2 -2
  39. data/lib/chef/knife/vault_edit.rb +6 -6
  40. data/lib/chef/knife/vault_isvault.rb +4 -4
  41. data/lib/chef/knife/vault_itemtype.rb +4 -4
  42. data/lib/chef/knife/vault_list.rb +4 -4
  43. data/lib/chef/knife/vault_refresh.rb +3 -3
  44. data/lib/chef/knife/vault_remove.rb +9 -9
  45. data/lib/chef/knife/vault_rotate_all_keys.rb +4 -4
  46. data/lib/chef/knife/vault_rotate_keys.rb +3 -3
  47. data/lib/chef/knife/vault_show.rb +12 -12
  48. data/lib/chef/knife/vault_update.rb +15 -15
  49. data/spec/chef-vault/certificate_spec.rb +7 -7
  50. data/spec/chef-vault/item_keys_spec.rb +53 -6
  51. data/spec/chef-vault/item_spec.rb +110 -110
  52. data/spec/chef-vault/user_spec.rb +6 -6
  53. data/spec/chef-vault_spec.rb +10 -10
  54. data/spec/spec_helper.rb +3 -3
  55. metadata +7 -6
  56. data/.rubocop_todo.yml +0 -101
@@ -7,7 +7,7 @@ RSpec.describe ChefVault::User do
7
7
  allow(item).to receive(:[]).with("id"){ "bar" }
8
8
  allow(item).to receive(:[]).with("password"){ "baz" }
9
9
  @orig_stdout = $stdout
10
- $stdout = File.open(File::NULL, 'w')
10
+ $stdout = File.open(File::NULL, "w")
11
11
  end
12
12
 
13
13
  after do
@@ -15,7 +15,7 @@ RSpec.describe ChefVault::User do
15
15
  end
16
16
 
17
17
  describe '#new' do
18
- it 'loads item' do
18
+ it "loads item" do
19
19
  expect(ChefVault::Item).to receive(:load).with("foo", "bar")
20
20
 
21
21
  ChefVault::User.new("foo", "bar")
@@ -24,18 +24,18 @@ RSpec.describe ChefVault::User do
24
24
 
25
25
  describe '#[]' do
26
26
  it "returns the value of the 'id' parameter" do
27
- expect(user['id']).to eq 'bar'
27
+ expect(user["id"]).to eq "bar"
28
28
  end
29
29
  end
30
30
 
31
- describe 'decrypt_password' do
32
- it 'echoes warning' do
31
+ describe "decrypt_password" do
32
+ it "echoes warning" do
33
33
  expect { user.decrypt_password }
34
34
  .to output("WARNING: This method is deprecated, please switch to item['value'] calls\n")
35
35
  .to_stdout
36
36
  end
37
37
 
38
- it 'returns items password' do
38
+ it "returns items password" do
39
39
  expect(item).to receive(:[]).with("password")
40
40
  expect(user.decrypt_password).to eq "baz"
41
41
  end
@@ -1,34 +1,34 @@
1
1
  RSpec.describe ChefVault do
2
- let(:vault) { ChefVault.new('foo') }
2
+ let(:vault) { ChefVault.new("foo") }
3
3
 
4
4
  describe '#new' do
5
- context 'with only a vault parameter specified' do
5
+ context "with only a vault parameter specified" do
6
6
 
7
7
  it "assigns 'foo' to the vault accessor" do
8
- expect(vault.vault).to eq 'foo'
8
+ expect(vault.vault).to eq "foo"
9
9
  end
10
10
  end
11
11
  end
12
12
 
13
- context 'with a vault and config file parameter specified' do
13
+ context "with a vault and config file parameter specified" do
14
14
  before do
15
- allow(IO).to receive(:read).with('knife.rb').and_return("node_name 'myserver'")
15
+ allow(IO).to receive(:read).with("knife.rb").and_return("node_name 'myserver'")
16
16
  end
17
17
 
18
- let(:vault) { ChefVault.new('foo', 'knife.rb') }
18
+ let(:vault) { ChefVault.new("foo", "knife.rb") }
19
19
 
20
20
  it "assigns 'foo' to the vault accessor" do
21
- expect(vault.vault).to eq 'foo'
21
+ expect(vault.vault).to eq "foo"
22
22
  end
23
23
 
24
- it 'loads the Chef config values' do
25
- expect(ChefVault).to receive(:load_config).with('knife.rb')
24
+ it "loads the Chef config values" do
25
+ expect(ChefVault).to receive(:load_config).with("knife.rb")
26
26
  vault
27
27
  end
28
28
  end
29
29
 
30
30
  describe '#version' do
31
- it 'the version method equals VERSION' do
31
+ it "the version method equals VERSION" do
32
32
  expect(vault.version).to eq(ChefVault::VERSION)
33
33
  end
34
34
  end
@@ -1,5 +1,5 @@
1
- require 'simplecov' if ENV['COVERAGE']
2
- require_relative '../lib/chef-vault'
1
+ require "simplecov" if ENV["COVERAGE"]
2
+ require_relative "../lib/chef-vault"
3
3
 
4
4
  # This file was generated by the `rspec --init` command. Conventionally, all
5
5
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
@@ -68,7 +68,7 @@ RSpec.configure do |config|
68
68
  # Use the documentation formatter for detailed output,
69
69
  # unless a formatter has already been configured
70
70
  # (e.g. via a command-line flag).
71
- config.default_formatter = 'doc'
71
+ config.default_formatter = "doc"
72
72
  end
73
73
 
74
74
  # Print the 10 slowest examples and example groups at the
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Moser
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-28 00:00:00.000000000 Z
12
+ date: 2016-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -120,7 +120,6 @@ files:
120
120
  - ".gitignore"
121
121
  - ".rspec"
122
122
  - ".rubocop.yml"
123
- - ".rubocop_todo.yml"
124
123
  - ".simplecov"
125
124
  - ".travis.yml"
126
125
  - CONTRIBUTING.md
@@ -132,11 +131,13 @@ files:
132
131
  - README.md
133
132
  - Rakefile
134
133
  - THEORY.md
134
+ - UPGRADE.md
135
135
  - bin/chef-vault
136
136
  - chef-vault.gemspec
137
137
  - features/clean.feature
138
138
  - features/clean_on_refresh.feature
139
139
  - features/clean_unknown_clients.feature
140
+ - features/detect_and_warn_v1_vault.feature
140
141
  - features/isvault.feature
141
142
  - features/itemtype.feature
142
143
  - features/step_definitions/chef-databag.rb
@@ -158,6 +159,7 @@ files:
158
159
  - lib/chef-vault/exceptions.rb
159
160
  - lib/chef-vault/item.rb
160
161
  - lib/chef-vault/item_keys.rb
162
+ - lib/chef-vault/mixins.rb
161
163
  - lib/chef-vault/user.rb
162
164
  - lib/chef-vault/version.rb
163
165
  - lib/chef/knife/decrypt.rb
@@ -190,7 +192,7 @@ files:
190
192
  - spec/chef-vault/user_spec.rb
191
193
  - spec/chef-vault_spec.rb
192
194
  - spec/spec_helper.rb
193
- homepage: https://github.com/Nordstrom/chef-vault
195
+ homepage: https://github.com/chef/chef-vault
194
196
  licenses:
195
197
  - Apache License, v2.0
196
198
  metadata: {}
@@ -210,9 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
212
  version: '0'
211
213
  requirements: []
212
214
  rubyforge_project:
213
- rubygems_version: 2.4.4
215
+ rubygems_version: 2.4.5.1
214
216
  signing_key:
215
217
  specification_version: 4
216
218
  summary: Data encryption support for Chef using data bags
217
219
  test_files: []
218
- has_rdoc: true
@@ -1,101 +0,0 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-02-09 09:22:33 -0800 using RuboCop version 0.29.0.
3
- # The point is for the user to remove these configuration records
4
- # one by one as the offenses are removed from the code base.
5
- # Note that changes in the inspected code, or installation of new
6
- # versions of RuboCop, may require this file to be generated again.
7
-
8
- AllCops:
9
- Exclude:
10
- - 'features/step_definitions/*.rb'
11
-
12
- # Offense count: 12
13
- Metrics/AbcSize:
14
- Max: 43
15
-
16
- # Offense count: 1
17
- Metrics/BlockNesting:
18
- Max: 4
19
-
20
- # Offense count: 1
21
- # Configuration parameters: CountComments.
22
- Metrics/ClassLength:
23
- Max: 306
24
-
25
- # Offense count: 5
26
- Metrics/CyclomaticComplexity:
27
- Max: 14
28
-
29
- # Offense count: 45
30
- # Configuration parameters: AllowURI, URISchemes.
31
- Metrics/LineLength:
32
- Max: 136
33
-
34
- # Offense count: 22
35
- # Configuration parameters: CountComments.
36
- Metrics/MethodLength:
37
- Max: 40
38
-
39
- # Offense count: 4
40
- Metrics/PerceivedComplexity:
41
- Max: 15
42
-
43
- # Offense count: 1
44
- Style/AccessorMethodName:
45
- Enabled: false
46
-
47
- # Offense count: 43
48
- # Cop supports --auto-correct.
49
- # Configuration parameters: EnforcedStyle, SupportedStyles.
50
- Style/AlignParameters:
51
- Enabled: false
52
-
53
- # Offense count: 30
54
- Style/Documentation:
55
- Enabled: false
56
-
57
- # Offense count: 6
58
- # Configuration parameters: Exclude.
59
- Style/FileName:
60
- Enabled: false
61
-
62
- # Offense count: 77
63
- # Cop supports --auto-correct.
64
- # Configuration parameters: EnforcedStyle, SupportedStyles.
65
- Style/HashSyntax:
66
- Enabled: false
67
-
68
- # Offense count: 7
69
- # Cop supports --auto-correct.
70
- Style/MethodCallParentheses:
71
- Enabled: false
72
-
73
- # Offense count: 7
74
- # Cop supports --auto-correct.
75
- # Configuration parameters: EnforcedStyle, SupportedStyles.
76
- Style/SignalException:
77
- Enabled: false
78
-
79
- # Offense count: 11
80
- # Cop supports --auto-correct.
81
- # Configuration parameters: EnforcedStyle, SupportedStyles.
82
- Style/SpaceAroundEqualsInParameterDefault:
83
- Enabled: false
84
-
85
- # Offense count: 16
86
- # Cop supports --auto-correct.
87
- # Configuration parameters: EnforcedStyle, SupportedStyles.
88
- Style/SpaceBeforeBlockBraces:
89
- Enabled: false
90
-
91
- # Offense count: 18
92
- # Cop supports --auto-correct.
93
- # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
94
- Style/SpaceInsideBlockBraces:
95
- Enabled: false
96
-
97
- # Offense count: 135
98
- # Cop supports --auto-correct.
99
- # Configuration parameters: EnforcedStyle, SupportedStyles.
100
- Style/StringLiterals:
101
- Enabled: false