summaryrefslogtreecommitdiff
path: root/lib/chef/resource/yum_repository.rb
diff options
context:
space:
mode:
authorAdam Leff <adam@leff.co>2016-12-02 14:51:56 -0500
committerThom May <thom@chef.io>2017-01-18 11:22:10 +0000
commit5ece8327c9d67fa13ca00cce5749a960c643b247 (patch)
tree3f1949e491b0689cead2e17a00e6f0529842445d /lib/chef/resource/yum_repository.rb
parenta70905ea932e1a5678c910c8495a344b3b0930e0 (diff)
downloadchef-5ece8327c9d67fa13ca00cce5749a960c643b247.tar.gz
Deprecate creating properties whose names are already methodsadamleff/warn-on-dangerous-property-names
When creating a resource, a user can create a property that is the same name as an already-existing Ruby method, such as `#hash`. In the case of the `#hash` method, this can cause issues when attempting to adding resources to other data structures, such as Arrays or Hashes. In other examples, this could cause unexpected behavior that is incredibly difficult to troubleshoot. This change adds a deprecation warning in the case where a user adds a property to a resource that the resource instance already responds to. If y'all are OK with this approach, I'll be happy to write up the deprecation doc for this for docs.chef.io. Signed-off-by: Adam Leff <adam@leff.co>
Diffstat (limited to 'lib/chef/resource/yum_repository.rb')
-rw-r--r--lib/chef/resource/yum_repository.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/chef/resource/yum_repository.rb b/lib/chef/resource/yum_repository.rb
index 1c215b51ff..30a14a22d5 100644
--- a/lib/chef/resource/yum_repository.rb
+++ b/lib/chef/resource/yum_repository.rb
@@ -58,7 +58,6 @@ class Chef
property :repo_gpgcheck, [TrueClass, FalseClass]
property :report_instanceid, [TrueClass, FalseClass]
property :repositoryid, String, regex: /.*/, name_property: true
- property :sensitive, [TrueClass, FalseClass], default: false
property :skip_if_unavailable, [TrueClass, FalseClass]
property :source, String, regex: /.*/
property :sslcacert, String, regex: /.*/