chef 14.5.33 → 14.6.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -3
- data/chef-universal-mingw32.gemspec +3 -2
- data/chef.gemspec +3 -4
- data/lib/chef/api_client.rb +5 -3
- data/lib/chef/api_client_v1.rb +6 -4
- data/lib/chef/application.rb +1 -1
- data/lib/chef/audit/audit_reporter.rb +1 -1
- data/lib/chef/audit/control_group_data.rb +12 -6
- data/lib/chef/chef_fs/chef_fs_data_store.rb +2 -2
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +1 -1
- data/lib/chef/cookbook/manifest_v0.rb +34 -29
- data/lib/chef/cookbook/manifest_v2.rb +15 -11
- data/lib/chef/cookbook/metadata.rb +4 -2
- data/lib/chef/cookbook_manifest.rb +8 -5
- data/lib/chef/cookbook_version.rb +1 -1
- data/lib/chef/data_bag.rb +4 -2
- data/lib/chef/data_bag_item.rb +5 -3
- data/lib/chef/data_collector.rb +2 -2
- data/lib/chef/data_collector/resource_report.rb +4 -4
- data/lib/chef/encrypted_data_bag_item.rb +4 -2
- data/lib/chef/environment.rb +4 -2
- data/lib/chef/file_content_management/deploy/mv_unix.rb +5 -4
- data/lib/chef/handler.rb +2 -2
- data/lib/chef/json_compat.rb +1 -1
- data/lib/chef/key.rb +7 -5
- data/lib/chef/knife/bootstrap.rb +7 -1
- data/lib/chef/knife/client_edit.rb +2 -2
- data/lib/chef/knife/data_bag_show.rb +2 -2
- data/lib/chef/knife/osc_user_edit.rb +2 -2
- data/lib/chef/knife/user_edit.rb +2 -2
- data/lib/chef/mixin/params_validate.rb +4 -2
- data/lib/chef/node/attribute.rb +4 -4
- data/lib/chef/org.rb +6 -4
- data/lib/chef/policy_builder/policyfile.rb +5 -3
- data/lib/chef/provider/package.rb +9 -4
- data/lib/chef/provider/package/windows.rb +23 -1
- data/lib/chef/provider/package/yum/yum_helper.py +3 -2
- data/lib/chef/provider/package/zypper.rb +12 -8
- data/lib/chef/provider/registry_key.rb +15 -6
- data/lib/chef/provider/user/windows.rb +4 -3
- data/lib/chef/provider/windows_task.rb +11 -2
- data/lib/chef/resource.rb +3 -1
- data/lib/chef/resource/locale.rb +1 -1
- data/lib/chef/resource/ohai_hint.rb +4 -4
- data/lib/chef/resource/rhsm_errata_level.rb +1 -1
- data/lib/chef/resource/timezone.rb +91 -0
- data/lib/chef/resource/user/windows_user.rb +4 -0
- data/lib/chef/resource/windows_task.rb +240 -238
- data/lib/chef/resource/zypper_package.rb +5 -0
- data/lib/chef/resource_collection/resource_collection_serialization.rb +4 -2
- data/lib/chef/resources.rb +1 -0
- data/lib/chef/role.rb +4 -2
- data/lib/chef/run_list/run_list_expansion.rb +5 -3
- data/lib/chef/run_status.rb +4 -2
- data/lib/chef/user.rb +7 -5
- data/lib/chef/user_v1.rb +8 -6
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/security/sid.rb +39 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.aarch64.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.i686.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64le.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.s390x.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.src.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.x86_64.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.aarch64.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.i686.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64le.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.s390x.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.src.rpm +0 -0
- data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.x86_64.rpm +0 -0
- data/spec/functional/http/simple_spec.rb +2 -2
- data/spec/functional/resource/remote_file_spec.rb +2 -2
- data/spec/functional/resource/user/windows_spec.rb +1 -1
- data/spec/functional/resource/windows_task_spec.rb +1 -1
- data/spec/functional/resource/zypper_package_spec.rb +233 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/unit/audit/audit_reporter_spec.rb +4 -4
- data/spec/unit/audit/control_group_data_spec.rb +17 -17
- data/spec/unit/environment_spec.rb +1 -1
- data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +13 -1
- data/spec/unit/node_spec.rb +33 -0
- data/spec/unit/provider/package/rpm_spec.rb +5 -5
- data/spec/unit/provider/package/zypper_spec.rb +51 -0
- data/spec/unit/provider/package_spec.rb +32 -2
- data/spec/unit/provider/registry_key_spec.rb +74 -0
- data/spec/unit/provider/user/windows_spec.rb +12 -3
- data/spec/unit/provider/windows_task_spec.rb +1 -0
- data/spec/unit/resource/timezone.rb +39 -0
- data/spec/unit/resource/windows_task_spec.rb +1 -1
- data/spec/unit/resource_collection_spec.rb +1 -1
- data/spec/unit/run_context/child_run_context_spec.rb +3 -3
- data/spec/unit/shell/shell_session_spec.rb +3 -2
- metadata +21 -43
- data/CONTRIBUTING.md +0 -152
- data/VERSION +0 -1
- data/distro/powershell/chef/chef.psm1 +0 -459
- data/distro/ruby_bin_folder/Chef.PowerShell.Wrapper.dll +0 -0
- data/distro/ruby_bin_folder/Chef.PowerShell.dll +0 -0
- data/distro/ruby_bin_folder/Newtonsoft.Json.dll +0 -0
@@ -53,7 +53,8 @@ describe Chef::Provider::User::Windows do
|
|
53
53
|
|
54
54
|
describe "when comparing the user's current properties to the desired properties" do
|
55
55
|
before do
|
56
|
-
@new_resource.
|
56
|
+
@new_resource.full_name "Adam Jacob"
|
57
|
+
@new_resource.comment "Some comments"
|
57
58
|
@new_resource.uid 1000
|
58
59
|
@new_resource.gid 1000
|
59
60
|
@new_resource.home "/home/adam"
|
@@ -88,12 +89,16 @@ describe Chef::Provider::User::Windows do
|
|
88
89
|
expect(@provider.set_options).not_to have_key(:password)
|
89
90
|
end
|
90
91
|
|
92
|
+
it "doesn't set the full_name to be updated" do
|
93
|
+
expect(@provider.set_options).not_to have_key(:full_name)
|
94
|
+
end
|
91
95
|
end
|
92
96
|
|
93
97
|
describe "and the properties do not match" do
|
94
98
|
before do
|
95
99
|
@current_resource = Chef::Resource::User::WindowsUser.new("adam")
|
96
|
-
@current_resource.
|
100
|
+
@current_resource.full_name "Adam Jacob-foo"
|
101
|
+
@current_resource.comment "some comments"
|
97
102
|
@current_resource.uid 1111
|
98
103
|
@current_resource.gid 1111
|
99
104
|
@current_resource.home "/home/adam-foo"
|
@@ -102,8 +107,12 @@ describe Chef::Provider::User::Windows do
|
|
102
107
|
@provider.current_resource = @current_resource
|
103
108
|
end
|
104
109
|
|
110
|
+
it "marks the full_name field to be updated" do
|
111
|
+
expect(@provider.set_options[:full_name]).to eq("Adam Jacob")
|
112
|
+
end
|
113
|
+
|
105
114
|
it "marks the comment field to be updated" do
|
106
|
-
expect(@provider.set_options[:comment]).to eq("
|
115
|
+
expect(@provider.set_options[:comment]).to eq("Some comments")
|
107
116
|
end
|
108
117
|
|
109
118
|
it "marks the home_dir property to be updated" do
|
@@ -416,6 +416,7 @@ describe Chef::Provider::WindowsTask, :windows_only do
|
|
416
416
|
end
|
417
417
|
|
418
418
|
it "return logon_type bindary value as 1 as if password is not nil" do
|
419
|
+
new_resource.user = "Administrator"
|
419
420
|
new_resource.password = "abc"
|
420
421
|
expect(provider.send(:logon_type)).to be(1)
|
421
422
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: Copyright 2018, 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::Timezone do
|
21
|
+
let(:resource) { Chef::Resource::Timezone.new("fakey_fakerton") }
|
22
|
+
|
23
|
+
it "sets resource name as :timezone" do
|
24
|
+
expect(resource.resource_name).to eql(:timezone)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "the timezone property is the name_property" do
|
28
|
+
expect(resource.timezone).to eql("fakey_fakerton")
|
29
|
+
end
|
30
|
+
|
31
|
+
it "sets the default action as :set" do
|
32
|
+
expect(resource.action).to eql([:set])
|
33
|
+
end
|
34
|
+
|
35
|
+
it "supports the :set action only" do
|
36
|
+
expect { resource.action :set }.not_to raise_error
|
37
|
+
expect { resource.action :unset }.to raise_error
|
38
|
+
end
|
39
|
+
end
|
@@ -73,7 +73,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
73
73
|
end
|
74
74
|
it "raises an error if the user is a non-system user" do
|
75
75
|
resource.user "bob"
|
76
|
-
expect { resource.after_created }.to raise_error(ArgumentError, %q{Cannot specify a user other than the system users without specifying a password!. Valid passwordless users: 'NT AUTHORITY\SYSTEM', '
|
76
|
+
expect { resource.after_created }.to raise_error(ArgumentError, %q{Cannot specify a user other than the system users without specifying a password!. Valid passwordless users: 'SYSTEM', 'NT AUTHORITY\SYSTEM', 'LOCAL SERVICE', 'NT AUTHORITY\LOCAL SERVICE', 'NETWORK SERVICE', 'NT AUTHORITY\NETWORK SERVICE', 'ADMINISTRATORS', 'BUILTIN\ADMINISTRATORS', 'USERS', 'BUILTIN\USERS', 'GUESTS', 'BUILTIN\GUESTS'})
|
77
77
|
end
|
78
78
|
|
79
79
|
it "does not raise an error if the user is a system user" do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Christopher Walters (<cw@chef.io>)
|
4
|
-
# Copyright:: Copyright 2008-
|
4
|
+
# Copyright:: Copyright 2008-2018, Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Tim Hinderliter (<tim@chef.io>)
|
4
4
|
# Author:: Christopher Walters (<cw@chef.io>)
|
5
|
-
# Copyright:: Copyright 2008-
|
5
|
+
# Copyright:: Copyright 2008-2018, Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -55,8 +55,8 @@ describe Chef::RunContext::ChildRunContext do
|
|
55
55
|
expect(child.resource_collection.object_id).not_to eq run_context.resource_collection.object_id
|
56
56
|
f = Chef::Resource::File.new("hi", child)
|
57
57
|
child.resource_collection.insert(f)
|
58
|
-
expect(child.resource_collection).to
|
59
|
-
expect(run_context.resource_collection).
|
58
|
+
expect(child.resource_collection.include?(f)).to be true
|
59
|
+
expect(run_context.resource_collection.include?(f)).to be false
|
60
60
|
end
|
61
61
|
|
62
62
|
it "immediate_notification_collection is not the same as the parent" do
|
@@ -204,7 +204,7 @@ describe Shell::SoloLegacySession do
|
|
204
204
|
allow(@session).to receive(:node_built?).and_return(true)
|
205
205
|
kitteh = Chef::Resource::Cat.new("keyboard")
|
206
206
|
@recipe.run_context.resource_collection << kitteh
|
207
|
-
expect(@session.resource_collection
|
207
|
+
expect(@session.resource_collection.include?(kitteh)).to be true
|
208
208
|
end
|
209
209
|
|
210
210
|
it "returns definitions from its compilation object" do
|
@@ -224,7 +224,8 @@ describe Shell::SoloLegacySession do
|
|
224
224
|
keyboard_cat = Chef::Resource::Cat.new("keyboard_cat")
|
225
225
|
@recipe.run_context.resource_collection << keyboard_cat
|
226
226
|
# @session.rebuild_collection
|
227
|
-
expect(@session.resource_collection
|
227
|
+
expect(@session.resource_collection.include?(kitteh_cat)).to be true
|
228
|
+
expect(@session.resource_collection.include?(keyboard_cat)).to be true
|
228
229
|
end
|
229
230
|
|
230
231
|
it "runs chef with a resource collection from the compiled cookbooks" do
|
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: 14.
|
4
|
+
version: 14.6.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 14.
|
19
|
+
version: 14.6.47
|
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: 14.
|
26
|
+
version: 14.6.47
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-cli
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -312,20 +312,6 @@ dependencies:
|
|
312
312
|
- - ">="
|
313
313
|
- !ruby/object:Gem::Version
|
314
314
|
version: '0'
|
315
|
-
- !ruby/object:Gem::Dependency
|
316
|
-
name: iso8601
|
317
|
-
requirement: !ruby/object:Gem::Requirement
|
318
|
-
requirements:
|
319
|
-
- - "~>"
|
320
|
-
- !ruby/object:Gem::Version
|
321
|
-
version: 0.11.0
|
322
|
-
type: :runtime
|
323
|
-
prerelease: false
|
324
|
-
version_requirements: !ruby/object:Gem::Requirement
|
325
|
-
requirements:
|
326
|
-
- - "~>"
|
327
|
-
- !ruby/object:Gem::Version
|
328
|
-
version: 0.11.0
|
329
315
|
- !ruby/object:Gem::Dependency
|
330
316
|
name: rspec-core
|
331
317
|
requirement: !ruby/object:Gem::Requirement
|
@@ -333,9 +319,6 @@ dependencies:
|
|
333
319
|
- - "~>"
|
334
320
|
- !ruby/object:Gem::Version
|
335
321
|
version: '3.5'
|
336
|
-
- - "<"
|
337
|
-
- !ruby/object:Gem::Version
|
338
|
-
version: '3.8'
|
339
322
|
type: :runtime
|
340
323
|
prerelease: false
|
341
324
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -343,9 +326,6 @@ dependencies:
|
|
343
326
|
- - "~>"
|
344
327
|
- !ruby/object:Gem::Version
|
345
328
|
version: '3.5'
|
346
|
-
- - "<"
|
347
|
-
- !ruby/object:Gem::Version
|
348
|
-
version: '3.8'
|
349
329
|
- !ruby/object:Gem::Dependency
|
350
330
|
name: rspec-expectations
|
351
331
|
requirement: !ruby/object:Gem::Requirement
|
@@ -353,9 +333,6 @@ dependencies:
|
|
353
333
|
- - "~>"
|
354
334
|
- !ruby/object:Gem::Version
|
355
335
|
version: '3.5'
|
356
|
-
- - "<"
|
357
|
-
- !ruby/object:Gem::Version
|
358
|
-
version: '3.8'
|
359
336
|
type: :runtime
|
360
337
|
prerelease: false
|
361
338
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -363,9 +340,6 @@ dependencies:
|
|
363
340
|
- - "~>"
|
364
341
|
- !ruby/object:Gem::Version
|
365
342
|
version: '3.5'
|
366
|
-
- - "<"
|
367
|
-
- !ruby/object:Gem::Version
|
368
|
-
version: '3.8'
|
369
343
|
- !ruby/object:Gem::Dependency
|
370
344
|
name: rspec-mocks
|
371
345
|
requirement: !ruby/object:Gem::Requirement
|
@@ -373,9 +347,6 @@ dependencies:
|
|
373
347
|
- - "~>"
|
374
348
|
- !ruby/object:Gem::Version
|
375
349
|
version: '3.5'
|
376
|
-
- - "<"
|
377
|
-
- !ruby/object:Gem::Version
|
378
|
-
version: '3.8'
|
379
350
|
type: :runtime
|
380
351
|
prerelease: false
|
381
352
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -383,9 +354,6 @@ dependencies:
|
|
383
354
|
- - "~>"
|
384
355
|
- !ruby/object:Gem::Version
|
385
356
|
version: '3.5'
|
386
|
-
- - "<"
|
387
|
-
- !ruby/object:Gem::Version
|
388
|
-
version: '3.8'
|
389
357
|
- !ruby/object:Gem::Dependency
|
390
358
|
name: rspec_junit_formatter
|
391
359
|
requirement: !ruby/object:Gem::Requirement
|
@@ -497,15 +465,12 @@ executables:
|
|
497
465
|
extensions: []
|
498
466
|
extra_rdoc_files:
|
499
467
|
- README.md
|
500
|
-
- CONTRIBUTING.md
|
501
468
|
- LICENSE
|
502
469
|
files:
|
503
|
-
- CONTRIBUTING.md
|
504
470
|
- Gemfile
|
505
471
|
- LICENSE
|
506
472
|
- README.md
|
507
473
|
- Rakefile
|
508
|
-
- VERSION
|
509
474
|
- bin/chef-apply
|
510
475
|
- bin/chef-client
|
511
476
|
- bin/chef-resource-inspector
|
@@ -514,10 +479,6 @@ files:
|
|
514
479
|
- bin/knife
|
515
480
|
- chef-universal-mingw32.gemspec
|
516
481
|
- chef.gemspec
|
517
|
-
- distro/powershell/chef/chef.psm1
|
518
|
-
- distro/ruby_bin_folder/Chef.PowerShell.Wrapper.dll
|
519
|
-
- distro/ruby_bin_folder/Chef.PowerShell.dll
|
520
|
-
- distro/ruby_bin_folder/Newtonsoft.Json.dll
|
521
482
|
- lib/chef.rb
|
522
483
|
- lib/chef/api_client.rb
|
523
484
|
- lib/chef/api_client/registration.rb
|
@@ -1257,6 +1218,7 @@ files:
|
|
1257
1218
|
- lib/chef/resource/sysctl.rb
|
1258
1219
|
- lib/chef/resource/systemd_unit.rb
|
1259
1220
|
- lib/chef/resource/template.rb
|
1221
|
+
- lib/chef/resource/timezone.rb
|
1260
1222
|
- lib/chef/resource/user.rb
|
1261
1223
|
- lib/chef/resource/user/aix_user.rb
|
1262
1224
|
- lib/chef/resource/user/dscl_user.rb
|
@@ -1762,6 +1724,20 @@ files:
|
|
1762
1724
|
- spec/functional/assets/yumrepo/repodata/other.xml.gz
|
1763
1725
|
- spec/functional/assets/yumrepo/repodata/primary.xml.gz
|
1764
1726
|
- spec/functional/assets/yumrepo/repodata/repomd.xml
|
1727
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.10-1.aarch64.rpm
|
1728
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.10-1.i686.rpm
|
1729
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64.rpm
|
1730
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64le.rpm
|
1731
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.10-1.s390x.rpm
|
1732
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.10-1.src.rpm
|
1733
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.10-1.x86_64.rpm
|
1734
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.2-1.aarch64.rpm
|
1735
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.2-1.i686.rpm
|
1736
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64.rpm
|
1737
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64le.rpm
|
1738
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.2-1.s390x.rpm
|
1739
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.2-1.src.rpm
|
1740
|
+
- spec/functional/assets/zypprepo/chef_rpm-1.2-1.x86_64.rpm
|
1765
1741
|
- spec/functional/audit/rspec_formatter_spec.rb
|
1766
1742
|
- spec/functional/audit/runner_spec.rb
|
1767
1743
|
- spec/functional/dsl/reboot_pending_spec.rb
|
@@ -1822,6 +1798,7 @@ files:
|
|
1822
1798
|
- spec/functional/resource/windows_service_spec.rb
|
1823
1799
|
- spec/functional/resource/windows_task_spec.rb
|
1824
1800
|
- spec/functional/resource/yum_package_spec.rb
|
1801
|
+
- spec/functional/resource/zypper_package_spec.rb
|
1825
1802
|
- spec/functional/root_alias_spec.rb
|
1826
1803
|
- spec/functional/run_lock_spec.rb
|
1827
1804
|
- spec/functional/shell_spec.rb
|
@@ -2458,6 +2435,7 @@ files:
|
|
2458
2435
|
- spec/unit/resource/sysctl_spec.rb
|
2459
2436
|
- spec/unit/resource/systemd_unit_spec.rb
|
2460
2437
|
- spec/unit/resource/template_spec.rb
|
2438
|
+
- spec/unit/resource/timezone.rb
|
2461
2439
|
- spec/unit/resource/user_spec.rb
|
2462
2440
|
- spec/unit/resource/windows_ad_join_spec.rb
|
2463
2441
|
- spec/unit/resource/windows_auto_run_spec.rb
|
data/CONTRIBUTING.md
DELETED
@@ -1,152 +0,0 @@
|
|
1
|
-
# Contributing to Chef Projects
|
2
|
-
|
3
|
-
We're glad you want to contribute to a Chef project! This document will help answer common questions you may have during your first contribution.
|
4
|
-
|
5
|
-
## Submitting Issues
|
6
|
-
|
7
|
-
Not every contribution comes in the form of code. Submitting, confirming, and triaging issues is an important task for any project. At Chef we use GitHub to track all project issues.
|
8
|
-
|
9
|
-
If you are familiar with Chef and know the component that is causing you a problem, you can file an issue in the corresponding GitHub project. All of our Open Source Software can be found in our [Chef GitHub organization](https://github.com/chef/). All projects include GitHub issue templates to help gather information needed for a thorough review.
|
10
|
-
|
11
|
-
We ask you not to submit security concerns via GitHub. For details on submitting potential security issues please see <https://www.chef.io/security/>
|
12
|
-
|
13
|
-
In addition to GitHub issues, we also utilize a feedback site that helps our product team track and rank feature requests. If you have a feature request, this is an excellent place to start <https://www.chef.io/feedback/>
|
14
|
-
|
15
|
-
## Contribution Process
|
16
|
-
|
17
|
-
We have a 3 step process for contributions:
|
18
|
-
|
19
|
-
1. Commit changes to a git branch, making sure to sign-off those changes for the [Developer Certificate of Origin](#developer-certification-of-origin-dco).
|
20
|
-
2. Create a GitHub Pull Request for your change, following the instructions in the pull request template.
|
21
|
-
3. Perform a [Code Review](#code-review-process) with the project maintainers on the pull request.
|
22
|
-
|
23
|
-
### Pull Request Requirements
|
24
|
-
|
25
|
-
Chef Projects are built to last. We strive to ensure high quality throughout the experience. In order to ensure this, we require that all pull requests to Chef projects meet these specifications:
|
26
|
-
|
27
|
-
1. **Tests:** To ensure high quality code and protect against future regressions, we require all the code in Chef Projects to have at least unit test coverage. We use [RSpec](http://rspec.info/) for unit testing.
|
28
|
-
2. **Green CI Tests:** We use [Travis CI](https://travis-ci.org/) and/or [AppVeyor](https://www.appveyor.com/) CI systems to test all pull requests. We require these test runs to succeed on every pull request before being merged.
|
29
|
-
|
30
|
-
### Code Review Process
|
31
|
-
|
32
|
-
Code review takes place in GitHub pull requests. See [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with GitHub Pull Requests.
|
33
|
-
|
34
|
-
Once you open a pull request, project maintainers will review your code and respond to your pull request with any feedback they might have. The process at this point is as follows:
|
35
|
-
|
36
|
-
1. Two thumbs-up (:+1:) are required from project maintainers. See the master maintainers document for Chef projects at <https://github.com/chef/chef/blob/master/MAINTAINERS.md>.
|
37
|
-
2. Your change will be merged into the project's `master` branch
|
38
|
-
3. Our Expeditor bot will automatically update the project's changelog with your contribution. For projects such as Chef and Chef-DK the version will be automatically incremented and a build kicked off to the project's `current` channel.
|
39
|
-
|
40
|
-
If you would like to learn about when your code will be available in a release of Chef, read more about [Chef Release Cycles](#release-cycles).
|
41
|
-
|
42
|
-
### Developer Certification of Origin (DCO)
|
43
|
-
|
44
|
-
Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired.
|
45
|
-
|
46
|
-
Chef uses [the Apache 2.0 license](https://github.com/chef/chef/blob/master/LICENSE) to strike a balance between open contribution and allowing you to use the software however you would like to.
|
47
|
-
|
48
|
-
The license tells you what rights you have that are provided by the copyright holder. It is important that the contributor fully understands what rights they are licensing and agrees to them. Sometimes the copyright holder isn't the contributor, such as when the contributor is doing work on behalf of a company.
|
49
|
-
|
50
|
-
To make a good faith effort to ensure these criteria are met, Chef requires the Developer Certificate of Origin (DCO) process to be followed.
|
51
|
-
|
52
|
-
The DCO is an attestation attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a Signed-off-by statement and thereby agrees to the DCO, which you can find below or at <http://developercertificate.org/>.
|
53
|
-
|
54
|
-
```
|
55
|
-
Developer's Certificate of Origin 1.1
|
56
|
-
|
57
|
-
By making a contribution to this project, I certify that:
|
58
|
-
|
59
|
-
(a) The contribution was created in whole or in part by me and I
|
60
|
-
have the right to submit it under the open source license
|
61
|
-
indicated in the file; or
|
62
|
-
|
63
|
-
(b) The contribution is based upon previous work that, to the
|
64
|
-
best of my knowledge, is covered under an appropriate open
|
65
|
-
source license and I have the right under that license to
|
66
|
-
submit that work with modifications, whether created in whole
|
67
|
-
or in part by me, under the same open source license (unless
|
68
|
-
I am permitted to submit under a different license), as
|
69
|
-
Indicated in the file; or
|
70
|
-
|
71
|
-
(c) The contribution was provided directly to me by some other
|
72
|
-
person who certified (a), (b) or (c) and I have not modified
|
73
|
-
it.
|
74
|
-
|
75
|
-
(d) I understand and agree that this project and the contribution
|
76
|
-
are public and that a record of the contribution (including
|
77
|
-
all personal information I submit with it, including my
|
78
|
-
sign-off) is maintained indefinitely and may be redistributed
|
79
|
-
consistent with this project or the open source license(s)
|
80
|
-
involved.
|
81
|
-
```
|
82
|
-
|
83
|
-
For more information on the change see the Chef Blog post [Introducing Developer Certificate of Origin](https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/)
|
84
|
-
|
85
|
-
#### DCO Sign-Off Methods
|
86
|
-
|
87
|
-
The DCO requires a sign-off message in the following format appear on each commit in the pull request:
|
88
|
-
|
89
|
-
```
|
90
|
-
Signed-off-by: Julia Child <juliachild@chef.io>
|
91
|
-
```
|
92
|
-
|
93
|
-
The DCO text can either be manually added to your commit body, or you can add either **-s** or **--signoff** to your usual git commit commands. If you forget to add the sign-off you can also amend a previous commit with the sign-off by running **git commit --amend -s**. If you've pushed your changes to GitHub already you'll need to force push your branch after this with **git push -f**.
|
94
|
-
|
95
|
-
### Chef Obvious Fix Policy
|
96
|
-
|
97
|
-
Small contributions, such as fixing spelling errors, where the content is small enough to not be considered intellectual property, can be submitted without signing the contribution for the DCO.
|
98
|
-
|
99
|
-
As a rule of thumb, changes are obvious fixes if they do not introduce any new functionality or creative thinking. Assuming the change does not affect functionality, some common obvious fix examples include the following:
|
100
|
-
|
101
|
-
- Spelling / grammar fixes
|
102
|
-
- Typo correction, white space and formatting changes
|
103
|
-
- Comment clean up
|
104
|
-
- Bug fixes that change default return values or error codes stored in constants
|
105
|
-
- Adding logging messages or debugging output
|
106
|
-
- Changes to 'metadata' files like Gemfile, .gitignore, build scripts, etc.
|
107
|
-
- Moving source files from one directory or package to another
|
108
|
-
|
109
|
-
**Whenever you invoke the "obvious fix" rule, please say so in your commit message:**
|
110
|
-
|
111
|
-
```
|
112
|
-
------------------------------------------------------------------------
|
113
|
-
commit 370adb3f82d55d912b0cf9c1d1e99b132a8ed3b5
|
114
|
-
Author: Julia Child <juliachild@chef.io>
|
115
|
-
Date: Wed Sep 18 11:44:40 2015 -0700
|
116
|
-
|
117
|
-
Fix typo in the README.
|
118
|
-
|
119
|
-
Obvious fix.
|
120
|
-
|
121
|
-
------------------------------------------------------------------------
|
122
|
-
```
|
123
|
-
|
124
|
-
## Release Cycles
|
125
|
-
|
126
|
-
Our primary shipping vehicle is operating system specific packages that includes all the requirements of Chef. The packages are built with our [Omnibus](https://github.com/chef/omnibus) packing project.
|
127
|
-
|
128
|
-
We also release our software as gems to [Rubygems](https://rubygems.org/) but we strongly recommend using Chef packages since they are the only combination of native libraries & gems required by Chef that we test throughly.
|
129
|
-
|
130
|
-
Our version numbering roughly follows [Semantic Versioning](http://semver.org/) standard. Our standard version numbers look like X.Y.Z which mean:
|
131
|
-
|
132
|
-
- X is a major release, which may not be fully compatible with prior major releases
|
133
|
-
- Y is a minor release, which adds both new features and bug fixes
|
134
|
-
- Z is a patch release, which adds just bug fixes
|
135
|
-
|
136
|
-
After shipping a release of Chef we bump the `Minor` version by one to start development of the next minor release. All merges to master trigger an increment of the `Patch` version, and a build through our internal testing pipeline. We do a `Minor` release approximately every month, which consist of shipping one of the already auto-incremented and tested `Patch` versions. For example after shiping 12.10.24, we incremented Chef to 12.11.0\. From there 18 commits where merged bringing the version to 12.11.18, which we shipped as an omnibus package.
|
137
|
-
|
138
|
-
Announcements of releases are made to the [chef mailing list](https://discourse.chef.io/c/chef-release) when they are available and are mirrored to the #announcements channel on the [Chef Community Slack](https://community-slack.chef.io/).
|
139
|
-
|
140
|
-
## Chef Community
|
141
|
-
|
142
|
-
Chef is made possible by a strong community of developers and system administrators. If you have any questions or if you would like to get involved in the Chef community you can check out:
|
143
|
-
|
144
|
-
- [Chef Mailing List](https://discourse.chef.io/)
|
145
|
-
- [Chef Community Slack](https://community-slack.chef.io/)
|
146
|
-
|
147
|
-
Also here are some additional pointers to some awesome Chef content:
|
148
|
-
|
149
|
-
- [Chef Docs](https://docs.chef.io/)
|
150
|
-
- [Learn Chef](https://learn.chef.io/)
|
151
|
-
- [Chef Software Inc. Website](https://www.chef.io/)
|
152
|
-
- [Chef Project Website](https://www.chef.sh/)
|