chef 16.5.64-universal-mingw32 → 16.5.77-universal-mingw32
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/chef.gemspec +1 -1
- data/lib/chef/application.rb +2 -2
- data/lib/chef/application/client.rb +1 -1
- data/lib/chef/application/solo.rb +1 -1
- data/lib/chef/chef_fs/chef_fs_data_store.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +1 -1
- data/lib/chef/cookbook/gem_installer.rb +1 -1
- data/lib/chef/event_loggers/windows_eventlog.rb +1 -1
- data/lib/chef/file_content_management/tempfile.rb +1 -1
- data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +1 -1
- data/lib/chef/formatters/indentable_output_stream.rb +2 -2
- data/lib/chef/knife/core/ui.rb +1 -1
- data/lib/chef/knife/node_policy_set.rb +2 -2
- data/lib/chef/knife/node_run_list_add.rb +1 -1
- data/lib/chef/knife/node_run_list_remove.rb +1 -1
- data/lib/chef/knife/node_run_list_set.rb +1 -1
- data/lib/chef/knife/role_env_run_list_add.rb +1 -1
- data/lib/chef/knife/role_env_run_list_set.rb +1 -1
- data/lib/chef/knife/role_run_list_add.rb +1 -1
- data/lib/chef/knife/role_run_list_set.rb +1 -1
- data/lib/chef/knife/search.rb +0 -1
- data/lib/chef/knife/ssh.rb +2 -2
- data/lib/chef/knife/tag_create.rb +1 -1
- data/lib/chef/knife/tag_delete.rb +1 -1
- data/lib/chef/local_mode.rb +1 -1
- data/lib/chef/mixin/template.rb +1 -1
- data/lib/chef/mixin/uris.rb +3 -1
- data/lib/chef/node_map.rb +2 -2
- data/lib/chef/policy_builder/dynamic.rb +2 -0
- data/lib/chef/provider.rb +1 -1
- data/lib/chef/provider/file.rb +1 -1
- data/lib/chef/provider/link.rb +0 -9
- data/lib/chef/provider/package/dpkg.rb +3 -12
- data/lib/chef/provider/package/homebrew.rb +1 -1
- data/lib/chef/provider/service/redhat.rb +1 -1
- data/lib/chef/provider/user/dscl.rb +2 -2
- data/lib/chef/provider/user/mac.rb +2 -2
- data/lib/chef/resource.rb +1 -1
- data/lib/chef/resource/apt_repository.rb +4 -2
- data/lib/chef/resource/chef_handler.rb +1 -0
- data/lib/chef/resource/cron/_cron_shared.rb +1 -0
- data/lib/chef/resource/file.rb +1 -1
- data/lib/chef/resource_reporter.rb +0 -2
- data/lib/chef/run_lock.rb +1 -1
- data/lib/chef/search/query.rb +3 -1
- data/lib/chef/util/backup.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/file.rb +1 -1
- data/lib/chef/win32/unicode.rb +1 -1
- data/spec/spec_helper.rb +1 -3
- data/spec/unit/chef_fs/config_spec.rb +1 -1
- data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
- data/spec/unit/data_collector_spec.rb +0 -4
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be66626e9a30881035691daab78994376a8b61f654e3eb3ca07157a35ec4aec4
|
4
|
+
data.tar.gz: bc3bf6bb5d75a908c6c8a805c2da1a732c42393a4d35570c6bfdca69845e566e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daf306b22d36bb452ae8ad642b3203cea5f1b60b5327a3c5b723e93c36256a18db1c02e8a9b29c119d64d00bbe5b04e28e8880f5af568f3a6cf5d0eda2469610
|
7
|
+
data.tar.gz: bb1093f29e376799b9f16b79e60b4ae03005ace97a9559d7820cdb40a97f21deffd2f1469b77721c3873a72df6561adcbedc79ce52f5b8c8500d30e05eca00a5
|
data/chef.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.add_dependency "highline", ">= 1.6.9", "< 3"
|
39
39
|
s.add_dependency "tty-prompt", "~> 0.21" # knife ui.ask prompt
|
40
40
|
s.add_dependency "tty-screen", "~> 0.6" # knife list
|
41
|
-
s.add_dependency "tty-table", "~> 0.11
|
41
|
+
s.add_dependency "tty-table", "~> 0.11" # knife render table output.
|
42
42
|
s.add_dependency "pastel" # knife ui.color
|
43
43
|
s.add_dependency "erubis", "~> 2.7"
|
44
44
|
s.add_dependency "diff-lcs", ">= 1.2.4", "< 1.4.0" # 1.4 breaks output
|
data/lib/chef/application.rb
CHANGED
@@ -27,7 +27,7 @@ require "mixlib/cli" unless defined?(Mixlib::CLI)
|
|
27
27
|
require "tmpdir" unless defined?(Dir.mktmpdir)
|
28
28
|
require "rbconfig" unless defined?(RbConfig)
|
29
29
|
require_relative "application/exit_code"
|
30
|
-
require "chef-utils" unless defined?(ChefUtils)
|
30
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
31
31
|
module LicenseAcceptance
|
32
32
|
autoload :Acceptor, "license_acceptance/acceptor"
|
33
33
|
end
|
@@ -172,7 +172,7 @@ class Chef
|
|
172
172
|
def configure_logging
|
173
173
|
configure_log_location
|
174
174
|
logger.init(MonoLogger.new(chef_config[:log_location][0]))
|
175
|
-
chef_config[:log_location][1
|
175
|
+
chef_config[:log_location][1..].each do |log_location|
|
176
176
|
logger.loggers << MonoLogger.new(log_location)
|
177
177
|
end
|
178
178
|
logger.level = resolve_log_level
|
@@ -21,7 +21,7 @@ require_relative "base"
|
|
21
21
|
require_relative "../handler/error_report"
|
22
22
|
require_relative "../workstation_config_loader"
|
23
23
|
autoload :URI, "uri"
|
24
|
-
require "chef-utils" unless defined?(ChefUtils)
|
24
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
25
25
|
module Mixlib
|
26
26
|
module Authentication
|
27
27
|
autoload :Log, "mixlib/authentication"
|
@@ -21,7 +21,7 @@ require_relative "../../chef"
|
|
21
21
|
require_relative "client"
|
22
22
|
require "fileutils" unless defined?(FileUtils)
|
23
23
|
require "pathname" unless defined?(Pathname)
|
24
|
-
require "chef-utils" unless defined?(ChefUtils)
|
24
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
25
25
|
|
26
26
|
# DO NOT MAKE EDITS, see Chef::Application::Base
|
27
27
|
#
|
@@ -265,7 +265,7 @@ class Chef
|
|
265
265
|
@memory_store.get(path)
|
266
266
|
|
267
267
|
elsif path[0] == "file_store" && path[1] == "repo"
|
268
|
-
entry = Chef::ChefFS::FileSystem.resolve_path(chef_fs, path[2
|
268
|
+
entry = Chef::ChefFS::FileSystem.resolve_path(chef_fs, path[2..].join("/"))
|
269
269
|
begin
|
270
270
|
entry.read
|
271
271
|
rescue Chef::ChefFS::FileSystem::NotFoundError => e
|
@@ -19,7 +19,7 @@
|
|
19
19
|
require_relative "base"
|
20
20
|
require_relative "../platform/query_helpers"
|
21
21
|
require_relative "../win32/eventlog"
|
22
|
-
require "chef-utils" unless defined?(ChefUtils)
|
22
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
23
23
|
|
24
24
|
class Chef
|
25
25
|
module EventLoggers
|
@@ -76,7 +76,7 @@ class Chef
|
|
76
76
|
# complexity here is due to supporting mangling non-UTF8 strings (e.g. latin-1 filenames with characters that are illegal in UTF-8)
|
77
77
|
b = File.basename(@new_resource.path)
|
78
78
|
i = b.index(".")
|
79
|
-
i.nil? ? "" : b[i
|
79
|
+
i.nil? ? "" : b[i..].scrub
|
80
80
|
end
|
81
81
|
|
82
82
|
# Returns the possible directories for the tempfile to be created in.
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# See the License for the specific language governing permissions and
|
17
17
|
# limitations under the License.
|
18
18
|
#
|
19
|
-
require "chef-utils" unless defined?(ChefUtils)
|
19
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
20
20
|
|
21
21
|
class Chef
|
22
22
|
module Formatters
|
@@ -20,7 +20,7 @@ class Chef
|
|
20
20
|
# pastel.decorate is a lightweight replacement for highline.color
|
21
21
|
def pastel
|
22
22
|
@pastel ||= begin
|
23
|
-
require "pastel"
|
23
|
+
require "pastel" unless defined?(Pastel)
|
24
24
|
Pastel.new
|
25
25
|
end
|
26
26
|
end
|
@@ -126,7 +126,7 @@ class Chef
|
|
126
126
|
indent_line(options)
|
127
127
|
|
128
128
|
# Note that the next line will need to be started
|
129
|
-
if line[-1
|
129
|
+
if line[-1..] == "\n"
|
130
130
|
@line_started = false
|
131
131
|
end
|
132
132
|
|
data/lib/chef/knife/core/ui.rb
CHANGED
@@ -45,7 +45,7 @@ class Chef
|
|
45
45
|
|
46
46
|
# Set policy name and group to node
|
47
47
|
def set_policy(node)
|
48
|
-
policy_group, policy_name = @name_args[1
|
48
|
+
policy_group, policy_name = @name_args[1..]
|
49
49
|
node.policy_name = policy_name
|
50
50
|
node.policy_group = policy_group
|
51
51
|
end
|
@@ -70,7 +70,7 @@ class Chef
|
|
70
70
|
|
71
71
|
# True if one of policy_name or policy_group was given, but not both
|
72
72
|
def incomplete_policyfile_options?
|
73
|
-
policy_group, policy_name = @name_args[1
|
73
|
+
policy_group, policy_name = @name_args[1..]
|
74
74
|
(policy_group.nil? || policy_name.nil? || @name_args[1..-1].size > 2)
|
75
75
|
end
|
76
76
|
|
@@ -43,7 +43,7 @@ class Chef
|
|
43
43
|
node = Chef::Node.load(@name_args[0])
|
44
44
|
if @name_args.size > 2
|
45
45
|
# Check for nested lists and create a single plain one
|
46
|
-
entries = @name_args[1
|
46
|
+
entries = @name_args[1..].map do |entry|
|
47
47
|
entry.split(",").map(&:strip)
|
48
48
|
end.flatten
|
49
49
|
else
|
data/lib/chef/knife/search.rb
CHANGED
data/lib/chef/knife/ssh.rb
CHANGED
@@ -489,7 +489,7 @@ class Chef
|
|
489
489
|
|
490
490
|
new_window_cmds = lambda do
|
491
491
|
if session.servers_for.size > 1
|
492
|
-
[""] + session.servers_for[1
|
492
|
+
[""] + session.servers_for[1..].map do |server|
|
493
493
|
if config[:tmux_split]
|
494
494
|
"split-window #{ssh_dest.call(server)}; tmux select-layout tiled"
|
495
495
|
else
|
@@ -625,7 +625,7 @@ class Chef
|
|
625
625
|
when "cssh"
|
626
626
|
cssh
|
627
627
|
else
|
628
|
-
ssh_command(@name_args[1
|
628
|
+
ssh_command(@name_args[1..].join(" "))
|
629
629
|
end
|
630
630
|
|
631
631
|
session.close
|
data/lib/chef/local_mode.rb
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
|
18
|
-
require "chef-utils" unless defined?(ChefUtils)
|
18
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
19
19
|
require_relative "config"
|
20
20
|
require_relative "monkey_patches/webrick-utils" if ChefUtils.windows?
|
21
21
|
|
data/lib/chef/mixin/template.rb
CHANGED
@@ -204,7 +204,7 @@ class Chef
|
|
204
204
|
all_ivars.delete(:@_extension_modules)
|
205
205
|
all_ivars.inject({}) do |ivar_map, ivar_symbol_name|
|
206
206
|
value = instance_variable_get(ivar_symbol_name)
|
207
|
-
name_without_at = ivar_symbol_name.to_s[1
|
207
|
+
name_without_at = ivar_symbol_name.to_s[1..].to_sym
|
208
208
|
ivar_map[name_without_at] = value
|
209
209
|
ivar_map
|
210
210
|
end
|
data/lib/chef/mixin/uris.rb
CHANGED
data/lib/chef/node_map.rb
CHANGED
@@ -225,13 +225,13 @@ class Chef
|
|
225
225
|
|
226
226
|
if attribute == :platform_family
|
227
227
|
# If any blocklist value matches, we don't match
|
228
|
-
return false if blocklist.any? { |v| v[1
|
228
|
+
return false if blocklist.any? { |v| v[1..] == value || platform_family_query_helper?(node, v[1..]) }
|
229
229
|
|
230
230
|
# If the allowlist is empty, or anything matches, we match.
|
231
231
|
allowlist.empty? || allowlist.any? { |v| v == :all || v == value || platform_family_query_helper?(node, v) }
|
232
232
|
else
|
233
233
|
# If any blocklist value matches, we don't match
|
234
|
-
return false if blocklist.any? { |v| v[1
|
234
|
+
return false if blocklist.any? { |v| v[1..] == value }
|
235
235
|
|
236
236
|
# If the allowlist is empty, or anything matches, we match.
|
237
237
|
allowlist.empty? || allowlist.any? { |v| v == :all || v == value }
|
data/lib/chef/provider.rb
CHANGED
@@ -88,7 +88,7 @@ class Chef
|
|
88
88
|
def self.use(partial)
|
89
89
|
dirname = ::File.dirname(partial)
|
90
90
|
basename = ::File.basename(partial, ".rb")
|
91
|
-
basename = basename[1
|
91
|
+
basename = basename[1..] if basename.start_with?("_")
|
92
92
|
class_eval IO.read(::File.expand_path("#{dirname}/_#{basename}.rb", ::File.dirname(caller_locations.first.absolute_path)))
|
93
93
|
end
|
94
94
|
|
data/lib/chef/provider/file.rb
CHANGED
@@ -31,7 +31,7 @@ require_relative "../util/backup"
|
|
31
31
|
require_relative "../util/diff"
|
32
32
|
require_relative "../util/selinux"
|
33
33
|
require_relative "../file_content_management/deploy"
|
34
|
-
require "chef-utils" unless defined?(ChefUtils)
|
34
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
35
35
|
|
36
36
|
# The Tao of File Providers:
|
37
37
|
# - the content provider must always return a tempfile that we can delete/mv
|
data/lib/chef/provider/link.rb
CHANGED
@@ -33,15 +33,6 @@ class Chef
|
|
33
33
|
include Chef::Mixin::EnforceOwnershipAndPermissions
|
34
34
|
include Chef::Mixin::FileClass
|
35
35
|
|
36
|
-
def negative_complement(big)
|
37
|
-
if big > 1073741823 # Fixnum max
|
38
|
-
big -= (2**32) # diminished radix wrap to negative
|
39
|
-
end
|
40
|
-
big
|
41
|
-
end
|
42
|
-
|
43
|
-
private :negative_complement
|
44
|
-
|
45
36
|
def load_current_resource
|
46
37
|
@current_resource = Chef::Resource::Link.new(new_resource.name)
|
47
38
|
current_resource.target_file(new_resource.target_file)
|
@@ -164,10 +164,7 @@ class Chef
|
|
164
164
|
#
|
165
165
|
# @return [Hash] Mapping of package names to sources
|
166
166
|
def name_sources
|
167
|
-
@name_sources
|
168
|
-
begin
|
169
|
-
Hash[*package_name_array.zip(resolved_source_array).flatten]
|
170
|
-
end
|
167
|
+
@name_sources ||= Hash[*package_name_array.zip(resolved_source_array).flatten]
|
171
168
|
end
|
172
169
|
|
173
170
|
# Helper to construct Hash of names-to-package-information.
|
@@ -186,17 +183,11 @@ class Chef
|
|
186
183
|
end
|
187
184
|
|
188
185
|
def name_candidate_version
|
189
|
-
@name_candidate_version ||=
|
190
|
-
begin
|
191
|
-
Hash[name_pkginfo.map { |k, v| [k, v ? v.split("\t")[1].strip : nil] }]
|
192
|
-
end
|
186
|
+
@name_candidate_version ||= name_pkginfo.transform_values { |v| v ? v.split("\t")[1]&.strip : nil }
|
193
187
|
end
|
194
188
|
|
195
189
|
def name_package_name
|
196
|
-
@name_package_name ||=
|
197
|
-
begin
|
198
|
-
Hash[name_pkginfo.map { |k, v| [k, v ? v.split("\t")[0] : nil] }]
|
199
|
-
end
|
190
|
+
@name_package_name ||= name_pkginfo.transform_values { |v| v ? v.split("\t")[0] : nil }
|
200
191
|
end
|
201
192
|
|
202
193
|
# Return candidate version array from pkg-deb -W against the source file(s).
|
@@ -127,7 +127,7 @@ class Chef
|
|
127
127
|
|
128
128
|
# check each item in the hash to see if we were passed an alias
|
129
129
|
brew_info.each_value do |p|
|
130
|
-
return p if p["aliases"].include?(package_name)
|
130
|
+
return p if p["full_name"] == package_name || p["aliases"].include?(package_name)
|
131
131
|
end
|
132
132
|
|
133
133
|
{}
|
@@ -84,7 +84,7 @@ class Chef
|
|
84
84
|
chkconfig = shell_out!("/sbin/chkconfig --list #{current_resource.service_name}", returns: [0, 1])
|
85
85
|
unless run_levels.nil? || run_levels.empty?
|
86
86
|
all_levels_match = true
|
87
|
-
chkconfig.stdout.split(/\s+/)[1
|
87
|
+
chkconfig.stdout.split(/\s+/)[1..].each do |level|
|
88
88
|
index = level.split(":").first
|
89
89
|
status = level.split(":").last
|
90
90
|
if CHKCONFIG_ON.match?(level)
|
@@ -584,7 +584,7 @@ in 'password', with the associated 'salt' and 'iterations'.")
|
|
584
584
|
#
|
585
585
|
|
586
586
|
def run_dscl(*args)
|
587
|
-
result = shell_out("dscl", ".", "-#{args[0]}", args[1
|
587
|
+
result = shell_out("dscl", ".", "-#{args[0]}", args[1..])
|
588
588
|
return "" if ( args.first =~ /^delete/ ) && ( result.exitstatus != 0 )
|
589
589
|
raise(Chef::Exceptions::DsclCommandFailed, "dscl error: #{result.inspect}") unless result.exitstatus == 0
|
590
590
|
raise(Chef::Exceptions::DsclCommandFailed, "dscl error: #{result.inspect}") if result.stdout.include?("No such key: ")
|
@@ -593,7 +593,7 @@ in 'password', with the associated 'salt' and 'iterations'.")
|
|
593
593
|
end
|
594
594
|
|
595
595
|
def run_plutil(*args)
|
596
|
-
result = shell_out("plutil", "-#{args[0]}", args[1
|
596
|
+
result = shell_out("plutil", "-#{args[0]}", args[1..])
|
597
597
|
raise(Chef::Exceptions::PlistUtilCommandFailed, "plutil error: #{result.inspect}") unless result.exitstatus == 0
|
598
598
|
|
599
599
|
if result.stdout.encoding == Encoding::ASCII_8BIT
|
@@ -608,7 +608,7 @@ class Chef
|
|
608
608
|
end
|
609
609
|
|
610
610
|
def run_dscl(*args)
|
611
|
-
result = shell_out("dscl", "-plist", ".", "-#{args[0]}", args[1
|
611
|
+
result = shell_out("dscl", "-plist", ".", "-#{args[0]}", args[1..])
|
612
612
|
return "" if ( args.first =~ /^delete/ ) && ( result.exitstatus != 0 )
|
613
613
|
raise(Chef::Exceptions::DsclCommandFailed, "dscl error: #{result.inspect}") unless result.exitstatus == 0
|
614
614
|
raise(Chef::Exceptions::DsclCommandFailed, "dscl error: #{result.inspect}") if /No such key: /.match?(result.stdout)
|
@@ -617,7 +617,7 @@ class Chef
|
|
617
617
|
end
|
618
618
|
|
619
619
|
def run_plutil(*args)
|
620
|
-
result = shell_out("plutil", "-#{args[0]}", args[1
|
620
|
+
result = shell_out("plutil", "-#{args[0]}", args[1..])
|
621
621
|
raise(Chef::Exceptions::PlistUtilCommandFailed, "plutil error: #{result.inspect}") unless result.exitstatus == 0
|
622
622
|
|
623
623
|
result.stdout
|
data/lib/chef/resource.rb
CHANGED
@@ -1480,7 +1480,7 @@ class Chef
|
|
1480
1480
|
def self.use(partial)
|
1481
1481
|
dirname = ::File.dirname(partial)
|
1482
1482
|
basename = ::File.basename(partial, ".rb")
|
1483
|
-
basename = basename[1
|
1483
|
+
basename = basename[1..] if basename.start_with?("_")
|
1484
1484
|
class_eval IO.read(::File.expand_path("#{dirname}/_#{basename}.rb", ::File.dirname(caller_locations.first.absolute_path)))
|
1485
1485
|
end
|
1486
1486
|
|
@@ -19,7 +19,9 @@
|
|
19
19
|
require_relative "../resource"
|
20
20
|
require_relative "../http/simple"
|
21
21
|
require "tmpdir" unless defined?(Dir.mktmpdir)
|
22
|
-
|
22
|
+
module Addressable
|
23
|
+
autoload :URI, "addressable/uri"
|
24
|
+
end
|
23
25
|
|
24
26
|
class Chef
|
25
27
|
class Resource
|
@@ -168,7 +170,7 @@ class Chef
|
|
168
170
|
# is the provided ID a key ID from a keyserver. Looks at length and HEX only values
|
169
171
|
# @param [String] id the key value passed by the user that *may* be an ID
|
170
172
|
def is_key_id?(id)
|
171
|
-
id = id[2
|
173
|
+
id = id[2..] if id.start_with?("0x")
|
172
174
|
id =~ /^\h+$/ && [8, 16, 40].include?(id.length)
|
173
175
|
end
|
174
176
|
|
@@ -102,6 +102,7 @@ class Chef
|
|
102
102
|
|
103
103
|
This recipe will generate report output similar to the following:
|
104
104
|
|
105
|
+
```
|
105
106
|
[2013-11-26T03:11:06+00:00] INFO: Chef Infra Client Run complete in 0.300029878 seconds
|
106
107
|
[2013-11-26T03:11:06+00:00] INFO: Running report handlers
|
107
108
|
[2013-11-26T03:11:06+00:00] INFO: Cookbooks and versions run: ["cookbook_versions_handler 1.0.0"]
|
data/lib/chef/resource/file.rb
CHANGED
@@ -22,7 +22,7 @@ require_relative "../platform/query_helpers"
|
|
22
22
|
require_relative "../mixin/securable"
|
23
23
|
require_relative "file/verification"
|
24
24
|
require "pathname" unless defined?(Pathname)
|
25
|
-
require "chef-utils" unless defined?(ChefUtils)
|
25
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
26
26
|
|
27
27
|
class Chef
|
28
28
|
class Resource
|
data/lib/chef/run_lock.rb
CHANGED
data/lib/chef/search/query.rb
CHANGED
data/lib/chef/util/backup.rb
CHANGED
@@ -36,7 +36,7 @@ class Chef
|
|
36
36
|
slice_number = @new_resource.backup
|
37
37
|
backup_files = sorted_backup_files
|
38
38
|
if backup_files.length >= @new_resource.backup
|
39
|
-
remainder = backup_files.slice(slice_number
|
39
|
+
remainder = backup_files.slice(slice_number..)
|
40
40
|
remainder.each do |backup_to_delete|
|
41
41
|
delete_backup(backup_to_delete)
|
42
42
|
end
|
data/lib/chef/version.rb
CHANGED
data/lib/chef/win32/file.rb
CHANGED
@@ -124,7 +124,7 @@ class Chef
|
|
124
124
|
# Return the link destination (strip off \??\ at the beginning, which is a local filesystem thing)
|
125
125
|
link_dest = reparse_buffer.reparse_buffer.substitute_name
|
126
126
|
if /^\\\?\?\\/.match?(link_dest)
|
127
|
-
link_dest = link_dest[4
|
127
|
+
link_dest = link_dest[4..]
|
128
128
|
end
|
129
129
|
link_dest
|
130
130
|
end
|
data/lib/chef/win32/unicode.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -68,7 +68,7 @@ end
|
|
68
68
|
|
69
69
|
# If you want to load anything into the testing environment
|
70
70
|
# without versioning it, add it to spec/support/local_gems.rb
|
71
|
-
require "spec/support/local_gems
|
71
|
+
require "spec/support/local_gems" if File.exist?(File.join(File.dirname(__FILE__), "support", "local_gems.rb"))
|
72
72
|
|
73
73
|
# Explicitly require spec helpers that need to load first
|
74
74
|
require "spec/support/platform_helpers"
|
@@ -309,8 +309,6 @@ RSpec.configure do |config|
|
|
309
309
|
end
|
310
310
|
|
311
311
|
require "webrick/utils"
|
312
|
-
require "thread"
|
313
|
-
|
314
312
|
# Webrick uses a centralized/synchronized timeout manager. It works by
|
315
313
|
# starting a thread to check for timeouts on an interval. The timeout
|
316
314
|
# checker thread cannot be stopped or canceled in any easy way, and it
|
@@ -26,10 +26,6 @@ require "socket"
|
|
26
26
|
# actually running -- another testing requirement similar to the integration testing framework in cheffish as well)
|
27
27
|
#
|
28
28
|
describe Chef::DataCollector do
|
29
|
-
before(:each) do
|
30
|
-
Chef::Config[:enable_reporting] = true
|
31
|
-
end
|
32
|
-
|
33
29
|
let(:node) { Chef::Node.new }
|
34
30
|
|
35
31
|
let(:rest_client) { double("Chef::ServerAPI (mock)") }
|
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: 16.5.
|
4
|
+
version: 16.5.77
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-28 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: 16.5.
|
19
|
+
version: 16.5.77
|
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: 16.5.
|
26
|
+
version: 16.5.77
|
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: 16.5.
|
33
|
+
version: 16.5.77
|
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: 16.5.
|
40
|
+
version: 16.5.77
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -376,14 +376,14 @@ dependencies:
|
|
376
376
|
requirements:
|
377
377
|
- - "~>"
|
378
378
|
- !ruby/object:Gem::Version
|
379
|
-
version: 0.11
|
379
|
+
version: '0.11'
|
380
380
|
type: :runtime
|
381
381
|
prerelease: false
|
382
382
|
version_requirements: !ruby/object:Gem::Requirement
|
383
383
|
requirements:
|
384
384
|
- - "~>"
|
385
385
|
- !ruby/object:Gem::Version
|
386
|
-
version: 0.11
|
386
|
+
version: '0.11'
|
387
387
|
- !ruby/object:Gem::Dependency
|
388
388
|
name: pastel
|
389
389
|
requirement: !ruby/object:Gem::Requirement
|