diff options
author | John Keiser <john@johnkeiser.com> | 2015-05-07 09:53:35 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-05-13 13:43:15 -0700 |
commit | 27c57238f1f2fddc7d03dad818a6b7ee78cbff96 (patch) | |
tree | bba0c04ced9a410ad5363c74e3a8462ee27e3d8c /lib/chef/resource.rb | |
parent | 2032c6776587f9450ddba182867973ab5bee1b75 (diff) | |
download | chef-27c57238f1f2fddc7d03dad818a6b7ee78cbff96.tar.gz |
Deprecate dsl_name (the "DSL name for this class" is no longer meaningful).
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index d5a1876943..6030572be6 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -605,7 +605,7 @@ class Chef return "suppressed sensitive resource output" if sensitive ivars = instance_variables.map { |ivar| ivar.to_sym } - HIDDEN_IVARS text = "# Declared in #{@source_line}\n\n" - text << self.class.dsl_name + "(\"#{name}\") do\n" + text << "#{resource_name}(\"#{name}\") do\n" ivars.each do |ivar| if (value = instance_variable_get(ivar)) && !(value.respond_to?(:empty?) && value.empty?) value_string = value.respond_to?(:to_text) ? value.to_text : value.inspect @@ -821,6 +821,7 @@ class Chef # # @return [String] The DSL name of this resource. def self.dsl_name + Chef::Log.deprecation "Resource.dsl_name is deprecated and will be removed in Chef 11. Use resource.resource_name instead." if name name = self.name.split('::')[-1] convert_to_snake_case(name) |