deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <>
Subject Re: Sketch of CIMI model layer
Date Fri, 04 Nov 2011 18:19:59 GMT
Hi Michal,

thanks for the patches. I folded all but the first one into mine.

On Fri, 2011-11-04 at 14:15 +0100, Michal Fojtik wrote:

> I made couple fixes (mostly because it's my way how to get familiar with
> the code ;-). I attached 4 patches:
> 0001-CIMI-Fixed-requires-and-added-module.patch

I forgot to git add lib/cimi/model.rb; fixed it by doing that.

> 0003-CIMI-Added-symbolize_key-to-convert-all-string-Hash-.patch
> * Usually I prefer Symbol as Hash key instead of String (XmlSimple sux
> there, this patch should add appropriate fix to Hash core_ext)

Yes, agreed; not sure if the extension to Hash is the right way to go,
since we also want to do the camelcase -> underscore conversion for
nested Hashes. I think I'll add a seperate 'object' word to the DSL that
will trigger this conversion, e.g.
> 0004-CIMI-Use-instance-variables-instead-of-getter-setter.patch
> * It's better in some (rare) cases to use instance variable when reading
> or storing something. You never know if someone smart enough will not
> redefine the attribute_values getter :)

If they do that, they should suffer ;) But yeah, works for me.


View raw message