[Nitro] Nitro Week

Jonathan Buch john at oxyliquit.de
Sun Jul 15 12:21:48 EDT 2007


Hi,

> I have allocated the coming week to work on Nitro. The goal is to make
> 0.50.0 ready for release. I would like to know, who can help me during this
> week.

great!

> - help with converting test cases to specs

I hope you can help arne with those, just convert crudely and let me clean
up after.  :P
(Of course, anyone is welcome to help here.  Surprise me.  :P)

> - annotating the source code with useful comments.
> - bug reports

Only one I'm having conceptual problems with:

OgModel#saved?

This is determined by asking if the primary key is not nil.  This works fine
as long as one uses autogenerated primary keys.  There's only one spec which
touches that issue, and that spec uses .insert to get around that.

The next piece of the puzzle is:  .create
In the current incarnation of .create it uses .insert to persist the object.
(This was a recent change from me, in the last 15 patches).  Before it used
.save which obviously breaks non-autogenerated pks.

Now, with .insert a different problem crops up, autosaving of relations +
.create blocks:

OgModel.create(:foo) do |o|
   o.some_attr = 'foo' # this is ok
   o.some_rel = some_obj # this saves `o` in the background
end

So, what happens essentially with my .insert patch for .create, it tries to
insert the object twice into the DB.  Once for autosaving, once in .create.

Aurelianito (on irc) cought that issue, I've never used .create with a block
so I'm grateful someone else does.

There's 2 ways we can take here, either create a 'persisted' flag on each
og object, or continue treating non-autogenerated pks as step-childs.

(I myself will just continue using my .insert patch as I don't use blocks
on .insert but many non standard pks.  But then again, my repo is quite
different anyhow.  :P)

So basically the issue here is the .saved? reacting on the 'wrong input'.
What are we gonna do?

> - improving the RELEASES text for the new release.

I honestly have no idea whatsoever what is new in this release... ^^;

> I especially will need the help of Tom to fix some problems with Aspects and
> try to get rid of Glue altogether.

Just got an idea for glue so you don't have to make a gem for it even if it
doesn't get removed:  just copy paste the glue parts in raw/nitro/og, just
for the gems.

Jo

-- 
Feel the love
http://pinkjuice.com/pics/ruby.png


More information about the Nitro-general mailing list