- Fix a missing
require
when usingsubclass_providers!
on Chef 12.3.
- Chef 13 compatibility.
- Passing a symbol for the parent now works with the
include Poise(:name)
shortcut. - Fixed
subclass_providers!
on older versions of Chef.
- Test harness fixes for Chef.
- Minor tweak for compatability with Chef master.
- More compatibility improvements for Chef 12.9.
- New helper:
Poise::Helpers::Win32User
to automatically convert'root'
defaults for user and group properties to more platform-appropriate values. - Enhanced
poise_shell_out
to better cope with Windows command parsing. Use Bash-style commands and it will automatically convert. - Overall compatibility fixes for Windows.
- Compatibility with Chef master to fix issues with
defined_in!
not ignoring stack frames from Chef code. - Setting a provider in a inversion options resource now works as (probably) expected.
- New backwards-compatibility helper:
Poise::Backports::VERIFY_PATH
. Use it likeverify "myapp -t #{Poise::Backports::VERIFY_PATH}" if defined?(verify)
for backwards-compatible usage of file verifications. - Fixed Poise's implementation of lazy defaults to more closely match Chef's even when both are used in conjunction. Lazy defaults will no longer be evaluated when setting a value or getting an existing non-default value.
- New property for inversion resources:
provider_no_auto
. Set one or more provider names that will be ignored for automatic resolution for that instance. - Support
variables
as an alias foroptions
in template content properties to match thetemplate
resource. - Template content properties are no longer validated after creation for non-default actions.
- Formalize the extra-verbose logging mode for Poise and expose it via helpers.
- Extra-verbose logging mode can now be enabled by creating a
/poise_debug
file. - New helper:
poise_shell_out
. Like normalshell_out
but sets group and environment variables automatically to better defaults.
- Added return value to
Container#register_subresource
to track if the resource was already added. - Improve inspect output for subresources and containers.
- Ensure notifications work with subresources.
- Inversion providers process name equivalences.
- Improve handling of deeply nested subresources.
- Ensure a container with a parent link to its own type doesn't use self as the default parent.
- Improve handling of
load_current_resource
in providers that call it viasuper
.
- New helper:
ResourceSubclass
, a helper for subclassing a resource while still using the providers as the base class. - New feature: Non-default containers. Use
container_default: false
to mark a container class as ineligible for default lookup. - New feature: parent attribute defaults. You can set a
parent_default
to provide a default value for the parent of a resource. This supports thelazy { }
helper as with normal default values. - New feature: use
forced_keys: [:name]
on an option collector property to force keys that would otherwise be clobbered by resource methods. - Can enable verbose logging mode via a node attribute in addition to an environment variable.
- Add
ancestor_send
utility method for use in other helpers. - Improve subresource support for use in mixins.
- Fix 2.2.1 for older versions of Chef.
- Fixed delayed notifications inside
notifying_block
. - Default actions as expected within LWRPs.
- Compatibility with Chef 12.4.1 and Chefspec 4.3.0.
- New helper
ResourceCloning
: Disables resource cloning between Poise-based resources. This is enabled by default. - Subresource parent references can be set to nil.
- Compatibility with Chef 12.4.
- Add
#property
as an alias for#attribute
in resources. This provides forward compatibility with future versions of Chef. - Freeze default resource attribute values. This may break your code, however this is not a major release because any code broken by this change was itself already a bug.
- Make the ChefspecHelpers helper a no-op if chefspec is not already loaded.
- Fix for finding the correct cookbook for a file when using vendored gems.
- New flag for the OptionCollector helper,
parser
:
class Resource < Chef::Resource
include Poise
attribute(:options, option_collector: true, parser: proc {|val| parse(val) })
def parse(val)
{name: val}
end
end
- Fix for a possible infinite loop when using
ResourceProviderMixin
in a nested module structure.
Major overhaul! Poise is now a Halite gem/cookbook. New helpers:
- ChefspecMatchers – Automatically create Chefspec matchers for Poise resources.
- DefinedIn – Track which file (and cookbook) a resource or provider is defined in.
- Fused – Experimental support for defining provider actions in the resource class.
- Inversion – Support for end-user dependency inversion with providers.
All helpers are compatible with Chef >= 12.0. Chef 11 is now deprecated, if you need to support Chef 11 please continue to use Poise 1.
- Correctly propagate errors from inside notifying_block.
- Fixes an issue with the LWRPPolyfill helper and false values.
- Delayed notifications from nested converges will still only run at the end of the main converge.
- The include_recipe helper now works correctly when used at compile time.
- Redeclaring a template attribute with the same name as a parent class will inherit its options.
- New template attribute pattern.
attribute(:config, template: true)
...
resource 'name' do
config_source 'template.erb'
end
...
new_resource.config_content
- Initial release!