Hi,

This patch include a major change in client code, in term of
meta-programming usage. Some of you already recognized some limitations
of metaprogramming in xml_to_class implementation and it would be
extremely difficult to fix all issues and this fixes will add additional
code here, which will make this method even worse.
So I decided to get rid of metaprogramming and instead of doing some
method_define mumbo-jumbo I used 'method_missing' approach.
So now we have three basic classes:

'BaseObject' -> Defines basic methods for REST objects like ID, URL, etc
'ActionObject' -> Extend BaseObject with actions (.stop!, .start!)
'StateFullObject' -> Extend ActionObject with states (reloading, etc)

This approach will make our client stable and safe. So now for example calls
like 'client.realms' will return correct realm names.

There are also some other additions to client. For now, all backend errors
throwed by API will be 're-raised' in client.

Another change was that I moved 'create_*' methods to method_missing.

Last important change is about versioning. Right now our version model is
0.0.9.x but now, version of client will need to be bumped to 0.0.9.9, so
I changed version number to 0.0.1, which I hope will be easy to maintain
and I will definitely looks better in RPMs.

PS:

Our test suite in client is perfectly green with all changes, so this should
break nothing in terms of API.

(rake spec):
...........................................

Finished in 98.923537 seconds
43 examples, 0 failures

I would really appreciate if guys from CloudEngine can test this new gem[1]
under their test frameworks.

[1] http://mifo.sk/tmp/deltacloud-client-0.0.1.gem

  -- Michal

Reply via email to