chef 15.14.0 → 15.17.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9cedb478d0c5c91ba1217dd228387261aa82eeb69b9f572ce7041719ce3f20f
4
- data.tar.gz: a4c107cea2186b546e20e4a754a6288d5ccd7cae2c88792aa79a4fa2894acc94
3
+ metadata.gz: 428f207b551e9d998887382821e0f8823a9e5eaf5b85bf383fe8eef0062e0482
4
+ data.tar.gz: 85e264549adc2e92e7ebbe3629bf4f722caf416bb72f5ad144fa9d325fe90e85
5
5
  SHA512:
6
- metadata.gz: 0f116046c01b46cb1de8e2e0eb07fa5bd4dff2045598460c5a7df71d77d2666caac0511071c6b91f1e879a68ae3c10ee72cdb58cbf9ff7b64bc93fbd6903738b
7
- data.tar.gz: 5732ddd577cd6b20a07ee8c899747cb09fda3752136540f4f6cc16f1d406ad5b9e7365dc53dc3e415028c9e4aa5281dfde445e19f83bbc3b5f4f551ca168aa45
6
+ metadata.gz: 7e765f72d1576a95d9bd53997db4ea589d92cd59893b4eb009d4378d5a5b3e2f13178538a69c82de7deec7c3d4b3f5da6b2bce88bafd6ca63f2072d4dad456e9
7
+ data.tar.gz: e2a04846dce24b1e2379c099214e280aeeff7b39941f63f624fa70fb92d8c6b7702c8dbc7a05893734ef512059e772b72eebaf7450ba9c6e9fa2b13006304086
data/Gemfile CHANGED
@@ -28,10 +28,8 @@ group(:omnibus_package) do
28
28
  gem "appbundler"
29
29
  gem "rb-readline"
30
30
  gem "inspec-core", "~> 4.18"
31
- gem "inspec-core-bin", "~> 4.18" # need to provide the binaries for inspec
31
+ gem "inspec-core-bin", "~> 4.24" # need to provide the binaries for inspec
32
32
  gem "chef-vault"
33
- gem "ed25519" # ed25519 ssh key support done here as it's a native gem we can't put in train
34
- gem "bcrypt_pbkdf", ">= 1.1.0.rc1" # ed25519 ssh key support done here as it's a native gem we can't put in train
35
33
  end
36
34
 
37
35
  group(:omnibus_package, :pry) do
@@ -65,7 +63,7 @@ group(:development, :test) do
65
63
  gem "rspec-core", "~> 3.5"
66
64
  gem "rspec-mocks", "~> 3.5"
67
65
  gem "rspec-expectations", "~> 3.5"
68
- gem "rspec_junit_formatter", "~> 0.2.0"
66
+ gem "rspec_junit_formatter", "~> 0.4.0"
69
67
  gem "webmock"
70
68
  gem "fauxhai-ng" # for chef-utils gem
71
69
  end
@@ -84,6 +82,9 @@ eval_gemfile("./Gemfile.local") if File.exist?("./Gemfile.local")
84
82
  # For FFI to call into PowerShell we need the binaries and assemblies located
85
83
  # in the Ruby bindir.
86
84
  # The Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim
85
+ # Every merge into that repo triggers a Habitat build and promotion. Running
86
+ # the rake :update_chef_exec_dll task in this (chef/chef) repo will pull down
87
+ # the built packages and copy the binaries to distro/ruby_bin_folder.
87
88
  #
88
89
  # We copy (and overwrite) these files every time "bundle <exec|install>" is
89
90
  # executed, just in case they have changed.
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![Code Climate](https://codeclimate.com/github/chef/chef.svg)](https://codeclimate.com/github/chef/chef)
3
3
  [![Build status](https://badge.buildkite.com/13b36bf2d9116e3527ff9893e7edd82cb183027941fef3d24e.svg)](https://buildkite.com/chef-oss/chef-chef-chef-15-verify)
4
4
  [![Gem Version](https://badge.fury.io/rb/chef.svg)](https://badge.fury.io/rb/chef)
5
- [![](https://img.shields.io/badge/Release%20Policy-Cadence%20Release-brightgreen.svg)](https://github.com/chef/chef/blob/v15.2.21/docs/dev/design_documents/client_release_cadence.md)
5
+ [![](https://img.shields.io/badge/Release%20Policy-Cadence%20Release-brightgreen.svg)](https://github.com/chef/chef/blob/chef-15/docs/dev/design_documents/client_release_cadence.md)
6
6
 
7
7
  **Umbrella Project**: [Chef Infra](https://github.com/chef/chef-oss-practices/blob/master/projects/chef-infra.md)
8
8
 
@@ -26,13 +26,13 @@ Other useful resources for Chef Infra users:
26
26
  - Source: <https://github.com/chef/chef/tree/master>
27
27
  - Tickets/Issues: <https://github.com/chef/chef/issues>
28
28
  - Slack: [Chef Community Slack](https://community-slack.chef.io/)
29
- - Mailing list/Forum: <https://discourse.chef.io>
29
+ - Mailing list/Forum: <https://discourse.chef.io/>
30
30
 
31
31
  ## Reporting Issues
32
32
 
33
33
  Issues can be reported by using [GitHub Issues](https://github.com/chef/chef/issues).
34
34
 
35
- Note that this repository is primarily for reporting issues in the chef-client itself. For reporting issues against other Chef projects, please look up the appropriate repository. If you're unsure where to submit an issue, please ask in the #chef-dev channel in [Chef Community Slack](https://community-slack.chef.io/).
35
+ Note that this repository is primarily for reporting issues in the chef-client itself. For reporting issues against other Chef projects, please look up the appropriate repository. If you're unsure where to submit an issue, please ask in the #chef-dev channel in [Chef Community Slack](https://community-slack.chef.io/).
36
36
 
37
37
  ## How We Build & Release Chef
38
38
 
@@ -46,7 +46,7 @@ We'd love to have your help developing Chef Infra. See our [Contributing Documen
46
46
 
47
47
  ## License and Copyright
48
48
 
49
- Copyright 2008-2020, Chef Software, Inc.
49
+ Copyright 2008-2021, Chef Software, Inc.
50
50
 
51
51
  ```
52
52
  Licensed under the Apache License, Version 2.0 (the "License");
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # Author:: Adam Jacob (<adam@chef.io>)
3
3
  # Author:: Daniel DeLeo (<dan@chef.io>)
4
- # Copyright:: Copyright 2008-2019, Chef Software Inc.
4
+ # Copyright:: Copyright, 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");
@@ -17,16 +17,20 @@
17
17
  # limitations under the License.
18
18
  #
19
19
 
20
+ # we need this to resolve files required by lib/chef/dist
21
+ $LOAD_PATH.unshift(File.expand_path("chef-config/lib", __dir__))
22
+
20
23
  begin
21
24
  require_relative "tasks/rspec"
22
25
  require_relative "tasks/dependencies"
23
- require_relative "tasks/announce"
24
26
  require_relative "tasks/docs"
25
- require_relative "lib/chef/dist"
27
+ require_relative "lib/chef/dist" unless defined?(Chef::Dist)
26
28
  rescue LoadError => e
27
29
  puts "Skipping missing rake dep: #{e}"
28
30
  end
29
31
 
32
+ require "bundler/gem_helper"
33
+
30
34
  ENV["CHEF_LICENSE"] = "accept-no-persist"
31
35
 
32
36
  # hack the chef-config install to run before the traditional install task
@@ -38,6 +42,7 @@ task :super_install do
38
42
  end
39
43
 
40
44
  # Templating the powershell extensions so we can inject distro constants
45
+ require "erb"
41
46
  template_file = ::File.join(::File.dirname(__FILE__), "distro", "templates", "powershell", "chef", "chef.psm1.erb")
42
47
  psm1_path = ::File.join(::File.dirname(__FILE__), "distro", "powershell", "chef")
43
48
  FileUtils.mkdir_p psm1_path
@@ -55,8 +60,20 @@ Bundler::GemHelper.install_tasks name: gemspec
55
60
  # this gets appended to the normal bundler install helper
56
61
  task :install do
57
62
  chef_bin_path = ::File.join(::File.dirname(__FILE__), "chef-bin")
58
- Dir.chdir(chef_bin_path)
59
- sh("rake install:force")
63
+ Dir.chdir(chef_bin_path) do
64
+ sh("rake install:force")
65
+ end
66
+ end
67
+
68
+ namespace :install do
69
+ task local: "super_install"
70
+
71
+ task :local do
72
+ chef_bin_path = ::File.join(::File.dirname(__FILE__), "chef-bin")
73
+ Dir.chdir(chef_bin_path) do
74
+ sh("rake install:local")
75
+ end
76
+ end
60
77
  end
61
78
 
62
79
  task :pedant, :chef_zero_spec
@@ -82,15 +99,3 @@ begin
82
99
  rescue LoadError
83
100
  puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed."
84
101
  end
85
-
86
- begin
87
- require "yard"
88
- DOC_FILES = [ "spec/tiny_server.rb", "lib/**/*.rb" ].freeze
89
-
90
- YARD::Rake::YardocTask.new(:docs) do |t|
91
- t.files = DOC_FILES
92
- t.options = ["--format", "html"]
93
- end
94
- rescue LoadError
95
- puts "yard is not available. bundle install first to make sure all dependencies are installed."
96
- end
@@ -10,12 +10,12 @@ gemspec.add_dependency "win32-event", "~> 0.6.1"
10
10
  gemspec.add_dependency "win32-eventlog", "0.6.3"
11
11
  gemspec.add_dependency "win32-mmap", "~> 0.4.1"
12
12
  gemspec.add_dependency "win32-mutex", "~> 0.4.2"
13
- gemspec.add_dependency "win32-process", "~> 0.8.2"
13
+ gemspec.add_dependency "win32-process", "~> 0.9"
14
14
  gemspec.add_dependency "win32-service", ">= 2.1.5", "< 3.0"
15
15
  gemspec.add_dependency "wmi-lite", "~> 1.0"
16
16
  gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
17
17
  gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out
18
- gemspec.add_dependency "win32-certstore", "~> 0.3"
18
+ gemspec.add_dependency "win32-certstore", "~> 0.5.0" # 0.5+ required for specifying user vs. system store
19
19
  gemspec.extensions << "ext/win32-eventlog/Rakefile"
20
20
  gemspec.files += Dir.glob("{distro,ext}/**/*")
21
21
 
data/chef.gemspec CHANGED
@@ -1,4 +1,13 @@
1
1
  $:.unshift(File.dirname(__FILE__) + "/lib")
2
+ vs_path = File.expand_path("chef-utils/lib/chef-utils/version_string.rb", __dir__)
3
+
4
+ if File.exist?(vs_path)
5
+ # this is the moral equivalent of a require_relative since bundler makes require_relative here fail hard
6
+ eval(IO.read(vs_path))
7
+ else
8
+ # if the path doesn't exist then we're just in the wild gem and not in the git repo
9
+ require "chef-utils/version_string"
10
+ end
2
11
  require "chef/version"
3
12
 
4
13
  Gem::Specification.new do |s|
@@ -20,7 +29,7 @@ Gem::Specification.new do |s|
20
29
  s.add_dependency "train-core", "~> 3.2", ">= 3.2.28" # 3.2.28 fixes sudo prompts. See https://github.com/chef/chef/pull/9635
21
30
  s.add_dependency "train-winrm", ">= 0.2.5"
22
31
 
23
- s.add_dependency "license-acceptance", "~> 1.0", ">= 1.0.5"
32
+ s.add_dependency "license-acceptance", ">= 1.0.5", "< 3"
24
33
  s.add_dependency "mixlib-cli", ">= 2.1.1", "< 3.0"
25
34
  s.add_dependency "mixlib-log", ">= 2.0.3", "< 4.0"
26
35
  s.add_dependency "mixlib-authentication", ">= 2.1", "< 4"
@@ -35,10 +44,10 @@ Gem::Specification.new do |s|
35
44
  s.add_dependency "net-sftp", ">= 2.1.2", "< 4.0"
36
45
  s.add_dependency "ed25519", "~> 1.2" # ed25519 ssh key support
37
46
  s.add_dependency "bcrypt_pbkdf", "~> 1.0" # ed25519 ssh key support
38
- s.add_dependency "highline", ">= 1.6.9", "< 2"
47
+ s.add_dependency "highline", ">= 1.6.9", "< 3"
39
48
  s.add_dependency "tty-screen", "~> 0.6" # knife list
40
49
  s.add_dependency "erubis", "~> 2.7"
41
- s.add_dependency "diff-lcs", "~> 1.2", ">= 1.2.4"
50
+ s.add_dependency "diff-lcs", ">= 1.2.4", "< 1.4.0" # 1.4 breaks output
42
51
  s.add_dependency "ffi-libarchive", "~> 1.0", ">= 1.0.3"
43
52
  s.add_dependency "chef-zero", ">= 14.0.11"
44
53
 
@@ -46,7 +55,7 @@ Gem::Specification.new do |s|
46
55
  s.add_dependency "iniparse", "~> 1.4"
47
56
  s.add_dependency "addressable"
48
57
  s.add_dependency "syslog-logger", "~> 1.6"
49
- s.add_dependency "uuidtools", "~> 2.1.5"
58
+ s.add_dependency "uuidtools", ">= 2.1.5", "< 3.0"
50
59
 
51
60
  s.add_dependency "proxifier", "~> 1.0"
52
61
 
@@ -62,4 +71,13 @@ Gem::Specification.new do |s|
62
71
  Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } +
63
72
  Dir.glob("*.gemspec") +
64
73
  Dir.glob("tasks/rspec.rb")
74
+
75
+ s.metadata = {
76
+ "bug_tracker_uri" => "https://github.com/chef/chef/issues",
77
+ "changelog_uri" => "https://github.com/chef/chef/blob/master/CHANGELOG.md",
78
+ "documentation_uri" => "https://docs.chef.io/",
79
+ "homepage_uri" => "https://www.chef.io",
80
+ "mailing_list_uri" => "https://discourse.chef.io/",
81
+ "source_code_uri" => "https://github.com/chef/chef/",
82
+ }
65
83
  end
@@ -101,6 +101,11 @@ while 1:
101
101
  if ppid == 1:
102
102
  sys.exit(0)
103
103
  line = sys.stdin.readline()
104
+
105
+ # only way to detect EOF in python
106
+ if line == "":
107
+ break
108
+
104
109
  command = json.loads(line)
105
110
  if command['action'] == "whatinstalled":
106
111
  query(command)
@@ -42,7 +42,9 @@ class Chef
42
42
  end
43
43
 
44
44
  def current_installed_version
45
- pkg_info = shell_out!("pkg", "info", new_resource.package_name, env: nil, returns: [0, 70])
45
+ # pkgng up to version 1.15.99.7 returns 70 for pkg not found,
46
+ # later versions return 1
47
+ pkg_info = shell_out!("pkg", "info", new_resource.package_name, env: nil, returns: [0, 1, 70])
46
48
  pkg_info.stdout[/^Version +: (.+)$/, 1]
47
49
  end
48
50
 
@@ -196,6 +196,10 @@ try:
196
196
  setup_exit_handler()
197
197
  line = inpipe.readline()
198
198
 
199
+ # only way to detect EOF in python
200
+ if line == "":
201
+ break
202
+
199
203
  try:
200
204
  command = json.loads(line)
201
205
  except ValueError, e:
@@ -292,6 +292,7 @@ class Chef
292
292
  source ::File.expand_path("support/cron.d.erb", __dir__)
293
293
  local true
294
294
  mode new_resource.mode
295
+ sensitive new_resource.sensitive
295
296
  variables(
296
297
  name: sanitized_name,
297
298
  predefined_value: new_resource.predefined_value,
@@ -59,7 +59,7 @@ class Chef
59
59
 
60
60
  unless casked?
61
61
  converge_by("install cask #{new_resource.cask_name} #{new_resource.options}") do
62
- shell_out!("#{new_resource.homebrew_path} cask install #{new_resource.cask_name} #{new_resource.options}",
62
+ shell_out!("#{new_resource.homebrew_path} install --cask #{new_resource.cask_name} #{new_resource.options}",
63
63
  user: new_resource.owner,
64
64
  env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
65
65
  cwd: ::Dir.home(new_resource.owner))
@@ -74,7 +74,7 @@ class Chef
74
74
 
75
75
  if casked?
76
76
  converge_by("uninstall cask #{new_resource.cask_name}") do
77
- shell_out!("#{new_resource.homebrew_path} cask uninstall #{new_resource.cask_name}",
77
+ shell_out!("#{new_resource.homebrew_path} uninstall --cask #{new_resource.cask_name}",
78
78
  user: new_resource.owner,
79
79
  env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
80
80
  cwd: ::Dir.home(new_resource.owner))
@@ -92,7 +92,7 @@ class Chef
92
92
  # @return [Boolean]
93
93
  def casked?
94
94
  unscoped_name = new_resource.cask_name.split("/").last
95
- shell_out!("#{new_resource.homebrew_path} cask list 2>/dev/null",
95
+ shell_out!("#{new_resource.homebrew_path} list --cask 2>/dev/null",
96
96
  user: new_resource.owner,
97
97
  env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
98
98
  cwd: ::Dir.home(new_resource.owner)).stdout.split.include?(unscoped_name)
@@ -97,7 +97,7 @@ class Chef
97
97
  # @raise [Mixlib::ShellOut::ShellCommandFailed] not a supported language or locale
98
98
  #
99
99
  def generate_locales
100
- shell_out!("locale-gen #{unavailable_locales.join(" ")}")
100
+ shell_out!("locale-gen #{unavailable_locales.join(" ")}", timeout: 1800)
101
101
  end
102
102
 
103
103
  # Updates system locale by appropriately writing them in /etc/locale.conf
data/lib/chef/shell.rb CHANGED
@@ -19,6 +19,7 @@ require "singleton" unless defined?(Singleton)
19
19
  require "pp" unless defined?(PP)
20
20
  require "etc" unless defined?(Etc)
21
21
  require "mixlib/cli" unless defined?(Mixlib::CLI)
22
+ require "chef-config/mixin/dot_d"
22
23
 
23
24
  require_relative "../chef"
24
25
  require_relative "version"
@@ -199,6 +200,7 @@ module Shell
199
200
 
200
201
  class Options
201
202
  include Mixlib::CLI
203
+ include ChefConfig::Mixin::DotD
202
204
 
203
205
  def self.footer(text = nil)
204
206
  @footer = text if text
@@ -314,15 +316,44 @@ module Shell
314
316
  # We have to nuke ARGV to make sure irb's option parser never sees it.
315
317
  # otherwise, IRB complains about command line switches it doesn't recognize.
316
318
  ARGV.clear
319
+
320
+ # This code should not exist.
321
+ # We should be using Application::Client and then calling load_config_file
322
+ # which does all this properly. However this will do for now.
317
323
  config[:config_file] = config_file_for_shell_mode(environment)
318
324
  config_msg = config[:config_file] || "none (standalone session)"
319
325
  puts "loading configuration: #{config_msg}"
320
- Chef::Config.from_file(config[:config_file]) if !config[:config_file].nil? && File.exist?(config[:config_file]) && File.readable?(config[:config_file])
326
+
327
+ # load the config (if we have one)
328
+ unless config[:config_file].nil?
329
+ if File.exist?(config[:config_file]) && File.readable?(config[:config_file])
330
+ Chef::Config.from_file(config[:config_file])
331
+ end
332
+
333
+ # even if we couldn't load that, we need to tell Chef::Config what
334
+ # the file was so it sets confdir and d_dir and such properly
335
+ Chef::Config[:config_file] = config[:config_file]
336
+
337
+ # now attempt to load any relevant dot-dirs
338
+ load_dot_d(Chef::Config[:client_d_dir]) if Chef::Config[:client_d_dir]
339
+ end
340
+
341
+ # finally merge command-line options in
321
342
  Chef::Config.merge!(config)
322
343
  end
323
344
 
324
345
  private
325
346
 
347
+ # shamelessly lifted from application.rb
348
+ def apply_config(config_content, config_file_path)
349
+ Chef::Config.from_string(config_content, config_file_path)
350
+ rescue Exception => error
351
+ logger.fatal("Configuration error #{error.class}: #{error.message}")
352
+ filtered_trace = error.backtrace.grep(/#{Regexp.escape(config_file_path)}/)
353
+ filtered_trace.each { |line| logger.fatal(" " + line ) }
354
+ raise Chef::Exceptions::ConfigurationError.new("Aborting due to error in '#{config_file_path}': #{error}")
355
+ end
356
+
326
357
  def config_file_for_shell_mode(environment)
327
358
  dot_chef_dir = Chef::Util::PathHelper.home(".chef")
328
359
  if config[:config_file]
@@ -64,7 +64,7 @@ class Chef::Util::DSC
64
64
  # The name may not be null or empty, and should start with a letter.
65
65
  def validate_configuration_name!(configuration_name)
66
66
  if !!(configuration_name =~ /\A[A-Za-z]+[_a-zA-Z0-9]*\Z/) == false
67
- raise ArgumentError, 'Configuration `#{configuration_name}` is not a valid PowerShell cmdlet name'
67
+ raise ArgumentError, "Configuration `#{configuration_name}` is not a valid PowerShell cmdlet name"
68
68
  end
69
69
  end
70
70
 
data/lib/chef/version.rb CHANGED
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("..", __dir__)
26
- VERSION = Chef::VersionString.new("15.14.0")
26
+ VERSION = Chef::VersionString.new("15.17.4")
27
27
  end
28
28
 
29
29
  #
@@ -13,7 +13,7 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
 
16
- require "chef-utils/version_string"
16
+ require "chef-utils/version_string" unless defined?(ChefUtils::VersionString)
17
17
 
18
18
  class Chef
19
19
  VersionString = ChefUtils::VersionString
@@ -98,13 +98,13 @@ describe Shell do
98
98
  [output, e.status]
99
99
  end
100
100
 
101
- it "boots correctly with -lauto" do
101
+ it "boots correctly with -lauto", :executables do
102
102
  output, exitstatus = run_chef_shell_with("-lauto")
103
103
  expect(output).to include("done")
104
104
  expect(exitstatus).to eq(0)
105
105
  end
106
106
 
107
- it "sets the log_level from the command line" do
107
+ it "sets the log_level from the command line", :executables do
108
108
  output, exitstatus = run_chef_shell_with("-lfatal") do |out, keyboard|
109
109
  show_log_level_code = %q[puts "===#{Chef::Log.level}==="]
110
110
  keyboard.puts(show_log_level_code)
@@ -115,13 +115,13 @@ describe Shell do
115
115
  end
116
116
 
117
117
  context "on solo mode" do
118
- it "starts correctly" do
118
+ it "starts correctly", :executables do
119
119
  output, exitstatus = run_chef_shell_with("--solo")
120
120
  expect(output).to include("done")
121
121
  expect(exitstatus).to eq(0)
122
122
  end
123
123
 
124
- it "should be able to use the API" do
124
+ it "should be able to use the API", :executables do
125
125
  output, exitstatus = run_chef_shell_with("-s") do |out, keyboard|
126
126
  simple_api_get = "api.get('data')"
127
127
  keyboard.puts(simple_api_get)
@@ -132,7 +132,7 @@ describe Shell do
132
132
  end
133
133
  end
134
134
 
135
- it "sets the override_runlist from the command line" do
135
+ it "sets the override_runlist from the command line", :executables do
136
136
  output, exitstatus = run_chef_shell_with("-o 'override::foo,override::bar'") do |out, keyboard|
137
137
  show_recipes_code = %q[puts "#{node["recipes"].inspect}"]
138
138
  keyboard.puts(show_recipes_code)
@@ -140,7 +140,9 @@ describe Chef::Knife::SupermarketShare do
140
140
  before do
141
141
  allow(Chef::CookbookSiteStreamingUploader).to receive(:create_build_dir).and_return("/var/tmp/dummy")
142
142
  @knife.config = { dry_run: true }
143
- allow(@knife).to receive_message_chain(:shell_out!, :stdout).and_return("file")
143
+ @so = instance_double("Mixlib::ShellOut")
144
+ allow(@knife).to receive(:shell_out!).and_return(@so)
145
+ allow(@so).to receive(:stdout).and_return("file")
144
146
  end
145
147
 
146
148
  it "should list files in the tarball" do
@@ -151,7 +153,7 @@ describe Chef::Knife::SupermarketShare do
151
153
  end
152
154
 
153
155
  it "does not upload the cookbook" do
154
- allow(@knife).to receive(:shell_out!).and_return(true)
156
+ allow(@knife).to receive(:shell_out!).and_return(@so)
155
157
  expect(@knife).not_to receive(:do_upload)
156
158
  @knife.run
157
159
  end
@@ -66,7 +66,7 @@ describe Chef::Provider::Package::Freebsd::Port do
66
66
  end
67
67
 
68
68
  it "should query pkg database" do
69
- expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "zsh", env: nil, returns: [0, 70], timeout: 900).and_return(@pkg_info)
69
+ expect(@provider).to receive(:shell_out_compacted!).with("pkg", "info", "zsh", env: nil, returns: [0, 1, 70], timeout: 900).and_return(@pkg_info)
70
70
  expect(@provider.current_installed_version).to eq("3.1.7")
71
71
  end
72
72
  end
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: 15.14.0
4
+ version: 15.17.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-11 00:00:00.000000000 Z
11
+ date: 2021-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 15.14.0
19
+ version: 15.17.4
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: 15.14.0
26
+ version: 15.17.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chef-utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 15.14.0
33
+ version: 15.17.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 15.14.0
40
+ version: 15.17.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -76,22 +76,22 @@ dependencies:
76
76
  name: license-acceptance
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '1.0'
82
79
  - - ">="
83
80
  - !ruby/object:Gem::Version
84
81
  version: 1.0.5
82
+ - - "<"
83
+ - !ruby/object:Gem::Version
84
+ version: '3'
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - "~>"
90
- - !ruby/object:Gem::Version
91
- version: '1.0'
92
89
  - - ">="
93
90
  - !ruby/object:Gem::Version
94
91
  version: 1.0.5
92
+ - - "<"
93
+ - !ruby/object:Gem::Version
94
+ version: '3'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: mixlib-cli
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -337,7 +337,7 @@ dependencies:
337
337
  version: 1.6.9
338
338
  - - "<"
339
339
  - !ruby/object:Gem::Version
340
- version: '2'
340
+ version: '3'
341
341
  type: :runtime
342
342
  prerelease: false
343
343
  version_requirements: !ruby/object:Gem::Requirement
@@ -347,7 +347,7 @@ dependencies:
347
347
  version: 1.6.9
348
348
  - - "<"
349
349
  - !ruby/object:Gem::Version
350
- version: '2'
350
+ version: '3'
351
351
  - !ruby/object:Gem::Dependency
352
352
  name: tty-screen
353
353
  requirement: !ruby/object:Gem::Requirement
@@ -380,22 +380,22 @@ dependencies:
380
380
  name: diff-lcs
381
381
  requirement: !ruby/object:Gem::Requirement
382
382
  requirements:
383
- - - "~>"
384
- - !ruby/object:Gem::Version
385
- version: '1.2'
386
383
  - - ">="
387
384
  - !ruby/object:Gem::Version
388
385
  version: 1.2.4
386
+ - - "<"
387
+ - !ruby/object:Gem::Version
388
+ version: 1.4.0
389
389
  type: :runtime
390
390
  prerelease: false
391
391
  version_requirements: !ruby/object:Gem::Requirement
392
392
  requirements:
393
- - - "~>"
394
- - !ruby/object:Gem::Version
395
- version: '1.2'
396
393
  - - ">="
397
394
  - !ruby/object:Gem::Version
398
395
  version: 1.2.4
396
+ - - "<"
397
+ - !ruby/object:Gem::Version
398
+ version: 1.4.0
399
399
  - !ruby/object:Gem::Dependency
400
400
  name: ffi-libarchive
401
401
  requirement: !ruby/object:Gem::Requirement
@@ -490,16 +490,22 @@ dependencies:
490
490
  name: uuidtools
491
491
  requirement: !ruby/object:Gem::Requirement
492
492
  requirements:
493
- - - "~>"
493
+ - - ">="
494
494
  - !ruby/object:Gem::Version
495
495
  version: 2.1.5
496
+ - - "<"
497
+ - !ruby/object:Gem::Version
498
+ version: '3.0'
496
499
  type: :runtime
497
500
  prerelease: false
498
501
  version_requirements: !ruby/object:Gem::Requirement
499
502
  requirements:
500
- - - "~>"
503
+ - - ">="
501
504
  - !ruby/object:Gem::Version
502
505
  version: 2.1.5
506
+ - - "<"
507
+ - !ruby/object:Gem::Version
508
+ version: '3.0'
503
509
  - !ruby/object:Gem::Dependency
504
510
  name: proxifier
505
511
  requirement: !ruby/object:Gem::Requirement
@@ -2628,7 +2634,13 @@ files:
2628
2634
  homepage: https://www.chef.io
2629
2635
  licenses:
2630
2636
  - Apache-2.0
2631
- metadata: {}
2637
+ metadata:
2638
+ bug_tracker_uri: https://github.com/chef/chef/issues
2639
+ changelog_uri: https://github.com/chef/chef/blob/master/CHANGELOG.md
2640
+ documentation_uri: https://docs.chef.io/
2641
+ homepage_uri: https://www.chef.io
2642
+ mailing_list_uri: https://discourse.chef.io/
2643
+ source_code_uri: https://github.com/chef/chef/
2632
2644
  post_install_message:
2633
2645
  rdoc_options: []
2634
2646
  require_paths:
@@ -2644,7 +2656,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2644
2656
  - !ruby/object:Gem::Version
2645
2657
  version: '0'
2646
2658
  requirements: []
2647
- rubygems_version: 3.0.3
2659
+ rubygems_version: 3.0.3.1
2648
2660
  signing_key:
2649
2661
  specification_version: 4
2650
2662
  summary: A systems integration framework, built to bring the benefits of configuration