On Sun, Mar 20, 2011 at 08:06:56AM -0700, Jesse A Wolfe wrote:
> >
> >
> > Is there a specific reason why uniqueness_key should be a SORTED list of
> > keyattributes? If we do not sort them they appear in the array in the
> > same order as the params were defined in the type definition (so the
> >
>
>
> Is there a specific reason why uniqueness_key should be a SORTED list of
> keyattributes? If we do not sort them they appear in the array in the
> same order as the params were defined in the type definition (so the
> order is still determined) [By type definition I mean the ruby source,
> no
On Tue, Mar 15, 2011 at 05:50:42PM -0700, Jesse Wolfe wrote:
> [...]
>def uniqueness_key
> -to_resource.uniqueness_key
> +self.class.key_attributes.sort_by { |attribute_name| attribute_name.to_s
> }.map{ |attribute_name| self[attribute_name] }
>end
>
> [...]
>
> + describe "when
Reviewed-By: Paul Berry
Signed-off-by: Jesse Wolfe
---
lib/puppet/type.rb |2 +-
spec/unit/type_spec.rb | 13 -
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index 205d809..d24cc85 100644
--- a/lib/puppet/type.rb
+++