chef-config 19.2.12 → 19.2.98
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.
- checksums.yaml +4 -4
- data/chef-config.gemspec +1 -1
- data/lib/chef-config/config.rb +8 -0
- data/lib/chef-config/version.rb +1 -1
- data/spec/unit/config_spec.rb +20 -13
- data/spec/unit/workstation_config_loader_spec.rb +2 -3
- metadata +11 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca5fb5fc3d18ac20b341fe25bcf9e8af0a1a90ae0cfd770ceb48a37a781f6dde
|
|
4
|
+
data.tar.gz: ae0031d5fa88a0043a7a3aa4d1a5a6f3c91d567c0b33be4a4a94dcefccafb5bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20b103258efcd8180aec43c7d8a61bd777b7a38434655b135d137d517d9d862f18fa494bb6cabf01d554762341d07688a26ad955e905ea32437d2018e5824363
|
|
7
|
+
data.tar.gz: 4c4e0fed39c55cc995403b101df099257b45523988a1278f1320ffb78f247338aa0bf6dd71fedf513cddcfe41f90b276e2795e9e00c851a41e4148b5430a84cd
|
data/chef-config.gemspec
CHANGED
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.add_dependency "mixlib-config", ">= 2.2.12", "< 4.0"
|
|
30
30
|
spec.add_dependency "fuzzyurl"
|
|
31
31
|
spec.add_dependency "addressable"
|
|
32
|
-
spec.add_dependency "tomlrb", "
|
|
32
|
+
spec.add_dependency "tomlrb", ">= 1.2", "< 3.0"
|
|
33
33
|
spec.add_dependency "racc"
|
|
34
34
|
|
|
35
35
|
spec.files = %w{Rakefile LICENSE} + Dir.glob("*.gemspec") +
|
data/lib/chef-config/config.rb
CHANGED
|
@@ -484,6 +484,14 @@ module ChefConfig
|
|
|
484
484
|
# toggle info level log items that can create a lot of output
|
|
485
485
|
default :verbose_logging, true
|
|
486
486
|
default :node_name, nil
|
|
487
|
+
|
|
488
|
+
# When target mode is active, these hold the operator's original Chef Server
|
|
489
|
+
# identity so that API auth uses the admin credentials rather than the
|
|
490
|
+
# target node name. Set in Chef::Application::Client#reconfigure before
|
|
491
|
+
# target_mode.enabled is flipped to true.
|
|
492
|
+
default :api_client_name, nil
|
|
493
|
+
default :api_client_key, nil
|
|
494
|
+
|
|
487
495
|
default :diff_disabled, false
|
|
488
496
|
default :diff_filesize_threshold, 10000000
|
|
489
497
|
default :diff_output_threshold, 1000000
|
data/lib/chef-config/version.rb
CHANGED
data/spec/unit/config_spec.rb
CHANGED
|
@@ -26,6 +26,9 @@ RSpec.describe ChefConfig::Config do
|
|
|
26
26
|
|
|
27
27
|
before(:each) do
|
|
28
28
|
ChefConfig::Config.reset
|
|
29
|
+
ChefConfig::Config.instance_variable_set(:@var_chef_dir, nil)
|
|
30
|
+
ChefConfig::Config.instance_variable_set(:@etc_chef_dir, nil)
|
|
31
|
+
ChefConfig::Config.instance_variable_set(:@var_root_dir, nil)
|
|
29
32
|
|
|
30
33
|
# By default, treat deprecation warnings as errors in tests.
|
|
31
34
|
ChefConfig::Config.treat_deprecation_warnings_as_errors(true)
|
|
@@ -245,16 +248,18 @@ RSpec.describe ChefConfig::Config do
|
|
|
245
248
|
end
|
|
246
249
|
|
|
247
250
|
context "on windows", :windows_only do
|
|
248
|
-
|
|
249
|
-
|
|
251
|
+
let(:windows_drive) { ChefConfig::Config.windows_installation_drive || "C:" }
|
|
252
|
+
|
|
253
|
+
it "var_chef_dir is on the windows installation drive" do
|
|
254
|
+
expect(ChefConfig::Config.var_chef_dir).to eql("#{windows_drive}\\#{dirname}")
|
|
250
255
|
end
|
|
251
256
|
|
|
252
257
|
it "var_root_dir is C:\\" do
|
|
253
258
|
expect(ChefConfig::Config.var_root_dir).to eql("C:\\")
|
|
254
259
|
end
|
|
255
260
|
|
|
256
|
-
it "etc_chef_dir is
|
|
257
|
-
expect(ChefConfig::Config.etc_chef_dir).to eql("
|
|
261
|
+
it "etc_chef_dir is on the windows installation drive" do
|
|
262
|
+
expect(ChefConfig::Config.etc_chef_dir).to eql("#{windows_drive}\\#{dirname}")
|
|
258
263
|
end
|
|
259
264
|
end
|
|
260
265
|
|
|
@@ -273,16 +278,18 @@ RSpec.describe ChefConfig::Config do
|
|
|
273
278
|
end
|
|
274
279
|
|
|
275
280
|
context "when forced to windows" do
|
|
276
|
-
|
|
277
|
-
|
|
281
|
+
let(:windows_drive) { ChefConfig::Config.windows_installation_drive || "C:" }
|
|
282
|
+
|
|
283
|
+
it "var_chef_dir is on the windows installation drive" do
|
|
284
|
+
expect(ChefConfig::Config.var_chef_dir(windows: true)).to eql("#{windows_drive}\\#{dirname}")
|
|
278
285
|
end
|
|
279
286
|
|
|
280
287
|
it "var_root_dir is C:\\" do
|
|
281
288
|
expect(ChefConfig::Config.var_root_dir(windows: true)).to eql("C:\\")
|
|
282
289
|
end
|
|
283
290
|
|
|
284
|
-
it "etc_chef_dir is
|
|
285
|
-
expect(ChefConfig::Config.etc_chef_dir(windows: true)).to eql("
|
|
291
|
+
it "etc_chef_dir is on the windows installation drive" do
|
|
292
|
+
expect(ChefConfig::Config.etc_chef_dir(windows: true)).to eql("#{windows_drive}\\#{dirname}")
|
|
286
293
|
end
|
|
287
294
|
end
|
|
288
295
|
|
|
@@ -728,9 +735,9 @@ RSpec.describe ChefConfig::Config do
|
|
|
728
735
|
|
|
729
736
|
end
|
|
730
737
|
|
|
731
|
-
# On Windows, we'll detect
|
|
738
|
+
# On Windows, we'll detect embedded install and set this to the
|
|
732
739
|
# cacert.pem included in the package, but it's nil if you're on Windows
|
|
733
|
-
# w/o
|
|
740
|
+
# w/o embedded install (e.g., doing development on Windows, custom build, etc.)
|
|
734
741
|
unless is_windows
|
|
735
742
|
it "ChefConfig::Config[:ssl_ca_file] defaults to nil" do
|
|
736
743
|
expect(ChefConfig::Config[:ssl_ca_file]).to be_nil
|
|
@@ -860,7 +867,7 @@ RSpec.describe ChefConfig::Config do
|
|
|
860
867
|
describe "finding the windows embedded dir" do
|
|
861
868
|
let(:default_config_location) { "c:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/config.rb" }
|
|
862
869
|
let(:alternate_install_location) { "c:/my/alternate/install/place/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/config.rb" }
|
|
863
|
-
let(:
|
|
870
|
+
let(:non_package_location) { "c:/my/dev/stuff/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/config.rb" }
|
|
864
871
|
|
|
865
872
|
let(:default_ca_file) { "c:/opscode/chef/embedded/ssl/certs/cacert.pem" }
|
|
866
873
|
|
|
@@ -874,8 +881,8 @@ RSpec.describe ChefConfig::Config do
|
|
|
874
881
|
expect(ChefConfig::Config.embedded_dir).to eq("c:/my/alternate/install/place/chef/embedded")
|
|
875
882
|
end
|
|
876
883
|
|
|
877
|
-
it "doesn't error when not in an
|
|
878
|
-
allow(ChefConfig::Config).to receive(:_this_file).and_return(
|
|
884
|
+
it "doesn't error when not in an package install" do
|
|
885
|
+
allow(ChefConfig::Config).to receive(:_this_file).and_return(non_package_location)
|
|
879
886
|
expect(ChefConfig::Config.embedded_dir).to be_nil
|
|
880
887
|
end
|
|
881
888
|
|
|
@@ -480,11 +480,10 @@ RSpec.describe ChefConfig::WorkstationConfigLoader do
|
|
|
480
480
|
node_name = 'barney'
|
|
481
481
|
client_key = "barney_rubble.pem"
|
|
482
482
|
chef_server_url = "https://api.chef.io/organizations/bedrock"
|
|
483
|
-
|
|
484
|
-
secret_file = "/home/barney/.chef/encrypted_data_bag_secret.pem"
|
|
485
|
-
}
|
|
483
|
+
|
|
486
484
|
[default.knife]
|
|
487
485
|
ssh_user = "knife_ssh_user"
|
|
486
|
+
secret_file = "/home/barney/.chef/encrypted_data_bag_secret.pem"
|
|
488
487
|
EOH
|
|
489
488
|
content
|
|
490
489
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chef-config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 19.2.
|
|
4
|
+
version: 19.2.98
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Jacob
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 19.2.
|
|
18
|
+
version: 19.2.98
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 19.2.
|
|
25
|
+
version: 19.2.98
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: mixlib-shellout
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -95,16 +95,22 @@ dependencies:
|
|
|
95
95
|
name: tomlrb
|
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
|
97
97
|
requirements:
|
|
98
|
-
- - "
|
|
98
|
+
- - ">="
|
|
99
99
|
- !ruby/object:Gem::Version
|
|
100
100
|
version: '1.2'
|
|
101
|
+
- - "<"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '3.0'
|
|
101
104
|
type: :runtime
|
|
102
105
|
prerelease: false
|
|
103
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
104
107
|
requirements:
|
|
105
|
-
- - "
|
|
108
|
+
- - ">="
|
|
106
109
|
- !ruby/object:Gem::Version
|
|
107
110
|
version: '1.2'
|
|
111
|
+
- - "<"
|
|
112
|
+
- !ruby/object:Gem::Version
|
|
113
|
+
version: '3.0'
|
|
108
114
|
- !ruby/object:Gem::Dependency
|
|
109
115
|
name: racc
|
|
110
116
|
requirement: !ruby/object:Gem::Requirement
|