chef-cli 2.0.10 → 3.0.1
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/Gemfile +0 -4
- data/chef-cli.gemspec +3 -3
- data/lib/chef-cli/command/clean_policy_cookbooks.rb +1 -1
- data/lib/chef-cli/command/clean_policy_revisions.rb +1 -1
- data/lib/chef-cli/command/delete_policy.rb +1 -1
- data/lib/chef-cli/command/delete_policy_group.rb +1 -1
- data/lib/chef-cli/command/export.rb +1 -1
- data/lib/chef-cli/command/generator_commands/cookbook.rb +1 -1
- data/lib/chef-cli/command/install.rb +1 -1
- data/lib/chef-cli/command/push.rb +1 -1
- data/lib/chef-cli/command/push_archive.rb +1 -1
- data/lib/chef-cli/command/show_policy.rb +1 -1
- data/lib/chef-cli/command/undelete.rb +1 -1
- data/lib/chef-cli/command/update.rb +1 -1
- data/lib/chef-cli/generator.rb +1 -1
- data/lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/kitchen.yml +1 -1
- data/lib/chef-cli/skeletons/code_generator/files/default/repo/README.md +1 -1
- data/lib/chef-cli/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb +1 -1
- data/lib/chef-cli/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +1 -1
- data/lib/chef-cli/skeletons/code_generator/files/default/repo/data_bags/README.md +4 -4
- data/lib/chef-cli/skeletons/code_generator/files/default/repo/environments/README.md +2 -2
- data/lib/chef-cli/skeletons/code_generator/files/default/repo/roles/README.md +2 -2
- data/lib/chef-cli/skeletons/code_generator/templates/default/CHANGELOG.md.erb +1 -2
- data/lib/chef-cli/skeletons/code_generator/templates/default/Policyfile.rb.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/helpers.rb.erb +2 -2
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen.yml.erb +3 -3
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_dokken.yml.erb +2 -2
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb +3 -3
- data/lib/chef-cli/skeletons/code_generator/templates/default/recipe_spec.rb.erb +4 -4
- data/lib/chef-cli/skeletons/code_generator/templates/default/resource.rb.erb +1 -1
- data/lib/chef-cli/version.rb +1 -1
- data/spec/unit/command/generator_commands/cookbook_spec.rb +8 -8
- data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
- data/spec/unit/command/generator_commands/repo_spec.rb +4 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb138942d756bfa17638b7ba9308e77730ba9b77bb505821d68ee9b7cdc3d2c
|
4
|
+
data.tar.gz: 4b9d246fe278ec0d4f230d6694e30c64dae2a6b426e4b5020639dc01d0401e98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32d8f2e150ff38eefdb26b17fa2b5eda415c697df4324aa3e63ef9545646a346388e4c985cee379773d4311b0421228fbfcb5a8adf3750bbc40a64882a6aacd7
|
7
|
+
data.tar.gz: 3a455461956da321300c610c56d78d594b789474017807d0c986dabdd45541e1260b123f838d52e179247f2e6ab4ec911dc7e09ba611c3855dd2b9b4a4cbc4fb
|
data/Gemfile
CHANGED
@@ -9,10 +9,6 @@ group :docs do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
group :test do
|
12
|
-
# For ruby 2.4 testing we need to use ohai 14
|
13
|
-
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5")
|
14
|
-
gem "ohai", "~> 14"
|
15
|
-
end
|
16
12
|
gem "rake"
|
17
13
|
gem "rspec", "~> 3.8"
|
18
14
|
gem "rspec-expectations", "~> 3.8"
|
data/chef-cli.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright (c)
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |gem|
|
|
29
29
|
gem.license = "Apache-2.0"
|
30
30
|
gem.homepage = "https://www.chef.io/"
|
31
31
|
|
32
|
-
gem.required_ruby_version = ">= 2.
|
32
|
+
gem.required_ruby_version = ">= 2.6"
|
33
33
|
|
34
34
|
gem.files = %w{Rakefile LICENSE} +
|
35
35
|
Dir.glob("Gemfile*") + # Includes Gemfile and locks
|
@@ -43,7 +43,7 @@ Gem::Specification.new do |gem|
|
|
43
43
|
gem.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0"
|
44
44
|
gem.add_dependency "ffi-yajl", ">= 1.0", "< 3.0"
|
45
45
|
gem.add_dependency "minitar", "~> 0.6"
|
46
|
-
gem.add_dependency "chef", ">=
|
46
|
+
gem.add_dependency "chef", ">= 15.0"
|
47
47
|
gem.add_dependency "solve", "< 5.0", "> 2.0"
|
48
48
|
gem.add_dependency "addressable", ">= 2.3.5", "< 2.8"
|
49
49
|
gem.add_dependency "cookbook-omnifetch", "~> 0.5"
|
@@ -216,7 +216,7 @@ module ChefCLI
|
|
216
216
|
if !@cookbook_name_or_path
|
217
217
|
@params_valid = false
|
218
218
|
elsif /-/ =~ File.basename(@cookbook_name_or_path)
|
219
|
-
msg("Hyphens are discouraged in cookbook names as they may cause problems with custom resources. See https://docs.chef.io/ctl_chef
|
219
|
+
msg("Hyphens are discouraged in cookbook names as they may cause problems with custom resources. See https://docs.chef.io/ctl_chef/#chef-generate-cookbook for more information.")
|
220
220
|
end
|
221
221
|
|
222
222
|
if config[:berks] && config[:policy]
|
data/lib/chef-cli/generator.rb
CHANGED
@@ -150,7 +150,7 @@ module ChefCLI
|
|
150
150
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
151
151
|
EOH
|
152
152
|
else
|
153
|
-
raise ArgumentError, "Invalid generator.license setting: #{license}.
|
153
|
+
raise ArgumentError, "Invalid generator.license setting: #{license}. See available licenses at https://docs.chef.io/ctl_chef/#chef-generate-cookbook"
|
154
154
|
end
|
155
155
|
if comment
|
156
156
|
# Ensure there's no trailing whitespace
|
@@ -13,7 +13,7 @@ This repository contains several directories, and each directory contains a READ
|
|
13
13
|
|
14
14
|
# Configuration
|
15
15
|
|
16
|
-
The config file, `.chef/config.rb` is a repository-specific configuration file for the knife command line tool. If you're using the Hosted Chef platform, you can download one for your organization from the management console. You can also generate a new config.rb by running `knife configure`. For more information about configuring Knife, see the Knife documentation at https://docs.chef.io/knife
|
16
|
+
The config file, `.chef/config.rb` is a repository-specific configuration file for the knife command line tool. If you're using the Hosted Chef platform, you can download one for your organization from the management console. You can also generate a new config.rb by running `knife configure`. For more information about configuring Knife, see the Knife documentation at https://docs.chef.io/workstation/knife/
|
17
17
|
|
18
18
|
# Next Steps
|
19
19
|
|
@@ -12,9 +12,9 @@ Then we can upload the items in the data bag's directory to the Chef Infra Serve
|
|
12
12
|
|
13
13
|
knife data bag from file example example_item.json
|
14
14
|
|
15
|
-
For more information on data bags, see the Chef docs site:
|
15
|
+
For more information on data bags, see the Chef Infra docs site:
|
16
16
|
|
17
|
-
https://docs.chef.io/data_bags
|
17
|
+
https://docs.chef.io/data_bags/
|
18
18
|
|
19
19
|
# Encrypted Data Bags
|
20
20
|
|
@@ -51,6 +51,6 @@ Use the secret_key to view the contents.
|
|
51
51
|
password: abc123
|
52
52
|
|
53
53
|
|
54
|
-
For more information on encrypted data bags, see the Chef docs site:
|
54
|
+
For more information on encrypted data bags, see the Chef Infra docs site:
|
55
55
|
|
56
|
-
https://docs.chef.io/data_bags
|
56
|
+
https://docs.chef.io/data_bags/
|
@@ -4,6 +4,6 @@ For example, in this directory, you'll find an example environment file called `
|
|
4
4
|
|
5
5
|
knife environment from file environments/example.json
|
6
6
|
|
7
|
-
For more information on environments, see the Chef docs site:
|
7
|
+
For more information on environments, see the Chef Infra docs site:
|
8
8
|
|
9
|
-
https://docs.chef.io/environments
|
9
|
+
https://docs.chef.io/environments/
|
@@ -4,6 +4,6 @@ For example, in this directory, you'll find an example role file called `example
|
|
4
4
|
|
5
5
|
knife role from file roles/example.json
|
6
6
|
|
7
|
-
For more information on roles, see the Chef docs site:
|
7
|
+
For more information on roles, see the Chef Infra docs site:
|
8
8
|
|
9
|
-
https://docs.chef.io/roles
|
9
|
+
https://docs.chef.io/roles/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Policyfile.rb - Describe how you want Chef Infra Client to build your system.
|
2
2
|
#
|
3
3
|
# For more information on the Policyfile feature, visit
|
4
|
-
# https://docs.chef.io/policyfile
|
4
|
+
# https://docs.chef.io/policyfile/
|
5
5
|
|
6
6
|
# A name that describes what the system you're building with Chef does.
|
7
7
|
name '<%= policy_name %>'
|
@@ -17,15 +17,15 @@ provisioner:
|
|
17
17
|
always_update_cookbooks: true
|
18
18
|
|
19
19
|
## product_name and product_version specifies a specific Chef product and version to install.
|
20
|
-
## see the Chef documentation for more details: https://docs.chef.io/config_yml_kitchen
|
20
|
+
## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
|
21
21
|
# product_name: chef
|
22
|
-
# product_version:
|
22
|
+
# product_version: 16
|
23
23
|
|
24
24
|
verifier:
|
25
25
|
name: inspec
|
26
26
|
|
27
27
|
platforms:
|
28
|
-
- name: ubuntu-
|
28
|
+
- name: ubuntu-20.04
|
29
29
|
- name: centos-8
|
30
30
|
|
31
31
|
suites:
|
@@ -14,9 +14,9 @@ verifier:
|
|
14
14
|
platforms:
|
15
15
|
# @see https://github.com/chef-cookbooks/testing_examples/blob/master/kitchen.dokken.yml
|
16
16
|
# @see https://hub.docker.com/u/dokken
|
17
|
-
- name: ubuntu-
|
17
|
+
- name: ubuntu-20.04
|
18
18
|
driver:
|
19
|
-
image: dokken/ubuntu-
|
19
|
+
image: dokken/ubuntu-20.04
|
20
20
|
pid_one_command: /bin/systemd
|
21
21
|
intermediate_instructions:
|
22
22
|
- RUN /usr/bin/apt-get update
|
@@ -13,15 +13,15 @@ provisioner:
|
|
13
13
|
name: chef_zero
|
14
14
|
|
15
15
|
## product_name and product_version specifies a specific Chef product and version to install.
|
16
|
-
## see the Chef documentation for more details: https://docs.chef.io/config_yml_kitchen
|
16
|
+
## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
|
17
17
|
# product_name: chef
|
18
|
-
# product_version:
|
18
|
+
# product_version: 16
|
19
19
|
|
20
20
|
verifier:
|
21
21
|
name: inspec
|
22
22
|
|
23
23
|
platforms:
|
24
|
-
- name: ubuntu-
|
24
|
+
- name: ubuntu-20.04
|
25
25
|
- name: centos-8
|
26
26
|
|
27
27
|
suites:
|
@@ -7,20 +7,20 @@
|
|
7
7
|
require 'spec_helper'
|
8
8
|
|
9
9
|
describe '<%= cookbook_name %>::<%= recipe_name %>' do
|
10
|
-
context 'When all attributes are default, on Ubuntu
|
10
|
+
context 'When all attributes are default, on Ubuntu 20.04' do
|
11
11
|
# for a complete list of available platforms and versions see:
|
12
12
|
# https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md
|
13
|
-
platform 'ubuntu', '
|
13
|
+
platform 'ubuntu', '20.04'
|
14
14
|
|
15
15
|
it 'converges successfully' do
|
16
16
|
expect { chef_run }.to_not raise_error
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
context 'When all attributes are default, on CentOS
|
20
|
+
context 'When all attributes are default, on CentOS 8' do
|
21
21
|
# for a complete list of available platforms and versions see:
|
22
22
|
# https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md
|
23
|
-
platform 'centos', '
|
23
|
+
platform 'centos', '8'
|
24
24
|
|
25
25
|
it 'converges successfully' do
|
26
26
|
expect { chef_run }.to_not raise_error
|
@@ -1 +1 @@
|
|
1
|
-
# To learn more about Custom Resources, see https://docs.chef.io/custom_resources
|
1
|
+
# To learn more about Custom Resources, see https://docs.chef.io/custom_resources/
|
data/lib/chef-cli/version.rb
CHANGED
@@ -129,7 +129,7 @@ describe ChefCLI::Command::GeneratorCommands::Cookbook do
|
|
129
129
|
|
130
130
|
it "warns if a hyphenated cookbook name is passed" do
|
131
131
|
expect(with_argv(%w{my-cookbook}).run).to eq(0)
|
132
|
-
message = "Hyphens are discouraged in cookbook names as they may cause problems with custom resources. See https://docs.chef.io/ctl_chef
|
132
|
+
message = "Hyphens are discouraged in cookbook names as they may cause problems with custom resources. See https://docs.chef.io/ctl_chef/#chef-generate-cookbook for more information."
|
133
133
|
expect(stdout_io.string).to include(message)
|
134
134
|
end
|
135
135
|
|
@@ -523,7 +523,7 @@ describe ChefCLI::Command::GeneratorCommands::Cookbook do
|
|
523
523
|
# Policyfile.rb - Describe how you want Chef Infra Client to build your system.
|
524
524
|
#
|
525
525
|
# For more information on the Policyfile feature, visit
|
526
|
-
# https://docs.chef.io/policyfile
|
526
|
+
# https://docs.chef.io/policyfile/
|
527
527
|
|
528
528
|
# A name that describes what the system you're building with Chef does.
|
529
529
|
name 'new_cookbook'
|
@@ -571,15 +571,15 @@ describe ChefCLI::Command::GeneratorCommands::Cookbook do
|
|
571
571
|
name: chef_zero
|
572
572
|
|
573
573
|
## product_name and product_version specifies a specific Chef product and version to install.
|
574
|
-
## see the Chef documentation for more details: https://docs.chef.io/config_yml_kitchen
|
574
|
+
## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
|
575
575
|
# product_name: chef
|
576
|
-
# product_version:
|
576
|
+
# product_version: 16
|
577
577
|
|
578
578
|
verifier:
|
579
579
|
name: inspec
|
580
580
|
|
581
581
|
platforms:
|
582
|
-
- name: ubuntu-
|
582
|
+
- name: ubuntu-20.04
|
583
583
|
- name: centos-8
|
584
584
|
|
585
585
|
suites:
|
@@ -658,15 +658,15 @@ describe ChefCLI::Command::GeneratorCommands::Cookbook do
|
|
658
658
|
always_update_cookbooks: true
|
659
659
|
|
660
660
|
## product_name and product_version specifies a specific Chef product and version to install.
|
661
|
-
## see the Chef documentation for more details: https://docs.chef.io/config_yml_kitchen
|
661
|
+
## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
|
662
662
|
# product_name: chef
|
663
|
-
# product_version:
|
663
|
+
# product_version: 16
|
664
664
|
|
665
665
|
verifier:
|
666
666
|
name: inspec
|
667
667
|
|
668
668
|
platforms:
|
669
|
-
- name: ubuntu-
|
669
|
+
- name: ubuntu-20.04
|
670
670
|
- name: centos-8
|
671
671
|
|
672
672
|
suites:
|
@@ -118,7 +118,7 @@ describe ChefCLI::Command::GeneratorCommands::Policyfile do
|
|
118
118
|
# Policyfile.rb - Describe how you want Chef Infra Client to build your system.
|
119
119
|
#
|
120
120
|
# For more information on the Policyfile feature, visit
|
121
|
-
# https://docs.chef.io/policyfile
|
121
|
+
# https://docs.chef.io/policyfile/
|
122
122
|
|
123
123
|
# A name that describes what the system you're building with Chef does.
|
124
124
|
name 'my-app-frontend'
|
@@ -331,9 +331,9 @@ describe ChefCLI::Command::GeneratorCommands::Repo do
|
|
331
331
|
|
332
332
|
knife role from file roles/example.json
|
333
333
|
|
334
|
-
For more information on roles, see the Chef docs site:
|
334
|
+
For more information on roles, see the Chef Infra docs site:
|
335
335
|
|
336
|
-
https://docs.chef.io/roles
|
336
|
+
https://docs.chef.io/roles/
|
337
337
|
README
|
338
338
|
end
|
339
339
|
|
@@ -355,9 +355,9 @@ describe ChefCLI::Command::GeneratorCommands::Repo do
|
|
355
355
|
|
356
356
|
knife environment from file environments/example.json
|
357
357
|
|
358
|
-
For more information on environments, see the Chef docs site:
|
358
|
+
For more information on environments, see the Chef Infra docs site:
|
359
359
|
|
360
|
-
https://docs.chef.io/environments
|
360
|
+
https://docs.chef.io/environments/
|
361
361
|
README
|
362
362
|
end
|
363
363
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-cli
|
@@ -90,14 +90,14 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: '
|
93
|
+
version: '15.0'
|
94
94
|
type: :runtime
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: '
|
100
|
+
version: '15.0'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: solve
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -592,7 +592,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
592
592
|
requirements:
|
593
593
|
- - ">="
|
594
594
|
- !ruby/object:Gem::Version
|
595
|
-
version: '2.
|
595
|
+
version: '2.6'
|
596
596
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
597
597
|
requirements:
|
598
598
|
- - ">="
|