chef-cli 3.0.11 → 3.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/lib/chef-cli/command/update.rb +1 -1
- data/lib/chef-cli/cookbook_profiler/git.rb +1 -1
- data/lib/chef-cli/policyfile/chef_server_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/cookbook_locks.rb +2 -2
- data/lib/chef-cli/policyfile/delivery_supermarket_source.rb +1 -1
- data/lib/chef-cli/policyfile/local_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/policyfile_location_specification.rb +1 -1
- data/lib/chef-cli/policyfile/read_cookbook_for_compat_mode_upload.rb +2 -2
- data/lib/chef-cli/policyfile_compiler.rb +1 -1
- data/lib/chef-cli/policyfile_lock.rb +1 -2
- data/lib/chef-cli/version.rb +1 -1
- data/lib/kitchen/provisioner/chef_zero_capture.rb +3 -4
- data/lib/kitchen/provisioner/policyfile_zero.rb +1 -2
- data/spec/unit/command/clean_policy_cookbooks_spec.rb +2 -2
- data/spec/unit/command/env_spec.rb +1 -1
- data/spec/unit/command/exec_spec.rb +1 -1
- data/spec/unit/commands_map_spec.rb +4 -4
- data/spec/unit/kitchen/provisioner/chef_zero_capture_spec.rb +0 -1
- data/spec/unit/policyfile_includes_spec.rb +0 -1
- data/spec/unit/policyfile_install_with_includes_spec.rb +0 -1
- data/spec/unit/policyfile_lock_build_spec.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32790ab3b088b47eecb22d5be42cb45915584d117687f6133f689fa7ae40b9b4
|
4
|
+
data.tar.gz: 3225502afa9009b0fb4d7cec8d0e1c5a2de851c8bcc982ef26a985e1e6e2aed1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79d8e068694829682f02159f01ab4aeb38930ce9a1f967fb90dc89958a0870c0ad4b804f1a75da6dcc36174dafae0d18569ca3a20cb4448a1f55db23bc83baee
|
7
|
+
data.tar.gz: 7a708060fc06c798514384e6ac4f8367a138d0d37aae8cda9ccb5cecabff6c0a953880801f808e12774b6210c18d3c4dde761fe98b5a8a7c18a4d07f8b8864bb
|
data/Gemfile
CHANGED
@@ -13,8 +13,8 @@ group :test do
|
|
13
13
|
gem "rspec", "~> 3.8"
|
14
14
|
gem "rspec-expectations", "~> 3.8"
|
15
15
|
gem "rspec-mocks", "~> 3.8"
|
16
|
-
gem "cookstyle"
|
17
|
-
gem "chefstyle"
|
16
|
+
gem "cookstyle", "6.13.3" # this forces dependabot PRs to open which triggers cookstyle CI on the chef generate command
|
17
|
+
gem "chefstyle", "1.2.0"
|
18
18
|
gem "test-kitchen", "> 2.5"
|
19
19
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6")
|
20
20
|
gem "chef-zero", "~> 14"
|
@@ -70,7 +70,7 @@ module ChefCLI
|
|
70
70
|
|
71
71
|
option :exclude_deps,
|
72
72
|
long: "--exclude-deps",
|
73
|
-
description: "Only update cookbooks
|
73
|
+
description: "Only update cookbooks explicitly mentioned on the command line",
|
74
74
|
boolean: true,
|
75
75
|
default: false
|
76
76
|
|
@@ -31,7 +31,7 @@ module ChefCLI
|
|
31
31
|
@unborn_branch_ref = nil
|
32
32
|
end
|
33
33
|
|
34
|
-
# @return [Hash] Hashed used for pinning cookbook versions within a
|
34
|
+
# @return [Hash] Hashed used for pinning cookbook versions within a Policyfile.lock
|
35
35
|
def profile_data
|
36
36
|
{
|
37
37
|
"scm" => "git",
|
@@ -400,8 +400,8 @@ module ChefCLI
|
|
400
400
|
|
401
401
|
dot_git = Pathname.new(".git")
|
402
402
|
Pathname.new(cookbook_path).ascend do |parent_dir|
|
403
|
-
|
404
|
-
if
|
403
|
+
possible_git_dir = parent_dir + dot_git
|
404
|
+
if possible_git_dir.exist?
|
405
405
|
@cookbook_in_git_repo = true
|
406
406
|
break
|
407
407
|
end
|
@@ -39,7 +39,7 @@ module ChefCLI
|
|
39
39
|
# * Version numbers for cookbooks that pass through the Ci pipeline always
|
40
40
|
# increase over time (so that largest version number == newest)
|
41
41
|
#
|
42
|
-
# In the future, alternative approaches may be
|
42
|
+
# In the future, alternative approaches may be pursued to achieve the goal
|
43
43
|
# of continuously integrating at the cookbook level without imposing those
|
44
44
|
# constraints.
|
45
45
|
#
|
@@ -89,9 +89,9 @@ module ChefCLI
|
|
89
89
|
@cookbook_version ||=
|
90
90
|
begin
|
91
91
|
cookbook_version = loader.cookbook_version
|
92
|
-
# TODO:
|
92
|
+
# TODO: don't do this for non-compat mode
|
93
93
|
cookbook_version.version = version_override
|
94
|
-
# TODO:
|
94
|
+
# TODO: don't do this either
|
95
95
|
|
96
96
|
# Fixup manifest.
|
97
97
|
# What happens is, the 'manifest' representation of cookbook
|
@@ -274,7 +274,7 @@ module ChefCLI
|
|
274
274
|
# compared to an unmodified copy upstream. For example, the community site
|
275
275
|
# may have a cookbook "apache2" at version "1.10.4", which the user has
|
276
276
|
# forked on github and modified the dependencies without changing the
|
277
|
-
# version number. To
|
277
|
+
# version number. To accommodate this, the local_artifacts_graph should be
|
278
278
|
# merged over the upstream's artifacts graph.
|
279
279
|
def local_artifacts_graph
|
280
280
|
cookbook_location_specs.inject({}) do |local_artifacts, (cookbook_name, cookbook_location_spec)|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- coding: UTF-8 -*-
|
2
1
|
#
|
3
2
|
# Copyright:: Copyright (c) 2014-2018 Chef Software Inc.
|
4
3
|
# License:: Apache License, Version 2.0
|
@@ -362,7 +361,7 @@ module ChefCLI
|
|
362
361
|
# doubles give 15-17 digits of precision, so we err on the safe side
|
363
362
|
# and only use 15 digits in the string conversion. We use the `g`
|
364
363
|
# format, which is a documented-enough "do what I mean" where floats
|
365
|
-
# >= 0.1 and <
|
364
|
+
# >= 0.1 and < precision are represented as floating point literals, and
|
366
365
|
# other numbers use the exponent notation with a lowercase 'e'. Note
|
367
366
|
# that both Ruby and Erlang document what their `g` does but have some
|
368
367
|
# differences both subtle and non-subtle:
|
data/lib/chef-cli/version.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Marc Paradise <marc@chef.io>
|
4
3
|
#
|
@@ -45,7 +44,7 @@ module Kitchen
|
|
45
44
|
#
|
46
45
|
# This provisioner does not do any cookbook dependency
|
47
46
|
# resolution and will not pull in external cookbooks. All cookbooks
|
48
|
-
# or cookbook
|
47
|
+
# or cookbook artifacts + policy data as captured from the live node and are
|
49
48
|
# expected to be available for chef-zero to provide to the client.
|
50
49
|
class ChefZeroCapture < ChefZero
|
51
50
|
# Declaring these ensure that they're available to the sandbox - it's initialized
|
@@ -55,7 +54,7 @@ module Kitchen
|
|
55
54
|
default_config :cookbook_artifacts_path, "cookbook_artifacts"
|
56
55
|
|
57
56
|
# This will load policyfile/berkshelf. We don't want either - the client resolves all
|
58
|
-
# dependencies from chef-zero, exactly as
|
57
|
+
# dependencies from chef-zero, exactly as prepped in the captured repository.
|
59
58
|
def load_needed_dependencies!; end
|
60
59
|
|
61
60
|
def create_sandbox
|
@@ -73,7 +72,7 @@ module Kitchen
|
|
73
72
|
end
|
74
73
|
|
75
74
|
# Overriding the private ProviderChefZero#default_config_rb
|
76
|
-
# so that we can add additional
|
75
|
+
# so that we can add additional configuration required for chef-zero
|
77
76
|
# to be able to locate our policies/, policy groups, and cookbook artifacts
|
78
77
|
# at run-time.
|
79
78
|
def default_config_rb
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -54,7 +53,7 @@ module Kitchen
|
|
54
53
|
# @author Daniel DeLeo <dan@chef.io>
|
55
54
|
class PolicyfileZero < ChefBase
|
56
55
|
|
57
|
-
# This
|
56
|
+
# This provisioner will forcibly set the following config options:
|
58
57
|
# * `use_policyfile`: `true`
|
59
58
|
# * `versioned_cookbooks`: `true`
|
60
59
|
# * `deployment_group`: `POLICY_NAME-local`
|
@@ -50,9 +50,9 @@ describe ChefCLI::Command::CleanPolicyCookbooks do
|
|
50
50
|
|
51
51
|
context "when given a path to the config" do
|
52
52
|
|
53
|
-
let(:params) { %w{ -c ~/
|
53
|
+
let(:params) { %w{ -c ~/other_stuff/config.rb } }
|
54
54
|
|
55
|
-
let(:config_arg) { "~/
|
55
|
+
let(:config_arg) { "~/other_stuff/config.rb" }
|
56
56
|
|
57
57
|
before do
|
58
58
|
expect(chef_config_loader).to receive(:load)
|
@@ -69,7 +69,7 @@ describe ChefCLI::Command::Env do
|
|
69
69
|
it "output should be valid yaml" do
|
70
70
|
expect { yaml }.not_to raise_error
|
71
71
|
end
|
72
|
-
it "Workstation version should indicate that that we're not
|
72
|
+
it "Workstation version should indicate that that we're not running from a WS install" do
|
73
73
|
expect(yaml).to have_key ChefCLI::Dist::PRODUCT
|
74
74
|
expect(yaml[ChefCLI::Dist::PRODUCT]["Version"]).to eql "Not running from within Workstation"
|
75
75
|
end
|
@@ -59,7 +59,7 @@ describe ChefCLI::Command::Exec do
|
|
59
59
|
before do
|
60
60
|
allow(Gem).to receive(:ruby).and_return(ruby_path)
|
61
61
|
|
62
|
-
# Using a fake path separator to keep to prevent people from
|
62
|
+
# Using a fake path separator to keep to prevent people from accidentally
|
63
63
|
# getting things correct on their system. This enforces that, in general,
|
64
64
|
# you should use the path separator ruby is telling you to use.
|
65
65
|
stub_const("File::PATH_SEPARATOR", "<>")
|
@@ -25,7 +25,7 @@ describe ChefCLI::CommandsMap do
|
|
25
25
|
|
26
26
|
before do
|
27
27
|
mapping.builtin("example", :Example)
|
28
|
-
mapping.builtin("
|
28
|
+
mapping.builtin("hyphenated-example", :HyphenatedExample)
|
29
29
|
mapping.builtin("explicit-path-example", :ExplicitPathExample, require_path: "unit/fixtures/command/explicit_path_example")
|
30
30
|
mapping.builtin("documented-example", :DocumentedExample, desc: "I have documentation")
|
31
31
|
end
|
@@ -34,16 +34,16 @@ describe ChefCLI::CommandsMap do
|
|
34
34
|
expect(mapping.have_command?("example")).to be true
|
35
35
|
end
|
36
36
|
|
37
|
-
it "infers a non-
|
37
|
+
it "infers a non-hyphenated command's require path" do
|
38
38
|
expect(mapping.spec_for("example").require_path).to eq("chef-cli/command/example")
|
39
39
|
end
|
40
40
|
|
41
41
|
it "infers a hyphenated command's require path" do
|
42
|
-
expect(mapping.spec_for("
|
42
|
+
expect(mapping.spec_for("hyphenated-example").require_path).to eq("chef-cli/command/hyphenated_example")
|
43
43
|
end
|
44
44
|
|
45
45
|
it "lists the available commands" do
|
46
|
-
expect(mapping.command_names).to match_array(%w{example
|
46
|
+
expect(mapping.command_names).to match_array(%w{example hyphenated-example explicit-path-example documented-example})
|
47
47
|
end
|
48
48
|
|
49
49
|
it "keeps the docstring of a command" 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: 3.0.
|
4
|
+
version: 3.0.14
|
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-
|
11
|
+
date: 2020-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-cli
|