chef 12.16.42 → 12.17.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/README.md +20 -5
- data/Rakefile +17 -0
- data/VERSION +1 -1
- data/acceptance/Gemfile.lock +32 -23
- data/distro/common/markdown/man1/knife-configure.mkd +3 -2
- data/lib-backcompat/chef/chef_fs/file_system/already_exists_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/cookbook_frozen_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/default_environment_cannot_be_modified_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/file_system_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/must_delete_recursively_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/not_found_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/operation_failed_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/operation_not_allowed_error.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_entry.rb +1 -1
- data/lib-backcompat/chef/chef_fs/file_system/repository/file_system_root_dir.rb +1 -1
- data/lib/chef/api_client.rb +1 -1
- data/lib/chef/application.rb +1 -1
- data/lib/chef/application/exit_code.rb +3 -3
- data/lib/chef/chef_class.rb +15 -5
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +12 -1
- data/lib/chef/chef_fs/file_system/repository/nodes_dir.rb +19 -0
- data/lib/chef/client.rb +1 -0
- data/lib/chef/cookbook/metadata.rb +2 -2
- data/lib/chef/cookbook_version.rb +4 -4
- data/lib/chef/data_bag.rb +1 -1
- data/lib/chef/data_bag_item.rb +1 -1
- data/lib/chef/data_collector.rb +20 -13
- data/lib/chef/data_collector/messages.rb +0 -1
- data/lib/chef/data_collector/messages/helpers.rb +2 -2
- data/lib/chef/decorator/unchain.rb +2 -2
- data/lib/chef/deprecated.rb +190 -0
- data/lib/chef/deprecation/provider/remote_directory.rb +1 -1
- data/lib/chef/deprecation/warnings.rb +3 -4
- data/lib/chef/dsl/method_missing.rb +2 -2
- data/lib/chef/dsl/resources.rb +2 -2
- data/lib/chef/environment.rb +1 -1
- data/lib/chef/exceptions.rb +1 -1
- data/lib/chef/formatters/base.rb +11 -1
- data/lib/chef/formatters/doc.rb +13 -4
- data/lib/chef/key.rb +1 -1
- data/lib/chef/knife/client_delete.rb +12 -9
- data/lib/chef/knife/configure.rb +1 -1
- data/lib/chef/knife/core/bootstrap_context.rb +25 -1
- data/lib/chef/knife/core/subcommand_loader.rb +3 -3
- data/lib/chef/knife/core/ui.rb +1 -1
- data/lib/chef/knife/node_delete.rb +6 -6
- data/lib/chef/log.rb +1 -1
- data/lib/chef/mixin/deprecation.rb +4 -10
- data/lib/chef/mixin/powershell_type_coercions.rb +19 -19
- data/lib/chef/mixin/shell_out.rb +1 -1
- data/lib/chef/node.rb +2 -2
- data/lib/chef/node/attribute.rb +3 -4
- data/lib/chef/node/common_api.rb +1 -1
- data/lib/chef/node/mixin/state_tracking.rb +5 -2
- data/lib/chef/node_map.rb +2 -2
- data/lib/chef/org.rb +1 -1
- data/lib/chef/platform/rebooter.rb +3 -1
- data/lib/chef/policy_builder/expand_node_object.rb +1 -1
- data/lib/chef/property.rb +5 -5
- data/lib/chef/provider.rb +4 -4
- data/lib/chef/provider/launchd.rb +1 -1
- data/lib/chef/provider/link.rb +6 -0
- data/lib/chef/provider/mount.rb +2 -0
- data/lib/chef/provider/mount/mount.rb +1 -1
- data/lib/chef/provider/ohai.rb +5 -3
- data/lib/chef/provider/package/cab.rb +1 -1
- data/lib/chef/provider/package/chocolatey.rb +2 -2
- data/lib/chef/provider/package/easy_install.rb +2 -2
- data/lib/chef/provider/package/msu.rb +162 -0
- data/lib/chef/provider/package/powershell.rb +114 -0
- data/lib/chef/provider/package/yum.rb +1 -1
- data/lib/chef/provider/yum_repository.rb +6 -7
- data/lib/chef/provider_resolver.rb +2 -2
- data/lib/chef/providers.rb +2 -0
- data/lib/chef/resource.rb +3 -5
- data/lib/chef/resource/apt_update.rb +1 -1
- data/lib/chef/resource/chef_gem.rb +2 -3
- data/lib/chef/resource/file/verification.rb +1 -1
- data/lib/chef/resource/launchd.rb +48 -8
- data/lib/chef/resource/mount.rb +1 -1
- data/lib/chef/resource/msu_package.rb +47 -0
- data/lib/chef/resource/ohai.rb +5 -25
- data/lib/chef/resource/powershell_package.rb +41 -0
- data/lib/chef/resource/reboot.rb +1 -1
- data/lib/chef/resource/user.rb +2 -2
- data/lib/chef/resource_builder.rb +4 -4
- data/lib/chef/resource_resolver.rb +2 -3
- data/lib/chef/resources.rb +2 -0
- data/lib/chef/rest.rb +1 -1
- data/lib/chef/role.rb +1 -1
- data/lib/chef/run_context.rb +3 -3
- data/lib/chef/shell/ext.rb +2 -2
- data/lib/chef/user.rb +3 -3
- data/lib/chef/user_v1.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/api/security.rb +12 -12
- data/spec/data/sample_msu1.xml +10 -0
- data/spec/data/sample_msu2.xml +14 -0
- data/spec/data/sample_msu3.xml +16 -0
- data/spec/functional/rebooter_spec.rb +3 -3
- data/spec/functional/resource/link_spec.rb +62 -1
- data/spec/functional/resource/msu_package_spec.rb +84 -0
- data/spec/functional/resource/registry_spec.rb +3 -3
- data/spec/functional/resource/rpm_spec.rb +7 -10
- data/spec/integration/solo/solo_spec.rb +50 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/platform_helpers.rb +16 -8
- data/spec/unit/application/exit_code_spec.rb +3 -15
- data/spec/unit/data_collector_spec.rb +6 -16
- data/spec/unit/deprecated_spec.rb +59 -0
- data/spec/unit/deprecation_spec.rb +1 -8
- data/spec/unit/handler_spec.rb +2 -2
- data/spec/unit/knife/client_delete_spec.rb +16 -0
- data/spec/unit/knife/configure_spec.rb +1 -1
- data/spec/unit/knife/cookbook_metadata_spec.rb +116 -113
- data/spec/unit/knife/core/bootstrap_context_spec.rb +55 -5
- data/spec/unit/knife/node_delete_spec.rb +19 -10
- data/spec/unit/mixin/shell_out_spec.rb +0 -1
- data/spec/unit/node/immutable_collections_spec.rb +5 -0
- data/spec/unit/node/vivid_mash_spec.rb +11 -0
- data/spec/unit/node_spec.rb +2 -2
- data/spec/unit/provider/launchd_spec.rb +81 -3
- data/spec/unit/provider/mount/mount_spec.rb +1 -1
- data/spec/unit/provider/mount_spec.rb +7 -0
- data/spec/unit/provider/package/chocolatey_spec.rb +5 -5
- data/spec/unit/provider/package/easy_install_spec.rb +6 -6
- data/spec/unit/provider/package/msu_spec.rb +283 -0
- data/spec/unit/provider/package/powershell_spec.rb +337 -0
- data/spec/unit/provider/service/macosx_spec.rb +1 -1
- data/spec/unit/provider/subversion_spec.rb +9 -0
- data/spec/unit/provider/user/linux_spec.rb +7 -1
- data/spec/unit/recipe_spec.rb +43 -11
- data/spec/unit/resource/apt_update_spec.rb +17 -25
- data/spec/unit/resource/file/verification_spec.rb +1 -1
- data/spec/unit/resource/mount_spec.rb +2 -1
- data/spec/unit/resource/msu_package_spec.rb +49 -0
- data/spec/unit/resource/ohai_spec.rb +1 -1
- data/spec/unit/resource/powershell_package_spec.rb +68 -0
- data/spec/unit/resource_reporter_spec.rb +4 -4
- data/spec/unit/run_status_spec.rb +1 -1
- data/tasks/announce.rb +58 -0
- data/tasks/changelog.rb +26 -6
- data/tasks/templates/prerelease.md.erb +35 -0
- data/tasks/templates/release.md.erb +34 -0
- metadata +21 -4
@@ -20,6 +20,7 @@
|
|
20
20
|
require "chef/chef_fs/file_system/repository/node"
|
21
21
|
require "chef/chef_fs/file_system/repository/directory"
|
22
22
|
require "chef/chef_fs/file_system/exceptions"
|
23
|
+
require "chef/win32/security" if Chef::Platform.windows?
|
23
24
|
|
24
25
|
class Chef
|
25
26
|
module ChefFS
|
@@ -30,6 +31,24 @@ class Chef
|
|
30
31
|
def make_child_entry(child_name)
|
31
32
|
Node.new(child_name, self)
|
32
33
|
end
|
34
|
+
|
35
|
+
def create_child(child_name, file_contents = nil)
|
36
|
+
child = super
|
37
|
+
File.chmod(0600, child.file_path)
|
38
|
+
if Chef::Platform.windows?
|
39
|
+
read_mask = Chef::ReservedNames::Win32::API::Security::GENERIC_READ
|
40
|
+
write_mask = Chef::ReservedNames::Win32::API::Security::GENERIC_WRITE
|
41
|
+
owner = Chef::ReservedNames::Win32::Security::SID.current_user
|
42
|
+
dacl = Chef::ReservedNames::Win32::Security::ACL.create([
|
43
|
+
Chef::ReservedNames::Win32::Security::ACE.access_allowed(owner, read_mask),
|
44
|
+
Chef::ReservedNames::Win32::Security::ACE.access_allowed(owner, write_mask),
|
45
|
+
])
|
46
|
+
so = Chef::ReservedNames::Win32::Security::SecurableObject.new(child.file_path)
|
47
|
+
so.owner = owner
|
48
|
+
so.set_dacl(dacl, false)
|
49
|
+
end
|
50
|
+
child
|
51
|
+
end
|
33
52
|
end
|
34
53
|
end
|
35
54
|
end
|
data/lib/chef/client.rb
CHANGED
@@ -641,8 +641,8 @@ class Chef
|
|
641
641
|
VERSION_CONSTRAINTS.each do |dependency_type, hash_key|
|
642
642
|
if dependency_group = o[hash_key]
|
643
643
|
dependency_group.each do |cb_name, constraints|
|
644
|
-
if metadata.respond_to?(
|
645
|
-
metadata.public_send(
|
644
|
+
if metadata.respond_to?(dependency_type)
|
645
|
+
metadata.public_send(dependency_type, cb_name, *Array(constraints))
|
646
646
|
end
|
647
647
|
end
|
648
648
|
end
|
@@ -54,12 +54,12 @@ class Chef
|
|
54
54
|
attr_accessor :metadata_filenames
|
55
55
|
|
56
56
|
def status=(new_status)
|
57
|
-
Chef.
|
57
|
+
Chef.deprecated(:internal_api, "Deprecated method `status' called. This method will be removed.")
|
58
58
|
@status = new_status
|
59
59
|
end
|
60
60
|
|
61
61
|
def status
|
62
|
-
Chef.
|
62
|
+
Chef.deprecated(:internal_api, "Deprecated method `status' called. This method will be removed.")
|
63
63
|
@status
|
64
64
|
end
|
65
65
|
|
@@ -485,7 +485,7 @@ class Chef
|
|
485
485
|
end
|
486
486
|
|
487
487
|
def self.json_create(o)
|
488
|
-
Chef.
|
488
|
+
Chef.deprecated(:json_auto_inflate, "Auto inflation of JSON data is deprecated. Please use Chef::CookbookVersion#from_hash")
|
489
489
|
from_hash(o)
|
490
490
|
end
|
491
491
|
|
@@ -496,7 +496,7 @@ class Chef
|
|
496
496
|
# @deprecated This method was used by the Ruby Chef Server and is no longer
|
497
497
|
# needed. There is no replacement.
|
498
498
|
def generate_manifest_with_urls
|
499
|
-
Chef.
|
499
|
+
Chef.deprecated(:internal_api, "Deprecated method #generate_manifest_with_urls.")
|
500
500
|
|
501
501
|
rendered_manifest = manifest.dup
|
502
502
|
COOKBOOK_SEGMENTS.each do |segment|
|
data/lib/chef/data_bag.rb
CHANGED
@@ -80,7 +80,7 @@ class Chef
|
|
80
80
|
|
81
81
|
# Create a Chef::Role from JSON
|
82
82
|
def self.json_create(o)
|
83
|
-
Chef.
|
83
|
+
Chef.deprecated(:json_auto_inflate, "Auto inflation of JSON data is deprecated. Please use Chef::DataBag#from_hash")
|
84
84
|
from_hash(o)
|
85
85
|
end
|
86
86
|
|
data/lib/chef/data_bag_item.rb
CHANGED
@@ -141,7 +141,7 @@ class Chef
|
|
141
141
|
|
142
142
|
# Create a Chef::DataBagItem from JSON
|
143
143
|
def self.json_create(o)
|
144
|
-
Chef.
|
144
|
+
Chef.deprecated(:json_auto_inflate, "Auto inflation of JSON data is deprecated. Please use Chef::DataBagItem#from_hash")
|
145
145
|
from_hash(o)
|
146
146
|
end
|
147
147
|
|
data/lib/chef/data_collector.rb
CHANGED
@@ -174,12 +174,13 @@ class Chef
|
|
174
174
|
# resource, and we only care about tracking top-level resources.
|
175
175
|
def resource_current_state_loaded(new_resource, action, current_resource)
|
176
176
|
return if nested_resource?(new_resource)
|
177
|
-
|
177
|
+
initialize_resource_report_if_needed(new_resource, action, current_resource)
|
178
178
|
end
|
179
179
|
|
180
180
|
# see EventDispatch::Base#resource_up_to_date
|
181
181
|
# Mark our ResourceReport status accordingly
|
182
182
|
def resource_up_to_date(new_resource, action)
|
183
|
+
initialize_resource_report_if_needed(new_resource, action)
|
183
184
|
current_resource_report.up_to_date unless nested_resource?(new_resource)
|
184
185
|
end
|
185
186
|
|
@@ -190,15 +191,15 @@ class Chef
|
|
190
191
|
def resource_skipped(new_resource, action, conditional)
|
191
192
|
return if nested_resource?(new_resource)
|
192
193
|
|
193
|
-
|
194
|
-
|
195
|
-
update_current_resource_report(resource_report)
|
194
|
+
initialize_resource_report_if_needed(new_resource, action)
|
195
|
+
current_resource_report.skipped(conditional)
|
196
196
|
end
|
197
197
|
|
198
198
|
# see EventDispatch::Base#resource_updated
|
199
199
|
# Flag the current ResourceReport instance as updated (as long as it's
|
200
200
|
# a top-level resource).
|
201
201
|
def resource_updated(new_resource, action)
|
202
|
+
initialize_resource_report_if_needed(new_resource, action)
|
202
203
|
current_resource_report.updated unless nested_resource?(new_resource)
|
203
204
|
end
|
204
205
|
|
@@ -207,6 +208,7 @@ class Chef
|
|
207
208
|
# long as it's a top-level resource, and update the run error text
|
208
209
|
# with the proper Formatter.
|
209
210
|
def resource_failed(new_resource, action, exception)
|
211
|
+
initialize_resource_report_if_needed(new_resource, action)
|
210
212
|
current_resource_report.failed(exception) unless nested_resource?(new_resource)
|
211
213
|
update_error_description(
|
212
214
|
Formatters::ErrorMapper.resource_failed(
|
@@ -224,7 +226,7 @@ class Chef
|
|
224
226
|
if current_resource_report && !nested_resource?(new_resource)
|
225
227
|
current_resource_report.finish
|
226
228
|
add_resource_report(current_resource_report)
|
227
|
-
|
229
|
+
clear_current_resource_report
|
228
230
|
end
|
229
231
|
end
|
230
232
|
|
@@ -274,7 +276,7 @@ class Chef
|
|
274
276
|
# see EventDispatch::Base#deprecation
|
275
277
|
# Append a received deprecation to the list of deprecations
|
276
278
|
def deprecation(message, location = caller(2..2)[0])
|
277
|
-
add_deprecation(message, location)
|
279
|
+
add_deprecation(message.message, message.url, location)
|
278
280
|
end
|
279
281
|
|
280
282
|
private
|
@@ -331,7 +333,7 @@ class Chef
|
|
331
333
|
def send_to_data_collector(message)
|
332
334
|
return unless data_collector_accessible?
|
333
335
|
|
334
|
-
Chef::Log.debug("data_collector_reporter: POSTing the following message to #{data_collector_server_url}: #{message}")
|
336
|
+
Chef::Log.debug("data_collector_reporter: POSTing the following message to #{data_collector_server_url}: #{Chef::JSONCompat.to_json(message)}")
|
335
337
|
http.post(nil, message, headers)
|
336
338
|
end
|
337
339
|
|
@@ -402,16 +404,17 @@ class Chef
|
|
402
404
|
@run_status = run_status
|
403
405
|
end
|
404
406
|
|
405
|
-
def update_current_resource_report(resource_report)
|
406
|
-
@current_resource_report = resource_report
|
407
|
-
end
|
408
|
-
|
409
407
|
def update_error_description(discription_hash)
|
410
408
|
@error_descriptions = discription_hash
|
411
409
|
end
|
412
410
|
|
413
|
-
def add_deprecation(message, location)
|
414
|
-
@deprecations << { message: message, location: location }
|
411
|
+
def add_deprecation(message, url, location)
|
412
|
+
@deprecations << { message: message, url: url, location: location }
|
413
|
+
end
|
414
|
+
|
415
|
+
def initialize_resource_report_if_needed(new_resource, action, current_resource = nil)
|
416
|
+
return unless current_resource_report.nil?
|
417
|
+
@current_resource_report = create_resource_report(new_resource, action, current_resource)
|
415
418
|
end
|
416
419
|
|
417
420
|
def create_resource_report(new_resource, action, current_resource = nil)
|
@@ -422,6 +425,10 @@ class Chef
|
|
422
425
|
)
|
423
426
|
end
|
424
427
|
|
428
|
+
def clear_current_resource_report
|
429
|
+
@current_resource_report = nil
|
430
|
+
end
|
431
|
+
|
425
432
|
def detect_unprocessed_resources
|
426
433
|
# create a Set containing all resource+action combinations from
|
427
434
|
# the Resource Collection
|
@@ -142,14 +142,14 @@ class Chef
|
|
142
142
|
# @return [Hash] DataCollector metadata for this node
|
143
143
|
#
|
144
144
|
def metadata
|
145
|
-
|
145
|
+
Chef::JSONCompat.parse(Chef::FileCache.load(metadata_filename))
|
146
146
|
rescue Chef::Exceptions::FileNotFound
|
147
147
|
{}
|
148
148
|
end
|
149
149
|
|
150
150
|
def update_metadata(key, value)
|
151
151
|
updated_metadata = metadata.tap { |x| x[key] = value }
|
152
|
-
Chef::FileCache.store(metadata_filename,
|
152
|
+
Chef::FileCache.store(metadata_filename, Chef::JSONCompat.to_json(updated_metadata), 0644)
|
153
153
|
end
|
154
154
|
|
155
155
|
def metadata_filename
|
@@ -44,10 +44,10 @@ class Chef
|
|
44
44
|
if symbol == :to_ary
|
45
45
|
merged_attributes.send(symbol, *args)
|
46
46
|
elsif args.empty?
|
47
|
-
Chef.
|
47
|
+
Chef.deprecated :attributes, %q{method access to node attributes (node.foo.bar) is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]["bar"])}
|
48
48
|
self[symbol]
|
49
49
|
elsif symbol.to_s =~ /=$/
|
50
|
-
Chef.
|
50
|
+
Chef.deprecated :attributes, %q{method setting of node attributes (node.foo="bar") is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]="bar")}
|
51
51
|
key_to_set = symbol.to_s[/^(.+)=$/, 1]
|
52
52
|
self[key_to_set] = (args.length == 1 ? args[0] : args)
|
53
53
|
else
|
@@ -0,0 +1,190 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright:: Copyright 2016 Chef Software, Inc.
|
3
|
+
# License:: Apache License, Version 2.0
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
|
18
|
+
require "chef/mixin/convert_to_class_name"
|
19
|
+
|
20
|
+
# Structured deprecations have a unique URL associated with them, which must exist before the deprecation is merged.
|
21
|
+
class Chef
|
22
|
+
class Deprecated
|
23
|
+
|
24
|
+
class << self
|
25
|
+
include Chef::Mixin::ConvertToClassName
|
26
|
+
|
27
|
+
def create(type, message = nil, location = nil)
|
28
|
+
Chef::Deprecated.const_get(convert_to_class_name(type.to_s)).send(:new, message, location)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class Base
|
33
|
+
BASE_URL = "https://docs.chef.io/deprecations_"
|
34
|
+
|
35
|
+
attr_accessor :message, :location
|
36
|
+
|
37
|
+
def initialize(msg = nil, location = nil)
|
38
|
+
@message = msg if msg
|
39
|
+
@location = location if location
|
40
|
+
end
|
41
|
+
|
42
|
+
def link
|
43
|
+
"Please see #{url} for further details and information on how to correct this problem."
|
44
|
+
end
|
45
|
+
|
46
|
+
def url
|
47
|
+
"#{BASE_URL}#{target}"
|
48
|
+
end
|
49
|
+
|
50
|
+
# We know that the only time this gets called is by Chef::Log.deprecation,
|
51
|
+
# so special case
|
52
|
+
def <<(location)
|
53
|
+
@location = location
|
54
|
+
end
|
55
|
+
|
56
|
+
def inspect
|
57
|
+
"#{message} (CHEF-#{id})#{location}.\n#{link}"
|
58
|
+
end
|
59
|
+
|
60
|
+
def id
|
61
|
+
raise NotImplementedError, "subclasses of Chef::Deprecated::Base should define #id with a unique number"
|
62
|
+
end
|
63
|
+
|
64
|
+
def target
|
65
|
+
raise NotImplementedError, "subclasses of Chef::Deprecated::Base should define #target"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
class JsonAutoInflate < Base
|
70
|
+
def id
|
71
|
+
1
|
72
|
+
end
|
73
|
+
|
74
|
+
def target
|
75
|
+
"json_auto_inflate.html"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
class ExitCode < Base
|
80
|
+
def id
|
81
|
+
2
|
82
|
+
end
|
83
|
+
|
84
|
+
def target
|
85
|
+
"exit_code.html"
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
class ChefGemCompileTime < Base
|
90
|
+
def id
|
91
|
+
3
|
92
|
+
end
|
93
|
+
|
94
|
+
def target
|
95
|
+
"chef_gem_compile_time.html"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
class Attributes < Base
|
100
|
+
def id
|
101
|
+
4
|
102
|
+
end
|
103
|
+
|
104
|
+
def target
|
105
|
+
"attributes.html"
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
class CustomResource < Base
|
110
|
+
def id
|
111
|
+
5
|
112
|
+
end
|
113
|
+
|
114
|
+
def target
|
115
|
+
"custom_resource_cleanups.html"
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
class EasyInstall < Base
|
120
|
+
def id
|
121
|
+
6
|
122
|
+
end
|
123
|
+
|
124
|
+
def target
|
125
|
+
"easy_install.html"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
class VerifyFile < Base
|
130
|
+
def id
|
131
|
+
7
|
132
|
+
end
|
133
|
+
|
134
|
+
def target
|
135
|
+
"verify_file.html"
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
class SupportsProperty < Base
|
140
|
+
def id
|
141
|
+
8
|
142
|
+
end
|
143
|
+
|
144
|
+
def target
|
145
|
+
"supports_property.html"
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
class ChefRest < Base
|
150
|
+
def id
|
151
|
+
9
|
152
|
+
end
|
153
|
+
|
154
|
+
def target
|
155
|
+
"chef_rest.html"
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
class ResourceCloning < Base
|
160
|
+
def id
|
161
|
+
3694
|
162
|
+
end
|
163
|
+
|
164
|
+
def target
|
165
|
+
"resource_cloning.html"
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
class InternalApi < Base
|
170
|
+
def id
|
171
|
+
0
|
172
|
+
end
|
173
|
+
|
174
|
+
def target
|
175
|
+
"internal_api.html"
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
class Generic < Base
|
180
|
+
def url
|
181
|
+
"https://docs.chef.io/chef_deprecations_client.html"
|
182
|
+
end
|
183
|
+
|
184
|
+
def inspect
|
185
|
+
"#{message}\nThis is a generic error message and should be updated to have a proper deprecation class. #{location}\nPlease see #{url} for an overview of Chef deprecations."
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
end
|
190
|
+
end
|
@@ -22,7 +22,7 @@ class Chef
|
|
22
22
|
module RemoteDirectory
|
23
23
|
|
24
24
|
def directory_root_in_cookbook_cache
|
25
|
-
Chef.
|
25
|
+
Chef.deprecated :internal_api, "the Chef::Provider::RemoteDirectory#directory_root_in_cookbook_cache method is deprecated"
|
26
26
|
|
27
27
|
@directory_root_in_cookbook_cache ||=
|
28
28
|
begin
|
@@ -23,10 +23,9 @@ class Chef
|
|
23
23
|
def add_deprecation_warnings_for(method_names)
|
24
24
|
method_names.each do |name|
|
25
25
|
define_method(name) do |*args|
|
26
|
-
message =
|
27
|
-
message << "
|
28
|
-
message
|
29
|
-
Chef.log_deprecation(message)
|
26
|
+
message = "Method '#{name}' of '#{self.class}' is deprecated. It will be removed in Chef 13."
|
27
|
+
message << " Please update your cookbooks accordingly."
|
28
|
+
Chef.deprecated(:internal_api, message)
|
30
29
|
super(*args)
|
31
30
|
end
|
32
31
|
end
|