chef 12.0.0-x86-mingw32 → 12.0.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/application/client.rb +3 -1
- data/lib/chef/event_loggers/windows_eventlog.rb +5 -3
- data/lib/chef/knife/core/bootstrap_context.rb +1 -1
- data/lib/chef/provider/lwrp_base.rb +1 -3
- data/lib/chef/resource/execute.rb +11 -0
- data/lib/chef/resource/lwrp_base.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/spec/data/lwrp/providers/buck_passer.rb +1 -0
- data/spec/data/lwrp/resources/bar.rb +1 -0
- data/spec/support/shared/unit/execute_resource.rb +6 -0
- data/spec/unit/application/client_spec.rb +12 -0
- data/spec/unit/knife/core/bootstrap_context_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4b0a76844eadc01a5b4afc0b742092db534e210
|
4
|
+
data.tar.gz: 69f4f5161d6aa4c1998de7b3ba084fb5b031d311
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b9acbc7ed8e2b719b551e215de84ffb496b77317fc430d31e72c3c9cc4f65e2b938e4166ac04f9c32ab354662fc61b4de19e6b2d020cc85ef12052e5835e3aa
|
7
|
+
data.tar.gz: 80950952217d387e7c4e9a90fadff2e56c54c93acc5e4fd7d7cff2ae28e97d22ad3f2697dfa9e72a0fee0947c8c0054e1e162aafe46d47770603587b276a8fc1
|
@@ -272,7 +272,9 @@ class Chef::Application::Client < Chef::Application
|
|
272
272
|
Chef::Config[:splay] = nil
|
273
273
|
end
|
274
274
|
|
275
|
-
|
275
|
+
if !Chef::Config[:client_fork] && Chef::Config[:interval] && !Chef::Platform.windows?
|
276
|
+
Chef::Application.fatal!(unforked_interval_error_message)
|
277
|
+
end
|
276
278
|
|
277
279
|
if Chef::Config[:json_attribs]
|
278
280
|
config_fetcher = Chef::ConfigFetcher.new(Chef::Config[:json_attribs])
|
@@ -20,9 +20,11 @@ require 'chef/event_loggers/base'
|
|
20
20
|
require 'chef/platform/query_helpers'
|
21
21
|
|
22
22
|
if Chef::Platform::windows? and not Chef::Platform::windows_server_2003?
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
if defined? Windows::Constants
|
24
|
+
[:INFINITE, :WAIT_FAILED, :FORMAT_MESSAGE_IGNORE_INSERTS, :ERROR_INSUFFICIENT_BUFFER].each do |c|
|
25
|
+
# These are redefined in 'win32/eventlog'
|
26
|
+
Windows::Constants.send(:remove_const, c) if Windows::Constants.const_defined? c
|
27
|
+
end
|
26
28
|
end
|
27
29
|
|
28
30
|
require 'win32/eventlog'
|
@@ -92,10 +92,8 @@ class Chef
|
|
92
92
|
provider_class = Chef::Provider.const_get(class_name)
|
93
93
|
else
|
94
94
|
provider_class = Class.new(self)
|
95
|
-
provider_class.class_from_file(filename)
|
96
|
-
|
97
|
-
class_name = convert_to_class_name(provider_name)
|
98
95
|
Chef::Provider.const_set(class_name, provider_class)
|
96
|
+
provider_class.class_from_file(filename)
|
99
97
|
Chef::Log.debug("Loaded contents of #{filename} into a provider named #{provider_name} defined in Chef::Provider::#{class_name}")
|
100
98
|
end
|
101
99
|
|
@@ -36,6 +36,7 @@ class Chef
|
|
36
36
|
@cwd = nil
|
37
37
|
@environment = nil
|
38
38
|
@group = nil
|
39
|
+
@path = nil
|
39
40
|
@returns = 0
|
40
41
|
@timeout = nil
|
41
42
|
@user = nil
|
@@ -94,6 +95,16 @@ class Chef
|
|
94
95
|
)
|
95
96
|
end
|
96
97
|
|
98
|
+
def path(arg=nil)
|
99
|
+
Chef::Log.warn "'path' attribute of 'execute' is not used by any provider in Chef 11 and Chef 12. Use 'environment' attribute to configure 'PATH'. This attribute will be removed in Chef 13."
|
100
|
+
|
101
|
+
set_or_return(
|
102
|
+
:path,
|
103
|
+
arg,
|
104
|
+
:kind_of => [ Array ]
|
105
|
+
)
|
106
|
+
end
|
107
|
+
|
97
108
|
def returns(arg=nil)
|
98
109
|
set_or_return(
|
99
110
|
:returns,
|
@@ -46,11 +46,11 @@ class Chef
|
|
46
46
|
else
|
47
47
|
resource_class = Class.new(self)
|
48
48
|
|
49
|
+
Chef::Resource.const_set(class_name, resource_class)
|
49
50
|
resource_class.resource_name = rname
|
50
51
|
resource_class.run_context = run_context
|
51
52
|
resource_class.class_from_file(filename)
|
52
53
|
|
53
|
-
Chef::Resource.const_set(class_name, resource_class)
|
54
54
|
Chef::Log.debug("Loaded contents of #{filename} into a resource named #{rname} defined in Chef::Resource::#{class_name}")
|
55
55
|
end
|
56
56
|
|
data/lib/chef/version.rb
CHANGED
@@ -76,6 +76,12 @@ shared_examples_for "an execute resource" do
|
|
76
76
|
@resource.group.should eql(1)
|
77
77
|
end
|
78
78
|
|
79
|
+
it "should accept an array for the execution path in Chef-12 and log deprecation message" do
|
80
|
+
expect(Chef::Log).to receive(:warn).at_least(:once)
|
81
|
+
@resource.path ["woot"]
|
82
|
+
expect(@resource.path).to eql(["woot"])
|
83
|
+
end
|
84
|
+
|
79
85
|
it "should accept an integer for the return code" do
|
80
86
|
@resource.returns 1
|
81
87
|
@resource.returns.should eql(1)
|
@@ -63,6 +63,18 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
context "when interval is given on windows" do
|
67
|
+
before do
|
68
|
+
Chef::Config[:interval] = 600
|
69
|
+
allow(Chef::Platform).to receive(:windows?).and_return(true)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should not terminate" do
|
73
|
+
expect(Chef::Application).not_to receive(:fatal!)
|
74
|
+
@app.reconfigure
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
66
78
|
context "when configured to run once" do
|
67
79
|
before do
|
68
80
|
Chef::Config[:once] = true
|
@@ -34,6 +34,10 @@ describe Chef::Knife::Core::BootstrapContext do
|
|
34
34
|
|
35
35
|
subject(:bootstrap_context) { described_class.new(config, run_list, chef_config, secret) }
|
36
36
|
|
37
|
+
it "initializes with Chef 11 parameters" do
|
38
|
+
expect{described_class.new(config, run_list, chef_config)}.not_to raise_error
|
39
|
+
end
|
40
|
+
|
37
41
|
it "runs chef with the first-boot.json in the _default environment" do
|
38
42
|
bootstrap_context.start_chef.should eq "chef-client -j /etc/chef/first-boot.json -E _default"
|
39
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.0.
|
4
|
+
version: 12.0.1
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-config
|