summaryrefslogtreecommitdiff
path: root/lib/chef/deprecated.rb
Commit message (Collapse)AuthorAgeFilesLines
* [SHACK-304] Deprecation checking turns up false positivetyler-ball2018-07-311-2/+7
| | | | | | | | | | | | When the location string during a deprecation check looks like "/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37/spec/unit/chef_class_spec.rb:141:in `block (4 levels) in <top (required)>'" then trying to catch silence deprecation warnings using only an index number (EG, "Chef::Config[:silence_deprecation_warnings] = [0]") can end up matching part of that location string incorrectly. In this case it matched the 0 in the ruby version. Signed-off-by: tyler-ball <tball@chef.io>
* fix Style/MutableConstantLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* deprecate old shell_out APIsLamont Granquist2018-06-191-1/+5
| | | | | | | | | note that this restores the behavior of shell_out_with_timeout() which downstream consumers may be using, and correctly treats custom resources and LWRPs the same, along with setting up removing all this backcompat weirdness in Chef-15. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Tweak the deprecation warning message to look a little nicer.Noah Kantrowitz2018-06-141-3/+3
| | | | | | | | | | Deprecation CHEF-18 from /Users/coderanger/src/chef/spec/support/shared/integration/knife_support.rb:104:in `block in knife' Starting local-mode server in deprecated socket mode Please see https://docs.chef.io/deprecations_local_listen.html for further details and information on how to correct this problem. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Allow targeting via the deprecation ID, either as a number or in the CHEF-n ↵Noah Kantrowitz2018-06-141-1/+1
| | | | | | | form we show in various places. This is because users might not actually know the deprecation key, so this is probably more approachable. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Switch map collisions to a dedicated deprecation type so they can be ↵Noah Kantrowitz2018-06-141-0/+4
| | | | | | silenced easily. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Give property deprecations an ID just for tracking if nothing else, even if ↵Noah Kantrowitz2018-06-141-0/+2
| | | | | | they don't have a docs page. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Simplify the deprecations system a bit, and introduce ways to silence ↵Noah Kantrowitz2018-06-141-181/+95
| | | | | | deprecation warnings. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Deprecated the Chef::Provider::Package::Freebsd::Pkg providerTim Smith2018-06-071-0/+10
| | | | | | FreeBSD 10 and later have pkgng and Chef will use that instead. This Oct even FreeBSD 10 goes fully EOL so we'll be supporting multiple EOL versions back come April. We should speed up this resource and simplify things by removing the unnecessary provider and the logic that decides which one to use. Signed-off-by: Tim Smith <tsmith@chef.io>
* RFC-102: Deprecation warning in resourcestm/deprecated_propertiesThom May2018-03-241-0/+7
| | | | | | | | | | | * `deprecated_property_alias` allows the resource author to provide transition from old properties to new ones with a deprecation warning. * The `deprecated` option on a property emits a deprecation warning. * The `deprecated` method on a resource takes a message, but does not yet emit a deprecation warning. Signed-off-by: Thom May <thom@chef.io>
* Deprecate erl_calldeprecate_erl_callTim Smith2018-01-011-0/+10
| | | | | | This implements RFC 98 from https://github.com/chef/chef-rfc Signed-off-by: Tim Smith <tsmith@chef.io>
* Deprecate the deploy resource and family.Noah Kantrowitz2017-10-031-0/+10
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Deprecate property namespace magicLamont Granquist2017-06-081-0/+10
| | | | | | | This forces everyone to starting using new_resource.property_name instead of just property_name. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Display a deprecation warning when using --listen mode.Noah Kantrowitz2017-05-251-0/+10
| | | | | | Deprecation doc added in https://github.com/chef/chef-web-docs/pull/687. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Add a deprecation warning when using use_inline_resources.Noah Kantrowitz2017-04-041-0/+10
| | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Chef-13: fix notifying array resourcesLamont Granquist2017-03-311-0/+10
| | | | | | | | this also deprecates the multi-resource notification syntax where `foo[a,b]` would attempt to notify both `foo[a]` and `foo[b]` because that is hella ambiguous. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13 remove resource cloning and 3694 warningsLamont Granquist2017-03-021-29/+21
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: chef_gem no longer runs at compile time by defaultLamont Granquist2017-02-281-10/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* package provider cleanuplcg/package-cleanupLamont Granquist2017-02-111-0/+10
| | | | | | | | | - cleans up a lot of ivar usage - converts most providers to shell_out_compact_timeout! - almost deprecates a few APIs, but can't quite yet - windows providers need mixlib-shellout to take an argv Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #5606 from chef/adamleff/warn-on-dangerous-property-namesThom May2017-01-181-0/+20
|\ | | | | Deprecate creating properties whose names are already methods
| * Deprecate creating properties whose names are already methodsadamleff/warn-on-dangerous-property-namesAdam Leff2017-01-181-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #4894 from chef/lcg/dnf-providerLamont Granquist2017-01-111-0/+10
|\ \ | | | | | | DNF Provider PR #2
| * | add tests and deprecation for allow_downgradeLamont Granquist2016-12-131-0/+10
| |/ | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | formally deprecate run_commandLamont Granquist2016-12-201-0/+10
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Properly deprecate old Chef::Platform methodsLamont Granquist2016-12-071-0/+10
| | | | | | | | These should have been deprecated formally in 12.5.1 after the Dynamic Provider-Resolver'ing of the internal chef resources was completed. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-161-0/+190
This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>