chef-config 12.6.0 → 12.7.2
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/Rakefile +5 -6
- data/chef-config.gemspec +5 -5
- data/lib/chef-config.rb +1 -1
- data/lib/chef-config/config.rb +136 -71
- data/lib/chef-config/exceptions.rb +3 -3
- data/lib/chef-config/logger.rb +1 -4
- data/lib/chef-config/package_task.rb +27 -28
- data/lib/chef-config/path_helper.rb +28 -28
- data/lib/chef-config/version.rb +2 -2
- data/lib/chef-config/windows.rb +1 -2
- data/lib/chef-config/workstation_config_loader.rb +22 -23
- data/spec/spec_helper.rb +2 -2
- data/spec/unit/config_spec.rb +140 -37
- data/spec/unit/path_helper_spec.rb +17 -18
- data/spec/unit/workstation_config_loader_spec.rb +9 -11
- metadata +3 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
|
-
# Author:: Daniel DeLeo (<dan@
|
3
|
-
# Copyright:: Copyright
|
2
|
+
# Author:: Daniel DeLeo (<dan@chef.io>)
|
3
|
+
# Copyright:: Copyright 2014-2016, Chef Software, Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -16,12 +16,12 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
require
|
20
|
-
require
|
19
|
+
require "spec_helper"
|
20
|
+
require "tempfile"
|
21
21
|
|
22
|
-
require
|
23
|
-
require
|
24
|
-
require
|
22
|
+
require "chef-config/exceptions"
|
23
|
+
require "chef-config/windows"
|
24
|
+
require "chef-config/workstation_config_loader"
|
25
25
|
|
26
26
|
RSpec.describe ChefConfig::WorkstationConfigLoader do
|
27
27
|
|
@@ -45,7 +45,7 @@ RSpec.describe ChefConfig::WorkstationConfigLoader do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
it "tests a path's existence" do
|
48
|
-
expect(config_loader.path_exists?(
|
48
|
+
expect(config_loader.path_exists?("/nope/nope/nope/nope/frab/jab/nab")).to be(false)
|
49
49
|
expect(config_loader.path_exists?(__FILE__)).to be(true)
|
50
50
|
end
|
51
51
|
|
@@ -68,7 +68,7 @@ RSpec.describe ChefConfig::WorkstationConfigLoader do
|
|
68
68
|
let(:home) { "/Users/example.user" }
|
69
69
|
|
70
70
|
before do
|
71
|
-
allow(ChefConfig::PathHelper).to receive(:home).with(
|
71
|
+
allow(ChefConfig::PathHelper).to receive(:home).with(".chef").and_yield(File.join(home, ".chef"))
|
72
72
|
allow(config_loader).to receive(:path_exists?).with("#{home}/.chef/knife.rb").and_return(true)
|
73
73
|
end
|
74
74
|
|
@@ -138,7 +138,6 @@ RSpec.describe ChefConfig::WorkstationConfigLoader do
|
|
138
138
|
expect(config_loader.config_location).to eq("#{cwd}/config.rb")
|
139
139
|
end
|
140
140
|
|
141
|
-
|
142
141
|
context "and/or KNIFE_HOME is set" do
|
143
142
|
|
144
143
|
let(:knife_home) { "/path/to/knife/home" }
|
@@ -206,7 +205,6 @@ RSpec.describe ChefConfig::WorkstationConfigLoader do
|
|
206
205
|
end
|
207
206
|
end
|
208
207
|
|
209
|
-
|
210
208
|
describe "loading the config file" do
|
211
209
|
|
212
210
|
context "when no explicit config is specifed and no implicit config is found" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.4.
|
141
|
+
rubygems_version: 2.4.7
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Chef's default configuration and config loading
|