chef 16.8.9-universal-mingw32 → 16.9.29-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -4
- data/README.md +1 -1
- data/chef.gemspec +11 -2
- data/lib/chef/compliance/default_attributes.rb +5 -1
- data/lib/chef/compliance/fetcher/automate.rb +2 -2
- data/lib/chef/compliance/fetcher/chef_server.rb +2 -2
- data/lib/chef/compliance/reporter/automate.rb +1 -2
- data/lib/chef/compliance/reporter/chef_server_automate.rb +4 -2
- data/lib/chef/compliance/runner.rb +53 -39
- data/lib/chef/http/ssl_policies.rb +27 -14
- data/lib/chef/knife/core/formatting_options.rb +49 -0
- data/lib/chef/knife/core/node_presenter.rb +0 -25
- data/lib/chef/knife/core/status_presenter.rb +1 -26
- data/lib/chef/knife/core/windows_bootstrap_context.rb +1 -1
- data/lib/chef/knife/node_show.rb +2 -1
- data/lib/chef/knife/search.rb +2 -1
- data/lib/chef/knife/ssh.rb +2 -0
- data/lib/chef/knife/status.rb +8 -11
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/provider/package.rb +53 -19
- data/lib/chef/provider/package/dnf.rb +39 -12
- data/lib/chef/provider/package/dnf/dnf_helper.py +18 -5
- data/lib/chef/provider/package/dnf/python_helper.rb +6 -6
- data/lib/chef/provider/package/freebsd/pkgng.rb +3 -1
- data/lib/chef/provider/yum_repository.rb +2 -2
- data/lib/chef/resource/chef_gem.rb +2 -2
- data/lib/chef/resource/cron/cron_d.rb +1 -0
- data/lib/chef/resource/file.rb +1 -1
- data/lib/chef/resource/gem_package.rb +2 -2
- data/lib/chef/resource/homebrew_cask.rb +3 -3
- data/lib/chef/resource/http_request.rb +1 -1
- data/lib/chef/resource/locale.rb +1 -1
- data/lib/chef/resource/mdadm.rb +2 -2
- data/lib/chef/resource/osx_profile.rb +7 -7
- data/lib/chef/resource/remote_directory.rb +1 -1
- data/lib/chef/resource/ruby.rb +1 -5
- data/lib/chef/resource/ruby_block.rb +1 -1
- data/lib/chef/resource/user/windows_user.rb +5 -0
- data/lib/chef/resource/windows_certificate.rb +2 -12
- data/lib/chef/resource/yum_repository.rb +5 -0
- data/lib/chef/shell.rb +32 -1
- data/lib/chef/version.rb +1 -1
- data/spec/data/rubygems.org/latest_specs.4.8.gz +0 -0
- data/spec/data/rubygems.org/nonexistent_gem +0 -0
- data/spec/data/rubygems.org/sexp_processor +0 -0
- data/spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz +0 -0
- data/spec/data/ssl/binary/chef-rspec-der.cert +0 -0
- data/spec/data/ssl/binary/chef-rspec-der.key +0 -0
- data/spec/functional/resource/dnf_package_spec.rb +319 -16
- data/spec/functional/resource/ohai_spec.rb +2 -10
- data/spec/functional/resource/windows_certificate_spec.rb +204 -384
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/compliance/runner_spec.rb +60 -7
- data/spec/unit/http/ssl_policies_spec.rb +106 -78
- data/spec/unit/knife/bootstrap_spec.rb +5 -17
- data/spec/unit/knife/core/status_presenter_spec.rb +54 -0
- data/spec/unit/mixin/openssl_helper_spec.rb +0 -7
- data/spec/unit/provider/package/freebsd/pkgng_spec.rb +1 -1
- data/spec/unit/provider/package/rubygems_spec.rb +39 -7
- data/spec/unit/resource/user/windows_user_spec.rb +36 -0
- metadata +32 -14
- data/spec/data/trusted_certs_empty/.gitkeep +0 -0
- data/spec/data/trusted_certs_empty/README.md +0 -1
- data/spec/scripts/ssl-serve.rb +0 -47
@@ -21,13 +21,6 @@ describe Chef::Mixin::OpenSSLHelper do
|
|
21
21
|
Class.new { include Chef::Mixin::OpenSSLHelper }.new
|
22
22
|
end
|
23
23
|
|
24
|
-
describe ".included" do
|
25
|
-
it "requires openssl" do
|
26
|
-
instance
|
27
|
-
expect(defined?(OpenSSL)).to_not be(false)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
24
|
# Path helpers
|
32
25
|
describe "#get_key_filename" do
|
33
26
|
context "When the input is not a string" do
|
@@ -66,7 +66,7 @@ describe Chef::Provider::Package::Freebsd::Port do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should query pkg database" do
|
69
|
-
expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "zsh", env: nil, returns: [0, 70], timeout: 900).and_return(@pkg_info)
|
69
|
+
expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "zsh", env: nil, returns: [0, 1, 70], timeout: 900).and_return(@pkg_info)
|
70
70
|
expect(@provider.current_installed_version).to eq("3.1.7")
|
71
71
|
end
|
72
72
|
end
|
@@ -50,6 +50,8 @@ describe Chef::Provider::Package::Rubygems::CurrentGemEnvironment do
|
|
50
50
|
before do
|
51
51
|
@gem_env = Chef::Provider::Package::Rubygems::CurrentGemEnvironment.new
|
52
52
|
allow(@gem_env).to receive(:logger).and_return(logger)
|
53
|
+
|
54
|
+
WebMock.disable_net_connect!
|
53
55
|
end
|
54
56
|
|
55
57
|
it "determines the gem paths from the in memory rubygems" do
|
@@ -113,28 +115,55 @@ describe Chef::Provider::Package::Rubygems::CurrentGemEnvironment do
|
|
113
115
|
end
|
114
116
|
|
115
117
|
it "finds a matching gem candidate version on rubygems 2.0.0+" do
|
116
|
-
|
118
|
+
stub_request(:head, "https://rubygems.org/api/v1/dependencies")
|
119
|
+
|
120
|
+
stub_request(:get, "https://rubygems.org/api/v1/dependencies?gems=sexp_processor")
|
121
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "sexp_processor")))
|
122
|
+
|
123
|
+
stub_request(:get, "https://rubygems.org/quick/Marshal.4.8/sexp_processor-4.15.1.gemspec.rz")
|
124
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "sexp_processor-4.15.1.gemspec.rz")))
|
125
|
+
|
126
|
+
dep = Gem::Dependency.new("sexp_processor", ">= 0")
|
117
127
|
expect(@gem_env.candidate_version_from_remote(dep)).to be_kind_of(Gem::Version)
|
118
128
|
end
|
119
129
|
|
120
130
|
it "gives the candidate version as nil if none is found" do
|
121
|
-
|
131
|
+
stub_request(:head, "https://rubygems.org/api/v1/dependencies")
|
132
|
+
|
133
|
+
stub_request(:get, "https://rubygems.org/api/v1/dependencies?gems=nonexistent_gem")
|
134
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "nonexistent_gem")))
|
135
|
+
|
136
|
+
dep = Gem::Dependency.new("nonexistent_gem", ">= 0")
|
122
137
|
expect(@gem_env.candidate_version_from_remote(dep)).to be_nil
|
123
138
|
end
|
124
139
|
|
125
140
|
it "finds a matching gem from a specific gemserver when explicit sources are given (to a server that doesn't respond to api requests)" do
|
126
|
-
|
127
|
-
|
141
|
+
stub_request(:head, "https://rubygems2.org/api/v1/dependencies")
|
142
|
+
|
143
|
+
stub_request(:get, "https://rubygems2.org/api/v1/dependencies?gems=sexp_processor")
|
144
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "sexp_processor")))
|
145
|
+
|
146
|
+
stub_request(:get, "https://rubygems2.org/quick/Marshal.4.8/sexp_processor-4.15.1.gemspec.rz")
|
147
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "sexp_processor-4.15.1.gemspec.rz")))
|
148
|
+
|
149
|
+
dep = Gem::Dependency.new("sexp_processor", ">= 0")
|
150
|
+
expect(@gem_env.candidate_version_from_remote(dep, "https://rubygems2.org")).to be_kind_of(Gem::Version)
|
128
151
|
end
|
129
152
|
end
|
130
153
|
|
131
154
|
context "old rubygems caching behavior" do
|
132
155
|
before do
|
133
156
|
Chef::Config[:rubygems_cache_enabled] = true
|
157
|
+
|
158
|
+
stub_request(:get, "https://rubygems.org/latest_specs.4.8.gz")
|
159
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "latest_specs.4.8.gz")))
|
134
160
|
end
|
135
161
|
|
136
162
|
it "finds a matching gem candidate version on rubygems 2.0.0+" do
|
137
|
-
|
163
|
+
stub_request(:get, "https://rubygems.org/quick/Marshal.4.8/sexp_processor-4.15.1.gemspec.rz")
|
164
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "sexp_processor-4.15.1.gemspec.rz")))
|
165
|
+
|
166
|
+
dep = Gem::Dependency.new("sexp_processor", ">= 0")
|
138
167
|
expect(@gem_env.candidate_version_from_remote(dep)).to be_kind_of(Gem::Version)
|
139
168
|
end
|
140
169
|
|
@@ -144,8 +173,11 @@ describe Chef::Provider::Package::Rubygems::CurrentGemEnvironment do
|
|
144
173
|
end
|
145
174
|
|
146
175
|
it "finds a matching gem from a specific gemserver when explicit sources are given" do
|
147
|
-
|
148
|
-
|
176
|
+
stub_request(:get, "https://rubygems.org/quick/Marshal.4.8/sexp_processor-4.15.1.gemspec.rz")
|
177
|
+
.to_return(status: 200, body: File.binread(File.join(CHEF_SPEC_DATA, "rubygems.org", "sexp_processor-4.15.1.gemspec.rz")))
|
178
|
+
|
179
|
+
dep = Gem::Dependency.new("sexp_processor", ">= 0")
|
180
|
+
expect(@gem_env.candidate_version_from_remote(dep, "http://rubygems2.org")).to be_kind_of(Gem::Version)
|
149
181
|
end
|
150
182
|
end
|
151
183
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
|
+
# License:: Apache License, Version 2.0
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
|
18
|
+
require "spec_helper"
|
19
|
+
|
20
|
+
describe Chef::Resource::User::WindowsUser, "#uid" do
|
21
|
+
let(:resource) { Chef::Resource::User::WindowsUser.new("notarealuser") }
|
22
|
+
|
23
|
+
it "allows a string" do
|
24
|
+
resource.uid "100"
|
25
|
+
expect(resource.uid).to eql(100)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "allows an integer" do
|
29
|
+
resource.uid 100
|
30
|
+
expect(resource.uid).to eql(100)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "does not allow a hash" do
|
34
|
+
expect { resource.uid({ woot: "i found it" }) }.to raise_error(ArgumentError)
|
35
|
+
end
|
36
|
+
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: 16.
|
4
|
+
version: 16.9.29
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 16.
|
19
|
+
version: 16.9.29
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 16.
|
26
|
+
version: 16.9.29
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: chef-utils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 16.
|
33
|
+
version: 16.9.29
|
34
34
|
type: :runtime
|
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: 16.
|
40
|
+
version: 16.9.29
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -328,14 +328,14 @@ dependencies:
|
|
328
328
|
requirements:
|
329
329
|
- - '='
|
330
330
|
- !ruby/object:Gem::Version
|
331
|
-
version: 1.1.0.
|
331
|
+
version: 1.1.0.rc2
|
332
332
|
type: :runtime
|
333
333
|
prerelease: false
|
334
334
|
version_requirements: !ruby/object:Gem::Requirement
|
335
335
|
requirements:
|
336
336
|
- - '='
|
337
337
|
- !ruby/object:Gem::Version
|
338
|
-
version: 1.1.0.
|
338
|
+
version: 1.1.0.rc2
|
339
339
|
- !ruby/object:Gem::Dependency
|
340
340
|
name: highline
|
341
341
|
requirement: !ruby/object:Gem::Requirement
|
@@ -554,16 +554,22 @@ dependencies:
|
|
554
554
|
name: uuidtools
|
555
555
|
requirement: !ruby/object:Gem::Requirement
|
556
556
|
requirements:
|
557
|
-
- - "
|
557
|
+
- - ">="
|
558
558
|
- !ruby/object:Gem::Version
|
559
559
|
version: 2.1.5
|
560
|
+
- - "<"
|
561
|
+
- !ruby/object:Gem::Version
|
562
|
+
version: '3.0'
|
560
563
|
type: :runtime
|
561
564
|
prerelease: false
|
562
565
|
version_requirements: !ruby/object:Gem::Requirement
|
563
566
|
requirements:
|
564
|
-
- - "
|
567
|
+
- - ">="
|
565
568
|
- !ruby/object:Gem::Version
|
566
569
|
version: 2.1.5
|
570
|
+
- - "<"
|
571
|
+
- !ruby/object:Gem::Version
|
572
|
+
version: '3.0'
|
567
573
|
- !ruby/object:Gem::Dependency
|
568
574
|
name: proxifier
|
569
575
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1683,6 +1689,7 @@ files:
|
|
1683
1689
|
- lib/chef/knife/cookbook_upload.rb
|
1684
1690
|
- lib/chef/knife/core/bootstrap_context.rb
|
1685
1691
|
- lib/chef/knife/core/cookbook_scm_repo.rb
|
1692
|
+
- lib/chef/knife/core/formatting_options.rb
|
1686
1693
|
- lib/chef/knife/core/gem_glob_loader.rb
|
1687
1694
|
- lib/chef/knife/core/generic_presenter.rb
|
1688
1695
|
- lib/chef/knife/core/hashed_command_loader.rb
|
@@ -2551,6 +2558,10 @@ files:
|
|
2551
2558
|
- spec/data/root_alias_cookbooks/simple/attributes.rb
|
2552
2559
|
- spec/data/root_alias_cookbooks/simple/metadata.rb
|
2553
2560
|
- spec/data/root_alias_cookbooks/simple/recipe.rb
|
2561
|
+
- spec/data/rubygems.org/latest_specs.4.8.gz
|
2562
|
+
- spec/data/rubygems.org/nonexistent_gem
|
2563
|
+
- spec/data/rubygems.org/sexp_processor
|
2564
|
+
- spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz
|
2554
2565
|
- spec/data/run_context/cookbooks/circular-dep1/attributes/default.rb
|
2555
2566
|
- spec/data/run_context/cookbooks/circular-dep1/definitions/circular_dep1_res.rb
|
2556
2567
|
- spec/data/run_context/cookbooks/circular-dep1/libraries/lib.rb
|
@@ -2632,6 +2643,8 @@ files:
|
|
2632
2643
|
- spec/data/snap_package/get_conf_success.json
|
2633
2644
|
- spec/data/snap_package/result_failure.json
|
2634
2645
|
- spec/data/ssl/5e707473.0
|
2646
|
+
- spec/data/ssl/binary/chef-rspec-der.cert
|
2647
|
+
- spec/data/ssl/binary/chef-rspec-der.key
|
2635
2648
|
- spec/data/ssl/chef-rspec.cert
|
2636
2649
|
- spec/data/ssl/chef-rspec.key
|
2637
2650
|
- spec/data/ssl/key.pem
|
@@ -2651,8 +2664,6 @@ files:
|
|
2651
2664
|
- spec/data/trusted_certs/intermediate.pem
|
2652
2665
|
- spec/data/trusted_certs/opscode.pem
|
2653
2666
|
- spec/data/trusted_certs/root.pem
|
2654
|
-
- spec/data/trusted_certs_empty/.gitkeep
|
2655
|
-
- spec/data/trusted_certs_empty/README.md
|
2656
2667
|
- spec/data/windows_certificates/base64_test.cer
|
2657
2668
|
- spec/data/windows_certificates/othertest.cer
|
2658
2669
|
- spec/data/windows_certificates/test.cer
|
@@ -2877,7 +2888,6 @@ files:
|
|
2877
2888
|
- spec/integration/recipes/use_partial_spec.rb
|
2878
2889
|
- spec/integration/solo/solo_spec.rb
|
2879
2890
|
- spec/rcov.opts
|
2880
|
-
- spec/scripts/ssl-serve.rb
|
2881
2891
|
- spec/spec_helper.rb
|
2882
2892
|
- spec/stress/win32/file_spec.rb
|
2883
2893
|
- spec/stress/win32/memory_spec.rb
|
@@ -3070,6 +3080,7 @@ files:
|
|
3070
3080
|
- spec/unit/knife/core/hashed_command_loader_spec.rb
|
3071
3081
|
- spec/unit/knife/core/node_editor_spec.rb
|
3072
3082
|
- spec/unit/knife/core/object_loader_spec.rb
|
3083
|
+
- spec/unit/knife/core/status_presenter_spec.rb
|
3073
3084
|
- spec/unit/knife/core/subcommand_loader_spec.rb
|
3074
3085
|
- spec/unit/knife/core/ui_spec.rb
|
3075
3086
|
- spec/unit/knife/core/windows_bootstrap_context_spec.rb
|
@@ -3429,6 +3440,7 @@ files:
|
|
3429
3440
|
- spec/unit/resource/systemd_unit_spec.rb
|
3430
3441
|
- spec/unit/resource/template_spec.rb
|
3431
3442
|
- spec/unit/resource/timezone_spec.rb
|
3443
|
+
- spec/unit/resource/user/windows_user_spec.rb
|
3432
3444
|
- spec/unit/resource/user_spec.rb
|
3433
3445
|
- spec/unit/resource/user_ulimit_spec.rb
|
3434
3446
|
- spec/unit/resource/windows_ad_join_spec.rb
|
@@ -3521,7 +3533,13 @@ files:
|
|
3521
3533
|
homepage: https://www.chef.io
|
3522
3534
|
licenses:
|
3523
3535
|
- Apache-2.0
|
3524
|
-
metadata:
|
3536
|
+
metadata:
|
3537
|
+
bug_tracker_uri: https://github.com/chef/chef/issues
|
3538
|
+
changelog_uri: https://github.com/chef/chef/blob/master/CHANGELOG.md
|
3539
|
+
documentation_uri: https://docs.chef.io/
|
3540
|
+
homepage_uri: https://www.chef.io
|
3541
|
+
mailing_list_uri: https://discourse.chef.io/
|
3542
|
+
source_code_uri: https://github.com/chef/chef/
|
3525
3543
|
post_install_message:
|
3526
3544
|
rdoc_options: []
|
3527
3545
|
require_paths:
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
A directory with no certs. Used for testing directories with no certs during bootstrap.
|
data/spec/scripts/ssl-serve.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
# ssl-serve.rb
|
2
|
-
# USAGE: ruby ssl-serve.rb
|
3
|
-
#
|
4
|
-
# ssl-serve is a script that serves a local directory over SSL.
|
5
|
-
# You can use it to test various HTTP behaviors in chef, like chef-client's
|
6
|
-
# `-j` and `-c` options and remote_file with https connections.
|
7
|
-
#
|
8
|
-
require "pp"
|
9
|
-
require "openssl"
|
10
|
-
require "webrick"
|
11
|
-
require "webrick/https"
|
12
|
-
|
13
|
-
$ssl = true
|
14
|
-
|
15
|
-
CHEF_SPEC_DATA = File.expand_path("../data", __dir__)
|
16
|
-
cert_text = File.read(File.expand_path("ssl/chef-rspec.cert", CHEF_SPEC_DATA))
|
17
|
-
cert = OpenSSL::X509::Certificate.new(cert_text)
|
18
|
-
key_text = File.read(File.expand_path("ssl/chef-rspec.key", CHEF_SPEC_DATA))
|
19
|
-
key = OpenSSL::PKey::RSA.new(key_text)
|
20
|
-
|
21
|
-
server_opts = {}
|
22
|
-
if $ssl
|
23
|
-
server_opts.merge!( { SSLEnable: true,
|
24
|
-
SSLVerifyClient: OpenSSL::SSL::VERIFY_NONE,
|
25
|
-
SSLCertificate: cert,
|
26
|
-
SSLPrivateKey: key })
|
27
|
-
end
|
28
|
-
|
29
|
-
# 5 == debug, 3 == warning
|
30
|
-
LOGGER = WEBrick::Log.new(STDOUT, 5)
|
31
|
-
DEFAULT_OPTIONS = {
|
32
|
-
server: "webrick",
|
33
|
-
Port: 9000,
|
34
|
-
Host: "localhost",
|
35
|
-
environment: :none,
|
36
|
-
Logger: LOGGER,
|
37
|
-
DocumentRoot: File.expand_path("#{Dir.tmpdir}/chef-118-sampledata"),
|
38
|
-
#:AccessLog => [] # Remove this option to enable the access log when debugging.
|
39
|
-
}.freeze
|
40
|
-
|
41
|
-
webrick_opts = DEFAULT_OPTIONS.merge(server_opts)
|
42
|
-
pp webrick_opts: webrick_opts
|
43
|
-
|
44
|
-
server = WEBrick::HTTPServer.new(webrick_opts)
|
45
|
-
trap("INT") { server.shutdown }
|
46
|
-
|
47
|
-
server.start
|