chef-cli 4.0.0 → 5.3.0
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 +4 -0
- data/chef-cli.gemspec +1 -1
- data/lib/chef-cli/command/export.rb +14 -6
- data/lib/chef-cli/command/generate.rb +5 -3
- data/lib/chef-cli/command/generator_commands/cookbook.rb +15 -2
- data/lib/chef-cli/command/generator_commands/recipe.rb +7 -0
- data/lib/chef-cli/cookbook_metadata.rb +1 -1
- data/lib/chef-cli/exceptions.rb +13 -1
- data/lib/chef-cli/helpers.rb +4 -4
- data/lib/chef-cli/policyfile/dsl.rb +16 -1
- data/lib/chef-cli/policyfile_services/export_repo.rb +9 -13
- data/lib/chef-cli/skeletons/code_generator/recipes/cookbook.rb +26 -5
- data/lib/chef-cli/skeletons/code_generator/recipes/recipe.rb +11 -3
- data/lib/chef-cli/skeletons/code_generator/templates/default/delivery-project.toml.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/recipe.yml.erb +18 -0
- data/lib/chef-cli/version.rb +1 -1
- data/spec/unit/command/export_spec.rb +18 -1
- data/spec/unit/command/generate_spec.rb +7 -0
- data/spec/unit/command/generator_commands/cookbook_spec.rb +49 -235
- data/spec/unit/command/generator_commands/recipe_spec.rb +34 -0
- data/spec/unit/cookbook_metadata_spec.rb +20 -1
- data/spec/unit/fixtures/example_cookbook_both_metadata/.gitignore +17 -0
- data/spec/unit/fixtures/example_cookbook_both_metadata/.kitchen.yml +16 -0
- data/spec/unit/fixtures/example_cookbook_both_metadata/Berksfile +3 -0
- data/spec/unit/fixtures/example_cookbook_both_metadata/README.md +4 -0
- data/spec/unit/fixtures/example_cookbook_both_metadata/chefignore +96 -0
- data/spec/unit/fixtures/example_cookbook_both_metadata/metadata.json +5 -0
- data/spec/unit/fixtures/example_cookbook_both_metadata/metadata.rb +9 -0
- data/spec/unit/fixtures/example_cookbook_both_metadata/recipes/default.rb +8 -0
- data/spec/unit/helpers_spec.rb +111 -0
- data/spec/unit/policyfile_evaluation_spec.rb +67 -1
- data/spec/unit/policyfile_services/export_repo_spec.rb +51 -2
- metadata +22 -14
- data/lib/chef-cli/command/generator_commands/build_cookbook.rb +0 -126
- data/lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/README.md +0 -146
- data/lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/kitchen.yml +0 -21
- data/lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/test-fixture-recipe.rb +0 -8
- data/lib/chef-cli/skeletons/code_generator/files/default/delivery-config.json +0 -17
- data/lib/chef-cli/skeletons/code_generator/recipes/build_cookbook.rb +0 -175
- data/lib/chef-cli/skeletons/code_generator/templates/default/build_cookbook/Berksfile.erb +0 -7
- data/lib/chef-cli/skeletons/code_generator/templates/default/build_cookbook/metadata.rb.erb +0 -10
- data/lib/chef-cli/skeletons/code_generator/templates/default/build_cookbook/recipe.rb.erb +0 -9
- data/spec/unit/command/generator_commands/build_cookbook_spec.rb +0 -377
@@ -0,0 +1,96 @@
|
|
1
|
+
# Put files/directories that should be ignored in this file when uploading
|
2
|
+
# or sharing to the community site.
|
3
|
+
# Lines that start with '# ' are comments.
|
4
|
+
|
5
|
+
# OS generated files #
|
6
|
+
######################
|
7
|
+
.DS_Store
|
8
|
+
Icon?
|
9
|
+
nohup.out
|
10
|
+
ehthumbs.db
|
11
|
+
Thumbs.db
|
12
|
+
|
13
|
+
# SASS #
|
14
|
+
########
|
15
|
+
.sass-cache
|
16
|
+
|
17
|
+
# EDITORS #
|
18
|
+
###########
|
19
|
+
\#*
|
20
|
+
.#*
|
21
|
+
*~
|
22
|
+
*.sw[a-z]
|
23
|
+
*.bak
|
24
|
+
REVISION
|
25
|
+
TAGS*
|
26
|
+
tmtags
|
27
|
+
*_flymake.*
|
28
|
+
*_flymake
|
29
|
+
*.tmproj
|
30
|
+
.project
|
31
|
+
.settings
|
32
|
+
mkmf.log
|
33
|
+
|
34
|
+
## COMPILED ##
|
35
|
+
##############
|
36
|
+
a.out
|
37
|
+
*.o
|
38
|
+
*.pyc
|
39
|
+
*.so
|
40
|
+
*.com
|
41
|
+
*.class
|
42
|
+
*.dll
|
43
|
+
*.exe
|
44
|
+
*/rdoc/
|
45
|
+
|
46
|
+
# Testing #
|
47
|
+
###########
|
48
|
+
.watchr
|
49
|
+
.rspec
|
50
|
+
spec/*
|
51
|
+
spec/fixtures/*
|
52
|
+
test/*
|
53
|
+
features/*
|
54
|
+
Guardfile
|
55
|
+
Procfile
|
56
|
+
|
57
|
+
# SCM #
|
58
|
+
#######
|
59
|
+
.git
|
60
|
+
*/.git
|
61
|
+
.gitignore
|
62
|
+
.gitmodules
|
63
|
+
.gitconfig
|
64
|
+
.gitattributes
|
65
|
+
.svn
|
66
|
+
*/.bzr/*
|
67
|
+
*/.hg/*
|
68
|
+
*/.svn/*
|
69
|
+
|
70
|
+
# Berkshelf #
|
71
|
+
#############
|
72
|
+
Berksfile
|
73
|
+
Berksfile.lock
|
74
|
+
cookbooks/*
|
75
|
+
tmp
|
76
|
+
|
77
|
+
# Cookbooks #
|
78
|
+
#############
|
79
|
+
CONTRIBUTING
|
80
|
+
CHANGELOG*
|
81
|
+
|
82
|
+
# Strainer #
|
83
|
+
############
|
84
|
+
Colanderfile
|
85
|
+
Strainerfile
|
86
|
+
.colander
|
87
|
+
.strainer
|
88
|
+
|
89
|
+
# Vagrant #
|
90
|
+
###########
|
91
|
+
.vagrant
|
92
|
+
Vagrantfile
|
93
|
+
|
94
|
+
# Travis #
|
95
|
+
##########
|
96
|
+
.travis.yml
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# This is vitally important for cookbooks that ship with context-dependent
|
2
|
+
# metadata.rb (to do things like auto incrementing semantic versioning) where
|
3
|
+
# the metadata.json means the cookbook is 'finalized' and must be authoritative.
|
4
|
+
# We need to never try to parse metadata.rb if the metadata.json exists. It isn't
|
5
|
+
# sufficient to simply not use the metadata.rb file, but we must allow the
|
6
|
+
# metadata.rb to have an invalid parse due to LoadErrors in the environment where
|
7
|
+
# the cookbook is being loaded.
|
8
|
+
|
9
|
+
raise "we never want to read the metadata.rb if metadata.json exists"
|
@@ -0,0 +1,111 @@
|
|
1
|
+
# Copyright:: Copyright (c) 2014-2018 Chef Software Inc.
|
2
|
+
# License:: Apache License, Version 2.0
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require "spec_helper"
|
18
|
+
require "chef-cli/helpers"
|
19
|
+
|
20
|
+
describe ChefCLI::Helpers do
|
21
|
+
context "path_check!" do
|
22
|
+
|
23
|
+
before do
|
24
|
+
allow(Gem).to receive(:ruby).and_return(ruby_path)
|
25
|
+
end
|
26
|
+
|
27
|
+
context "when installed via omnibus" do
|
28
|
+
before do
|
29
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_install?).and_return true
|
30
|
+
end
|
31
|
+
|
32
|
+
context "on unix" do
|
33
|
+
|
34
|
+
let(:user_bin_dir) { File.expand_path(File.join(Gem.user_dir, "bin")) }
|
35
|
+
let(:omnibus_embedded_bin_dir) { "/opt/chef-workstation/embedded/bin" }
|
36
|
+
let(:omnibus_bin_dir) { "/opt/chef-workstation/bin" }
|
37
|
+
let(:expected_PATH) { [ omnibus_bin_dir, user_bin_dir, omnibus_embedded_bin_dir, ENV["PATH"].split(File::PATH_SEPARATOR) ] }
|
38
|
+
let(:expected_GEM_ROOT) { Gem.default_dir }
|
39
|
+
let(:expected_GEM_HOME) { Gem.user_dir }
|
40
|
+
let(:expected_GEM_PATH) { Gem.path.join(File::PATH_SEPARATOR) }
|
41
|
+
let(:ruby_path) { "/opt/chef-workstation/embedded/bin/ruby" }
|
42
|
+
|
43
|
+
it "#omnibus_env path" do
|
44
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_bin_dir).and_return("/opt/chef-workstation/bin")
|
45
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_embedded_bin_dir).and_return("/opt/chef-workstation/embedded/bin")
|
46
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_env).and_return(
|
47
|
+
"PATH" => expected_PATH.flatten.uniq.join(File::PATH_SEPARATOR),
|
48
|
+
"GEM_ROOT" => expected_GEM_ROOT,
|
49
|
+
"GEM_HOME" => expected_GEM_HOME,
|
50
|
+
"GEM_PATH" => expected_GEM_PATH
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context "on windows" do
|
56
|
+
let(:ruby_path) { "c:/opscode/chef-workstation/embedded/bin/ruby.exe" }
|
57
|
+
let(:user_bin_dir) { File.expand_path(File.join(Gem.user_dir, "bin")) }
|
58
|
+
let(:omnibus_embedded_bin_dir) { "c:/opscode/chef-workstation/embedded/bin" }
|
59
|
+
let(:omnibus_bin_dir) { "c:/opscode/chef-workstation/bin" }
|
60
|
+
let(:expected_GEM_ROOT) { Gem.default_dir }
|
61
|
+
let(:expected_GEM_HOME) { Gem.user_dir }
|
62
|
+
let(:expected_GEM_PATH) { Gem.path.join(File::PATH_SEPARATOR) }
|
63
|
+
let(:omnibus_root) { "c:/opscode/chef-workstation" }
|
64
|
+
let(:expected_PATH) { [ omnibus_bin_dir, user_bin_dir, omnibus_embedded_bin_dir, ENV["PATH"].split(File::PATH_SEPARATOR) ] }
|
65
|
+
|
66
|
+
before do
|
67
|
+
allow(ChefCLI::Helpers).to receive(:expected_omnibus_root).and_return(ruby_path)
|
68
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_install?).and_return(true)
|
69
|
+
allow(Chef::Platform).to receive(:windows?).and_return(true)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "#omnibus_env path" do
|
73
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_bin_dir).and_return("c:/opscode/chef-workstation/bin")
|
74
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_embedded_bin_dir).and_return("c:/opscode/chef-workstation/embedded/bin")
|
75
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_env).and_return(
|
76
|
+
"PATH" => expected_PATH.flatten.uniq.join(File::PATH_SEPARATOR),
|
77
|
+
"GEM_ROOT" => expected_GEM_ROOT,
|
78
|
+
"GEM_HOME" => expected_GEM_HOME,
|
79
|
+
"GEM_PATH" => expected_GEM_PATH
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
context "when not installed via omnibus" do
|
86
|
+
|
87
|
+
before do
|
88
|
+
allow(ChefCLI::Helpers).to receive(:omnibus_install?).and_return false
|
89
|
+
end
|
90
|
+
let(:ruby_path) { "/Users/bog/.lots_o_rubies/2.1.2/bin/ruby" }
|
91
|
+
let(:expected_root_path) { "/Users/bog/.lots_o_rubies" }
|
92
|
+
|
93
|
+
before do
|
94
|
+
allow(File).to receive(:exist?).with(expected_root_path).and_return(false)
|
95
|
+
|
96
|
+
%i{
|
97
|
+
omnibus_root
|
98
|
+
omnibus_bin_dir
|
99
|
+
omnibus_embedded_bin_dir
|
100
|
+
}.each do |method_name|
|
101
|
+
allow(ChefCLI::Helpers).to receive(method_name).and_raise(ChefCLI::OmnibusInstallNotFound.new)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
it "skips the sanity check without error" do
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -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");
|
@@ -555,6 +555,72 @@ describe ChefCLI::PolicyfileCompiler do
|
|
555
555
|
|
556
556
|
end
|
557
557
|
|
558
|
+
describe "the metadata DSL keyword used in a cookbook with metadata" do
|
559
|
+
let(:policyfile_rb) do
|
560
|
+
<<-EOH
|
561
|
+
run_list "foo"
|
562
|
+
metadata
|
563
|
+
EOH
|
564
|
+
end
|
565
|
+
it "reads the metadata from the current cookbook" do
|
566
|
+
expect(File).to receive(:exist?).with("./metadata.rb").and_return(true)
|
567
|
+
expect(ChefCLI::CookbookMetadata).to receive(:from_path).and_return(double(cookbook_name: "foo"))
|
568
|
+
expect(policyfile.errors.size).to eq(0)
|
569
|
+
expect(policyfile.errors.first).to eq(nil)
|
570
|
+
end
|
571
|
+
end
|
572
|
+
|
573
|
+
describe "the metadata DSL keyword used in a cookbook without metadata" do
|
574
|
+
let(:policyfile_rb) do
|
575
|
+
<<-EOH
|
576
|
+
run_list "foo"
|
577
|
+
metadata
|
578
|
+
EOH
|
579
|
+
end
|
580
|
+
it "throws a missing cookbook metadata error" do
|
581
|
+
expected = <<~EOH
|
582
|
+
Evaluation of policyfile 'TestPolicyfile.rb' raised an exception
|
583
|
+
Exception: ChefCLI::PolicyfileMissingCookbookMetadata "Policyfile specified to use cookbook metadata, but neither ./metadata.rb or ./metadata.json was found."
|
584
|
+
|
585
|
+
Relevant Code:
|
586
|
+
2: metadata
|
587
|
+
|
588
|
+
Backtrace:
|
589
|
+
TestPolicyfile.rb:2:in `eval_policyfile'
|
590
|
+
EOH
|
591
|
+
expect(File).to receive(:exist?).with("./metadata.rb").and_return(false)
|
592
|
+
expect(File).to receive(:exist?).with("./metadata.json").and_return(false)
|
593
|
+
expect(policyfile.errors.size).to eq(1)
|
594
|
+
expect(policyfile.errors.first).to eq(expected)
|
595
|
+
end
|
596
|
+
end
|
597
|
+
|
598
|
+
describe "the metadata DSL keyword used in a cookbook with bad metadata" do
|
599
|
+
let(:policyfile_rb) do
|
600
|
+
<<-EOH
|
601
|
+
run_list "foo"
|
602
|
+
metadata
|
603
|
+
EOH
|
604
|
+
end
|
605
|
+
it "throws a bad cookbook metadata error" do
|
606
|
+
expected = <<~EOH
|
607
|
+
Evaluation of policyfile 'TestPolicyfile.rb' raised an exception
|
608
|
+
Exception: ChefCLI::PolicyfileBadCookbookMetadata "Cookbook metadata for cookbook at . could not be parsed:
|
609
|
+
Original Exception: No such file or directory @ rb_sysopen - ./metadata.json"
|
610
|
+
|
611
|
+
Relevant Code:
|
612
|
+
2: metadata
|
613
|
+
|
614
|
+
Backtrace:
|
615
|
+
TestPolicyfile.rb:2:in `eval_policyfile'
|
616
|
+
EOH
|
617
|
+
expect(File).to receive(:exist?).with("./metadata.rb").and_return(true)
|
618
|
+
expect(File).to receive(:exist?).with("./metadata.json").and_return(true)
|
619
|
+
expect(policyfile.errors.size).to eq(1)
|
620
|
+
expect(policyfile.errors.first).to eq(expected)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
558
624
|
describe "defining attributes" do
|
559
625
|
|
560
626
|
let(:policyfile_rb) do
|
@@ -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");
|
@@ -42,12 +42,15 @@ describe ChefCLI::PolicyfileServices::ExportRepo do
|
|
42
42
|
|
43
43
|
let(:archive) { false }
|
44
44
|
|
45
|
+
let(:policy_group) { nil }
|
46
|
+
|
45
47
|
subject(:export_service) do
|
46
48
|
described_class.new(policyfile: policyfile_rb_explicit_name,
|
47
49
|
root_dir: working_dir,
|
48
50
|
export_dir: export_dir,
|
49
51
|
archive: archive,
|
50
|
-
force: force_export
|
52
|
+
force: force_export,
|
53
|
+
policy_group: policy_group)
|
51
54
|
end
|
52
55
|
|
53
56
|
it "uses Policyfile.rb as the default Policyfile name" do
|
@@ -306,6 +309,52 @@ describe ChefCLI::PolicyfileServices::ExportRepo do
|
|
306
309
|
expect(File).to exist(readme_path)
|
307
310
|
end
|
308
311
|
|
312
|
+
context "when the policy_group is changed" do
|
313
|
+
let(:policy_group) { "production" }
|
314
|
+
it "creates a policy_group file for a specified policy group with the revision id of the exported policy" do
|
315
|
+
exported_policy_group_path = File.join(export_dir, "policy_groups", "production.json")
|
316
|
+
exported_policy_group_data = FFI_Yajl::Parser.parse(IO.read(exported_policy_group_path))
|
317
|
+
|
318
|
+
expected_data = { "policies" => { "install-example" => { "revision_id" => revision_id } } }
|
319
|
+
|
320
|
+
expect(exported_policy_group_data).to eq(expected_data)
|
321
|
+
end
|
322
|
+
|
323
|
+
it "creates a working local mode configuration file with the changed policy_group" do
|
324
|
+
expected_config_text = <<~CONFIG
|
325
|
+
### Chef Infra Client Configuration ###
|
326
|
+
# The settings in this file will configure chef to apply the exported policy in
|
327
|
+
# this directory. To use it, run:
|
328
|
+
#
|
329
|
+
# chef-client -z
|
330
|
+
#
|
331
|
+
|
332
|
+
policy_name 'install-example'
|
333
|
+
policy_group 'production'
|
334
|
+
|
335
|
+
use_policyfile true
|
336
|
+
policy_document_native_api true
|
337
|
+
|
338
|
+
# In order to use this repo, you need a version of Chef Infra Client and Chef Zero
|
339
|
+
# that supports policyfile "native mode" APIs:
|
340
|
+
current_version = Gem::Version.new(Chef::VERSION)
|
341
|
+
unless Gem::Requirement.new(">= 12.7").satisfied_by?(current_version)
|
342
|
+
puts("!" * 80)
|
343
|
+
puts(<<-MESSAGE)
|
344
|
+
This Chef Repo requires features introduced in Chef Infra Client 12.7, but you are using
|
345
|
+
Chef \#{Chef::VERSION}. Please upgrade to Chef Infra Client 12.7 or later.
|
346
|
+
MESSAGE
|
347
|
+
puts("!" * 80)
|
348
|
+
exit!(1)
|
349
|
+
end
|
350
|
+
|
351
|
+
CONFIG
|
352
|
+
config_path = File.join(export_dir, ".chef", "config.rb")
|
353
|
+
expect(File).to exist(config_path)
|
354
|
+
expect(IO.read(config_path)).to eq(expected_config_text)
|
355
|
+
end
|
356
|
+
end
|
357
|
+
|
309
358
|
end
|
310
359
|
|
311
360
|
context "when the export dir is empty" do
|
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: 5.3.0
|
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: 2021-
|
11
|
+
date: 2021-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-cli
|
@@ -240,7 +240,6 @@ files:
|
|
240
240
|
- lib/chef-cli/command/generator_commands.rb
|
241
241
|
- lib/chef-cli/command/generator_commands/attribute.rb
|
242
242
|
- lib/chef-cli/command/generator_commands/base.rb
|
243
|
-
- lib/chef-cli/command/generator_commands/build_cookbook.rb
|
244
243
|
- lib/chef-cli/command/generator_commands/chef_exts/generator_desc_resource.rb
|
245
244
|
- lib/chef-cli/command/generator_commands/chef_exts/quieter_doc_formatter.rb
|
246
245
|
- lib/chef-cli/command/generator_commands/chef_exts/recipe_dsl_ext.rb
|
@@ -328,13 +327,9 @@ files:
|
|
328
327
|
- lib/chef-cli/service_exceptions.rb
|
329
328
|
- lib/chef-cli/shell_out.rb
|
330
329
|
- lib/chef-cli/skeletons/code_generator/files/default/Berksfile
|
331
|
-
- lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/README.md
|
332
|
-
- lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/kitchen.yml
|
333
|
-
- lib/chef-cli/skeletons/code_generator/files/default/build_cookbook/test-fixture-recipe.rb
|
334
330
|
- lib/chef-cli/skeletons/code_generator/files/default/chefignore
|
335
331
|
- lib/chef-cli/skeletons/code_generator/files/default/cookbook_readmes/README-policy.md
|
336
332
|
- lib/chef-cli/skeletons/code_generator/files/default/cookbook_readmes/README.md
|
337
|
-
- lib/chef-cli/skeletons/code_generator/files/default/delivery-config.json
|
338
333
|
- lib/chef-cli/skeletons/code_generator/files/default/delivery-project.toml
|
339
334
|
- lib/chef-cli/skeletons/code_generator/files/default/gitignore
|
340
335
|
- lib/chef-cli/skeletons/code_generator/files/default/repo/README.md
|
@@ -354,7 +349,6 @@ files:
|
|
354
349
|
- lib/chef-cli/skeletons/code_generator/files/default/spec_helper_policyfile.rb
|
355
350
|
- lib/chef-cli/skeletons/code_generator/metadata.rb
|
356
351
|
- lib/chef-cli/skeletons/code_generator/recipes/attribute.rb
|
357
|
-
- lib/chef-cli/skeletons/code_generator/recipes/build_cookbook.rb
|
358
352
|
- lib/chef-cli/skeletons/code_generator/recipes/cookbook.rb
|
359
353
|
- lib/chef-cli/skeletons/code_generator/recipes/cookbook_file.rb
|
360
354
|
- lib/chef-cli/skeletons/code_generator/recipes/helpers.rb
|
@@ -372,9 +366,6 @@ files:
|
|
372
366
|
- lib/chef-cli/skeletons/code_generator/templates/default/Policyfile.rb.erb
|
373
367
|
- lib/chef-cli/skeletons/code_generator/templates/default/README.md.erb
|
374
368
|
- lib/chef-cli/skeletons/code_generator/templates/default/attribute.rb.erb
|
375
|
-
- lib/chef-cli/skeletons/code_generator/templates/default/build_cookbook/Berksfile.erb
|
376
|
-
- lib/chef-cli/skeletons/code_generator/templates/default/build_cookbook/metadata.rb.erb
|
377
|
-
- lib/chef-cli/skeletons/code_generator/templates/default/build_cookbook/recipe.rb.erb
|
378
369
|
- lib/chef-cli/skeletons/code_generator/templates/default/cookbook_file.erb
|
379
370
|
- lib/chef-cli/skeletons/code_generator/templates/default/delivery-project.toml.erb
|
380
371
|
- lib/chef-cli/skeletons/code_generator/templates/default/helpers.rb.erb
|
@@ -384,6 +375,7 @@ files:
|
|
384
375
|
- lib/chef-cli/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb
|
385
376
|
- lib/chef-cli/skeletons/code_generator/templates/default/metadata.rb.erb
|
386
377
|
- lib/chef-cli/skeletons/code_generator/templates/default/recipe.rb.erb
|
378
|
+
- lib/chef-cli/skeletons/code_generator/templates/default/recipe.yml.erb
|
387
379
|
- lib/chef-cli/skeletons/code_generator/templates/default/recipe_spec.rb.erb
|
388
380
|
- lib/chef-cli/skeletons/code_generator/templates/default/repo/gitignore.erb
|
389
381
|
- lib/chef-cli/skeletons/code_generator/templates/default/resource.rb.erb
|
@@ -416,7 +408,6 @@ files:
|
|
416
408
|
- spec/unit/command/generate_spec.rb
|
417
409
|
- spec/unit/command/generator_commands/attribute_spec.rb
|
418
410
|
- spec/unit/command/generator_commands/base_spec.rb
|
419
|
-
- spec/unit/command/generator_commands/build_cookbook_spec.rb
|
420
411
|
- spec/unit/command/generator_commands/chef_exts/generator_desc_resource_spec.rb
|
421
412
|
- spec/unit/command/generator_commands/chef_exts/recipe_dsl_ext_spec.rb
|
422
413
|
- spec/unit/command/generator_commands/cookbook_file_spec.rb
|
@@ -494,6 +485,14 @@ files:
|
|
494
485
|
- spec/unit/fixtures/example_cookbook/chefignore
|
495
486
|
- spec/unit/fixtures/example_cookbook/metadata.rb
|
496
487
|
- spec/unit/fixtures/example_cookbook/recipes/default.rb
|
488
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/.gitignore
|
489
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/.kitchen.yml
|
490
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/Berksfile
|
491
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/README.md
|
492
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/chefignore
|
493
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/metadata.json
|
494
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/metadata.rb
|
495
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/recipes/default.rb
|
497
496
|
- spec/unit/fixtures/example_cookbook_metadata_json_only/.gitignore
|
498
497
|
- spec/unit/fixtures/example_cookbook_metadata_json_only/.kitchen.yml
|
499
498
|
- spec/unit/fixtures/example_cookbook_metadata_json_only/Berksfile
|
@@ -529,6 +528,7 @@ files:
|
|
529
528
|
- spec/unit/fixtures/local_path_cookbooks/noignore-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/metadata.rb
|
530
529
|
- spec/unit/fixtures/local_path_cookbooks/noignore-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/recipes/default.rb
|
531
530
|
- spec/unit/generator_spec.rb
|
531
|
+
- spec/unit/helpers_spec.rb
|
532
532
|
- spec/unit/kitchen/provisioner/chef_zero_capture_spec.rb
|
533
533
|
- spec/unit/pager_spec.rb
|
534
534
|
- spec/unit/policyfile/artifactory_cookbook_source_spec.rb
|
@@ -595,7 +595,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
595
595
|
requirements:
|
596
596
|
- - ">="
|
597
597
|
- !ruby/object:Gem::Version
|
598
|
-
version: '2.
|
598
|
+
version: '2.6'
|
599
599
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
600
600
|
requirements:
|
601
601
|
- - ">="
|
@@ -631,7 +631,6 @@ test_files:
|
|
631
631
|
- spec/unit/command/generate_spec.rb
|
632
632
|
- spec/unit/command/generator_commands/attribute_spec.rb
|
633
633
|
- spec/unit/command/generator_commands/base_spec.rb
|
634
|
-
- spec/unit/command/generator_commands/build_cookbook_spec.rb
|
635
634
|
- spec/unit/command/generator_commands/chef_exts/generator_desc_resource_spec.rb
|
636
635
|
- spec/unit/command/generator_commands/chef_exts/recipe_dsl_ext_spec.rb
|
637
636
|
- spec/unit/command/generator_commands/cookbook_file_spec.rb
|
@@ -709,6 +708,14 @@ test_files:
|
|
709
708
|
- spec/unit/fixtures/example_cookbook/chefignore
|
710
709
|
- spec/unit/fixtures/example_cookbook/metadata.rb
|
711
710
|
- spec/unit/fixtures/example_cookbook/recipes/default.rb
|
711
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/.gitignore
|
712
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/.kitchen.yml
|
713
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/Berksfile
|
714
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/README.md
|
715
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/chefignore
|
716
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/metadata.json
|
717
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/metadata.rb
|
718
|
+
- spec/unit/fixtures/example_cookbook_both_metadata/recipes/default.rb
|
712
719
|
- spec/unit/fixtures/example_cookbook_metadata_json_only/.gitignore
|
713
720
|
- spec/unit/fixtures/example_cookbook_metadata_json_only/.kitchen.yml
|
714
721
|
- spec/unit/fixtures/example_cookbook_metadata_json_only/Berksfile
|
@@ -744,6 +751,7 @@ test_files:
|
|
744
751
|
- spec/unit/fixtures/local_path_cookbooks/noignore-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/metadata.rb
|
745
752
|
- spec/unit/fixtures/local_path_cookbooks/noignore-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/recipes/default.rb
|
746
753
|
- spec/unit/generator_spec.rb
|
754
|
+
- spec/unit/helpers_spec.rb
|
747
755
|
- spec/unit/kitchen/provisioner/chef_zero_capture_spec.rb
|
748
756
|
- spec/unit/pager_spec.rb
|
749
757
|
- spec/unit/policyfile/artifactory_cookbook_source_spec.rb
|