diff options
author | John Keiser <john@johnkeiser.com> | 2015-04-25 10:20:46 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-05-07 17:02:12 -0700 |
commit | 9e3803c4305ed738dc25afe392694c551a5d25de (patch) | |
tree | 24fb7e8645cc67b939378c87a4dff41c56b160e9 | |
parent | 3858171fea818f0b8d36ee350f17aa2b446fc8c6 (diff) | |
download | chef-9e3803c4305ed738dc25afe392694c551a5d25de.tar.gz |
Add method_missing and DSL deprecation to docs
-rw-r--r-- | CHANGELOG.md | 7 | ||||
-rw-r--r-- | DOC_CHANGES.md | 33 |
2 files changed, 38 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index bad8bffd37..973f21cb27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,10 +25,13 @@ * [pr#3295](https://github.com/chef/chef/pull/3295): Stop mutating `new_resource.checksum` in file providers. Fixes some ChecksumMismatch exceptions like [issue#3168](https://github.com/chef/chef/issues/3168) * [pr#3320] Sanitize non-UTF8 characters in the node data before doing node.save(). Works around many UTF8 exception issues reported on node.save(). * Implemented X-Ops-Server-API-Version with a API version of 0, as well as error handling when the Chef server does not support the API version that the client supports. +<<<<<<< HEAD * [pr#3327](https://github.com/chef/chef/pull/3327): Fix unreliable AIX service group parsing mechanism. * [pr#3333](https://github.com/chef/chef/pull/3333): Fix SSL errors when connecting to private Supermarkets * [pr#3340](https://github.com/chef/chef/pull/3340): Allow Event dispatch subscribers to be inspected. +* [pr#3269](https://github.com/chef/chef/pull/3269): Deprecate automatic recipe + DSL for classes in `Chef::Resource` ## 12.3.0 @@ -74,14 +77,14 @@ ## 12.1.2 * [Issue 3022](https://github.com/chef/chef/issues/3022): Homebrew Cask install fails - FIXME (remove on 12.2.0 release): 3022 was only merged to 12-stable and #3077 or its descendant should fix this + FIXME (remove on 12.2.0 release): 3022 was only merged to 12-stable and #3077 or its descendant should fix this * [Issue 3059](https://github.com/chef/chef/issues/3059): Chef 12.1.1 yum_package silently fails * [Issue 3078](https://github.com/chef/chef/issues/3078): Compat break in audit-mode changes ## 12.1.1 * [**Phil Dibowitz**](https://github.com/jaymzh): [Issue 3008](https://github.com/chef/chef/issues/3008) Allow people to pass in `source` to package -* [Issue 3011](https://github.com/chef/chef/issues/3011) `package` provider base should include +* [Issue 3011](https://github.com/chef/chef/issues/3011) `package` provider base should include `Chef::Mixin::Command` as there are still providers that use it. * [**Ranjib Dey**](https://github.com/ranjib): [Issue 3019](https://github.com/chef/chef/issues/3019) Fix data fetching when explicit attributes are passed diff --git a/DOC_CHANGES.md b/DOC_CHANGES.md index 6b58871418..70f62ed629 100644 --- a/DOC_CHANGES.md +++ b/DOC_CHANGES.md @@ -5,3 +5,36 @@ Example Doc Change: ### Headline for the required change Description of the required change. --> + +### Resources must now use `provides` to declare recipe DSL + +Resources declared in `Chef::Resource` namespace will no longer get recipe DSL +automatically. Instead, explicit `provides` is required in order to have DSL: + +```ruby +module MyModule + class MyResource < Chef::Resource + provides :my_resource + end +end +``` + +Users are encouraged to declare resources in their own namespaces. + +This is deprecated (and will emit a warning) in Chef 12, and will be removed in +Chef 13. + +### LWRPs are no longer placed in the `Chef::Resource` namespace + +Additionally, resources declared as LWRPs are no longer placed in the +`Chef::Resource` namespace. This means that if your cookbook includes the LWRP +`mycookbook/resources/myresource.rb`, you will no longer be able to extend or +reference `Chef::Resource::MycookbookMyresource` in Ruby code. LWRP recipe DSL +does not change: the LWRP will still be available to recipes as +`mycookbook_myresource`. + +You can still get the LWRP class by calling `Chef::Resource.resource_matching_short_name(:mycookbook_myresource)`. + +The primary aim here is clearing out the `Chef::Resource` namespace. + +References to these classes is deprecated (and will emit a warning) in Chef 12, and will be removed in Chef 13. |