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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -4
  3. data/chef-cli.gemspec +3 -3
  4. data/lib/chef-cli/command/clean_policy_cookbooks.rb +1 -1
  5. data/lib/chef-cli/command/clean_policy_revisions.rb +1 -1
  6. data/lib/chef-cli/command/delete_policy.rb +1 -1
  7. data/lib/chef-cli/command/delete_policy_group.rb +1 -1
  8. data/lib/chef-cli/command/export.rb +1 -1
  9. data/lib/chef-cli/command/generator_commands/cookbook.rb +1 -1
  10. data/lib/chef-cli/command/install.rb +1 -1
  11. data/lib/chef-cli/command/push.rb +1 -1
  12. data/lib/chef-cli/command/push_archive.rb +1 -1
  13. data/lib/chef-cli/command/show_policy.rb +1 -1
  14. data/lib/chef-cli/command/undelete.rb +1 -1
  15. data/lib/chef-cli/command/update.rb +1 -1
  16. data/lib/chef-cli/generator.rb +1 -1
  17. data/lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/kitchen.yml +1 -1
  18. data/lib/chef-cli/skeletons/code_generator/files/default/repo/README.md +1 -1
  19. data/lib/chef-cli/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb +1 -1
  20. data/lib/chef-cli/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +1 -1
  21. data/lib/chef-cli/skeletons/code_generator/files/default/repo/data_bags/README.md +4 -4
  22. data/lib/chef-cli/skeletons/code_generator/files/default/repo/environments/README.md +2 -2
  23. data/lib/chef-cli/skeletons/code_generator/files/default/repo/roles/README.md +2 -2
  24. data/lib/chef-cli/skeletons/code_generator/templates/default/CHANGELOG.md.erb +1 -2
  25. data/lib/chef-cli/skeletons/code_generator/templates/default/Policyfile.rb.erb +1 -1
  26. data/lib/chef-cli/skeletons/code_generator/templates/default/helpers.rb.erb +2 -2
  27. data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen.yml.erb +3 -3
  28. data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_dokken.yml.erb +2 -2
  29. data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb +3 -3
  30. data/lib/chef-cli/skeletons/code_generator/templates/default/recipe_spec.rb.erb +4 -4
  31. data/lib/chef-cli/skeletons/code_generator/templates/default/resource.rb.erb +1 -1
  32. data/lib/chef-cli/version.rb +1 -1
  33. data/spec/unit/command/generator_commands/cookbook_spec.rb +8 -8
  34. data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
  35. data/spec/unit/command/generator_commands/repo_spec.rb +4 -4
  36. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ebc60c7c08e91010059db01bc99774da3a071cb08320ed2cedd0f3faec80efa
4
- data.tar.gz: '08b56a1c62d520a03198a1c7e5dbbff004d967571945eb0049f665a7379e5e96'
3
+ metadata.gz: adb138942d756bfa17638b7ba9308e77730ba9b77bb505821d68ee9b7cdc3d2c
4
+ data.tar.gz: 4b9d246fe278ec0d4f230d6694e30c64dae2a6b426e4b5020639dc01d0401e98
5
5
  SHA512:
6
- metadata.gz: fff531a5e154a54d3bc751ae067abfcf2febeae073d9ba22739fc814089fb3d019259ea7a4d04c71967b44c698543cadeefe0c5d0bc9fa51a2fc1541430ba9fd
7
- data.tar.gz: 3bec22ca55b7f1c04e38695b5a1f26c4e308c996c613bf008fd17a66ec0bae8576ef9716f35cd126cad65b43d4b58436fb265c2df797edc5f9ad3694d5d09b57
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) 2014-2019, Chef Software Inc.
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.4"
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", ">= 14.0"
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"
@@ -37,7 +37,7 @@ module ChefCLI
37
37
 
38
38
  See our detailed README for more information:
39
39
 
40
- https://docs.chef.io/policyfile.html
40
+ https://docs.chef.io/policyfile/
41
41
 
42
42
  Options:
43
43
 
@@ -36,7 +36,7 @@ module ChefCLI
36
36
 
37
37
  See our detailed README for more information:
38
38
 
39
- https://docs.chef.io/policyfile.html
39
+ https://docs.chef.io/policyfile/
40
40
 
41
41
  Options:
42
42
 
@@ -36,7 +36,7 @@ module ChefCLI
36
36
 
37
37
  See our detailed README for more information:
38
38
 
39
- https://docs.chef.io/policyfile.html
39
+ https://docs.chef.io/policyfile/
40
40
 
41
41
  Options:
42
42
 
@@ -36,7 +36,7 @@ module ChefCLI
36
36
 
37
37
  See our detailed README for more information:
38
38
 
39
- https://docs.chef.io/policyfile.html
39
+ https://docs.chef.io/policyfile/
40
40
 
41
41
  Options:
42
42
 
@@ -41,7 +41,7 @@ module ChefCLI
41
41
 
42
42
  See our detailed README for more information:
43
43
 
44
- https://docs.chef.io/policyfile.html
44
+ https://docs.chef.io/policyfile/
45
45
 
46
46
  Options:
47
47
 
@@ -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.html#chef-generate-cookbook for more information.")
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]
@@ -40,7 +40,7 @@ module ChefCLI
40
40
 
41
41
  See our detailed README for more information:
42
42
 
43
- https://docs.chef.io/policyfile.html
43
+ https://docs.chef.io/policyfile/
44
44
 
45
45
  Options:
46
46
 
@@ -38,7 +38,7 @@ module ChefCLI
38
38
 
39
39
  See our detailed README for more information:
40
40
 
41
- https://docs.chef.io/policyfile.html
41
+ https://docs.chef.io/policyfile/
42
42
 
43
43
  Options:
44
44
 
@@ -38,7 +38,7 @@ module ChefCLI
38
38
 
39
39
  For more information about Policyfiles, see our detailed README:
40
40
 
41
- https://docs.chef.io/policyfile.html
41
+ https://docs.chef.io/policyfile/
42
42
 
43
43
  Options:
44
44
  E
@@ -40,7 +40,7 @@ module ChefCLI
40
40
 
41
41
  See our detailed README for more information:
42
42
 
43
- https://docs.chef.io/policyfile.html
43
+ https://docs.chef.io/policyfile/
44
44
 
45
45
  Options:
46
46
 
@@ -47,7 +47,7 @@ module ChefCLI
47
47
 
48
48
  See our detailed README for more information:
49
49
 
50
- https://docs.chef.io/policyfile.html
50
+ https://docs.chef.io/policyfile/
51
51
 
52
52
  Options:
53
53
 
@@ -43,7 +43,7 @@ module ChefCLI
43
43
 
44
44
  See our detailed README for more information:
45
45
 
46
- https://docs.chef.io/policyfile.html
46
+ https://docs.chef.io/policyfile/
47
47
 
48
48
  Options:
49
49
 
@@ -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}. See available licenses at https://docs.chef.io/ctl_chef.html#chef-generate-cookbook"
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
@@ -11,7 +11,7 @@ provisioner:
11
11
  product_name: chefdk
12
12
 
13
13
  platforms:
14
- - name: ubuntu-18.04
14
+ - name: ubuntu-20.04
15
15
  - name: centos-8
16
16
 
17
17
  suites:
@@ -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.html
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
 
@@ -4,4 +4,4 @@
4
4
  # Set a default name
5
5
  default['example']['name'] = 'Sam Doe'
6
6
 
7
- # For further information, see the Chef documentation (https://docs.chef.io/attributes.html).
7
+ # For further information, see the Chef Infra documentation (https://docs.chef.io/attributes/).
@@ -5,4 +5,4 @@ log "Welcome to Chef Infra Client, #{node['example']['name']}!" do
5
5
  level :info
6
6
  end
7
7
 
8
- # For more information, see the documentation: https://docs.chef.io/recipes.html
8
+ # For more information, see the documentation: https://docs.chef.io/recipes
@@ -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.html
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.html
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.html
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.html
9
+ https://docs.chef.io/roles/
@@ -2,10 +2,9 @@
2
2
 
3
3
  This file is used to list changes made in each version of the <%= cookbook_name %> cookbook.
4
4
 
5
- # 0.1.0
5
+ ## 0.1.0
6
6
 
7
7
  Initial release.
8
8
 
9
9
  - change 0
10
10
  - change 1
11
-
@@ -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.html
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 %>'
@@ -1,6 +1,6 @@
1
1
  #
2
- # Chef Documentation
3
- # https://docs.chef.io/libraries.html
2
+ # Chef Infra Documentation
3
+ # https://docs.chef.io/libraries/
4
4
  #
5
5
 
6
6
  #
@@ -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.html
20
+ ## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
21
21
  # product_name: chef
22
- # product_version: 15
22
+ # product_version: 16
23
23
 
24
24
  verifier:
25
25
  name: inspec
26
26
 
27
27
  platforms:
28
- - name: ubuntu-18.04
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-18.04
17
+ - name: ubuntu-20.04
18
18
  driver:
19
- image: dokken/ubuntu-18.04
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.html
16
+ ## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
17
17
  # product_name: chef
18
- # product_version: 15
18
+ # product_version: 16
19
19
 
20
20
  verifier:
21
21
  name: inspec
22
22
 
23
23
  platforms:
24
- - name: ubuntu-18.04
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 18.04' do
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', '18.04'
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 7' do
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', '7'
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.html
1
+ # To learn more about Custom Resources, see https://docs.chef.io/custom_resources/
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module ChefCLI
19
- VERSION = "2.0.10".freeze
19
+ VERSION = "3.0.1".freeze
20
20
  end
@@ -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.html#chef-generate-cookbook for more information."
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.html
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.html
574
+ ## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
575
575
  # product_name: chef
576
- # product_version: 15
576
+ # product_version: 16
577
577
 
578
578
  verifier:
579
579
  name: inspec
580
580
 
581
581
  platforms:
582
- - name: ubuntu-18.04
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.html
661
+ ## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
662
662
  # product_name: chef
663
- # product_version: 15
663
+ # product_version: 16
664
664
 
665
665
  verifier:
666
666
  name: inspec
667
667
 
668
668
  platforms:
669
- - name: ubuntu-18.04
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.html
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.html
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.html
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: 2.0.10
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-05 00:00:00.000000000 Z
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: '14.0'
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: '14.0'
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.4'
595
+ version: '2.6'
596
596
  required_rubygems_version: !ruby/object:Gem::Requirement
597
597
  requirements:
598
598
  - - ">="