Hi, * Will file uploads make it to Instiki 1.0? Specifically the ''import'' option? * How did you keep the snapshot binary files compatible? Reason I ask is that for Pimki the snapshot binary file format will change. So while no upgrading content is needed from Instiki 0.9.2 to 0.10, it doesn''t hold for Pimki (i.e. I cannot just reuse the snapshots). Alexey, do you have any insight on keeping the snapshots compatible? Or on performing the import? I''m OK (and I hope my users are as well :) with mandating an export/import upgrade for Pimki, but I don''t want to redevelop what is going to be there anyway. Thnaks for your work on Instiki, Assaph
Assaph Mehr wrote:>* Will file uploads make it to Instiki 1.0? Specifically the ''import'' option? > >Most certainly. The main question is "When Instiki 1.0 is going to happen". And the answer is "fairly soon, on the open source timescale". :) I''ll enable them fFileController on the trunk right after fixing the export_html bug (unless there are more embarrassments like this to come in the next few days, of course). Generally,>* How did you keep the snapshot binary files compatible? > >In a way, persisted Ruby object is not much more than a attribute name => attribute value hash (which is the object state), plus the name of its class (which is the object behaviors). So, you have to retain the same class names for all entities in the storage, and if you add new attributes, even if you always initialize them in a constructor, you may not assume that they are initialized, so you must write a getter that will set these attributes to some defaults if they are not defined yet. This is why in the models/web.rb we have snippets like def wiki() @wiki ||= WikiService.instance; end.>Or on performing the import? >Have a look at what the FileController#import does, and do the same. It is easy to get inside the storage and do things there. Just remember to take a snapshot when you are done (or use only public WikiService methods like revise_page, so that they everything is persisted automatically). -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
On 5/3/05, Alexey Verkhovsky <alex@verk.info> wrote:> >* Will file uploads make it to Instiki 1.0? Specifically the ''import'' option? > > > Most certainly. The main question is "When Instiki 1.0 is going to > happen". And the answer is "fairly soon, on the open source timescale". > :) I''ll enable them fFileController on the trunk right after fixing the > export_html bug (unless there are more embarrassments like this to come > in the next few days, of course). Generally,Good. At this point I''m sure we can hold a contest on who can code slowest past midnight :-)> >* How did you keep the snapshot binary files compatible? > > > In a way, persisted Ruby object is not much more than a attribute name > => attribute value hash (which is the object state), plus the name of > its class (which is the object behaviors).I did, yet I still got errors where madeleine will not load the snapshot. <sigh> No magic solution, need to investigate further.> So, you have to retain the same class names for all entities in the > storage, and if you add new attributes, even if you always initialize > them in a constructor, you may not assume that they are initialized, so > you must write a getter that will set these attributes to some defaults > if they are not defined yet. This is why in the models/web.rb we have > snippets like def wiki() @wiki ||= WikiService.instance; end.That has been my standard practice for pimki 1.x, but I saw you got rid of all those getters in Instiki 0.10 so I thought you found a way around it. Oh well, if I force users to export/import the markup I can leave those out and only introduce them for later versions. This keeps the code somewhat cleaner for the initial release.> >Or on performing the import? > > > Have a look at what the FileController#import does, and do the same. It > is easy to get inside the storage and do things there. Just remember to > take a snapshot when you are done (or use only public WikiService > methods like revise_page, so that they everything is persisted > automatically).I''ll take a look, thanks. Cheers, Assaph