summaryrefslogtreecommitdiff
path: root/RELEASE_NOTES.md
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2017-04-04 10:45:41 -0700
committerNoah Kantrowitz <noah@coderanger.net>2017-04-04 10:45:41 -0700
commit11a07953165b631eb3612a00560a24fa14d14606 (patch)
treeb4011db7d33e99186e9e9c124d62040db1e6bb3f /RELEASE_NOTES.md
parent848404e77096c19ba8689927330c61e12cbd10fb (diff)
parent93c72873224c6a79ae13b5d2fa70cb9bfc645c5c (diff)
downloadchef-11a07953165b631eb3612a00560a24fa14d14606.tar.gz
Merge branch 'master' into freeze-property-default
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'RELEASE_NOTES.md')
-rw-r--r--RELEASE_NOTES.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 27fa342e52..3a459b9a18 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -210,6 +210,21 @@ This change allows chef to support new classes of files, such as Ohai
plugins or Inspec tests, without having to make changes to the cookbook
format to support them.
+### DSL-based custom resources and providers no longer get module constants
+
+Up until now, creating a `mycook/resources/thing.rb` would create a `Chef::Resources::MycookThing` name to access the resource class object.
+This const is no longer created for resources and providers. You can access resource classes through the resolver API like:
+
+```ruby
+Chef::Resource.resource_for_node(:mycook_thing, node)
+```
+
+Accessing a provider class is a bit more complex, as you need a resource against which to run a resolution like so:
+
+```ruby
+Chef::ProviderResolver.new(node, find_resource!("mycook_thing[name]"), :nothing).resolve
+```
+
### Default values for resource properties are frozen
A resource declaring something like: