From george.moschovitis at gmail.com Tue Aug 1 08:50:56 2006 From: george.moschovitis at gmail.com (george.moschovitis at gmail.com) Date: 1 Aug 2006 12:50:56 -0000 Subject: [Nitro] reddit.com: Nitro - Rails is not the only web programming framework for Ruby Message-ID: <20060801125056.4939.qmail@alexis.reddit.com> A user at reddit thought you would find this interesting: Nitro - Rails is not the only web programming framework for Ruby http://www.nitroproject.org/ -- what's new online: http://reddit.com/ questions? email feedback at reddit.com From lionel.orry at gmail.com Tue Aug 1 10:50:57 2006 From: lionel.orry at gmail.com (Lionel Orry) Date: Tue, 01 Aug 2006 16:50:57 +0200 Subject: [Nitro] reddit.com: Nitro - Rails is not the only web programming framework for Ruby In-Reply-To: <20060801125056.4939.qmail@alexis.reddit.com> References: <20060801125056.4939.qmail@alexis.reddit.com> Message-ID: <44CF6A51.5040909@gmail.com> george.moschovitis at gmail.com wrote: > A user at reddit thought you would find this interesting: > > Nitro - Rails is not the only web programming framework for Ruby > http://www.nitroproject.org/ > ... indeed. -Lionel From transfire at gmail.com Tue Aug 1 11:40:47 2006 From: transfire at gmail.com (TRANS) Date: Tue, 1 Aug 2006 11:40:47 -0400 Subject: [Nitro] Tryng Facets 1.7 Message-ID: <4b6f054f0608010840n44c4148frff32a441e555db64@mail.gmail.com> Hi. I'm finally back. Was an aweful trip. Anyway... Has anyone tried Facets 1.7 with Nitro/Og? T. From richard at protea-systems.com Tue Aug 1 11:56:36 2006 From: richard at protea-systems.com (Richard Hundt) Date: Tue, 01 Aug 2006 17:56:36 +0200 Subject: [Nitro] overriding Element.prefix Message-ID: <44CF79B4.2080708@protea-systems.com> Hi List, I'm trying to override the Element.prefix property (defaults to 'x'). I've tried: require 'nitro' require 'nitro/element' include Nitro Element.prefix = 'px' require 'element/my_element.rb' ...in my run.rb, to no avail. There's something about the sequence in which the Elements::Listener::PREFIX_RE constant is defined which seems to preclude changing the prefix at some point after the nitro libraries are included. Does this sound right? Is there any way in which I could add my own xml namespace? Any ideas, suggestions or ridicule would be appreciated. Thanks, Richard From george.moschovitis at gmail.com Tue Aug 1 14:51:45 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Aug 2006 21:51:45 +0300 Subject: [Nitro] overriding Element.prefix In-Reply-To: <44CF79B4.2080708@protea-systems.com> References: <44CF79B4.2080708@protea-systems.com> Message-ID: Hello Richard, to tell you the truth I haven't tested the prefix override recently. If you add this as a ticket on nitroproject.org I will have a look over it on first occasion. thanks, George. On 8/1/06, Richard Hundt wrote: > Hi List, > > I'm trying to override the Element.prefix property (defaults to 'x'). > I've tried: > > require 'nitro' > require 'nitro/element' > > include Nitro > > Element.prefix = 'px' > > require 'element/my_element.rb' > > ...in my run.rb, to no avail. There's something about the sequence in > which the Elements::Listener::PREFIX_RE constant is defined which seems > to preclude changing the prefix at some point after the nitro libraries > are included. Does this sound right? Is there any way in which I could > add my own xml namespace? > > Any ideas, suggestions or ridicule would be appreciated. > > Thanks, > Richard > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Tue Aug 1 16:57:50 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Aug 2006 23:57:50 +0300 Subject: [Nitro] nice post Message-ID: have a look at this nice post: http://nitroproject.org/blog/articles/7 as always, your comments are welcome! -g. -- http://www.gmosx.com http://www.nitroproject.org From james.britt at gmail.com Tue Aug 1 18:15:26 2006 From: james.britt at gmail.com (James Britt) Date: Tue, 01 Aug 2006 15:15:26 -0700 Subject: [Nitro] nice post In-Reply-To: References: Message-ID: <44CFD27E.8070002@gmail.com> George Moschovitis wrote: > have a look at this nice post: > > http://nitroproject.org/blog/articles/7 > > as always, your comments are welcome! What version of Og is that? -- James Britt "I must create a system, or be enslaved by another man's; I will not reason and compare; my business is to create." - William Blake From richard at protea-systems.com Tue Aug 1 19:43:55 2006 From: richard at protea-systems.com (Richard Hundt) Date: Wed, 02 Aug 2006 01:43:55 +0200 Subject: [Nitro] overriding Element.prefix In-Reply-To: References: <44CF79B4.2080708@protea-systems.com> Message-ID: <44CFE73B.2060000@protea-systems.com> Hi George, Thanks, it's not too critical, I'll see if I can track it down... just thought somebody might see something obvious which I'd missed. Cheers, Richard George Moschovitis wrote: > Hello Richard, > > to tell you the truth I haven't tested the prefix override recently. > If you add this as a ticket > on nitroproject.org I will have a look over it on first occasion. > > thanks, > George. > > On 8/1/06, Richard Hundt wrote: > >> Hi List, >> >> I'm trying to override the Element.prefix property (defaults to 'x'). >> I've tried: >> >> require 'nitro' >> require 'nitro/element' >> >> include Nitro >> >> Element.prefix = 'px' >> >> require 'element/my_element.rb' >> >> ...in my run.rb, to no avail. There's something about the sequence in >> which the Elements::Listener::PREFIX_RE constant is defined which seems >> to preclude changing the prefix at some point after the nitro libraries >> are included. Does this sound right? Is there any way in which I could >> add my own xml namespace? >> >> Any ideas, suggestions or ridicule would be appreciated. >> >> Thanks, >> Richard >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> >> > > > From richard at protea-systems.com Tue Aug 1 20:15:17 2006 From: richard at protea-systems.com (Richard Hundt) Date: Wed, 02 Aug 2006 02:15:17 +0200 Subject: [Nitro] nice post In-Reply-To: References: Message-ID: <44CFEE95.3010001@protea-systems.com> Hi George, I've got a couple of question regarding Og. I've written something very similar in Perl called Oryx (it's up on CPAN). Oryx ended up doing what Og does with automatic schema creation and evolution (admittedly Perl is more verbose, though). In the process I also ran into inheritance and abstract classes and what these concepts could mean to an ORM system. So when reading through some docs on Og, I found some mention of what looked like a unsolved inheritance issues. What happens when persistent classes inherit from one another? Basically there are 3 ways of modeling this (which I'm sure you're aware of, but it's hard to ask the question without scoping it out). The simplest is to put all classes in the inheritance chain in a single table (which is what Tangram does). Another way is to duplicate the table for the subclass with the same columns as the super class and then add columns to this new table for the new attributes defined in the subclass. However, the most natural for me was to create a new table with only the newly added attributes for the subclass and join on the table of the superclass. Some tricks are needed to keep track of which columns should be delegated to the superclass for inserts, updates and deletes. This isn't too hard though. So, I guess my questions regarding inheritance are: which model does Og use, and is inheritance still considered "dangerous" and not recommended (because stuff ends up going into the wrong tables)? Cheers, Richard George Moschovitis wrote: > have a look at this nice post: > > http://nitroproject.org/blog/articles/7 > > as always, your comments are welcome! > > -g. > From richard at protea-systems.com Tue Aug 1 20:17:31 2006 From: richard at protea-systems.com (Richard Hundt) Date: Wed, 02 Aug 2006 02:17:31 +0200 Subject: [Nitro] Abstract classes in Og In-Reply-To: References: Message-ID: <44CFEF1B.2070007@protea-systems.com> Hi again, I've got a few comments/thoughts regarding abstract classes in Og. I'd like to present some some ideas taken from Oryx, if I may (as I'm seriously falling in love with Ruby, and you've got a really cooking ORM going with Og). I think the most natural would be to define these simply as Og derivatives which define no persistent attributes. That is, they have identity, but no concrete state (they do hold meta-data, but more on that later). This would be modeled simply as a table with an oid column, and a column holding the class name of the subclass, the instance of which a given row in this table represents. To understand how this is useful, assume that we have an association type called "has_many_ordered" which behaves exactly like an Array where the link table as a third column of integers which holds the array indicies (which you can order the collection by during retrieval). Consider the following diagram for a simple CMS: +------+ +----------+ | Page |----------| Fragment | +------+ frags +----------+ |______| |__________| /_\ | +---------+------+ | | +-----------+ +-------+ | Paragraph | | Image | +-----------+ +-------+ |___________| |_______| Having an "has_many_ordered" (Array) association from one Og class (Page) to an abstract class (Fragment) would allow you to fill the Array association with a mixture of subclasses of Fragment (Paragraph and Image instances). This is not normally possible using standard relational concepts such as link tables. But we've got an OO data model, so the way this works is that the primary key is generated from the oid of the abstract super class (Fragment) only, and then supplied to the subclasses as their primary keys when rows are inserted. This means that in either the Paragraph or Image tables, the primary keys would be sparse, meaning they won't be sequential and there would be gaps, such that the sum of the set keys in both tables would be equal to the set of the keys in the Fragments table. However, the has_many_ordered link table only holds foreign keys to the abstract Fragment class table, so when you try to retrieve an instance, you need to know whether it's an Image instance or a Paragraph. To do this, all you would need is to add a `realised_by' column to the abstract class and a `super_id' column to the subclass tables which would identify the derived class and super class instance, respectively. Essentially, the abstract class table acts as a sort of link table coupled with a sequence generator, and which stores the implementing subclass name along with the oid, so that you can look up the subclass and fetch the correct instance by it's oid directly. Am I making sense? Anyway, I hope to do some cool stuff with Nitro/Og - I need to get into the guts of Og though, got some additional features which I need: extended_attributes (a sort of meta-model, with attributes saved as rows in another table, instead of adding columns to existing tables), has_many_ordered and has_many_keyed, but I've just been doing Ruby for about a week, so initially the going will be slow-ish. Cheers, Richard George Moschovitis wrote: > have a look at this nice post: > > http://nitroproject.org/blog/articles/7 > > as always, your comments are welcome! > > -g. > > From george.moschovitis at gmail.com Wed Aug 2 11:40:28 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 2 Aug 2006 18:40:28 +0300 Subject: [Nitro] nice post In-Reply-To: <44CFD27E.8070002@gmail.com> References: <44CFD27E.8070002@gmail.com> Message-ID: > What version of Og is that? The version on my laptop, will commit to the repo later today ;-) -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Wed Aug 2 11:45:52 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 2 Aug 2006 18:45:52 +0300 Subject: [Nitro] nice post In-Reply-To: <44CFEE95.3010001@protea-systems.com> References: <44CFEE95.3010001@protea-systems.com> Message-ID: > The simplest is to put all classes in the inheritance chain in a single > table (which is what Tangram does). Og implements the Single Table Inheritance pattern. Have a look at test/og/tc_inheritance.rb for example. > Another way is to duplicate the > table for the subclass with the same columns as the super class and then > add columns to this new table for the new attributes defined in the > subclass. This is the defaultfor Og, ie what Og does if no STI directive is given. -g. -- http://www.gmosx.com http://www.nitroproject.org From jos at catnook.com Wed Aug 2 21:44:00 2006 From: jos at catnook.com (Jos Backus) Date: Wed, 2 Aug 2006 18:44:00 -0700 Subject: [Nitro] Where are the examples? Message-ID: <20060803014422.GA98514@lizzy.catnook.local> Hello George, all, I am showing Nitro to an interested colleague. http://www.nitroproject.org/rdoc/nitro/index.html says: Then try to run the examples/tiny Example application. Yet the gem has no examples: jonagold% gem spec nitro|grep -i example jonagold% This is with the latest Nitro (0.31.0) on OS X. Is there a gem that has all the examples? Thanks, -- Jos Backus jos at catnook.com From nusgnaf at gmail.com Wed Aug 2 22:15:57 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Thu, 3 Aug 2006 10:15:57 +0800 Subject: [Nitro] Where are the examples? In-Reply-To: <20060803014422.GA98514@lizzy.catnook.local> References: <20060803014422.GA98514@lizzy.catnook.local> Message-ID: <716700c90608021915g6fd6ff02j9855d1caacb910d3@mail.gmail.com> Hello, right now the examples can be download seperately from http://rubyforge.org/frs/?group_id=418&release_id=6109 as tgz or zip package, there is no gem package. From m.fellinger at gmail.com Thu Aug 3 08:33:48 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 3 Aug 2006 21:33:48 +0900 Subject: [Nitro] [BUNDLE] Glue::Template -> Nitro::Template Message-ID: <9c00d3e00608030533r7b9bedb4wa34867d198ea761f@mail.gmail.com> * Glue::Template -> Nitro::Template This moves the template.rb from glue to nitro and integrates it nicely into the compiler-pipeline so it it just one compiler of many. this should make integrating other template-engines much easier. also, i fixed some small bugs in the engine like some fuzzy gsubs that would have allowed - tho i'm not sure that this behaviour is intended i'm sure it is not good :) updated all pointers to Nitro::Template as well and updated the requires my page, the app and some smaller examples run well, but beware - i added the Nitro::Template to the usual Compiler-pipeline, so if you are using Localization, make sure to add Template at the end of the pipeline if you don't, some funny errors will show up :) MfG manveru -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle.tar.gz Type: application/x-gzip Size: 3861 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060803/3e374792/attachment.gz From george.moschovitis at gmail.com Thu Aug 3 16:28:44 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Aug 2006 23:28:44 +0300 Subject: [Nitro] [BUNDLE] Glue::Template -> Nitro::Template In-Reply-To: <9c00d3e00608030533r7b9bedb4wa34867d198ea761f@mail.gmail.com> References: <9c00d3e00608030533r7b9bedb4wa34867d198ea761f@mail.gmail.com> Message-ID: Interesting patch, thanks, -g. On 8/3/06, Michael Fellinger wrote: > * Glue::Template -> Nitro::Template > > This moves the template.rb from glue to nitro and integrates it > nicely into the > compiler-pipeline so it it just one compiler of many. > this should make integrating other template-engines much easier. > > also, i fixed some small bugs in the engine like some fuzzy gsubs that > would have allowed - tho i'm not sure that this > behaviour is intended i'm sure it is not good :) > updated all pointers to Nitro::Template as well and updated the requires > my page, the app and some smaller examples run well, but beware - i > added the Nitro::Template to the usual Compiler-pipeline, so if you > are using Localization, make sure to add Template at the end of the > pipeline > if you don't, some funny errors will show up :) > > MfG manveru > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From al-nitrogen at none.at Fri Aug 4 04:02:26 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Fri, 4 Aug 2006 10:02:26 +0200 Subject: [Nitro] nitro 0.31 && facets/more/consoleapp Message-ID: <20060804080226.GA16192@none.at> Hi, today i have try to run nitro from a fresh setup but. The ruby install (./configure --prefix=/home/al/progs/ruby && make && make test && make install) works fine also the install of: gem install nitro gem install rake gem install mongrel --source=http://mongrel.rubyforge.org/releases/ gem install facets (for version 1.7.x i haven't found the *consoleapp* into 1.4.x) --- Why i have decide to make a ruby from source, because the debian ruby don't have the 'mkmf' :-( --- After a call of /home/al/progs/ruby/bin/nitro start i get the follwing error: --- /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in \ `gem_original_require': no such file to load -- facets/more/consoleapp \ (LoadError) from \ /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/bin/nitro:3 from /home/al/progs/ruby/bin/nitro:18 --- a find /home/al/progs/ruby/lib/ruby/gems/1.8/gems -name "*consoleapp*" returns ./facets-1.4.5/proj/calibre/ProjectInfo.consoleapp Please can anybody help to solve this error ;-) which ruby /home/al/progs/ruby/bin/ruby ruby -v ruby 1.8.4 (2005-12-24) [i686-linux] which gem /home/al/progs/ruby/bin/gem gem -v 0.9.0 --- /home/al/progs/ruby/lib/ruby/gems/1.8/gems$ ls -1 RedCloth-3.0.3 daemons-0.4.4 facets-1.4.5 facets-1.7.0 gem_plugin-0.2.1 gen-0.31.0 glue-0.31.0 laber mongrel-0.3.13.4 nitro-0.31.0 og-0.31.0 rake-0.7.1 ruby-breakpoint-0.5.1 sources-0.0.1 --- Thanks for help && regards Alex From manveru at weez-int.com Fri Aug 4 04:26:16 2006 From: manveru at weez-int.com (Michael Fellinger) Date: Fri, 4 Aug 2006 17:26:16 +0900 Subject: [Nitro] nitro 0.31 && facets/more/consoleapp In-Reply-To: <20060804080226.GA16192@none.at> References: <20060804080226.GA16192@none.at> Message-ID: <200608041726.16398.manveru@weez-int.com> On Friday 04 August 2006 17:02, Alexander Lazic wrote: > Hi, > > today i have try to run nitro from a fresh setup but. > The ruby install (./configure --prefix=/home/al/progs/ruby && make && > make test && make install) works fine also the install of: > > gem install nitro > gem install rake > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > gem install facets (for version 1.7.x i haven't found the *consoleapp* > into 1.4.x) > --- > Why i have decide to make a ruby from source, because the debian ruby > don't have the 'mkmf' :-( you just have to install the headers for ruby - it's called ruby-dev in apt-get or something... just do `apt-cache search ruby | grep dev` > --- > > After a call of > > /home/al/progs/ruby/bin/nitro start > > i get the follwing error: > > --- > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > \ `gem_original_require': no such file to load -- facets/more/consoleapp \ > (LoadError) > from \ > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:i >n `require' from > /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/bin/nitro:3 from > /home/al/progs/ruby/bin/nitro:18 > --- > this is very easy to explain - and there's a patch out already but i guess the gems haven't been updated :| edit this file with root /usr/lib/ruby/gems/1.8/gems/nitro-0.31.0/bin/nitro and change line 3: - require 'facets/more/consoleapp' to + require 'facets/more/command' ok, now that should fix the error. also keep in mind that you can always use the good old `ruby run.rb` - which is almost exactly what the nitro-command does :) and `nitro start` is the same as `nitro` alone... thanks for the detailed information - it's always nice to have a detailed error-report :) MfG manveru > a > > find /home/al/progs/ruby/lib/ruby/gems/1.8/gems -name "*consoleapp*" > > returns > > ./facets-1.4.5/proj/calibre/ProjectInfo.consoleapp > > Please can anybody help to solve this error ;-) > > which ruby > /home/al/progs/ruby/bin/ruby > > ruby -v > ruby 1.8.4 (2005-12-24) [i686-linux] > > which gem > /home/al/progs/ruby/bin/gem > > gem -v > 0.9.0 > > --- > /home/al/progs/ruby/lib/ruby/gems/1.8/gems$ ls -1 > RedCloth-3.0.3 > daemons-0.4.4 > facets-1.4.5 > facets-1.7.0 > gem_plugin-0.2.1 > gen-0.31.0 > glue-0.31.0 > laber > mongrel-0.3.13.4 > nitro-0.31.0 > og-0.31.0 > rake-0.7.1 > ruby-breakpoint-0.5.1 > sources-0.0.1 > --- > > Thanks for help && regards > > Alex > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From al-nitrogen at none.at Fri Aug 4 04:47:07 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Fri, 4 Aug 2006 10:47:07 +0200 Subject: [Nitro] nitro 0.31 && facets/more/consoleapp In-Reply-To: <200608041726.16398.manveru@weez-int.com> References: <20060804080226.GA16192@none.at> <200608041726.16398.manveru@weez-int.com> Message-ID: <20060804084707.GA19678@none.at> Hi, On Fre 04.08.2006 17:26, Michael Fellinger wrote: >On Friday 04 August 2006 17:02, Alexander Lazic wrote: [snipp] >> Why i have decide to make a ruby from source, because the debian ruby >> don't have the 'mkmf' :-( > >you just have to install the headers for ruby - it's called ruby-dev in >apt-get or something... >just do >`apt-cache search ruby | grep dev` Ah ok now i have it, but i would prefer the self compiled way because on the prod-maschines i don't have root ;-) >> >> After a call of >> >> /home/al/progs/ruby/bin/nitro start >> >> i get the follwing error: [snipp] >this is very easy to explain - and there's a patch out already but i >guess the gems haven't been updated :| > >edit this file with root >/usr/lib/ruby/gems/1.8/gems/nitro-0.31.0/bin/nitro > >and change line 3: > >- require 'facets/more/consoleapp' >to >+ require 'facets/more/command' > >ok, now that should fix the error. Yep thanks for the quick answer ;-) Now i get: --- /home/al/progs/ruby/bin/nitro start No application found! --- and I can now start to learn && develop ruby-nitro-a_new_world ;-)) >also keep in mind that you can always use the good old `ruby run.rb` - >which is almost exactly what the nitro-command does :) >and `nitro start` is the same as `nitro` alone... But will find nitro then the facet-x.x.x libs which was installed with gems?! Sorry for the *naive* question but I have started with ruby some days before ;-) >thanks for the detailed information - it's always nice to have a >detailed error-report :) Hey thats the minimum if you want help ;-)) Regards && thanx for help ;-))))) Alex From fabian at oggu.de Fri Aug 4 05:24:38 2006 From: fabian at oggu.de (Fabian Buch) Date: Fri, 4 Aug 2006 11:24:38 +0200 Subject: [Nitro] Rolls sounds interesting Message-ID: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> hey Trans, http://roll.rubyforge.org/overview.html sounds very interesting. One question: has Rolls to be installed on a users system to require a versioned lib? (not for installing, I mean requireing, e.g. if the user just unpacked the package using tar or similar) Considering the following directory structure: fruitapp/ 1.0.0/ fruit/ apple.rb basket/ wicker.rb Now the user does: require 'fruitapp' Would the developer usually put a fruitapp.rb at the highest level to require the current version and each time installing a new version would override this fruitapp.rb? What if someone installs an older version of a lib after he installed the latest version? Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From al-nitrogen at none.at Fri Aug 4 08:11:26 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Fri, 4 Aug 2006 14:11:26 +0200 Subject: [Nitro] Doc update for 0.31 Message-ID: <20060804121126.GA30521@none.at> Hi, today i go thru the *very* helpfull screencasts and have seen some pitfalls: 1.) when you install the nitro thru the rubygems then you need one of this calls to start the 'demo.rb': require 'rubygems' # or call # ruby -rubygems demo.rb 2.) I think the new version need the: gem install sqlite3-ruby and the underlaying sqlite3 sources on debian unstable: aptitude install libsqlite3-dev Stay tuned for more infos ;-) Thanks George for this nice screen casts ;-)) regards Alex From transfire at gmail.com Fri Aug 4 08:53:13 2006 From: transfire at gmail.com (TRANS) Date: Fri, 4 Aug 2006 08:53:13 -0400 Subject: [Nitro] Rolls sounds interesting In-Reply-To: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> References: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> Message-ID: <4b6f054f0608040553w15da455eqe870188a5ef0375e@mail.gmail.com> On 8/4/06, Fabian Buch wrote: > hey Trans, > > http://roll.rubyforge.org/overview.html sounds very interesting. > > One question: has Rolls to be installed on a users system to require > a versioned lib? (not for installing, I mean requireing, e.g. if the > user just unpacked the package using tar or similar) Generally speaking, yes. Becuase there is a version tier in lib/ structure. Otherwise a user would have to specify the version in the path. Eg. require 'fruitapp/1.0.0/tryme' Will work fine w/o Rolls. Keep in mind though that it is also possible to distribute a non-rolled layout and have a special installer "roll" it at installation time instead. In which case just unpacking and using a package would not have the same limitation. I have just such an installer under development called Sow (sow.rubyforge.org). > Considering the following directory structure: > > fruitapp/ > 1.0.0/ > fruit/ > apple.rb > basket/ > wicker.rb > > Now the user does: > > require 'fruitapp' > > Would the developer usually put a fruitapp.rb at the highest level to > require the current version and each time installing a new version > would override this fruitapp.rb? What if someone installs an older > version of a lib after he installed the latest version? Yes, that can be a problem if the older version is functionally different from the latest version. Top level files should really contian nothing more then requires to a subdir. In fact, Rolls makes it so you don't even neccessarily need a top level file becuase if you do require 'fruitapp' And a file doesn't exist by that name but a rolled lib does, Rolls will automatically load 'fruitapp/{version}/index.rb' if it exists. In anycase, you are right. This is the one area in which Rolls can present some difficulties with version conflicts. If you have any suggestions for improvement here, I'm all ears. Thanks, T. P.S. I plain to promote Rolls once Sow is a little further along. From fabian at oggu.de Fri Aug 4 09:47:35 2006 From: fabian at oggu.de (Fabian Buch) Date: Fri, 4 Aug 2006 15:47:35 +0200 Subject: [Nitro] gen and parts Message-ID: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> Are there plans for a "gen part .."? Riffraff maybe working on it since you're working on gen and part/admin? If not I'm thinking of implementing it myself, since I want parts with a public/ dir and this would've to be copied into the main apps public/ dir. What strategy would be best? Just "cp -r part/X/public/* public/", risking to override existing files, but easier parts development () or "cp -r part/X/public/* public/part/X/ (). Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From fabian at oggu.de Fri Aug 4 10:17:50 2006 From: fabian at oggu.de (Fabian Buch) Date: Fri, 4 Aug 2006 16:17:50 +0200 Subject: [Nitro] Rolls sounds interesting In-Reply-To: <4b6f054f0608040553w15da455eqe870188a5ef0375e@mail.gmail.com> References: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> <4b6f054f0608040553w15da455eqe870188a5ef0375e@mail.gmail.com> Message-ID: <01548A52-64E9-4C24-88CB-9683D84F8C1A@oggu.de> Am 04.08.2006 um 14:53 schrieb TRANS: > On 8/4/06, Fabian Buch wrote: >> Would the developer usually put a fruitapp.rb at the highest level to >> require the current version and each time installing a new version >> would override this fruitapp.rb? What if someone installs an older >> version of a lib after he installed the latest version? > > Yes, that can be a problem if the older version is functionally > different from the latest version. Top level files should really > contian nothing more then requires to a subdir. In fact, Rolls makes That's what I had in mind "just a require", but if it's versiond (no rolls installed), it'd contain "require 'fruitapp/1.0/x.rb'" and when installing the next version the fruitapp.rb would be replaced by a file containing "require 'fruitapp/1.1/x.rb'", which is usually fine, but if the user afterwards installs version 0.6 it'll again be replaced by a file containing "require 'fruitapp/0.6/x.rb'". This might not happen often, but the user will probably look for hours why a functionality he expects from fruitapp version 1.1 isn't working, since he thinks he installed the latest version (which is installed in fact). I don't know how, but it might be a good idea to assist the developer to have a check at install-time (via setup.rb) that replaces fruitapp.rb only if the version that's to be installed is newer than all already installed versions. I don't know if this is possible without rolls/sow on the users machine (of course the developer has it installed ;)). > P.S. I plain to promote Rolls once Sow is a little further along. Looking forward to it. It sounds very good already and if the above can't be handled we could stick to standard dir structures usually and use sow to roll it :). Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From transfire at gmail.com Fri Aug 4 11:04:13 2006 From: transfire at gmail.com (TRANS) Date: Fri, 4 Aug 2006 11:04:13 -0400 Subject: [Nitro] Rolls sounds interesting In-Reply-To: <01548A52-64E9-4C24-88CB-9683D84F8C1A@oggu.de> References: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> <4b6f054f0608040553w15da455eqe870188a5ef0375e@mail.gmail.com> <01548A52-64E9-4C24-88CB-9683D84F8C1A@oggu.de> Message-ID: <4b6f054f0608040804n744ca298m5d1dc0fd44d56511@mail.gmail.com> On 8/4/06, Fabian Buch wrote: > > Am 04.08.2006 um 14:53 schrieb TRANS: > > On 8/4/06, Fabian Buch wrote: > >> Would the developer usually put a fruitapp.rb at the highest level to > >> require the current version and each time installing a new version > >> would override this fruitapp.rb? What if someone installs an older > >> version of a lib after he installed the latest version? > > > > Yes, that can be a problem if the older version is functionally > > different from the latest version. Top level files should really > > contian nothing more then requires to a subdir. In fact, Rolls makes > > That's what I had in mind "just a require", but if it's versiond (no > rolls installed), it'd contain "require 'fruitapp/1.0/x.rb'" and when > installing the next version the fruitapp.rb would be replaced by a > file containing "require 'fruitapp/1.1/x.rb'", which is usually fine, > but if the user afterwards installs version 0.6 it'll again be > replaced by a file containing "require 'fruitapp/0.6/x.rb'". This > might not happen often, but the user will probably look for hours why > a functionality he expects from fruitapp version 1.1 isn't working, > since he thinks he installed the latest version (which is installed > in fact). Not so sure about this. The fruitapp.rb file should only contain "require 'frutiapp/x.rb'" --no version reference. In which case if Rolls is installed then the versioned and non-versioned will work. If Rolls is not installed then only the non-versioned will work. The problem I was thinking of is along the lines of installing an older version of a lib built prior to any notion of Rolls, along side one that is rolled. That has some potential for file conflicts. T. From fabian at oggu.de Fri Aug 4 12:14:17 2006 From: fabian at oggu.de (Fabian Buch) Date: Fri, 4 Aug 2006 18:14:17 +0200 Subject: [Nitro] Rolls sounds interesting In-Reply-To: <4b6f054f0608040804n744ca298m5d1dc0fd44d56511@mail.gmail.com> References: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> <4b6f054f0608040553w15da455eqe870188a5ef0375e@mail.gmail.com> <01548A52-64E9-4C24-88CB-9683D84F8C1A@oggu.de> <4b6f054f0608040804n744ca298m5d1dc0fd44d56511@mail.gmail.com> Message-ID: <14063510-036F-4773-877D-F8EF87DEDF2F@oggu.de> Am 04.08.2006 um 17:04 schrieb TRANS: > Not so sure about this. The fruitapp.rb file should only contain > "require 'frutiapp/x.rb'" --no version reference. In which case if > Rolls is installed then the versioned and non-versioned will work. If > Rolls is not installed then only the non-versioned will work. ic, so as developer I'd always provide it both versioned and non- versioned. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From george.moschovitis at gmail.com Fri Aug 4 12:46:35 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 4 Aug 2006 19:46:35 +0300 Subject: [Nitro] Doc update for 0.31 In-Reply-To: <20060804121126.GA30521@none.at> References: <20060804121126.GA30521@none.at> Message-ID: > Thanks George for this nice screen casts ;-)) glad you like them ;-) -g. -- http://www.gmosx.com http://www.nitroproject.org From transfire at gmail.com Fri Aug 4 12:59:46 2006 From: transfire at gmail.com (TRANS) Date: Fri, 4 Aug 2006 12:59:46 -0400 Subject: [Nitro] Rolls sounds interesting In-Reply-To: <14063510-036F-4773-877D-F8EF87DEDF2F@oggu.de> References: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> <4b6f054f0608040553w15da455eqe870188a5ef0375e@mail.gmail.com> <01548A52-64E9-4C24-88CB-9683D84F8C1A@oggu.de> <4b6f054f0608040804n744ca298m5d1dc0fd44d56511@mail.gmail.com> <14063510-036F-4773-877D-F8EF87DEDF2F@oggu.de> Message-ID: <4b6f054f0608040959v34988852oa34edf4dfc9fa3eb@mail.gmail.com> On 8/4/06, Fabian Buch wrote: > > Am 04.08.2006 um 17:04 schrieb TRANS: > > Not so sure about this. The fruitapp.rb file should only contain > > "require 'frutiapp/x.rb'" --no version reference. In which case if > > Rolls is installed then the versioned and non-versioned will work. If > > Rolls is not installed then only the non-versioned will work. > > ic, so as developer I'd always provide it both versioned and non- > versioned. If you wish to provide for both possibilites then that is certainly an option. Kind of like offering both a gem and a tar.gz. Bascially the options are: 1. Provide only a rolled package and require the end-user have Rolls installed (or use a tool liek Sow to unroll if they don't want to use Rolls). 2. Provide ony a non-rolled package which the user can use normally or use a tool, like Sow, to roll it first. 3. Provide both a rolled and a non-rolled package for the end-user to choice between. Keep in mind that when Sow is fully functional it will be able to pull down apps/libs from the web too (like gems --remote). So lets say you have a package foo. All you need to do is release a foo-x.y.z.tar.gz package on Rubyforge or RAA, then, to get the latest version, the end user only needs to do something like: sow install --roll foo That's the ideal anyway. Sow and Roll aren't quite to that point yet, but I'm not very far off. T. From transfire at gmail.com Fri Aug 4 13:47:08 2006 From: transfire at gmail.com (TRANS) Date: Fri, 4 Aug 2006 13:47:08 -0400 Subject: [Nitro] Rolls sounds interesting In-Reply-To: <4b6f054f0608040959v34988852oa34edf4dfc9fa3eb@mail.gmail.com> References: <29FD695B-3F73-4E75-A8CC-22B4130786EE@oggu.de> <4b6f054f0608040553w15da455eqe870188a5ef0375e@mail.gmail.com> <01548A52-64E9-4C24-88CB-9683D84F8C1A@oggu.de> <4b6f054f0608040804n744ca298m5d1dc0fd44d56511@mail.gmail.com> <14063510-036F-4773-877D-F8EF87DEDF2F@oggu.de> <4b6f054f0608040959v34988852oa34edf4dfc9fa3eb@mail.gmail.com> Message-ID: <4b6f054f0608041047j39be3137o66bffc9e727dde26@mail.gmail.com> BTW, I decide to add a bin script to Rolls itself that can do the rolling/unrolling. So you don't have to have Sow neccessarily. T. From m.fellinger at gmail.com Fri Aug 4 14:44:08 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 5 Aug 2006 03:44:08 +0900 Subject: [Nitro] Doc update for 0.31 In-Reply-To: References: <20060804121126.GA30521@none.at> Message-ID: <9c00d3e00608041144g703a9780l7ed41215b8b55044@mail.gmail.com> well... actually these are discussable issues :) george most likely has export RUBYOPT=-rubygems which gets rid of all requireing... i don't do that on any of my machines since i don't like all the magic rubygems does ;) require 'rubygems' would at least make sure everybody does that - and who has that exported won't suffer as well... installing sqlite3 is another thing - this depends on the platform you are on. it's a lot different on windows/osx/bsd/linux and between the various distributions as well... so best would be to make it given that you have it installed or at least have a like to how to install it. On 8/5/06, George Moschovitis wrote: > > Thanks George for this nice screen casts ;-)) > > glad you like them ;-) > > -g. > > -- > http://www.gmosx.com > http://www.nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From al-nitrogen at none.at Fri Aug 4 15:44:18 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Fri, 4 Aug 2006 21:44:18 +0200 Subject: [Nitro] Doc update for 0.31 In-Reply-To: <9c00d3e00608041144g703a9780l7ed41215b8b55044@mail.gmail.com> References: <20060804121126.GA30521@none.at> <9c00d3e00608041144g703a9780l7ed41215b8b55044@mail.gmail.com> Message-ID: <20060804194418.GA22036@none.at> On Sam 05.08.2006 03:44, Michael Fellinger wrote: >well... actually these are discussable issues :) > >george most likely has export RUBYOPT=-rubygems which gets rid of all >requireing... i don't do that on any of my machines since i don't like >all the magic rubygems does ;) > >require 'rubygems' would at least make sure everybody does that - and >who has that exported won't suffer as well... In http://www.nitroproject.org/rdoc/nitro/files/INSTALL.html is the gem-way the first one and therfore i have thought that it would be nice to add the require per default ;-) But you are right it ist also a way to add the RUBYOPT=-rubygems into the $SHELLrc file, well there are more then one way to solve this as in some other languages also ;-) >installing sqlite3 is another thing - this depends on the platform you >are on. it's a lot different on windows/osx/bsd/linux and between the >various distributions as well... so best would be to make it given that >you have it installed or at least have a like to how to install it. Well maybe but per default the sqlite3 is now default, what i have sugest is to drop a line into the INSTALL that the sqlite3 is now default and if you don't have it then how to change the OG-store ;-) It was only a wish ;-)) regards Alex From aglarond at gmail.com Fri Aug 4 16:40:13 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Fri, 4 Aug 2006 22:40:13 +0200 Subject: [Nitro] Doc update for 0.31 In-Reply-To: <20060804194418.GA22036@none.at> References: <20060804121126.GA30521@none.at> <9c00d3e00608041144g703a9780l7ed41215b8b55044@mail.gmail.com> <20060804194418.GA22036@none.at> Message-ID: <55c107bf0608041340pfa304abgff3fba2d3b36879b@mail.gmail.com> On 8/4/06, Alexander Lazic wrote: > > On Sam 05.08.2006 03:44, Michael Fellinger wrote: > >well... actually these are discussable issues :) So, let's discuss. :) Well maybe but per default the sqlite3 is now default, what i have > sugest is to drop a line into the INSTALL that the sqlite3 is now > default and if you don't have it then how to change the OG-store ;-) The default of sqlite3 has been a thorn in my side for a long time, now. I don't use it on any of my machines. When I need SQL-capabilities, I go for PostgreSQL, otherwise I use KirbyBase for persistance. George - it would be nice to have the default store the "memory" store because it has no outside dependency. Yeah, nothing will be persisted after a restart, but running tests without changing the default store won't cause the tests to fail. If the "filesystem" store were to be resurrected, that would be even better. So, do you think this would be possible for the 0.40.0 release? - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060804/7fddcbac/attachment.html From al-nitrogen at none.at Fri Aug 4 18:18:11 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 00:18:11 +0200 Subject: [Nitro] Q about helper :form Message-ID: <20060804221811.GA32193@none.at> Hi, i'am now at the end of the first screencast and have stopped and started the demo.rb. I was very suprised to get the following error: --- ruby demo.rb ./controller.rb:2: undefined method `helper' for Hello:Class (NoMethodError) from /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from demo.rb:10 --- The demo.rb is now: --- require 'rubygems' # or # ruby -rubygems demo.rb require 'nitro' require 'og' require 'part/admin' require 'model' require 'controller' # default sqllite3 Og.start Nitro.start Hello --- the controller.rb --- class Hello helper :form def index %{ Hello World
test
list } end # lets refactor a bit def list @users = User.all end def delete(oid) User.delete(oid) redirect_to_referer end # intelligent dispatching = no rewrite rules!! def test(name,pass) %{ The Time is #{Time.now}.

The name is #{name}.
The pass is #{pass}. } end def another @hello = 'Hello from controller' end def init_db User.create 'gsmox' User.create 'stella' User.create 'tassos' redirect_to_referer end end --- and the list.xhtml ---

User List

No users
#{form_for User.find_by_name('gsmox')} --- The unbelivable for me is if i remove the 'helper :form' and start after the start i add this line back the reload is ok without a error message?! Does anybody understand this?! Regards Alex From al-nitrogen at none.at Fri Aug 4 19:40:59 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 01:40:59 +0200 Subject: [Nitro] Q about mongrel && nitro Message-ID: <20060804234059.GA2999@none.at> Hi, as i have wrote today i have started with nitro ;-) Now i have wanted to switch to mongrel and get a very interesting behaviour, i don't know if this is an error in the nitro-adapter or in mongrel itself. Is there a option which i can set similar to 'mongrel_rails -B' wich start mongrel in debug mode i think, or set this the debug option fro rails?! --- telnet localhost 9999 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. GET / HTTP/1.1 Host: localhost:9999 HTTP/1.1 200 OK Connection: close Date: Fri, 04 Aug 2006 23:06:53 GMT Status: 200 OK Content-Type: text/html Set-Cookie: nsid=100baa2073d2f41e1c0d15cc48360efc; Path=/ Content-Length: 110 Hello World
test
list Connection closed by foreign host. --- with webrick --- telnet localhost 9999 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. GET / HTTP/1.1 Host: localhost:9999 HTTP/1.1 200 OK Connection: Keep-Alive Date: Fri, 04 Aug 2006 23:06:15 GMT Server: WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) Content-Type: text/html Content-Length: 110 Set-Cookie: nsid=e541d730b1fba8e1c89dde91d8ca4d31; Path=/ Hello World
test
list --- I have started the demo.rb with: strace -fveall -a 1000 -s1000 -o laber ruby demo.rb -m --debug you can get the strace file from http://none.at/laber.bz2 but be warned unbzip2 it is 43M big! Here now some infos about the system: The ruby install (./configure --prefix=/home/al/progs/ruby && make && make test && make install) works fine also the install of: gem install nitro gem install rake gem install mongrel --source=http://mongrel.rubyforge.org/releases/ gem install facets (for version 1.7.x) which ruby /home/al/progs/ruby/bin/ruby ruby -v ruby 1.8.4 (2005-12-24) [i686-linux] which gem /home/al/progs/ruby/bin/gem gem -v 0.9.0 --- ls -la ~/progs/ruby/lib/ruby/gems/1.8/gems/ RedCloth-3.0.3 daemons-0.4.4 facets-1.4.5 facets-1.7.0 gem_plugin-0.2.1 gen-0.31.0 glue-0.31.0 mongrel-0.3.13.4 mongrel_cluster-0.2.0 nitro-0.31.0 og-0.31.0 rake-0.7.1 ruby-breakpoint-0.5.1 sources-0.0.1 sqlite3-ruby-1.1.0 --- Thanks for help && regards Alex From nusgnaf at gmail.com Fri Aug 4 21:55:59 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sat, 5 Aug 2006 01:55:59 +0000 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <20060804234059.GA2999@none.at> References: <20060804234059.GA2999@none.at> Message-ID: <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> Digging mongrel rdoc I found these interesting remarks on Mongrel::HttpResponse implementation: "You may also work the HttpResponse object directly using the various attributes available for the raw socket, body, header, and status codes. If you do this you're on your own. A design decision was made to force the client to not pipeline requests. HTTP/1.1 pipelining really kills the performance due to how it has to be handled and how unclear the standard is. To fix this the HttpResponse gives a "Connection: close" header which forces the client to close right away. The bonus for this is that it gives a pretty nice speed boost to most clients since they can close their connection immediately." So, it seems that mongrel close the client connection mainly for performance reason. From george.moschovitis at gmail.com Sat Aug 5 00:58:49 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 5 Aug 2006 07:58:49 +0300 Subject: [Nitro] Doc update for 0.31 In-Reply-To: <55c107bf0608041340pfa304abgff3fba2d3b36879b@mail.gmail.com> References: <20060804121126.GA30521@none.at> <9c00d3e00608041144g703a9780l7ed41215b8b55044@mail.gmail.com> <20060804194418.GA22036@none.at> <55c107bf0608041340pfa304abgff3fba2d3b36879b@mail.gmail.com> Message-ID: > would be even better. So, do you think this would be possible for the > 0.40.0 release? no time for 0.40.0, but could do it for 0.41.0 regards, George. -- http://www.gmosx.com http://www.nitroproject.org From m.fellinger at gmail.com Sat Aug 5 01:07:47 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 5 Aug 2006 14:07:47 +0900 Subject: [Nitro] Q about helper :form In-Reply-To: <20060804221811.GA32193@none.at> References: <20060804221811.GA32193@none.at> Message-ID: <9c00d3e00608042207o17b0d57fle961bf805bbc1c3b@mail.gmail.com> yes, please require 'part/admin' after the other stuff... that should fix it :) On 8/5/06, Alexander Lazic wrote: > Hi, > > i'am now at the end of the first screencast and have stopped and started > the demo.rb. > > I was very suprised to get the following error: > > --- > ruby demo.rb > ./controller.rb:2: undefined method `helper' for Hello:Class (NoMethodError) > from /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' > from demo.rb:10 > --- > > The demo.rb is now: > > --- > require 'rubygems' > # or > # ruby -rubygems demo.rb > > require 'nitro' > require 'og' > > require 'part/admin' > require 'model' > require 'controller' > > # default sqllite3 > Og.start > > Nitro.start Hello > --- > > the controller.rb > --- > class Hello > helper :form > > def index > %{ > > Hello World >
> test >
> list > } > end > > # lets refactor a bit > def list > @users = User.all > end > > def delete(oid) > User.delete(oid) > redirect_to_referer > end > > # intelligent dispatching = no rewrite rules!! > def test(name,pass) > %{ > The Time is #{Time.now}. >

> The name is #{name}. >
> The pass is #{pass}. > } > end > > def another > @hello = 'Hello from controller' > end > > def init_db > User.create 'gsmox' > User.create 'stella' > User.create 'tassos' > redirect_to_referer > end > end > --- > > and the list.xhtml > --- > >

User List

> > > No users > >
> > #{form_for User.find_by_name('gsmox')} > > --- > > The unbelivable for me is if i remove the 'helper :form' and start after > the start i add this line back the reload is ok without a error > message?! > > Does anybody understand this?! > > Regards > > Alex > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From al-nitrogen at none.at Sat Aug 5 03:03:57 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 09:03:57 +0200 Subject: [Nitro] Q about helper :form In-Reply-To: <9c00d3e00608042207o17b0d57fle961bf805bbc1c3b@mail.gmail.com> References: <20060804221811.GA32193@none.at> <9c00d3e00608042207o17b0d57fle961bf805bbc1c3b@mail.gmail.com> Message-ID: <20060805070357.GA25361@none.at> On Sam 05.08.2006 14:07, Michael Fellinger wrote: >yes, please require 'part/admin' after the other stuff... that should >fix it :) Nope. --- ruby demo.rb -m --debug ./controller.rb:2: undefined method `helper' for Hello:Class (NoMethodError) from /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from demo.rb:9 --- demo.rb --- require 'rubygems' # or # ruby -rubygems demo.rb require 'nitro' require 'og' require 'model' require 'controller' require 'part/admin' # default sqllite Og.start Nitro.start Hello --- I have also remove the 'part/admin' but i get the same error :-( I'am not sure but have: /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/lib/nitro/helper/form.rb anything to with this and if yes when would this be required into the nitro framwork? regards Alex From al-nitrogen at none.at Sat Aug 5 03:18:49 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 09:18:49 +0200 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> Message-ID: <20060805071849.GB25361@none.at> On Sam 05.08.2006 01:55, Fang Sun wrote: >Digging mongrel rdoc I found these interesting remarks on >Mongrel::HttpResponse implementation: > >"You may also work the HttpResponse object directly using the various >attributes available for the raw socket, body, header, and status >codes. If you do this you're on your own. A design decision was made to >force the client to not pipeline requests. HTTP/1.1 pipelining really >kills the performance due to how it has to be handled and how unclear >the standard is. To fix this the HttpResponse gives a "Connection: >close" header which forces the client to close right away. The bonus >for this is that it gives a pretty nice speed boost to most clients >since they can close their connection immediately." > >So, it seems that mongrel close the client connection mainly for >performance reason. Thanks for the point but, HTTP/1.1 pipelining is a little bit different then Keep-Alive requests. In RFC2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8) stands: --- 8.1.2 Overall Operation A significant difference between HTTP/1.1 and earlier versions of HTTP is that persistent connections are the default behavior of any HTTP connection. That is, unless otherwise indicated, the client SHOULD assume that the server will maintain a persistent connection, even after error responses from the server. . . --- and also --- 8.1.2.1 Negotiation An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to maintain a persistent connection unless a Connection header including the connection-token "close" was sent in the request. . . . 8.1.2.2 Pipelining A client that supports persistent connections MAY "pipeline" its requests (i.e., send multiple requests without waiting for each response). A server MUST send its responses to those requests in the same order that the requests were received. Clients which assume persistent connections and pipeline immediately after connection establishment SHOULD be prepared to retry their connection if the first pipelined attempt fails. If a client does such a retry, it MUST NOT pipeline before it knows the connection is persistent. Clients MUST also be prepared to resend their requests if the server closes the connection before sending all of the corresponding responses. . . . --- At the moment i don't know a client which use pipelineing, but this wasn't my issue ;-) What i have meant was that after the Set-Cookie-Header a futher header is send which is wrong! Anybody, nitro || mongrel, sends: --- "Date: Fri, 04 Aug 2006 23:00:29 GMT\r\nStatus: 200 OK\r\nContent-Type: \ text/html\r\nSet-Cookie: nsid=376b3e39265fc699c62ab4aa3868e3e4; \ Path=/\r\n\r\nContent-Length: 110\r\n\r\n" --- The '\r\n' is the 'delimiter' for the header as RFC2616 say ;-) My Question was now *who* send the Cookie-Header and *who* the Content-Length-Header? Sorry for my unspecific question. regards Alex From al-nitrogen at none.at Sat Aug 5 03:48:24 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 09:48:24 +0200 Subject: [Nitro] Q about helper :form In-Reply-To: <20060805070357.GA25361@none.at> References: <20060804221811.GA32193@none.at> <9c00d3e00608042207o17b0d57fle961bf805bbc1c3b@mail.gmail.com> <20060805070357.GA25361@none.at> Message-ID: <20060805074824.GA27704@none.at> On Sam 05.08.2006 09:03, Alexander Lazic wrote: >On Sam 05.08.2006 14:07, Michael Fellinger wrote: >>yes, please require 'part/admin' after the other stuff... that should >>fix it :) > >Nope. Well i think i have solved the error but i don't know if it's the *right* way. I have add --- require 'nitro/helper/form' class Hello include Nitro::FormHelper . . . --- into the controller.rb and now the form is build ;-) The next pitfall is that the action is now: ---

User List

No users
#{form_for User.find_by_name('gsmox')} --- i think i need a 'def save_user(....)' in controller.rb ;-), thats my next step ;-) regards Alex From fabian at oggu.de Sat Aug 5 04:27:25 2006 From: fabian at oggu.de (Fabian Buch) Date: Sat, 5 Aug 2006 10:27:25 +0200 Subject: [Nitro] gen and parts In-Reply-To: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> Message-ID: Was too impatient and just hacked one. It copies the given part to the applications folder (part/partname) and moves the content of its public/ folder to public/part/partname. attacheed patch is against repo.nitroproject.org Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de -------------- next part -------------- A non-text attachment was scrubbed... Name: gen_part.patch.gz Type: application/x-gzip Size: 7239 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060805/159e69c6/attachment.gz -------------- next part -------------- From al-nitrogen at none.at Sat Aug 5 06:18:00 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 12:18:00 +0200 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <20060805071849.GB25361@none.at> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> Message-ID: <20060805101800.GB32266@none.at> On Sam 05.08.2006 09:18, Alexander Lazic wrote: > >What i have meant was that after the Set-Cookie-Header a futher header >is send which is wrong! > >Anybody, nitro || mongrel, sends: > >"Date: Fri, 04 Aug 2006 23:00:29 GMT\r\nStatus: 200 OK\r\nContent-Type: \ > text/html\r\nSet-Cookie: nsid=376b3e39265fc699c62ab4aa3868e3e4; \ >Path=/\r\n\r\nContent-Length: 110\r\n\r\n" > >The '\r\n' is the 'delimiter' for the header as RFC2616 say ;-) > >My Question was now *who* send the Cookie-Header and *who* the >Content-Length-Header? I think i have found the error but not a solution, yet. I have add this into the /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/lib/nitro/adapter/mongrel.rb ### def handle(req, res) . . after: res.header.out << Cgi.response_headers(context) res.body << context.out puts "in MongrelAdapter at handle() after unless()" puts " res.header.out.string " + res.header.out.string puts "\n in MongrelAdapter at handle() after unless() res.body " + res.body.string ### And have seen that no Content-Length-Header is there, now i assume that mongrel add this header but to late. What i also assume that the response-header should be send completely by mongrel. It looks to me that the mongreladapter need a little bit redesign, could i try it ;-)? Is anybody on this list which have more experience with ruby and mongrel who can help me ;-)) Regards Alex From nusgnaf at gmail.com Sat Aug 5 06:37:48 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sat, 5 Aug 2006 10:37:48 +0000 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <20060805071849.GB25361@none.at> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> Message-ID: <716700c90608050337u181d9b8tb5705798fa351ad8@mail.gmail.com> It should be mongrel do the trick, just quote mongrel rdoc: "One additional caveat is that you don't have to specify the Content-length header as the HttpResponse will write this for you based on the out length." On 8/5/06, Alexander Lazic wrote: > On Sam 05.08.2006 01:55, Fang Sun wrote: > > >Digging mongrel rdoc I found these interesting remarks on > >Mongrel::HttpResponse implementation: > > > >"You may also work the HttpResponse object directly using the various > >attributes available for the raw socket, body, header, and status > >codes. If you do this you're on your own. A design decision was made to > >force the client to not pipeline requests. HTTP/1.1 pipelining really > >kills the performance due to how it has to be handled and how unclear > >the standard is. To fix this the HttpResponse gives a "Connection: > >close" header which forces the client to close right away. The bonus > >for this is that it gives a pretty nice speed boost to most clients > >since they can close their connection immediately." > > > >So, it seems that mongrel close the client connection mainly for > >performance reason. > > Thanks for the point but, HTTP/1.1 pipelining is a little bit different > then Keep-Alive requests. > > In RFC2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8) > stands: > > --- > 8.1.2 Overall Operation > > A significant difference between HTTP/1.1 and earlier versions of HTTP > is that persistent connections are the default behavior of any HTTP > connection. That is, unless otherwise indicated, the client SHOULD > assume that the server will maintain a persistent connection, even after > error responses from the server. > . > . > > --- > > and also > > --- > 8.1.2.1 Negotiation > > An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to maintain > a persistent connection unless a Connection header including the > connection-token "close" was sent in the request. > . > . > . > 8.1.2.2 Pipelining > > A client that supports persistent connections MAY "pipeline" its > requests (i.e., send multiple requests without waiting for each > response). A server MUST send its responses to those requests in the > same order that the requests were received. > > Clients which assume persistent connections and pipeline immediately > after connection establishment SHOULD be prepared to retry their > connection if the first pipelined attempt fails. If a client does such a > retry, it MUST NOT pipeline before it knows the connection is > persistent. Clients MUST also be prepared to resend their requests if > the server closes the connection before sending all of the corresponding > responses. > . > . > . > --- > > At the moment i don't know a client which use pipelineing, but this > wasn't my issue ;-) > > What i have meant was that after the Set-Cookie-Header a futher header > is send which is wrong! > > Anybody, nitro || mongrel, sends: > > --- > "Date: Fri, 04 Aug 2006 23:00:29 GMT\r\nStatus: 200 OK\r\nContent-Type: \ > text/html\r\nSet-Cookie: nsid=376b3e39265fc699c62ab4aa3868e3e4; \ > Path=/\r\n\r\nContent-Length: 110\r\n\r\n" > --- > > The '\r\n' is the 'delimiter' for the header as RFC2616 say ;-) > > My Question was now *who* send the Cookie-Header and *who* the > Content-Length-Header? > > Sorry for my unspecific question. > > regards > > Alex > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From nusgnaf at gmail.com Sat Aug 5 06:41:13 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sat, 5 Aug 2006 10:41:13 +0000 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <20060805101800.GB32266@none.at> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> <20060805101800.GB32266@none.at> Message-ID: <716700c90608050341j3425ed25wd26a69533978a2b3@mail.gmail.com> +1, just go for it. As George said before, the mongrel adapter is based on webrick, after long time development mongrel is becoming another monster to take special care. On 8/5/06, Alexander Lazic wrote: > On Sam 05.08.2006 09:18, Alexander Lazic wrote: > > > >What i have meant was that after the Set-Cookie-Header a futher header > >is send which is wrong! > > > >Anybody, nitro || mongrel, sends: > > > >"Date: Fri, 04 Aug 2006 23:00:29 GMT\r\nStatus: 200 OK\r\nContent-Type: \ > > text/html\r\nSet-Cookie: nsid=376b3e39265fc699c62ab4aa3868e3e4; \ > >Path=/\r\n\r\nContent-Length: 110\r\n\r\n" > > > >The '\r\n' is the 'delimiter' for the header as RFC2616 say ;-) > > > >My Question was now *who* send the Cookie-Header and *who* the > >Content-Length-Header? > > I think i have found the error but not a solution, yet. > > I have add this into the > /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/lib/nitro/adapter/mongrel.rb > > ### def handle(req, res) > . > . > after: > > res.header.out << Cgi.response_headers(context) > res.body << context.out > > puts "in MongrelAdapter at handle() after unless()" > puts " res.header.out.string " + res.header.out.string > > puts "\n in MongrelAdapter at handle() after unless() res.body " > + res.body.string > ### > > And have seen that no Content-Length-Header is there, now i assume that > mongrel add this header but to late. > > What i also assume that the response-header should be send completely by > mongrel. > > It looks to me that the mongreladapter need a little bit redesign, could > i try it ;-)? > > Is anybody on this list which have more experience with ruby and mongrel > who can help me ;-)) > > Regards > > Alex > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From al-nitrogen at none.at Sat Aug 5 07:13:41 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 13:13:41 +0200 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <716700c90608050337u181d9b8tb5705798fa351ad8@mail.gmail.com> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> <716700c90608050337u181d9b8tb5705798fa351ad8@mail.gmail.com> Message-ID: <20060805111341.GA4866@none.at> On Sam 05.08.2006 10:37, Fang Sun wrote: >It should be mongrel do the trick, just quote mongrel rdoc: > >"One additional caveat is that you don't have to specify the >Content-length header as the HttpResponse will write this for you based >on the out length." I understand your hint with the pale ;-) I must dig deeper into the mongrel docs ;-)) Regards Alex From al-nitrogen at none.at Sat Aug 5 07:14:27 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 13:14:27 +0200 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <716700c90608050341j3425ed25wd26a69533978a2b3@mail.gmail.com> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> <20060805101800.GB32266@none.at> <716700c90608050341j3425ed25wd26a69533978a2b3@mail.gmail.com> Message-ID: <20060805111427.GB4866@none.at> On Sam 05.08.2006 10:41, Fang Sun wrote: >+1, just go for it. As George said before, the mongrel adapter is based >on webrick, after long time development mongrel is becoming another >monster to take special care. Well i will start an look how far i come ;-) regards Alex From al-nitrogen at none.at Sat Aug 5 08:34:44 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 14:34:44 +0200 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <20060805101800.GB32266@none.at> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> <20060805101800.GB32266@none.at> Message-ID: <20060805123444.GA9027@none.at> On Sam 05.08.2006 12:18, Alexander Lazic wrote: > >I think i have found the error but not a solution, yet. And it was *drum rolls* ### /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/lib/nitro/cgi.rb => def self.response_headers(context, proto = false) buf << EOL ### Puh i'am very glad to found this ;-)) @George: how about to add around this this: ### if not proto buf << EOL end ### as some lines before for http ;-) Thoughts?! Regards Alex From john at oxyliquit.de Sat Aug 5 09:02:20 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 05 Aug 2006 15:02:20 +0200 Subject: [Nitro] Q about helper :form In-Reply-To: <20060804221811.GA32193@none.at> References: <20060804221811.GA32193@none.at> Message-ID: On Sat, 05 Aug 2006 00:18:11 +0200, Alexander Lazic wrote: > the controller.rb > --- > class Hello make this: class Hello < Nitro::Controller I think this should to it Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From al-nitrogen at none.at Sat Aug 5 09:22:41 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 15:22:41 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter Message-ID: <20060805132241.GA11050@none.at> Hi, attached the first attempt to mongrelify the adapter ;-) At the moment i see some pitfalls: 1.) i have *borrow* some code from lib/nitro/cgi.rb because i haven't found a easy way to get the header from Cgi.response_headers(context). This methode return the headers as string and i don't like to make hash=>string=>hash :-( @George: howabout to add a methode Cgi.response_headers_as_hash or is there a easier way in ruby which i don't know?! 2.) Are in server.options also the --debug flag from the commandline? 3.) It's a quick hack from a ruby newbie threfore somethings could be *better* ;-) I'am not sure if the Mongrel::Configurator is the *best* or preferd way to setup the mongrel but i hope somone can us help in this issue ;-))) Please tell me your thoughts ;-) Regards Alex -------------- next part -------------- --- /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/lib/nitro/adapter/mongrel.rb.orig 2006-08-05 09:55:03.000000000 +0200 +++ /home/al/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0/lib/nitro/adapter/mongrel.rb 2006-08-05 15:11:47.000000000 +0200 @@ -35,38 +35,30 @@ class << self attr_accessor :mongrel + attr_accessor :mongrel_config # Start the Webrick adapter. def start(server) # TODO add logging. - mongrel_options = server.options.dup - - mongrel_options.update( - :BindAddress => server.address, - :Port => server.port, - :DocumentRoot => server.public_root - ) - - @mongrel = ::Mongrel::HttpServer.new(mongrel_options[:BindAddress], - mongrel_options[:Port]) - - trap('INT') { exit } # works until you use breakpoint... why? - - @mongrel.register('/', MongrelAdapter.new(server)) - - initialize_mongrel(server) - - @mongrel.run - @mongrel_thread = @mongrel.acceptor - @mongrel_thread.join + @mongrel_config = ::Mongrel::Configurator.new :host => server.address do + listener :port => server.port do + uri "/", :handler => MongrelAdapter.new(server) + trap('INT') { exit } # works until you use breakpoint... why? +# debug "/" + run + end + end + @mongrel_config.log("Started mongel on " + server.address + ":" + server.port.to_s) + @mongrel_config.join end # Stop the Mongrel adapter. def stop - @mongrel_thread.kill + @mongrel_config.log("Stopped mongel on " + server.address + ":" + server.port.to_s) + @mongrel_config.stop end # Override this method to perform customized mongrel @@ -139,12 +131,20 @@ Cgi.parse_cookies(context) context.render(path) - - res.status = context.status - res.header.out << Cgi.response_headers(context) - res.body << context.out - + # what is the error code if a request without a handler is comming?! al 2006-Aug-05 + res.start(context.status,true) do |head,out| + context.response_headers.each do |key, value| + head[key] = value + end + + context.response_cookies.each do |cookie| + head['Set-Cookie:'] = cookie + end if context.response_cookies + + out.write(context.out) + end + context.close ensure Og.manager.put_store if defined?(Og) and Og.respond_to?(:manager) and Og.manager From zedshaw at zedshaw.com Sat Aug 5 13:03:25 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 05 Aug 2006 10:03:25 -0700 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <20060805132241.GA11050@none.at> References: <20060805132241.GA11050@none.at> Message-ID: <1154797405.6039.17.camel@localhost.localdomain> On Sat, 2006-08-05 at 15:22 +0200, Alexander Lazic wrote: > Hi, > > attached the first attempt to mongrelify the adapter ;-) > I'll look at this, and if you're on IRC I'd like to help. > I'am not sure if the Mongrel::Configurator is the *best* or preferd way > to setup the mongrel but i hope somone can us help in this issue ;-))) > Yep, use Configurator, it's not Rails specific (RailsConfigurator is, which is a hint that you might need a NitroConfigurator). -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From al-nitrogen at none.at Sat Aug 5 13:34:47 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 19:34:47 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <1154797405.6039.17.camel@localhost.localdomain> References: <20060805132241.GA11050@none.at> <1154797405.6039.17.camel@localhost.localdomain> Message-ID: <20060805173447.GB23804@none.at> On Sam 05.08.2006 10:03, Zed Shaw wrote: >On Sat, 2006-08-05 at 15:22 +0200, Alexander Lazic wrote: >> >> attached the first attempt to mongrelify the adapter ;-) > >I'll look at this, and if you're on IRC I'd like to help. And what do you think about it ;-) Sorry but i'am not a IRCer :-( >> I'am not sure if the Mongrel::Configurator is the *best* or preferd >> way to setup the mongrel but i hope somone can us help in this issue >> ;-))) > >Yep, use Configurator, it's not Rails specific (RailsConfigurator is, >which is a hint that you might need a NitroConfigurator). I have looked into mongrel/rails.rb and it looks to me that mongrel call rails isn't it? Nitro goes the other way and call mongrel from nitro what do you mean, from mongrel point of view, is the better way, if there any ;-) regards Alex From zedshaw at zedshaw.com Sat Aug 5 13:35:09 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sat, 05 Aug 2006 10:35:09 -0700 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <20060805071849.GB25361@none.at> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> Message-ID: <1154799309.6039.41.camel@localhost.localdomain> On Sat, 2006-08-05 at 09:18 +0200, Alexander Lazic wrote: > On Sam 05.08.2006 01:55, Fang Sun wrote: > Yeah, I really need to write why Mongrel does this officially. Anyway, on to the real question... > At the moment i don't know a client which use pipelineing, but this > wasn't my issue ;-) > Yes, exactly, but if it's in the standard some dip will start exploring it and use it in his next piece of crap social network. Ok, now that I got that off my chest. :-) > What i have meant was that after the Set-Cookie-Header a futher header > is send which is wrong! > > Anybody, nitro || mongrel, sends: > > --- > "Date: Fri, 04 Aug 2006 23:00:29 GMT\r\nStatus: 200 OK\r\nContent-Type: \ > text/html\r\nSet-Cookie: nsid=376b3e39265fc699c62ab4aa3868e3e4; \ > Path=/\r\n\r\nContent-Length: 110\r\n\r\n" > --- > > The '\r\n' is the 'delimiter' for the header as RFC2616 say ;-) > > My Question was now *who* send the Cookie-Header and *who* the > Content-Length-Header? Mongrel doesn't do cookies, so Nitro must be hacking into the HttpResponse object and messing things up. Get together with me on IRC and I'll help debug it. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From al-nitrogen at none.at Sat Aug 5 13:56:35 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 5 Aug 2006 19:56:35 +0200 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <1154799309.6039.41.camel@localhost.localdomain> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> <1154799309.6039.41.camel@localhost.localdomain> Message-ID: <20060805175635.GD23804@none.at> On Sam 05.08.2006 10:35, Zed Shaw wrote: >On Sat, 2006-08-05 at 09:18 +0200, Alexander Lazic wrote: > >Yes, exactly, but if it's in the standard some dip will start exploring >it and use it in his next piece of crap social network. > >Ok, now that I got that off my chest. :-) Thanks to open it a little bit ;-) What do you think to add a *switch* so that we can use some proxy-modules which are use the keep-alive without the pipline ;-) What i think about is such behaviour: Default => Connection: close with --keep-alive be RFC conform ;-) Thoughts?! >> My Question was now *who* send the Cookie-Header and *who* the >> Content-Length-Header? > >Mongrel doesn't do cookies, so Nitro must be hacking into the >HttpResponse object and messing things up. Get together with me on IRC >and I'll help debug it. Thanks for help, i have found the *bad guy* ;-) As i wrote in <20060805123444.GA9027 at none.at> It was in lib/nitro/cgi.rb ### => def self.response_headers(context,proto = false) . . buf << EOL . . ### As you have seen i my patch i have copied the each-loops from this routine into the mongrel-adapter :-) I hope that we find a better solution => DRY, you know ;-) Regards Alex From james.britt at gmail.com Sat Aug 5 23:10:58 2006 From: james.britt at gmail.com (James Britt) Date: Sat, 05 Aug 2006 20:10:58 -0700 Subject: [Nitro] Looking for examples of ScriptAdapter use Message-ID: <44D55DC2.5030409@gmail.com> I'm trying to write some integration test code using ScriptAdapter, but can't quite get what I need to do. Are there any examples available? -- James Britt "A principle or axiom is of no value without the rules for applying it." - Len Bullard From zedshaw at zedshaw.com Sun Aug 6 04:03:15 2006 From: zedshaw at zedshaw.com (Zed Shaw) Date: Sun, 06 Aug 2006 01:03:15 -0700 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <20060805175635.GD23804@none.at> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> <1154799309.6039.41.camel@localhost.localdomain> <20060805175635.GD23804@none.at> Message-ID: <1154851395.5994.21.camel@localhost.localdomain> On Sat, 2006-08-05 at 19:56 +0200, Alexander Lazic wrote: > On Sam 05.08.2006 10:35, Zed Shaw wrote: > >On Sat, 2006-08-05 at 09:18 +0200, Alexander Lazic wrote: > > > >Yes, exactly, but if it's in the standard some dip will start exploring > >it and use it in his next piece of crap social network. > > > >Ok, now that I got that off my chest. :-) > > Thanks to open it a little bit ;-) > > What do you think to add a *switch* so that we can use some > proxy-modules which are use the keep-alive without the pipline ;-) > > What i think about is such behaviour: > > Default => Connection: close > with --keep-alive be RFC conform ;-) > > Thoughts?! No. If your proxy doesn't close the connection when it encounters "Connection: close" then ***it's*** not following the standard. That's why Mongrel does it. So that it can process one request at a time but still follow the standard. Simply not sending this header does not magically make Mongrel descend into the nasty ugly part of the RFC around "keep-alive" and "pipe-lining". Finally, while you may think "keep alive" and "pipe line" are different, they aren't. It's kind of like saying a salmon is different from a fish. You need one to have the other, so there's no point arguing some imaginary difference between the two. Anyway, not gonna happen any time soon, and it's not really needed. It's a *huge* (let me repeat, gigantic, massive *all fake*) myth that turning keep-alives on and pipe-lining requests over HTTP makes your app faster. It's a load of bull that had dubious motivations (think MS vs. Netscape) back in the day when clients were pathetic (things changed thanks to DDoS) and was backed by sad little statistics. Sorry, but people who fret over keep-alive and pipe-lining I've found either use broken proxies or don't want to design their services around batched processing. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support? From al-nitrogen at none.at Sun Aug 6 05:27:22 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sun, 6 Aug 2006 11:27:22 +0200 Subject: [Nitro] Q about mongrel && nitro In-Reply-To: <1154851395.5994.21.camel@localhost.localdomain> References: <20060804234059.GA2999@none.at> <716700c90608041855i6748046bhaff5667a3fe9596a@mail.gmail.com> <20060805071849.GB25361@none.at> <1154799309.6039.41.camel@localhost.localdomain> <20060805175635.GD23804@none.at> <1154851395.5994.21.camel@localhost.localdomain> Message-ID: <20060806092722.GA4335@none.at> On Son 06.08.2006 01:03, Zed Shaw wrote: >On Sat, 2006-08-05 at 19:56 +0200, Alexander Lazic wrote: >> Thanks to open it a little bit ;-) >> >> What do you think to add a *switch* so that we can use some >> proxy-modules which are use the keep-alive without the pipline ;-) >> >> What i think about is such behaviour: >> >> Default => Connection: close >> with --keep-alive be RFC conform ;-) >> >> Thoughts?! > >No. If your proxy doesn't close the connection when it encounters >"Connection: close" then ***it's*** not following the standard. Full ack, the most proxies close the connection ;-) >That's why Mongrel does it. So that it can process one request at a >time but still follow the standard. Simply not sending this header does >not magically make Mongrel descend into the nasty ugly part of the RFC >around "keep-alive" and "pipe-lining". Also ack. >Finally, while you may think "keep alive" and "pipe line" are >different, they aren't. It's kind of like saying a salmon is different >from a fish. You need one to have the other, so there's no point >arguing some imaginary difference between the two. Ack but the revese statement, keep-alive without pipeline can't work, isn't valid, from my point of view. There are many clients and server which use keep-alive without pipelineing as i know. To make a simple statement: You can use keep-alive without piplineing. You can't use piplineing without keep-alive. Can you agree with that?! A bigger *uglier* i find is the Transfer-Encoding: chunked ;-) >Anyway, not gonna happen any time soon, and it's not really needed. >It's a *huge* (let me repeat, gigantic, massive *all fake*) myth that >turning keep-alives on and pipe-lining requests over HTTP makes your >app faster. It's a load of bull that had dubious motivations (think MS >vs. Netscape) back in the day when clients were pathetic (things >changed thanks to DDoS) and was backed by sad little statistics. May be for plain HTTP but for HTTPS it's a *really big* performance issue, i have seen this in may all day work ;-) >Sorry, but people who fret over keep-alive and pipe-lining I've found >either use broken proxies or don't want to design their services around >batched processing. I think that keep-alive could be a help for server and client if all components between works correct ;-) I don't see 'keep-alive and pipe-lining' as i wrote before i see: keep-alive or (keep-alive and pipe-lining) Jm2c BTW: which #irc-server && channel have you mean ;-) Regards Alex From surrender_it at yahoo.it Sun Aug 6 10:02:49 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 06 Aug 2006 16:02:49 +0200 Subject: [Nitro] Tryng Facets 1.7 In-Reply-To: <4b6f054f0608010840n44c4148frff32a441e555db64@mail.gmail.com> References: <4b6f054f0608010840n44c4148frff32a441e555db64@mail.gmail.com> Message-ID: TRANS ha scritto: > Hi. I'm finally back. Was an aweful trip. Anyway... > > Has anyone tried Facets 1.7 with Nitro/Og? done it some time ago, with it repo.np.org fails one more test, and IIRC not even the minimal Proto application is working with it anymore. Anyway, the error was this: 4) Error: test_aspect(TestControllerAspect): NoMethodError: undefined method `[]' for nil:NilClass repo/nitro/lib/nitro/cgi/request.rb:178:in `referer' repo/nitro/lib/nitro/render.rb:223:in `redirect_to_referer' (eval):15:in `list_action' repo/nitro/lib/nitro/publishable.rb:109:in `method_missing' ./test/nitro/tc_controller_aspect.rb:26:in `test_aspect' -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From surrender_it at yahoo.it Sun Aug 6 10:52:33 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 06 Aug 2006 16:52:33 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> Message-ID: Fabian Buch ha scritto: > > Was too impatient and just hacked one. It copies the given part to the > applications folder (part/partname) and moves the content of its > public/ folder to public/part/partname. sorry, I was away for family business. > attacheed patch is against repo.nitroproject.org for what is worth, I could replicate the patch against the new gen infrastructure, but I'm not sure I understand what is the use for this: you just want to copy a part from some $LOAD_PATH into the main directory (plus proper public/ handling) ? -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From surrender_it at yahoo.it Sun Aug 6 15:56:05 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 06 Aug 2006 21:56:05 +0200 Subject: [Nitro] Change settings programmatically Message-ID: Hi everyone, sorry for the dumb question, but is there a way to change the value of a setting/annotation via reflection, given klass="Klass" name="setting" value="foo" I could use eval(klass+"."+name+"="+value) or constant(klass).send(name+"=",value) but I recall that there was some less powerful and cleaner way, any ideas? Thanks in advance. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From george.moschovitis at gmail.com Sun Aug 6 16:19:57 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 6 Aug 2006 23:19:57 +0300 Subject: [Nitro] Change settings programmatically In-Reply-To: References: Message-ID: > I could use eval(klass+"."+name+"="+value) or > constant(klass).send(name+"=",value) but I recall that there was some > less powerful and cleaner way, any ideas? how about: klass = MyClass name = :mysetting value = 25 Configuration[klass][name].value = value -g. -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Mon Aug 7 07:08:11 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 07 Aug 2006 13:08:11 +0200 Subject: [Nitro] gen and parts In-Reply-To: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> Message-ID: Hi, > If not I'm thinking of implementing it myself, since I want parts > with a public/ dir and this would've to be copied into the main apps > public/ dir. Wouldn't it make more sense, just to use a common path for parts? I mean, parts aren't there to get modified (normally) by the standard user. Using parts would just work like `require 'parts/CMS'`, so there is actually no real need to copy anything. You're probably thinking of editability, but for lox I don't think this is needed. When the user really wants to mess with parts, he really gotta know what he does, if not, he's screwed in anyway. Jo PS: Sorry everyone, Oxyliquit had some out time again, I better make some monitoring tool.... -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From james.britt at gmail.com Mon Aug 7 09:47:10 2006 From: james.britt at gmail.com (James Britt) Date: Mon, 07 Aug 2006 06:47:10 -0700 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> Message-ID: <44D7445E.6000401@gmail.com> Jonathan Buch wrote: > Hi, > > >>If not I'm thinking of implementing it myself, since I want parts >>with a public/ dir and this would've to be copied into the main apps >>public/ dir. > > > Wouldn't it make more sense, just to use a common path for parts? > I mean, parts aren't there to get modified (normally) by the standard > user. Using parts would just work like `require 'parts/CMS'`, so there is > actually no real need to copy anything. If my part has some HTML files in parts/public/, will they been seen by Nitro and/or the front-end Web server? Likewise for any images or javascript that would be in subdirectories of public/. -- James Britt From lasso at lassoweb.se Mon Aug 7 13:52:56 2006 From: lasso at lassoweb.se (Lars Olsson) Date: Mon, 07 Aug 2006 19:52:56 +0200 Subject: [Nitro] Separating action and arguments Message-ID: <44D77DF8.6020609@lassoweb.se> Hi list! I currently have a Nitro controller that generates links looking like this: ... The template code that generate this HTML is: ... Now I'm trying to switch to "pretty" urls: ... I've created an action that takes an argument, but I'm having problems creating the template code since request.path includes the "action arguments" as well (i.e cccccc in the example link above) Is there an easy way (other than File.dirname...which doesn't work with multiple arguments) to get the path of an action *without* the action arguments? Sincerely /lasso -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From surrender_it at yahoo.it Mon Aug 7 15:27:36 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 07 Aug 2006 21:27:36 +0200 Subject: [Nitro] Change settings programmatically In-Reply-To: References: Message-ID: gabriele renzi ha scritto: > Hi everyone, > > sorry for the dumb question, but is there a way to change the value of a > setting/annotation via reflection, given > klass="Klass" > name="setting" > value="foo" > I could use eval(klass+"."+name+"="+value) or > constant(klass).send(name+"=",value) but I recall that there was some > less powerful and cleaner way, any ideas? > > Thanks in advance. ok, for what is worth, I found the way, doing s=Configuration[owner][name.to_sym] s.value= new value Now, if only I could dump Configuration to yaml :/ -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From fabian at oggu.de Mon Aug 7 15:49:37 2006 From: fabian at oggu.de (Fabian Buch) Date: Mon, 7 Aug 2006 21:49:37 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> Message-ID: <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Am 06.08.2006 um 16:52 schrieb gabriele renzi: > for what is worth, I could replicate the patch against the new gen > infrastructure, but I'm not sure I understand what is the use for > this: > you just want to copy a part from some $LOAD_PATH into the main > directory (plus proper public/ handling) ? Yes, but the main reason is the public/ handling, since I want parts that also have images, custom css files and maybe (like James) custom JS files. It could be somehow piped or css in actions (like the admin part does), but that doesn't work nice for images. So at least the public/ directory of a part has to be copied to the applications public/ directory, to be visible by the webserver directly. My patch does both, copy the whole part and it's public/ directory into the applications public/ directory. I think that's also what George means by "The files that reside in the public directory are typically copied by a code generator to your application public dir." in the rdoc of part.rb, just that till now this generator wasn't implemented yet. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From john at oxyliquit.de Mon Aug 7 18:49:43 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 08 Aug 2006 00:49:43 +0200 Subject: [Nitro] gen and parts In-Reply-To: <44D7445E.6000401@gmail.com> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <44D7445E.6000401@gmail.com> Message-ID: Hi, > If my part has some HTML files in parts/public/, will they been seen by > Nitro and/or the front-end Web server? Likewise for any images or > javascript that would be in subdirectories of public/. that is a very good question.... How would conflicts be handled? (same file names in different `public/` directories). Not sure if it's possible to implement, since static files are served by the Web-server and not by Nitro. I think I got it now, yeah :P So yes, a `gen part .` doing a copy of the `public/` dir is needed.... Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Mon Aug 7 18:55:17 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 08 Aug 2006 00:55:17 +0200 Subject: [Nitro] http://oxyliquit.de/question/73 Message-ID: Maybe a question for George? seems like a bug to me, can't check that right now though. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From surrender_it at yahoo.it Mon Aug 7 19:21:58 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Tue, 08 Aug 2006 01:21:58 +0200 Subject: [Nitro] gen and parts In-Reply-To: <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Message-ID: Fabian Buch ha scritto: > Am 06.08.2006 um 16:52 schrieb gabriele renzi: > >>for what is worth, I could replicate the patch against the new gen >>infrastructure, but I'm not sure I understand what is the use for >>this: >>you just want to copy a part from some $LOAD_PATH into the main >>directory (plus proper public/ handling) ? > > > Yes, but the main reason is the public/ handling, since I want parts > that also have images, custom css files and maybe (like James) custom > JS files. It could be somehow piped or css in actions (like the admin > part does), but that doesn't work nice for images. So at least the > public/ directory of a part has to be copied to the applications > public/ directory, to be visible by the webserver directly. I see thank you , I'll implement this since it is simple enough :) But just another question: how do you handle references to media/js in the part code? Do you rely on hardcoded paths (i.e. ), or is there a way through which we could make it modular, allowing for the copying of a part with a different name? What I mean is, for example, gen part wiki pages that could copy the wiki part installing it into the application as part/pages and public/pages. It seem kind of useful, but seem hard to do. > My patch does both, copy the whole part and it's public/ directory > into the applications public/ directory. yes I've seen that, I just did not really understood what it was for :) > I think that's also what George means by "The files that reside in > the public directory are typically copied by a code generator to your > application public dir." in the rdoc of part.rb, just that till now > this generator wasn't implemented yet. yup, thanks for taking time to explain :) -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From fabian at oggu.de Tue Aug 8 07:00:39 2006 From: fabian at oggu.de (Fabian Buch) Date: Tue, 8 Aug 2006 13:00:39 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Message-ID: Am 08.08.2006 um 01:21 schrieb gabriele renzi: > I see thank you , I'll implement this since it is simple enough :) > But just another question: how do you handle references to media/js in > the part code? > Do you rely on hardcoded paths (i.e. something.png>), > or is there a way through which we could make it modular, allowing for > the copying of a part with a different name? Well, I've written a test part where I made a setting for it, like in the AdminPart there's a setting :charset, mine looks as follows: class TestPart setting :public, :default => '/part/test' setting :charset, :default => 'utf-8' end Then in a skin for example I use: I'm not so sure whether it's clever to name it :public, maybe something nicer could be found. But you get the idea and it could be set as guidline for Part developers to always set this setting (whether it's :public or something else we define through this thread) if the part uses a public/ directory. Gen could then override this setting while copying the part. My "gen part" doesn't take the latter into account yet. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From transfire at gmail.com Tue Aug 8 09:17:36 2006 From: transfire at gmail.com (TRANS) Date: Tue, 8 Aug 2006 09:17:36 -0400 Subject: [Nitro] Change settings programmatically In-Reply-To: References: Message-ID: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> On 8/7/06, gabriele renzi wrote: > gabriele renzi ha scritto: > > Hi everyone, > > > > sorry for the dumb question, but is there a way to change the value of a > > setting/annotation via reflection, given > > klass="Klass" > > name="setting" > > value="foo" > > I could use eval(klass+"."+name+"="+value) or > > constant(klass).send(name+"=",value) but I recall that there was some > > less powerful and cleaner way, any ideas? > > > > Thanks in advance. > > ok, for what is worth, I found the way, doing > s=Configuration[owner][name.to_sym] > s.value= new value Why doesn;t this work? owner.setting name.to_sym => new valuw > Now, if only I could dump Configuration to yaml :/ T. From surrender_it at yahoo.it Wed Aug 9 04:30:26 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 10:30:26 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Message-ID: Fabian Buch ha scritto: > Am 08.08.2006 um 01:21 schrieb gabriele renzi: > >>I see thank you , I'll implement this since it is simple enough :) >>But just another question: how do you handle references to media/js in >>the part code? >>Do you rely on hardcoded paths (i.e. >something.png>), >>or is there a way through which we could make it modular, allowing for >>the copying of a part with a different name? > > > Well, I've written a test part where I made a setting for it, like in > the AdminPart there's a setting :charset, mine looks as follows: > > class TestPart > setting :public, :default => '/part/test' > setting :charset, :default => 'utf-8' > end > > Then in a skin for example I use: > > makes sense, even if I admit I prefer to set References: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> Message-ID: TRANS ha scritto: >>ok, for what is worth, I found the way, doing >>s=Configuration[owner][name.to_sym] >>s.value= new value > > > Why doesn;t this work? > > owner.setting name.to_sym => new valuw Because owner is_a String, not a Module. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From surrender_it at yahoo.it Wed Aug 9 04:41:24 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 10:41:24 +0200 Subject: [Nitro] Building objects from Strings Message-ID: Hi everyone, I have a somewhat working interface to change Settings from the administration UI, and I think it is a Good Thing(TM). But bat the moment it is slightly fragile, and uses a hacky way of getting the values from the user. Basically, I'm providigin small text fields for each "good" setting, and in the server side I'm assigning to the setting the value by transforming it in the right type. In code: setting.value = setting.type.new(param[name]) Now to the bad one: ruby does not have String constructors for many things, so the above is working fine for String and Numerics. I added the handling for Booleans as a simple def TrueClass.new(arg) arg=='true' end def FalseClass.new(arg) not TrueClass.new(arg) end A better solution could be using YAML.load on the given String. Someone has other ideas or could point me to something in facets (i.e. core/kernel/parse_literal) ? -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From manveru at weez-int.com Wed Aug 9 05:07:33 2006 From: manveru at weez-int.com (Michael Fellinger) Date: Wed, 9 Aug 2006 18:07:33 +0900 Subject: [Nitro] Building objects from Strings In-Reply-To: References: Message-ID: <200608091807.33440.manveru@weez-int.com> On Wednesday 09 August 2006 17:41, gabriele renzi wrote: > Hi everyone, > > I have a somewhat working interface to change Settings from the > administration UI, and I think it is a Good Thing(TM). > > But bat the moment it is slightly fragile, and uses a hacky way of > getting the values from the user. > Basically, I'm providigin small text fields for each "good" setting, and > in the server side I'm assigning to the setting the value by > transforming it in the right type. > > In code: > > setting.value = setting.type.new(param[name]) > > Now to the bad one: ruby does not have String constructors for many > things, so the above is working fine for String and Numerics. > I added the handling for Booleans as a simple > def TrueClass.new(arg) arg=='true' end > def FalseClass.new(arg) not TrueClass.new(arg) end > > A better solution could be using YAML.load on the given String. > Someone has other ideas or could point me to something in facets (i.e. > core/kernel/parse_literal) ? did you think about checkboxes? -- Weez International Limited East Roppongi Bldg 5F, 509 3-16-35 Roppongi, Minato-ku Tokyo #106-0032 Tel: 81-(0)3-3505-3881 Fax: 81-(0)3-3505-3883 E-mail: manveru at weez-int.com Website: http://weez-int.com From fabian at oggu.de Wed Aug 9 05:34:39 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 9 Aug 2006 11:34:39 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Message-ID: Am 09.08.2006 um 10:30 schrieb gabriele renzi: > Fabian Buch ha scritto: >> > > makes sense, even if I admit I prefer to set href="#{TestPart.public}> so that I can simplify the rest of the > html code. I'm not sure how that works. Can you elaborate? > As for the name.. well, it has a name clash with ruby's #public so > possibly public_root or public_dir could be better ? Let's go with public_root then! Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From transfire at gmail.com Wed Aug 9 05:36:24 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 05:36:24 -0400 Subject: [Nitro] Change settings programmatically In-Reply-To: References: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> Message-ID: <4b6f054f0608090236l6aac96fbk985a5eeb5bc42f5f@mail.gmail.com> On 8/9/06, gabriele renzi wrote: > TRANS ha scritto: > > >>ok, for what is worth, I found the way, doing > >>s=Configuration[owner][name.to_sym] > >>s.value= new value > > > > > > Why doesn;t this work? > > > > owner.setting name.to_sym => new valuw > > Because owner is_a String, not a Module. I see. Is owner a string representation of an actual module? Or is it possible that you want to "settize" a module prior to it's existance? T. From surrender_it at yahoo.it Wed Aug 9 05:47:25 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 11:47:25 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Message-ID: Fabian Buch ha scritto: > Am 09.08.2006 um 10:30 schrieb gabriele renzi: > >>Fabian Buch ha scritto: >> >>> >> >>makes sense, even if I admit I prefer to set >href="#{TestPart.public}> so that I can simplify the rest of the >>html code. > > > I'm not sure how that works. Can you elaborate? Each time you use a link you should be using the absolute path /foo/media/test.png, but if you set the HTML tagh then you can just use src="test.png" in that page. In my admin code, for example, I'm using something like in the SystemPage, to let me use very simple and always working html to refer to actions, withouth referring to complex Routes in views. So forms become something like: referring to self.list and links become referring to self.delete. Absolute paths still work fine, so everything is nice, but there may be hidden problems somewhere that I ignore. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From transfire at gmail.com Wed Aug 9 05:48:38 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 05:48:38 -0400 Subject: [Nitro] project dir Message-ID: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> I have to make a final decision for Reap before the next release about this meta/ directory. Is it worth the bother? And if so what should it be called really? FYI the idea is to have a project location for those file that normally sit at the top and are about the project itself. I asked on Ruby-talk but few people seemed interested in the topic. One person did mention using script/ however --apparently this is a Railism. To clarify it's curious to wonder, how would you categorize these files: ProjectInfo ChangeLog VERSION MANIFEST Rakefile Reapfile Taskfile README COPYING LICENSE setup.rb doap.xml Although, both setup.rb and Rakefile are the only two that cannot be put in a subdir at this point because they do not support it. And one can question the prudence of putting README and COPYING or LICENSE in a subdir too. T. From surrender_it at yahoo.it Wed Aug 9 05:51:20 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 11:51:20 +0200 Subject: [Nitro] Change settings programmatically In-Reply-To: <4b6f054f0608090236l6aac96fbk985a5eeb5bc42f5f@mail.gmail.com> References: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> <4b6f054f0608090236l6aac96fbk985a5eeb5bc42f5f@mail.gmail.com> Message-ID: TRANS ha scritto: >>>>s=Configuration[owner][name.to_sym] >>>>s.value= new value >>> >>> >>>Why doesn;t this work? >>> >>> owner.setting name.to_sym => new valuw >> >>Because owner is_a String, not a Module. > > > I see. Is owner a string representation of an actual module? Or is it > possible that you want to "settize" a module prior to it's existance? no, all the Modules exist, my solution is working nicely so nevermind, I don't think it is bad :) Anyway, a take on the other question: If I recall correct you recently changed the implementation of annotations so that each one keeps track of its owner, and this may be the reason thay're no more serializable with a dummy to_yaml. Are there any plans to provide this kind of functionality, or to accept a patch that could do it? Or possibly I'm just horribly wrong? -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From transfire at gmail.com Wed Aug 9 05:55:56 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 05:55:56 -0400 Subject: [Nitro] Building objects from Strings In-Reply-To: References: Message-ID: <4b6f054f0608090255i1877e3c8qe3a64ff595498b85@mail.gmail.com> On 8/9/06, gabriele renzi wrote: > Hi everyone, > > I have a somewhat working interface to change Settings from the > administration UI, and I think it is a Good Thing(TM). > > But bat the moment it is slightly fragile, and uses a hacky way of > getting the values from the user. > Basically, I'm providigin small text fields for each "good" setting, and > in the server side I'm assigning to the setting the value by > transforming it in the right type. > > In code: > > setting.value = setting.type.new(param[name]) > > Now to the bad one: ruby does not have String constructors for many > things, so the above is working fine for String and Numerics. > I added the handling for Booleans as a simple > def TrueClass.new(arg) arg=='true' end > def FalseClass.new(arg) not TrueClass.new(arg) end > > A better solution could be using YAML.load on the given String. > Someone has other ideas or could point me to something in facets (i.e. > core/kernel/parse_literal) ? Try: YAML.load( "--ruby/object:#{type} {}" ) Might be worth adding to Facets. T. From surrender_it at yahoo.it Wed Aug 9 06:00:49 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 12:00:49 +0200 Subject: [Nitro] Building objects from Strings In-Reply-To: <200608091807.33440.manveru@weez-int.com> References: <200608091807.33440.manveru@weez-int.com> Message-ID: Michael Fellinger ha scritto: > On Wednesday 09 August 2006 17:41, gabriele renzi wrote: > >>Hi everyone, >> >>I have a somewhat working interface to change Settings from the >>administration UI, and I think it is a Good Thing(TM). >> >>But bat the moment it is slightly fragile, and uses a hacky way of >>getting the values from the user. >>Basically, I'm providigin small text fields for each "good" setting, and >>in the server side I'm assigning to the setting the value by >>transforming it in the right type. >> >>In code: >> >> setting.value = setting.type.new(param[name]) >> >>Now to the bad one: ruby does not have String constructors for many >>things, so the above is working fine for String and Numerics. >>I added the handling for Booleans as a simple >>def TrueClass.new(arg) arg=='true' end >>def FalseClass.new(arg) not TrueClass.new(arg) end >> >>A better solution could be using YAML.load on the given String. >>Someone has other ideas or could point me to something in facets (i.e. >>core/kernel/parse_literal) ? > > > did you think about checkboxes? I did think of using Nitro's Controls for existing types, but in the original basic implementation I was just doing an eval() on the string, and nitro's checkbox control returns "t" or "f" instead of "true" and "false" so this would have not worked. If I was allowed to change that we could make this a setting, i.e. AdminPart.setting_input = (:controls or :text) Or I could change the implementation of TrueClass.new, but that would mean keeping this code around, which I'd like to remove alltogether. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From transfire at gmail.com Wed Aug 9 06:00:27 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 06:00:27 -0400 Subject: [Nitro] Change settings programmatically In-Reply-To: References: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> <4b6f054f0608090236l6aac96fbk985a5eeb5bc42f5f@mail.gmail.com> Message-ID: <4b6f054f0608090300u40cfb0ael519ca4e87ecdcb4f@mail.gmail.com> On 8/9/06, gabriele renzi wrote: > TRANS ha scritto: > > >>>>s=Configuration[owner][name.to_sym] > >>>>s.value= new value > >>> > >>> > >>>Why doesn;t this work? > >>> > >>> owner.setting name.to_sym => new valuw > >> > >>Because owner is_a String, not a Module. > > > > > > I see. Is owner a string representation of an actual module? Or is it > > possible that you want to "settize" a module prior to it's existance? > > no, all the Modules exist, my solution is working nicely so nevermind, I > don't think it is bad :) > > Anyway, a take on the other question: If I recall correct you recently > changed the implementation of annotations so that each one keeps track > of its owner, and this may be the reason thay're no more serializable > with a dummy to_yaml. > Are there any plans to provide this kind of functionality, or to accept > a patch that could do it? > Or possibly I'm just horribly wrong? Ah, now there's an unexpected consequence. Personally I'm not so sure they should be tracking their owner, but George had requested that they at least know hteir own name, which menas they might as well know their owner too. But I'll have alook at it again and see. Could you give me an example of how you had serialized them? Thanks, T. From aglarond at gmail.com Wed Aug 9 06:26:20 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 9 Aug 2006 12:26:20 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Message-ID: <55c107bf0608090326g4f95d9f9x8cdd13ac68eaaf10@mail.gmail.com> On 8/9/06, Fabian Buch wrote: > > > Let's go with public_root then! > How about 'webroot' or 'web_root'? I've always been averse to the use of 'public' as a description for files to be served by a webserver... - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060809/422c05e2/attachment.html From surrender_it at yahoo.it Wed Aug 9 06:27:42 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 12:27:42 +0200 Subject: [Nitro] Setings to YAML (was Re: Change settings programmatically) In-Reply-To: <4b6f054f0608090300u40cfb0ael519ca4e87ecdcb4f@mail.gmail.com> References: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> <4b6f054f0608090236l6aac96fbk985a5eeb5bc42f5f@mail.gmail.com> <4b6f054f0608090300u40cfb0ael519ca4e87ecdcb4f@mail.gmail.com> Message-ID: TRANS ha scritto: >>Anyway, a take on the other question: If I recall correct you recently >>changed the implementation of annotations so that each one keeps track >>of its owner, and this may be the reason thay're no more serializable >>with a dummy to_yaml. >>Are there any plans to provide this kind of functionality, or to accept >>a patch that could do it? >>Or possibly I'm just horribly wrong? > > > Ah, now there's an unexpected consequence. Personally I'm not so sure > they should be tracking their owner, but George had requested that > they at least know hteir own name, which menas they might as well know > their owner too. But I'll have alook at it again and see. Could you > give me an example of how you had serialized them? there was an old patch from Jonas Pfenninger[1] which basically has this: [Glue::Configuration#to_yaml and #save added Jonas Pfenniger **20060523120027] { hunk ./glue/lib/glue/configuration.rb 137 + + # Converts the configuration into yaml data. + + def to_yaml() + options = Hash.new + @@owners.each_pair do |owner,ss| + hash = Hash.new + options[owner.to_s.gsub(/::/,'.')] = {} + ss.each_pair do |key, setting| + options[owner.to_s.gsub(/::/,'.')][key.to_s] = setting.value + end + end + options.to_yaml + end + + # Saves the yaml data in the designed file. + + def save(filename) + File.open(filename,'w').write(to_yaml.to_s) + end you can see from the attached test that the output should be reparsable from Configuration.parse, which is already there but whose format is not cleanly documented: hunk ./glue/test/glue/tc_configuration.rb 133 + + # Settings save and reload + Configuration.parse(Configuration.to_yaml) + assert_equal 'wow', Dummy.root_dir + possibly we could redefine to_yaml in Setting to do the same thing to owner that is done there, i.e. to_s+gsub. But be careful, I'm only _supposing_ this is the reason fot it to fail.. the error I'm seeing happens in cases like: >> Configuration.settings.at(0).to_yaml TypeError: can't dump anonymous class Class from lib/ruby/1.8/yaml/rubytypes.rb:6:in `to_yaml' from lib/ruby/1.8/yaml/rubytypes.rb:41:in `to_yaml' from lib/ruby/1.8/yaml/rubytypes.rb:40:in `to_yaml' from lib/ruby/1.8/yaml/rubytypes.rb:39:in `to_yaml' from lib/ruby/1.8/yaml.rb:387:in `quick_emit' from lib/ruby/1.8/yaml/rubytypes.rb:38:in `to_yaml' from lib/ruby/1.8/yaml/rubytypes.rb:18:in `to_yaml' from lib/ruby/1.8/yaml/rubytypes.rb:17:in `to_yaml' from lib/ruby/1.8/yaml/rubytypes.rb:16:in `to_yaml' from lib/ruby/1.8/yaml.rb:387:in `quick_emit' from lib/ruby/1.8/yaml/rubytypes.rb:15:in `to_yaml' from (irb):2 it seem that redefining to_yaml_properties to avoid @type, @owner and @options make to_yaml work again, so the problem may not be strictly related to just owner.. [1]http://rubyforge.org/pipermail/nitro-general/2006-May/004569.html -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From aglarond at gmail.com Wed Aug 9 06:31:20 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 9 Aug 2006 12:31:20 +0200 Subject: [Nitro] project dir In-Reply-To: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> References: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> Message-ID: <55c107bf0608090331n19e1954ana4822009f9ed3ba5@mail.gmail.com> On 8/9/06, TRANS wrote: > > I have to make a final decision for Reap before the next release about > this meta/ directory. Is it worth the bother? And if so what should it > be called really? FYI the idea is to have a project location for those > file that normally sit at the top and are about the project itself. > How about '.reap'? Or, if the directory could be used by other tools as well, '.meta'? Just to make it a bit more unobtrusive by having it hidden. - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060809/ef2a2962/attachment-0001.html From surrender_it at yahoo.it Wed Aug 9 06:31:31 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 12:31:31 +0200 Subject: [Nitro] Building objects from Strings In-Reply-To: <4b6f054f0608090255i1877e3c8qe3a64ff595498b85@mail.gmail.com> References: <4b6f054f0608090255i1877e3c8qe3a64ff595498b85@mail.gmail.com> Message-ID: TRANS ha scritto: >>A better solution could be using YAML.load on the given String. >>Someone has other ideas or could point me to something in facets (i.e. >>core/kernel/parse_literal) ? > > > Try: > > YAML.load( "--ruby/object:#{type} {}" ) mh.. I assume there is #{value} missing somewhere there? > Might be worth adding to Facets. indeed, or to yaml.rb itself. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From transfire at gmail.com Wed Aug 9 06:35:14 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 06:35:14 -0400 Subject: [Nitro] Setings to YAML (was Re: Change settings programmatically) In-Reply-To: References: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> <4b6f054f0608090236l6aac96fbk985a5eeb5bc42f5f@mail.gmail.com> <4b6f054f0608090300u40cfb0ael519ca4e87ecdcb4f@mail.gmail.com> Message-ID: <4b6f054f0608090335h71112667lfe9cbff5b9d9e8a1@mail.gmail.com> Ah, this has to do with Settings and not Annotations. From transfire at gmail.com Wed Aug 9 06:48:32 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 06:48:32 -0400 Subject: [Nitro] Building objects from Strings In-Reply-To: References: <4b6f054f0608090255i1877e3c8qe3a64ff595498b85@mail.gmail.com> Message-ID: <4b6f054f0608090348i617ba1c7l6d92988c2406c080@mail.gmail.com> On 8/9/06, gabriele renzi wrote: > TRANS ha scritto: > > >>A better solution could be using YAML.load on the given String. > >>Someone has other ideas or could point me to something in facets (i.e. > >>core/kernel/parse_literal) ? > > > > > > Try: > > > > YAML.load( "--ruby/object:#{type} {}" ) > > mh.. I assume there is #{value} missing somewhere there? val = value.to_yaml.sub('---','') YAML.load( "--ruby/object:#{type} #{val}" ) Doesn't work though. YAML's not consistant it seems. T. From zimba.tm at gmail.com Wed Aug 9 06:54:22 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Wed, 9 Aug 2006 12:54:22 +0200 Subject: [Nitro] project dir In-Reply-To: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> References: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> Message-ID: <3ff63f9b0608090354k7b7084caofd071d540b71a51b@mail.gmail.com> On 09/08/06, TRANS wrote: > To clarify it's curious to wonder, how would you categorize these files: > > ProjectInfo > ChangeLog > VERSION > MANIFEST > Rakefile > Reapfile > Taskfile > README > COPYING > LICENSE > setup.rb > doap.xml Traditionally, README, COPYING, LICENSE, ... are in the project's root. Technically there is no difference excepting when you run reap and it has to look up for the Reapfile. Putting it in a sub-dir makes an unnecessary dir search. I think that README and other data text files should be placed where the author prefers them with a default to the root dir. -- Cheers, zimbatm http://zimbatm.oree.ch From zimba.tm at gmail.com Wed Aug 9 06:56:32 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Wed, 9 Aug 2006 12:56:32 +0200 Subject: [Nitro] Setings to YAML (was Re: Change settings programmatically) In-Reply-To: References: <4b6f054f0608080617x5d262a64v6e184be157f4678c@mail.gmail.com> <4b6f054f0608090236l6aac96fbk985a5eeb5bc42f5f@mail.gmail.com> <4b6f054f0608090300u40cfb0ael519ca4e87ecdcb4f@mail.gmail.com> Message-ID: <3ff63f9b0608090356h4fb46a6bn207effc1a7722eb2@mail.gmail.com> On 09/08/06, gabriele renzi wrote: > TRANS ha scritto: > there was an old patch from Jonas Pfenninger[1] which basically has this: > > [Glue::Configuration#to_yaml and #save added WARNING : YAML in Ruby 1.8.4 and below doesn't support class name exporting and Nitro often stores class names in it's settings. _why told be it should be fixes for 1.8.5. -- Cheers, zimbatm http://zimbatm.oree.ch From transfire at gmail.com Wed Aug 9 07:08:24 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 07:08:24 -0400 Subject: [Nitro] project dir In-Reply-To: <3ff63f9b0608090354k7b7084caofd071d540b71a51b@mail.gmail.com> References: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> <3ff63f9b0608090354k7b7084caofd071d540b71a51b@mail.gmail.com> Message-ID: <4b6f054f0608090408k6f2fbe00s6ff5db48fcbfa8ff@mail.gmail.com> On 8/9/06, Jonas Pfenniger wrote: > On 09/08/06, TRANS wrote: > > To clarify it's curious to wonder, how would you categorize these files: > > > > ProjectInfo > > ChangeLog > > VERSION > > MANIFEST > > Rakefile > > Reapfile > > Taskfile > > README > > COPYING > > LICENSE > > setup.rb > > doap.xml > > Traditionally, README, COPYING, LICENSE, ... are in the project's > root. Technically there is no difference excepting when you run reap > and it has to look up for the Reapfile. Putting it in a sub-dir makes > an unnecessary dir search. True, but it also makes for a very unclutterd layout when everything is neating separated. > I think that README and other data text files should be placed where > the author prefers them with a default to the root dir. Right. I'm not suggesting the author can't. Reap still supports the files it looks up if they are at root. My problem really is that 'meta' might be one of those names that's just too generic to ever catch on and as a general convention --so I'm trying to figure out if there is a better, readily acceptable nomenclature that might. T. From transfire at gmail.com Wed Aug 9 07:25:45 2006 From: transfire at gmail.com (TRANS) Date: Wed, 9 Aug 2006 07:25:45 -0400 Subject: [Nitro] project dir In-Reply-To: <55c107bf0608090331n19e1954ana4822009f9ed3ba5@mail.gmail.com> References: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> <55c107bf0608090331n19e1954ana4822009f9ed3ba5@mail.gmail.com> Message-ID: <4b6f054f0608090425i31bd10a4l3f10efcda2e16a1e@mail.gmail.com> On 8/9/06, Dimitri Aivaliotis wrote: > > On 8/9/06, TRANS wrote: > > I have to make a final decision for Reap before the next release about > > this meta/ directory. Is it worth the bother? And if so what should it > > be called really? FYI the idea is to have a project location for those > > file that normally sit at the top and are about the project itself. > > > > How about '.reap'? Or, if the directory could be used by other tools as > well, '.meta'? Just to make it a bit more unobtrusive by having it hidden. That seems to be a general thgouh too. I just don't think hiding these files altogether is a good idea. Just being able to set them aside in a directory I think is enough (and even that may be overly anal on my part). T. From fabian at oggu.de Wed Aug 9 07:50:45 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 9 Aug 2006 13:50:45 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> Message-ID: <7CE302FB-D417-4CA7-9B0E-7153CD2129CE@oggu.de> Am 09.08.2006 um 11:47 schrieb gabriele renzi: > Each time you use a link you should be using the absolute path > /foo/media/test.png, but if you set the HTML tagh href="/foo/media/"> then you can just use src="test.png" in that page. .. > Absolute paths still work fine, so everything is nice, but there > may be > hidden problems somewhere that I ignore. ic, where does this functionality come from? Is it a Nitro Compiler? In any case, if we use the setting a part developer can use whatever he wants, either always like my former example or via . Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From fabian at oggu.de Wed Aug 9 07:55:43 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 9 Aug 2006 13:55:43 +0200 Subject: [Nitro] gen and parts In-Reply-To: <55c107bf0608090326g4f95d9f9x8cdd13ac68eaaf10@mail.gmail.com> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> <55c107bf0608090326g4f95d9f9x8cdd13ac68eaaf10@mail.gmail.com> Message-ID: <7CE59F74-D14C-4216-8FD4-6EA596301708@oggu.de> Am 09.08.2006 um 12:26 schrieb Dimitri Aivaliotis: > How about 'webroot' or 'web_root'? I've always been averse to the > use of 'public' as a description for files to be served by a > webserver... No, that'd only be confusing, since Nitro has public_root already it also should be used for Nitro parts. And I don't think public is so bad, since that's what's publically visible via the webserver, without an application server that fiddles with it (nitro in this case). And everyone else is using this naming too, if I remember right Rails, probably some of the Java frameworks and the good-old public_html folder of Apache. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From aglarond at gmail.com Wed Aug 9 08:09:57 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 9 Aug 2006 14:09:57 +0200 Subject: [Nitro] gen and parts In-Reply-To: <7CE59F74-D14C-4216-8FD4-6EA596301708@oggu.de> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> <55c107bf0608090326g4f95d9f9x8cdd13ac68eaaf10@mail.gmail.com> <7CE59F74-D14C-4216-8FD4-6EA596301708@oggu.de> Message-ID: <55c107bf0608090509k1740fab1xd8692660447ee580@mail.gmail.com> On 8/9/06, Fabian Buch wrote: > > > Am 09.08.2006 um 12:26 schrieb Dimitri Aivaliotis: > > How about 'webroot' or 'web_root'? I've always been averse to the > > use of 'public' as a description for files to be served by a > > webserver... > > No, that'd only be confusing, since Nitro has public_root already it > also should be used for Nitro parts. > I wasn't limiting my comments to just Nitro parts. In general, I think that 'public' is a poor name for this type of directory, regardless of the framework built around it. - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060809/66ae7254/attachment.html From aglarond at gmail.com Wed Aug 9 09:33:21 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 9 Aug 2006 15:33:21 +0200 Subject: [Nitro] Dimitri's Transformer. In-Reply-To: References: <55c107bf0606090411v27b8e81fud95b4af2c3a757a7@mail.gmail.com> Message-ID: <55c107bf0608090633v47a35b26sa9e8b9935695d9e7@mail.gmail.com> Hey George, On 6/10/06, George Moschovitis wrote: > > Ok, let me have a look at this again, and I could post some ideas ;-) > Just another friendly reminder. Any ideas you could post yet? I'd love to be able to use a different Templating engine. Maybe in combination with manveru's patch? - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060809/45614576/attachment-0001.html From surrender_it at yahoo.it Wed Aug 9 12:33:01 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 18:33:01 +0200 Subject: [Nitro] gen and parts In-Reply-To: <7CE302FB-D417-4CA7-9B0E-7153CD2129CE@oggu.de> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> <7CE302FB-D417-4CA7-9B0E-7153CD2129CE@oggu.de> Message-ID: Fabian Buch ha scritto: > Am 09.08.2006 um 11:47 schrieb gabriele renzi: > >>Each time you use a link you should be using the absolute path >>/foo/media/test.png, but if you set the HTML tagh >href="/foo/media/"> then you can just use src="test.png" in that page. > > .. > >>Absolute paths still work fine, so everything is nice, but there >>may be >>hidden problems somewhere that I ignore. > > > ic, where does this functionality come from? Is it a Nitro Compiler? no, standard html behaviour :) I admit I ahve thought of adding some kind of Compiler to do that for me, though :) > In any case, if we use the setting a part developer can use whatever > he wants, either always like my former example or via . ok, sounds reasonable, even if the problem still has issues, i.e: should we rename FooPart into BarPart? what about controllers? are there any Server.map["/foo/"]=FooController to change? I'm asking because this is all stuff I'm doing with gen scaffold, but there the input files are strictly controlled. I think we could just replace every Foo with Bar, in .rb files, and filenames, leaving .xhtml+media untouched, is it ok ? Or possibly this is just something useless in the end and we are just making everything too complex when standard copying as in the original patch is enough? :) -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From george.moschovitis at gmail.com Wed Aug 9 12:48:40 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 9 Aug 2006 19:48:40 +0300 Subject: [Nitro] Dimitri's Transformer. In-Reply-To: <55c107bf0608090633v47a35b26sa9e8b9935695d9e7@mail.gmail.com> References: <55c107bf0606090411v27b8e81fud95b4af2c3a757a7@mail.gmail.com> <55c107bf0608090633v47a35b26sa9e8b9935695d9e7@mail.gmail.com> Message-ID: Hmm I had some problems with manveru's patch I couldn't introduce this right away. But thanks for reminding, I will revisit manvs's code and then your patch. I will do so later today and tommorow and let you know. thanks, George. On 8/9/06, Dimitri Aivaliotis wrote: > Hey George, > > > On 6/10/06, George Moschovitis wrote: > > Ok, let me have a look at this again, and I could post some ideas ;-) > > > > Just another friendly reminder. Any ideas you could post yet? I'd love to > be able to use a different Templating engine. Maybe in combination with > manveru's patch? > > - Dimitri > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Wed Aug 9 13:03:54 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 9 Aug 2006 20:03:54 +0300 Subject: [Nitro] project dir In-Reply-To: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> References: <4b6f054f0608090248k86b1ed3t71f3980893e4811e@mail.gmail.com> Message-ID: Just keep README, setup.rb and Rake file in the root dir. -g. On 8/9/06, TRANS wrote: > I have to make a final decision for Reap before the next release about > this meta/ directory. Is it worth the bother? And if so what should it > be called really? FYI the idea is to have a project location for those > file that normally sit at the top and are about the project itself. > > I asked on Ruby-talk but few people seemed interested in the topic. > One person did mention using script/ however --apparently this is a > Railism. > > To clarify it's curious to wonder, how would you categorize these files: > > ProjectInfo > ChangeLog > VERSION > MANIFEST > Rakefile > Reapfile > Taskfile > README > COPYING > LICENSE > setup.rb > doap.xml > > Although, both setup.rb and Rakefile are the only two that cannot be > put in a subdir at this point because they do not support it. And one > can question the prudence of putting README and COPYING or LICENSE in > a subdir too. > > T. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From fabian at oggu.de Wed Aug 9 13:38:55 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 9 Aug 2006 19:38:55 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> <7CE302FB-D417-4CA7-9B0E-7153CD2129CE@oggu.de> Message-ID: <414A1D6E-F0B9-4A3A-8B8A-A24FC1D416BB@oggu.de> Am 09.08.2006 um 18:33 schrieb gabriele renzi: > should we rename FooPart into BarPart? what about controllers? > are there any Server.map["/foo/"]=FooController to change? > I'm asking because this is all stuff I'm doing with gen scaffold, but > there the input files are strictly controlled. > > > I think we could just replace every Foo with Bar, in .rb files, and > filenames, leaving .xhtml+media untouched, is it ok ? > > Or possibly this is just something useless in the end and we are just > making everything too complex when standard copying as in the original > patch is enough? :) Yeah, I think that's complicating it too much and I wouldn't rename parts at all. It's confusing if the AdminPart suddenly is known as BarPart. That's what's nice about Server.map, you can map it wherever you want, with the name you want. That should be sufficient. If you want you can make gen set Server.map to "bar" when renaming a part as bar, but I wouldn't touch the internals of a Part too much (like renaming AdminPart to BarPart (and then also the AdminController to BarController?)). Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From surrender_it at yahoo.it Wed Aug 9 15:08:10 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 09 Aug 2006 21:08:10 +0200 Subject: [Nitro] gen and parts In-Reply-To: <414A1D6E-F0B9-4A3A-8B8A-A24FC1D416BB@oggu.de> References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> <7CE302FB-D417-4CA7-9B0E-7153CD2129CE@oggu.de> <414A1D6E-F0B9-4A3A-8B8A-A24FC1D416BB@oggu.de> Message-ID: Fabian Buch ha scritto: > Am 09.08.2006 um 18:33 schrieb gabriele renzi: > >>should we rename FooPart into BarPart? what about controllers? >>are there any Server.map["/foo/"]=FooController to change? >>I'm asking because this is all stuff I'm doing with gen scaffold, but >>there the input files are strictly controlled. >> >> >>I think we could just replace every Foo with Bar, in .rb files, and >>filenames, leaving .xhtml+media untouched, is it ok ? >> >>Or possibly this is just something useless in the end and we are just >>making everything too complex when standard copying as in the original >>patch is enough? :) > > > Yeah, I think that's complicating it too much and I wouldn't rename > parts at all. Ok, then it is set, I'll implement this tomorrow, thank your for taking time to eviscerate this with me :) -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From fabian at oggu.de Wed Aug 9 16:56:22 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 9 Aug 2006 22:56:22 +0200 Subject: [Nitro] gen and parts In-Reply-To: References: <8B81ECD4-3F91-4508-B1C2-CECF8BFA5017@oggu.de> <31FF4D41-C31E-459B-BE0E-DDE393A9D2D8@oggu.de> <7CE302FB-D417-4CA7-9B0E-7153CD2129CE@oggu.de> <414A1D6E-F0B9-4A3A-8B8A-A24FC1D416BB@oggu.de> Message-ID: <6EF95772-B411-40E7-9706-76F35FC8B63F@oggu.de> Am 09.08.2006 um 21:08 schrieb gabriele renzi: > Ok, then it is set, I'll implement this tomorrow, thank your for > taking > time to eviscerate this with me :) Great! Can't wait for your gen to make it into Nitro. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From transfire at gmail.com Thu Aug 10 09:18:23 2006 From: transfire at gmail.com (TRANS) Date: Thu, 10 Aug 2006 09:18:23 -0400 Subject: [Nitro] Is it a better way to build? Message-ID: <4b6f054f0608100618j1f365f38jb49a094db69fcabe@mail.gmail.com> Yesterday, as I beat myself with my old what-to-name-it-where-to-put-it stick ;-) I touched on idea based on the script/ "Railism". So I tried it out just to see if it could work and indeed it does. The idea is this. Instead of a single monolithic script like Rakefile to manage your project tasks, you can have a script file for each task in a subdir (like script/). Task dependencies are simply handled by internal methods if they are "hidden" tasks or by requiring another task, and handled via a cache mechinism. So for example a project might look like: fooproject/ lib/ test/ script/ rdoc package release test An example script (as presently implemented) looks like this. Note, for the expiremental system I called the module "Scriptonic" (as opposed to "Reap"). Here's script/rdoc: #!/usr/bin/env ruby def rdoc Scriptonic.rdoc do |r| r.template = 'jamis' r.options = ['--all', '--inline-source'] r.include = [ 'lib/**/*', '[A-Z]*' ] r.output = 'rdoc' end end load 'scriptonic.rb' By calling script/rdoc on the command line: $ script/rdoc It will find the ProjectInfo and change to the project root dir and then call the method of the same name, e.g. rdoc, which as we see runs the Scriptonic.rdoc builtin task. (Note, on a system that doesn't support #!/usr/bin/env ruby, you have to use "ruby script/rdoc") To have a prereq lets say we wanted to run our test task before rdocing. To do that we can use the #prereq method which returns a Once functor (a memoize/cache system): require 'test' def rdoc prereq.test Scriptonic.rdoc do |r| r.template = 'jamis' r.options = ['--all', '--inline-source'] r.include = [ 'lib/**/*', '[A-Z]*' ] r.output = 'doc/api' end end There is also a help system "script/rdoc --help" and task can take arguments "script/rdoc more" (doesn't yet support custom flag options though). Okay, now that I explained it, the question is: Is this a better way to build than Rake (and it's "improved" clone Reap)? Thanks, T. From john at oxyliquit.de Thu Aug 10 17:08:47 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 10 Aug 2006 23:08:47 +0200 Subject: [Nitro] Is it a better way to build? In-Reply-To: <4b6f054f0608100618j1f365f38jb49a094db69fcabe@mail.gmail.com> References: <4b6f054f0608100618j1f365f38jb49a094db69fcabe@mail.gmail.com> Message-ID: Hi, > Okay, now that I explained it, the question is: Is this a better way > to build than Rake (and it's "improved" clone Reap)? I like that idea.... Not sure about using so many files yet, I'd have to try it to see if I like it. Right now I'm using Rake for everything, as it is just plain Ruby and is very easy to write. That said, the new 'format' looks like it would be just like that, less to remember, just put a file into the `script/` folder with a normal method in it, great :D Anyway, I'd like to give it a try :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From transfire at gmail.com Thu Aug 10 22:12:23 2006 From: transfire at gmail.com (TRANS) Date: Thu, 10 Aug 2006 22:12:23 -0400 Subject: [Nitro] Is it a better way to build? In-Reply-To: References: <4b6f054f0608100618j1f365f38jb49a094db69fcabe@mail.gmail.com> Message-ID: <4b6f054f0608101912q3d92198dncdceb100d4c43e12@mail.gmail.com> On 8/10/06, Jonathan Buch wrote: > Hi, > > > Okay, now that I explained it, the question is: Is this a better way > > to build than Rake (and it's "improved" clone Reap)? > > I like that idea.... Not sure about using so many files yet, I'd have to > try it to see if I like it. Right now I'm using Rake for everything, as > it is just plain Ruby and is very easy to write. That said, the new > 'format' looks like it would be just like that, less to remember, just put > a file into the `script/` folder with a normal method in it, great :D > > Anyway, I'd like to give it a try :) I'll have the first release ready soon. I've been refining and playing with it today, and I have to say, so far it's pretty sweet. I eveb added for support for reap style yaml taks def for backward compatability with Reap. Let you know soon. BTW, have any suggestions for a better name for 'rubytest' command? T. From m.fellinger at gmail.com Sat Aug 12 02:10:09 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 12 Aug 2006 15:10:09 +0900 Subject: [Nitro] Dimitri's Transformer. In-Reply-To: References: <55c107bf0606090411v27b8e81fud95b4af2c3a757a7@mail.gmail.com> <55c107bf0608090633v47a35b26sa9e8b9935695d9e7@mail.gmail.com> Message-ID: <9c00d3e00608112310v6812df0bgdcd9e905d56a6125@mail.gmail.com> On 8/10/06, George Moschovitis wrote: > Hmm I had some problems with manveru's patch I couldn't introduce this > right away. But thanks for reminding, I will revisit manvs's code and > then your patch. I will do so later today and tommorow and let you > know. > > thanks, > George. > > > On 8/9/06, Dimitri Aivaliotis wrote: > > Hey George, > > > > > > On 6/10/06, George Moschovitis wrote: > > > Ok, let me have a look at this again, and I could post some ideas ;-) Could you please let me know what kind of problems you have? I didn't do the patch for np.org because my application doesn't run on it and so i don't have a full set of unittests for it :| > > > > > > > Just another friendly reminder. Any ideas you could post yet? I'd love to > > be able to use a different Templating engine. Maybe in combination with > > manveru's patch? > > > > - Dimitri From george.moschovitis at gmail.com Sun Aug 13 01:04:17 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 13 Aug 2006 08:04:17 +0300 Subject: [Nitro] Short Vacations... Message-ID: Dear devs, these days I am on short vacations. See you again on Thursday. regards, George. -- http://www.gmosx.com http://www.nitroproject.org From surrender_it at yahoo.it Mon Aug 14 06:02:20 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 14 Aug 2006 12:02:20 +0200 Subject: [Nitro] Extending EnitityMixin Message-ID: Hi everyone, has part of the scaffolding infrastructure I'm adding some extensions methods to the Og managed classes, i.e. Model#to_href, default #to_s and so on. Reopening Og::EntityMixin seem like a nice way to do it. The problem is: how to handle class methods? I could use Module#inherited but EntityMixin already defines that, so it is not a good way. I could use a EntityScaffoldingMixin, but I'd like to hear other suggestions. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From m.fellinger at gmail.com Mon Aug 14 08:07:26 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 14 Aug 2006 21:07:26 +0900 Subject: [Nitro] Extending EnitityMixin In-Reply-To: References: Message-ID: <9c00d3e00608140507x145ea333j6e0a0c95af28db66@mail.gmail.com> On 8/14/06, gabriele renzi wrote: > Hi everyone, > > has part of the scaffolding infrastructure I'm adding some extensions > methods to the Og managed classes, i.e. Model#to_href, default #to_s and > so on. Reopening Og::EntityMixin seem like a nice way to do it. > > The problem is: how to handle class methods? > I could use Module#inherited but EntityMixin already defines that, > so it is not a good way. > I could use a EntityScaffoldingMixin, but I'd like to hear other > suggestions. just for the record http://facets.rubyforge.org/api/core/classes/Module.html#M000208 From transfire at gmail.com Mon Aug 14 12:31:49 2006 From: transfire at gmail.com (TRANS) Date: Mon, 14 Aug 2006 12:31:49 -0400 Subject: [Nitro] Short Vacations... In-Reply-To: References: Message-ID: <4b6f054f0608140931k69bd8000wf775d9c16b167a41@mail.gmail.com> Probably a little late, but have a good time!!!! On 8/13/06, George Moschovitis wrote: > Dear devs, > > these days I am on short vacations. See you again on Thursday. > > > regards, > George. > > -- > http://www.gmosx.com > http://www.nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- ( o- // trans. / / transfire at gmail.com From zimba.tm at gmail.com Tue Aug 15 02:14:29 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 15 Aug 2006 08:14:29 +0200 Subject: [Nitro] [devlab] Trac instance Message-ID: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> Hi list, since np.org has a ticket system, can I remove the corresponding Trac on devlab ? -- Cheers, zimbatm http://zimbatm.oree.ch From fabian at oggu.de Wed Aug 16 04:00:12 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 16 Aug 2006 10:00:12 +0200 Subject: [Nitro] [devlab] Trac instance In-Reply-To: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> Message-ID: Am 15.08.2006 um 08:14 schrieb Jonas Pfenniger: > since np.org has a ticket system, can I remove the corresponding Trac > on devlab ? Even though the np.org ticket system doesn't seem to be full featured and fully working at the moment, G asked to make tickets there. In that case making them in Trac again would be redundant. Maybe you should wait till G is back from his vacation? On the other hand I'm pretty sure he's for his new ticket system. I, for one, aren't very happy with the current state of the np.org ticket system, but there's hope and probably no way around it. Are there important open tickets on Trac that should be moved to np.org's ticket system before Trac deletion? Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From surrender_it at yahoo.it Wed Aug 16 13:53:28 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 16 Aug 2006 19:53:28 +0200 Subject: [Nitro] status code not set on error rendering Message-ID: Hi everyone, I notice that when rendering an error page an error code is not returned accordingly (i.e. 501). This makes functional testing like assert_response :success or assert_status :200 completely meaningless, because they would pass even when exceoptions are raised. Could it be possible to define #error in Nitro::Controller so that it returns a reasonable error code? By the way, in 0.40 there seem to be no template-related assertions, how can I check that something is rendered correctly? PS I tried to submit this via np.org ticket system but that does not work ATM. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From george.moschovitis at gmail.com Wed Aug 16 14:39:21 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 16 Aug 2006 21:39:21 +0300 Subject: [Nitro] [devlab] Trac instance In-Reply-To: References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> Message-ID: > I, for one, aren't very happy with the current state of the np.org > ticket system, but there's hope and probably no way around it. What are the important missing features of the np.org ticket system? Could you please provide a list in order of importance? -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Wed Aug 16 14:41:31 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 16 Aug 2006 21:41:31 +0300 Subject: [Nitro] status code not set on error rendering In-Reply-To: References: Message-ID: > Could it be possible to define #error in Nitro::Controller so that it > returns a reasonable error code? nice tip! will do! > I tried to submit this via np.org ticket system but that does not work ATM. oops, will have a look at this as well.. -g. -- http://www.gmosx.com http://www.nitroproject.org From fabian at oggu.de Wed Aug 16 16:24:19 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 16 Aug 2006 22:24:19 +0200 Subject: [Nitro] [devlab] Trac instance In-Reply-To: References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> Message-ID: <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> Am 16.08.2006 um 20:39 schrieb George Moschovitis: >> I, for one, aren't very happy with the current state of the np.org >> ticket system, but there's hope and probably no way around it. > > What are the important missing features of the np.org ticket system? > Could you please provide a list in order of importance? most importantly: - it should work! (didn't for more than a week) other: - more ppl apart from you should be able to work on and close tickets, at least to the state it was with devlab's Trac - visually mark open/closed/critical tickets (green/red/dark-red?) Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From vikingtux at gmail.com Wed Aug 16 19:39:08 2006 From: vikingtux at gmail.com (Alexandre Gravem) Date: Wed, 16 Aug 2006 20:39:08 -0300 Subject: [Nitro] [devlab] Trac instance In-Reply-To: <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> Message-ID: <40b05ebe0608161639m3bc2cc2fu709854ff7f84aefc@mail.gmail.com> Why waste such time building a ticket system from scratch instead of using the good one that trac provides?? This time should be used to improve Nitro IMHO. On 8/16/06, Fabian Buch wrote: > > > Am 16.08.2006 um 20:39 schrieb George Moschovitis: > > >> I, for one, aren't very happy with the current state of the np.org > >> ticket system, but there's hope and probably no way around it. > > > > What are the important missing features of the np.org ticket system? > > Could you please provide a list in order of importance? > > most importantly: > - it should work! (didn't for more than a week) > > other: > - more ppl apart from you should be able to work on and close > tickets, at least to the state it was with devlab's Trac > - visually mark open/closed/critical tickets (green/red/dark-red?) > > Fabian > > > -- > Nitro Q&A: http://oxyliquit.de/ > Blog: http://blog.fabian-buch.de > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060816/4fff1ac6/attachment.html From george.moschovitis at gmail.com Thu Aug 17 00:34:28 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Aug 2006 07:34:28 +0300 Subject: [Nitro] [devlab] Trac instance In-Reply-To: <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> Message-ID: > - it should work! (didn't for more than a week) didn't know about this, will fix. > - more ppl apart from you should be able to work on and close > tickets, at least to the state it was with devlab's Trac brian and jonas can do this, I can give you admin rights too... > - visually mark open/closed/critical tickets (green/red/dark-red?) ok. -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 17 03:26:41 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Aug 2006 10:26:41 +0300 Subject: [Nitro] status code not set on error rendering In-Reply-To: References: Message-ID: Added both. np.org tickets did work, but there was no validation and many people forgot to add a category ;-) nothing that couldnt be fixed with a few validate_value, validate_length, validate_relatio etc... -g. On 8/16/06, George Moschovitis wrote: > > Could it be possible to define #error in Nitro::Controller so that it > > returns a reasonable error code? > > nice tip! will do! > > > I tried to submit this via np.org ticket system but that does not work ATM. > > oops, will have a look at this as well.. > > -g. > > -- > http://www.gmosx.com > http://www.nitroproject.org > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 17 03:29:03 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Aug 2006 10:29:03 +0300 Subject: [Nitro] [devlab] Trac instance In-Reply-To: References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> Message-ID: Well tickets now do work (see my other message on this list). I will add some filtering/labeling functionality for the next update. stay tuned. -g. On 8/17/06, George Moschovitis wrote: > > - it should work! (didn't for more than a week) > > didn't know about this, will fix. > > > - more ppl apart from you should be able to work on and close > > tickets, at least to the state it was with devlab's Trac > > brian and jonas can do this, I can give you admin rights too... > > > - visually mark open/closed/critical tickets (green/red/dark-red?) > > ok. > > -g. > > -- > http://www.gmosx.com > http://www.nitroproject.org > -- http://www.gmosx.com http://www.nitroproject.org From fabian at oggu.de Thu Aug 17 04:49:05 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 17 Aug 2006 10:49:05 +0200 Subject: [Nitro] [devlab] Trac instance In-Reply-To: References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> Message-ID: <1BD63F75-91D4-4775-B000-6AEBF504D0D4@oggu.de> Am 17.08.2006 um 06:34 schrieb George Moschovitis: > >> - more ppl apart from you should be able to work on and close >> tickets, at least to the state it was with devlab's Trac > > brian and jonas can do this, I can give you admin rights too... Ah, ok, didn't know that. That's cool. I don't need it right now, might be useful sometime in the future. Maybe you could give it to me and manveru too (sometime ago you asked for Blog posts about Nitro too). Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From al-nitrogen at none.at Thu Aug 17 04:52:34 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 17 Aug 2006 10:52:34 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <20060805132241.GA11050@none.at> References: <20060805132241.GA11050@none.at> Message-ID: <20060817085234.GA11823@none.at> @George: how about to add this patch to main repo ;-) --- On Sam 05.08.2006 15:22, Alexander Lazic wrote: >Hi, > >attached the first attempt to mongrelify the adapter ;-) > >At the moment i see some pitfalls: > >1.) i have *borrow* some code from lib/nitro/cgi.rb because i haven't > found a easy way to get the header from > Cgi.response_headers(context). > This methode return the headers as string and i don't like to make > hash=>string=>hash :-( > @George: howabout to add a methode Cgi.response_headers_as_hash or > is there a easier way in ruby which i don't know?! > >2.) Are in server.options also the --debug flag from the commandline? >3.) It's a quick hack from a ruby newbie threfore somethings could be > *better* ;-) > >I'am not sure if the Mongrel::Configurator is the *best* or preferd way >to setup the mongrel but i hope somone can us help in this issue ;-))) > >Please tell me your thoughts ;-) --- Regards Alex From fabian at oggu.de Thu Aug 17 05:07:49 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 17 Aug 2006 11:07:49 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <20060817085234.GA11823@none.at> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> Message-ID: <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> Am 17.08.2006 um 10:52 schrieb Alexander Lazic: > @George: how about to add this patch to main repo ;-) Does it have unit tests? -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From al-nitrogen at none.at Thu Aug 17 05:31:48 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 17 Aug 2006 11:31:48 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> Message-ID: <20060817093148.GA14286@none.at> On Don 17.08.2006 11:07, Fabian Buch wrote: > >Am 17.08.2006 um 10:52 schrieb Alexander Lazic: > >> @George: how about to add this patch to main repo ;-) > >Does it have unit tests? I'am not sure, i haven't write some one?! Could the current be reused?! regards Alex From fabian at oggu.de Thu Aug 17 05:45:29 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 17 Aug 2006 11:45:29 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <20060817093148.GA14286@none.at> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> Message-ID: Am 17.08.2006 um 11:31 schrieb Alexander Lazic: > On Don 17.08.2006 11:07, Fabian Buch wrote: >> >> Am 17.08.2006 um 10:52 schrieb Alexander Lazic: >> >>> @George: how about to add this patch to main repo ;-) >> >> Does it have unit tests? > > I'am not sure, i haven't write some one?! > > Could the current be reused?! As far as I know there aren't yet, but to assure quality and thus improve the chances for your patch to make it into the official repo you might want to write some tests. For that have a look at nitro/test/nitro/adapter/tc_webrick.rb. Umm.. just seeing it's empty too :(. Nitro is a little "under-tested". Have a look at http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/ Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From john at oxyliquit.de Thu Aug 17 05:55:40 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 17 Aug 2006 11:55:40 +0200 Subject: [Nitro] [devlab] Trac instance In-Reply-To: References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> Message-ID: Hi, >> - visually mark open/closed/critical tickets (green/red/dark-red?) > ok. Great, please look at the 'Color code tickets' ticket in the ticket system. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From al-nitrogen at none.at Thu Aug 17 06:38:50 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 17 Aug 2006 12:38:50 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> Message-ID: <20060817103850.GA18733@none.at> On Don 17.08.2006 11:45, Fabian Buch wrote: > >Am 17.08.2006 um 11:31 schrieb Alexander Lazic: >> >> I'am not sure, i haven't write some one?! >> >> Could the current be reused?! > >As far as I know there aren't yet, but to assure quality and thus >improve the chances for your patch to make it into the official repo >you might want to write some tests. >For that have a look at nitro/test/nitro/adapter/tc_webrick.rb. Umm.. >just seeing it's empty too :(. Nitro is a little "under-tested". > >Have a look at http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/ Thanks for info i will come back with some tests ;-) Regards Alex From george.moschovitis at gmail.com Thu Aug 17 07:50:39 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Aug 2006 14:50:39 +0300 Subject: [Nitro] [devlab] Trac instance In-Reply-To: References: <3ff63f9b0608142314u1ce6189fqe72e5638c7dfff51@mail.gmail.com> <00E99029-DEE8-4DC6-8A6C-D5076CDE0E9F@oggu.de> Message-ID: Ok, will work a bit on some new np.org stuff over the weekend ;-) -g. On 8/17/06, Jonathan Buch wrote: > Hi, > > >> - visually mark open/closed/critical tickets (green/red/dark-red?) > > ok. > > Great, please look at the 'Color code tickets' ticket in the ticket system. > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 17 07:54:05 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Aug 2006 14:54:05 +0300 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <20060817103850.GA18733@none.at> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> <20060817103850.GA18733@none.at> Message-ID: > Thanks for info i will come back with some tests ;-) > Great ;-) So I will wait for the revised version. -g. -- http://www.gmosx.com http://www.nitroproject.org From al-nitrogen at none.at Thu Aug 17 08:04:22 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 17 Aug 2006 14:04:22 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> <20060817103850.GA18733@none.at> Message-ID: <20060817120422.GA23941@none.at> On Don 17.08.2006 14:54, George Moschovitis wrote: >> Thanks for info i will come back with some tests ;-) > >Great ;-) > >So I will wait for the revised version. Ok, but i'am very busy it will take some time. regards Alex From john at oxyliquit.de Fri Aug 18 14:33:18 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 18 Aug 2006 20:33:18 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status Message-ID: Hi, after my brother spend like an hour tracing a non-existant bug (RMagick wasn't installed, but it showed some weird 'missing method foo' error which had nothing to do with it) I created a FIXME/TODO list. That bug hunt was only because of those `rescue Object => ex` statements.. I added a patch which adds a "don't use Object to rescue!" after every statement. Some are trivial, other require more thought to fix. attributeutils.rb (14): don't use Object to rescue! outgoing.rb (27): don't use Object to rescue! sweeper.rb (45): don't use Object to rescue! mongrel.rb (108): don't use Object to rescue! vcr.rb (63): don't use Object to rescue! webrick.rb (129): don't use Object to rescue! output.rb (86): don't use Object to rescue! errors.rb (66): don't use Object to rescue! script.rb (53): don't use Object to rescue! scgi_service (31): don't use Object to rescue! mysql.rb (3): don't use Object to rescue! mysql.rb (9): don't use Object to rescue! mysql.rb (74): don't use Object to rescue! postgresql.rb (3): don't use Object to rescue! postgresql.rb (42): don't use Object to rescue! sqlite.rb (3): don't use Object to rescue! sql.rb (382): don't use Object to rescue! sql.rb (401): don't use Object to rescue! sql.rb (433): don't use Object to rescue! sql.rb (454): don't use Object to rescue! store.rb (180): don't use Object to rescue! scgi_service (25): don't use Object to rescue! Other fixmes/todos: Quite an impressive list, some of them are probably in the wrong category and should be rewritten or this is from manverus repo (0.40+2): FIXME || TODO ============================== FIXME ============================== apache.conf (20): if you have installed the distribution the -I is not needed. apache.conf.new (22): if you have installed the gems controller.rb (111): will be improved. view.xhtml (8): at #{@obj.create_time.strftime('%I %M %p')} apache.conf (20): if you have installed the distribution the -I is not needed. setup.rb (1365): should not remove current config files attribute.rb (22): this is a hack, rethink! attributeutils.rb (14): don't use Object to rescue! attributeutils.rb (100): FIXME: this is a hack, will be replaced with proper configuration.rb (179): this does not work as expected. mail.rb (133): From is typically NOT an array. outgoing.rb (27): don't use Object to rescue! outgoing.rb (28): rescue needed here at all? outgoing.rb (49): FIXME: for some STUPID reason, delivery_method template.rb (39): must be xformed before the cache, reimplement helpers. scgi_service (18): remove sync, Nitro *is* thread safe! tc_feed.rb (12): add more (all) tc_feed.rb (52): there should be some more hierarchical.rb (9): use active collections. taggable.rb (57): implement me. timestamped.rb (8): add an initialize method that inits times collection.rb (148): add remove by oid! collection.rb (167): add delete by oid! clone.rb (24): Convert to enchantments on objects entity.rb (355): add cascade option. entity.rb (520): refactor this method. joins_many.rb (113): optimize this!! use count. utils.rb (16): Optimize this. utils.rb (26): Optimize this. utils.rb (35): implement me! utils.rb (58): Optimize this. utils.rb (68): Optimize this. utils.rb (86): implement me!! sql.rb (110): use annotation :superclass) sql.rb (317): don't convert to float by default, perhaps validation.rb (31): unique should implicitly generate og.rb (74): move this to the sql store. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From Reid.Thompson at ateb.com Fri Aug 18 14:59:46 2006 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Fri, 18 Aug 2006 14:59:46 -0400 Subject: [Nitro] How do I gracefully handle db error conditions either from .rb or .xhtml files? Message-ID: <1155927586.5496.5.camel@jhereg> OK, so a duplicate key constraint violation throws an error. How do I capture this( or any db error condition for that matter ) so that I can gracefully inform the user of the violation and return them to the data entry page w/o having the app dump the full debug content to the screen ala.... Error Path: /save_user ERROR C23505 Mduplicate key violates unique constraint "oguser_username_key" Fnbtinsert.c L249 R_bt_check_unique Reload this page. Go to the referer or the home page. In file '/usr/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb' : 110: else 111: # TODO 112: end 113: end 114: 115: raise errors.map{|e| e.field_values.join("\t") }.join("\n") unless errors.empty? 116: 117: result 118: end 119: 120: DEFAULT_PORT = 5432 Stack Trace /usr/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:115:in `query' /usr/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:33:in `exec' (eval):7:in `og_insert' /usr/lib/ruby/gems/1.8/gems/og-0.30.0/lib/og/store.rb:104:in `save' /usr/lib/ruby/gems/1.8/gems/og-0.30.0/lib/og/entity.rb:125:in `create' ./controller.rb:28:in `save_user' (eval):6:in `save_user_action' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/render.rb:129:in `render' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/adapter/webrick.rb:223:in `do_POST' /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/adapter/webrick.rb:59:in `start' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/server/runner.rb:343:in `invoke_server' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/server/runner.rb:305:in `invoke' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/server.rb:128:in `run' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro.rb:78:in `start' demo.rb:19 Request Parameters: {"username"=>"rthompso", "first_name"=>"adsf ", "last_name"=>"adsf", "e_mail"=>"dfdf at ateb.com"} Cookies: {"nsid"=>"074fd7f694752cf295cd14ff8c0fed12"} Headers: SERVER_NAME => localhost ACCEPT-CHARSET => ISO-8859-1,utf-8;q=0.7,*;q=0.7 ACCEPT-LANGUAGE => en-us,en;q=0.5 CONTENT_LENGTH => 72 PATH_INFO => /save_user REMOTE_HOST => 127.0.0.1 HTTP_ACCEPT_ENCODING => gzip,deflate HTTP_USER_AGENT => Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5 ACCEPT => text/xml,application/xml,application/xhtml +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 CONNECTION => keep-alive SCRIPT_NAME => SERVER_PROTOCOL => HTTP/1.1 HTTP_ACCEPT_LANGUAGE => en-us,en;q=0.5 HTTP_HOST => localhost:9999 ACCEPT-ENCODING => gzip,deflate REMOTE_ADDR => 127.0.0.1 SERVER_SOFTWARE => WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) HTTP_KEEP_ALIVE => 300 USER-AGENT => Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5 CONTENT-TYPE => application/x-www-form-urlencoded CONTENT_TYPE => application/x-www-form-urlencoded HTTP_REFERER => http://localhost:9999/add_user CONTENT-LENGTH => 72 COOKIE => nsid=074fd7f694752cf295cd14ff8c0fed12 HTTP_COOKIE => nsid=074fd7f694752cf295cd14ff8c0fed12 HTTP_ACCEPT_CHARSET => ISO-8859-1,utf-8;q=0.7,*;q=0.7 REQUEST_URI => /save_user REFERER => http://localhost:9999/add_user SERVER_PORT => 9999 GATEWAY_INTERFACE => CGI/1.1 QUERY_STRING => REMOTE_USER => HOST => localhost:9999 HTTP_ACCEPT => text/xml,application/xml,application/xhtml +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 KEEP-ALIVE => 300 REQUEST_METHOD => POST HTTP_CONNECTION => keep-alive Response Headers: {"Content-Type"=>"text/html"} Cookies: nil Session Values: {:FLASH=>{}} Powered by Nitro version 0.30.0 From john at oxyliquit.de Fri Aug 18 15:53:56 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 18 Aug 2006 21:53:56 +0200 Subject: [Nitro] How do I gracefully handle db error conditions either from .rb or .xhtml files? In-Reply-To: <1155927586.5496.5.camel@jhereg> References: <1155927586.5496.5.camel@jhereg> Message-ID: Hi, > OK, so a duplicate key constraint violation throws an error. How do I > capture this( or any db error condition for that matter ) so that I can > gracefully inform the user of the violation and return them to the data > entry page w/o having the app dump the full debug content to the screen Using validations in Og models lets you check specifically for such errors. But they don't protect you from bad SQL, it just protects you from errors which you can predict that will happen. For example, a unique constraint like your error message has shown: class OgExampleModel property :message_id, String validate_unique :message_id end Now in a controller you can check if an object is valid: class ExampleController < Nitro::Controller def add_obj obj = OgExampleModel.new obj.message_id = 5 if obj.valid? obj.save else flash[:err] = 'Zonk! Input shite!' end end end Now in your .xhtml

#{flash[:err]}

Like I said, this will only protect you from known error sources, all others will still get you the error screen, but it's a huge advantage. Hope that helps. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From zimba.tm at gmail.com Fri Aug 18 16:22:47 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Fri, 18 Aug 2006 22:22:47 +0200 Subject: [Nitro] How do I gracefully handle db error conditions either from .rb or .xhtml files? In-Reply-To: References: <1155927586.5496.5.camel@jhereg> Message-ID: <3ff63f9b0608181322i6b84753bhd6e98d2f74259518@mail.gmail.com> This is a bug in the postgresql adapter. It should only return standardized Og errors. You can submit a ticket to nitroproject.org -- Cheers, zimbatm http://zimbatm.oree.ch From surrender_it at yahoo.it Fri Aug 18 17:20:49 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 18 Aug 2006 23:20:49 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Jonathan Buch ha scritto: > Hi, > > after my brother spend like an hour tracing a non-existant bug (RMagick > wasn't installed, but it showed some weird 'missing method foo' error > which had nothing to do with it) I created a FIXME/TODO list. That bug > hunt was only because of those `rescue Object => ex` statements.. > > I added a patch which adds a "don't use Object to rescue!" after every > statement. Some are trivial, other require more thought to fix. I can't even start to say ho much I'd love those to go away. 'rescue Object' caused me to waste *days* tracking errors :( FWIW there was a patch of mine in the thread [Nitro] [PATCH] Og.setup crash-early that removed one of those and enhanced diagnostics a little, plus some tests. And the new gen should handle errors correctly, I think. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From george.moschovitis at gmail.com Fri Aug 18 18:12:59 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 19 Aug 2006 01:12:59 +0300 Subject: [Nitro] How do I gracefully handle db error conditions either from .rb or .xhtml files? In-Reply-To: <3ff63f9b0608181322i6b84753bhd6e98d2f74259518@mail.gmail.com> References: <1155927586.5496.5.camel@jhereg> <3ff63f9b0608181322i6b84753bhd6e98d2f74259518@mail.gmail.com> Message-ID: > This is a bug in the postgresql adapter. It should only return > standardized Og errors. You can submit a ticket to nitroproject.org Btw, the psql adapter in the repo version is not fully tested :( -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Fri Aug 18 18:15:59 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 19 Aug 2006 01:15:59 +0300 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Interesting, I didn't know that rescue Object was so problematic. But from your email I do not understand the proposed solution. Can you elaborate? -g. -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Sat Aug 19 05:24:04 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 19 Aug 2006 11:24:04 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Hi, > Interesting, > > I didn't know that rescue Object was so problematic. But from your > email I do not understand the proposed solution. Can you elaborate? Proposed solution is to be evaluated on a case by case study on each of those requires. The basic approach would be: Either identify the errors that should be thrown and replace `Object` with those Errors or remove the rescue since it makes no sense anyway. An example: begin require 'postgres' rescue Object => ex # FIXME: don't use Object to rescue! Logger.error 'Ruby-PostgreSQL bindings are not installed!' Logger.error ex end When the Postgresql aren't installed, how is the application going to work? So: begin require 'postgres' rescue LoadError => ex Logger.error 'Ruby-PostgreSQL bindings are not installed!' exit # or `raise` ? end Otherwise the Log-statement could've been untrue. It might have been that there is a syntactical error in the postgres gem, but we will never know... Jo Uh, btw, I made a little mistake while producing those TODOs: It regards `gmosx:` comments as todos as well. Not sure about those, I made that change to the TextMate TODO-generator quite some time ago... So, the TODO list is probably a bit shorter than it appeared now. Sorry ^^; -- Feel the love http://pinkjuice.com/pics/ruby.png From transfire at gmail.com Sat Aug 19 10:40:45 2006 From: transfire at gmail.com (TRANS) Date: Sat, 19 Aug 2006 10:40:45 -0400 Subject: [Nitro] Next release of Reap ? In-Reply-To: <3ff63f9b0608181150i46b30519x8671aae968d0d55e@mail.gmail.com> References: <3ff63f9b0608180802r2dbd3a09g851ad4ac37951310@mail.gmail.com> <4b6f054f0608181038j2d3b9692w2eaf4c632b163196@mail.gmail.com> <3ff63f9b0608181150i46b30519x8671aae968d0d55e@mail.gmail.com> Message-ID: <4b6f054f0608190740n5e76dc48l64950fdf1f82b947@mail.gmail.com> Sigh... Facets' Taskable module is inheirently flawed and I have no clear idea how to fix it. Which means the new version of Reap is presently dead in the water. T. From george.moschovitis at gmail.com Sat Aug 19 11:40:37 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 19 Aug 2006 18:40:37 +0300 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Ok, your proposal sounds reasonable. Can you please help me by submitting a set of patches against the current version of my repository. This patches wil not break anything so I 'll be able to apply them immediately. Can you please help here? regards, George. > Proposed solution is to be evaluated on a case by case study on each of > those requires. The basic approach would be: Either identify the errors > that should be thrown and replace `Object` with those Errors or remove the > rescue since it makes no sense anyway. > > An example: > > begin > require 'postgres' > rescue Object => ex # FIXME: don't use Object to rescue! > Logger.error 'Ruby-PostgreSQL bindings are not installed!' > Logger.error ex > end > > When the Postgresql aren't installed, how is the application going to > work? So: > > begin > require 'postgres' > rescue LoadError => ex > Logger.error 'Ruby-PostgreSQL bindings are not installed!' > exit # or `raise` ? > end > > Otherwise the Log-statement could've been untrue. It might have been that > there is a syntactical error in the postgres gem, but we will never know... > > Jo > > Uh, btw, I made a little mistake while producing those TODOs: It regards > `gmosx:` comments as todos as well. Not sure about those, I made that > change to the TextMate TODO-generator quite some time ago... So, the TODO > list is probably a bit shorter than it appeared now. Sorry ^^; > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From surrender_it at yahoo.it Sun Aug 20 02:45:54 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 20 Aug 2006 08:45:54 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: George Moschovitis ha scritto: > Ok, your proposal sounds reasonable. Can you please help me by > submitting a set of patches against the current version of my > repository. This patches wil not break anything so I 'll be able to > apply them immediately. Can you please help here? I think Fabnian's patch is applicable against your repo. I was able to apply it against mine[1], at least. [1] so if you want you could pull it from http://darcs.riffraff.info/nitro -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From george.moschovitis at gmail.com Sun Aug 20 02:59:00 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Aug 2006 09:59:00 +0300 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: > [1] so if you want you could pull it from > http://darcs.riffraff.info/nitro How can I extract e single patch from your repo and apply it to mine? -g. -- http://www.gmosx.com http://www.nitroproject.org From surrender_it at yahoo.it Sun Aug 20 03:45:18 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 20 Aug 2006 09:45:18 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: George Moschovitis ha scritto: >> [1] so if you want you could pull it from >> http://darcs.riffraff.info/nitro > > How can I extract e single patch from your repo and apply it to mine? > -g. > this should work darcs pull --no-set-default http://darcs.riffraff.info/nitro --match "name fixme" It should apply cleanly, I think. -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From george.moschovitis at gmail.com Sun Aug 20 03:52:17 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Aug 2006 10:52:17 +0300 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Thanks, I will try it ;-) -g. On 8/20/06, gabriele renzi wrote: > George Moschovitis ha scritto: > >> [1] so if you want you could pull it from > >> http://darcs.riffraff.info/nitro > > > > How can I extract e single patch from your repo and apply it to mine? > > -g. > > > > this should work > > darcs pull --no-set-default http://darcs.riffraff.info/nitro --match > "name fixme" > > It should apply cleanly, I think. > > -- > > blog en: http://www.riffraff.info > blog it: http://riffraff.blogsome.com > jabber : rff.rff at gmail dot com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Sun Aug 20 03:52:44 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Aug 2006 10:52:44 +0300 Subject: [Nitro] Next release of Reap ? In-Reply-To: <4b6f054f0608190740n5e76dc48l64950fdf1f82b947@mail.gmail.com> References: <3ff63f9b0608180802r2dbd3a09g851ad4ac37951310@mail.gmail.com> <4b6f054f0608181038j2d3b9692w2eaf4c632b163196@mail.gmail.com> <3ff63f9b0608181150i46b30519x8671aae968d0d55e@mail.gmail.com> <4b6f054f0608190740n5e76dc48l64950fdf1f82b947@mail.gmail.com> Message-ID: > Facets' Taskable module is inheirently flawed and I have no clear idea What exactly is the problem? -g. -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Sun Aug 20 04:12:05 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 20 Aug 2006 10:12:05 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Hi, > Thanks, I will try it ;-) I'd rather you don't :P There has been a slight glitch in riffraffs reality :P. The patch he is talking about was from me and it doesn't correct anything, it just puts FIXMEs to every `rescue Object`. I will work on the fixmes, and riffraff has already patched one or two of them: Sat Aug 19 16:02:58 CEST 2006 rff.rff at gmail.com * removing spurious "p" Sat Aug 19 15:46:39 CEST 2006 [_\c3_][_\b9_]rff.rff at gmail.com * better error handling for helper.rb Fri Aug 18 18:35:04 CEST 2006 Jonathan Buch * add fixmes for object rescues Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sun Aug 20 05:42:33 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Aug 2006 12:42:33 +0300 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Please, can you provide a patch bundle with all patches related to rescues against my repo? This will help a LOT (and allow me to apply the patch immediately) thanks, -g. On 8/20/06, Jonathan Buch wrote: > Hi, > > > Thanks, I will try it ;-) > > I'd rather you don't :P > > There has been a slight glitch in riffraffs reality :P. The patch he is > talking about was from me and it doesn't correct anything, it just puts > FIXMEs to every `rescue Object`. > > I will work on the fixmes, and riffraff has already patched one or two of > them: > > Sat Aug 19 16:02:58 CEST 2006 rff.rff at gmail.com > * removing spurious "p" > > Sat Aug 19 15:46:39 CEST 2006 [_\c3_][_\b9_]rff.rff at gmail.com > * better error handling for helper.rb > > Fri Aug 18 18:35:04 CEST 2006 Jonathan Buch > * add fixmes for object rescues > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From surrender_it at yahoo.it Sun Aug 20 10:11:51 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 20 Aug 2006 16:11:51 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Jonathan Buch ha scritto: > Hi, > >> Thanks, I will try it ;-) > > I'd rather you don't :P > > There has been a slight glitch in riffraffs reality :P. The patch he is > talking about was from me and it doesn't correct anything, it just puts > FIXMEs to every `rescue Object`. Ah yes, sorry I misread what george was saying, as we clarified on irc :) -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From m.fellinger at gmail.com Sun Aug 20 10:13:55 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 20 Aug 2006 23:13:55 +0900 Subject: [Nitro] How do I gracefully handle db error conditions either from .rb or .xhtml files? In-Reply-To: References: <1155927586.5496.5.camel@jhereg> <3ff63f9b0608181322i6b84753bhd6e98d2f74259518@mail.gmail.com> Message-ID: <9c00d3e00608200713j30bae849m78bfb41ed9766af@mail.gmail.com> speaking of which... george, could you try to get the testsuite for og running again? i really need psql for my app working nicely, but have no idea how to achieve that... right now even the most simple app fails :| On 8/19/06, George Moschovitis wrote: > > This is a bug in the postgresql adapter. It should only return > > standardized Og errors. You can submit a ticket to nitroproject.org > > Btw, the psql adapter in the repo version is not fully tested :( > > -g. > > -- > http://www.gmosx.com > http://www.nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From transfire at gmail.com Sun Aug 20 10:17:55 2006 From: transfire at gmail.com (TRANS) Date: Sun, 20 Aug 2006 10:17:55 -0400 Subject: [Nitro] Next release of Reap ? In-Reply-To: References: <3ff63f9b0608180802r2dbd3a09g851ad4ac37951310@mail.gmail.com> <4b6f054f0608181038j2d3b9692w2eaf4c632b163196@mail.gmail.com> <3ff63f9b0608181150i46b30519x8671aae968d0d55e@mail.gmail.com> <4b6f054f0608190740n5e76dc48l64950fdf1f82b947@mail.gmail.com> Message-ID: <4b6f054f0608200717r7e07cb4fs715c1e7ac3d562e8@mail.gmail.com> On 8/20/06, George Moschovitis wrote: > > Facets' Taskable module is inheirently flawed and I have no clear idea > > What exactly is the problem? I suck. ;-) Actually, I just rewrote the whole damn thing from scratch and got it to work. The problem was that there is no way (that I could figure) to track "annotations" across an #extend. I had to track prerequisites for tasks, but if I used a module to extend another I could no longer find the prerequistes at the extend level. It's as complicated as it is subtle and it was made worse by Ruby's Toplevel being a proxy for Object class. Anyway the trick was to dump TSort and just store eash set of prerequites in another method --I can always find another method ;-) T. From d454d at web.de Sun Aug 20 12:08:32 2006 From: d454d at web.de (Stephan Mueller) Date: Sun, 20 Aug 2006 18:08:32 +0200 Subject: [Nitro] og: automatic deletion of records in M:N relations? Message-ID: <20060820160832.GA14685@X.thorsten.dyndns.org> Hi, it seems to me og is not deleting records in helper tables in case the 'master' record/object is deleted: Let's say i have two classes: class Item # ... many_to_many Tag # ... end class Tag # ... many_to_many Item # ... end Creating items and tags just works as intended. But when there are items deleted, in the mapping table (eg. ogj_item_tag) the records for the deleted items don't get removed automatically. Inserting new objects can lead to problems and resulting exceptions due to the remaining entries in the mapping table. This can be circumvented by deleting tags first like this: item.tags.each { | t | item.remove_tag(t) } but in my opion this should be handled by og without any help by the programmer. The remaining records in the mapping table are useless anyway because the references are broken. Is there a better way to handle this kind of situation? Cheers, Steph. From transfire at gmail.com Sun Aug 20 16:55:24 2006 From: transfire at gmail.com (TRANS) Date: Sun, 20 Aug 2006 16:55:24 -0400 Subject: [Nitro] Finally coming along... Message-ID: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> Hi All-- Boy, has this been a long and grueling development cycle. Getting Taskable to work there at the end almost did me in. But everything is finally starting to come together. And some signifficant transformations have taken place. 1. A new version of Facets will be out in a day or so. This is mostly the same as before, with the new Taskable module, which includes a new lib called 'main_as_module.rb', plus a few additional methods added to core. I suppose the next thing for Facets is to revist the new version of annotation.rb again and make sure it's working for Nitro and adjust it as you all see fit. Please, input on this is welcome. 2. Reap is looking better than ever. She's becoming a very strong Rake-clone that actually runs considerably faster than Rake! There are still some capabilities to add though, such as rules and perhaps namespaces. Yet ironically, while I still plan to polish her off, I am moving my main focus to a new build tool technology I developed these past couple of weeks called Sake (as in the Japanese drink). One consequence of this is that Reap will depend on Sake for it's built-in tasks. So the initial release of Sake will be out (in a couple of days) before the next version of Reap. More on Sake soon. 3. Lastly, I'm debating whether to get rid of Sow and just merge it's capabilites into Rolls. I'm not 100% sure on this yet, but at the moment that's the working assumption. They fit closely together b/c "Sow" builds packages of any format and can layout a package to work with Rolls automatically when it does so. On the downside I still want the library ledger part of Rolls to be seen on it's own merits as a simple independent light weight app (which it is) --not dependent on any package manager. Guess I just have to stress the two aspect of this are independent but interelated. Thoughts on this are welcome too. Just a little bit longer and I'll finally have all these technologies at essentially solid and stable releases! Thanks for all you patience and help, T. From transfire at gmail.com Sun Aug 20 17:09:17 2006 From: transfire at gmail.com (TRANS) Date: Sun, 20 Aug 2006 17:09:17 -0400 Subject: [Nitro] Reap's rubytest script Message-ID: <4b6f054f0608201409k58e7552fvdd667df4741d2531@mail.gmail.com> I doubt many people use it besides me (I use all the time). The 'rubytest' program which allows one to directly run tests that are commented in =begin test ... =end blocks in source. I've thought for awhile now that maybe that's not a good name. But I could never think of a better one. Today I thought that maybe 'test#' might be good since '#' seems to be an accepatable file name character on all platforms. What do others think? Any other suggestions? Or should I just stick to 'rubytest'. From riku.raisanen at walkingwoods.com Mon Aug 21 03:22:17 2006 From: riku.raisanen at walkingwoods.com (=?ISO-8859-1?Q?Riku_R=E4is=E4nen?=) Date: Mon, 21 Aug 2006 10:22:17 +0300 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: References: Message-ID: <44E95F29.3010909@walkingwoods.com> Try to set the relation only to other of the classes (it's two-way automatically). Also, try this: class Item # ... joins_many Tag # ... end class Tag # ... belongs_to Item # ... end so Tags get deleted if the Item is deleted, I don't know why you would want to remove the Items if a Tag is removed... can't test these out, in a hurry. -Rayman From fabian at oggu.de Mon Aug 21 04:23:30 2006 From: fabian at oggu.de (Fabian Buch) Date: Mon, 21 Aug 2006 10:23:30 +0200 Subject: [Nitro] Finally coming along... In-Reply-To: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> Message-ID: <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> Am 20.08.2006 um 22:55 schrieb TRANS: > 3. Lastly, I'm debating whether to get rid of Sow and just merge it's > capabilites into Rolls. I'm not 100% sure on this yet, but at the > moment that's the working assumption. They fit closely together b/c > "Sow" builds packages of any format and can layout a package to work > with Rolls automatically when it does so. On the downside I still want > the library ledger part of Rolls to be seen on it's own merits as a > simple independent light weight app (which it is) --not dependent on > any package manager. Guess I just have to stress the two aspect of > this are independent but interelated. Thoughts on this are welcome > too. Well, there are so many names to remember with all your great software, that it's sometimes confusing which is which. Before I read your websites for Sow and Rolls I couldn't tell why there are two projects. Since they work closely together I think it'd get higher attention if you merge them to one name. As for me, I have to admit, I'm more interested in Sow than Rolls. But in either case, I'd probably use sow to create rolls packages + alternatives. Calling it Rolls the first thing I'd think about is creating rolls packages plus some alternatives, since it can. With Sow +Rolls, I'd maybe think about creating all kind of packages plus rolls as alternative, b/c it's a cool new package system. I know this is just about naming, but I'm just for "Rolls" for both. > Just a little bit longer and I'll finally have all these technologies > at essentially solid and stable releases! Sounds great! Can't wait for Sow (Rolls). Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From fabian at oggu.de Mon Aug 21 04:27:07 2006 From: fabian at oggu.de (Fabian Buch) Date: Mon, 21 Aug 2006 10:27:07 +0200 Subject: [Nitro] Reap's rubytest script In-Reply-To: <4b6f054f0608201409k58e7552fvdd667df4741d2531@mail.gmail.com> References: <4b6f054f0608201409k58e7552fvdd667df4741d2531@mail.gmail.com> Message-ID: <169B144F-DDB2-4AAE-A1A1-4EE6E4EE30B1@oggu.de> Am 20.08.2006 um 23:09 schrieb TRANS: > I doubt many people use it besides me (I use all the time). The > 'rubytest' program which allows one to directly run tests that are > commented in =begin test ... =end blocks in source. I've thought for > awhile now that maybe that's not a good name. But I could never think > of a better one. Today I thought that maybe 'test#' might be good > since '#' seems to be an accepatable file name character on all > platforms. What do others think? Any other suggestions? Or should I > just stick to 'rubytest'. Dunno, but 'test#' looks like a typo or like a C#. What's the # in test# standing for? But I'm not a user of it, so am just curious. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From transfire at gmail.com Mon Aug 21 06:38:04 2006 From: transfire at gmail.com (TRANS) Date: Mon, 21 Aug 2006 06:38:04 -0400 Subject: [Nitro] Reap's rubytest script In-Reply-To: <169B144F-DDB2-4AAE-A1A1-4EE6E4EE30B1@oggu.de> References: <4b6f054f0608201409k58e7552fvdd667df4741d2531@mail.gmail.com> <169B144F-DDB2-4AAE-A1A1-4EE6E4EE30B1@oggu.de> Message-ID: <4b6f054f0608210338m13cee1bck14e59044ef369b59@mail.gmail.com> On 8/21/06, Fabian Buch wrote: > > Am 20.08.2006 um 23:09 schrieb TRANS: > > I doubt many people use it besides me (I use all the time). The > > 'rubytest' program which allows one to directly run tests that are > > commented in =begin test ... =end blocks in source. I've thought for > > awhile now that maybe that's not a good name. But I could never think > > of a better one. Today I thought that maybe 'test#' might be good > > since '#' seems to be an accepatable file name character on all > > platforms. What do others think? Any other suggestions? Or should I > > just stick to 'rubytest'. > > Dunno, but 'test#' looks like a typo or like a C#. What's the # in > test# standing for? Stands for "comment". Perhaps a bit of misnomer though, since the comment used is acutally: =begin test Put your unit tests here. =end T. From george.moschovitis at gmail.com Mon Aug 21 07:40:43 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 21 Aug 2006 14:40:43 +0300 Subject: [Nitro] Finally coming along... In-Reply-To: <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> Message-ID: > Well, there are so many names to remember with all your great > software, that it's sometimes confusing which is which. Before I read +1 -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Mon Aug 21 12:15:18 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 21 Aug 2006 19:15:18 +0300 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: <44E95F29.3010909@walkingwoods.com> References: <44E95F29.3010909@walkingwoods.com> Message-ID: This should work, can anyone verify this ? -g. On 8/21/06, Riku R?is?nen wrote: > Try to set the relation only to other of the classes (it's two-way > automatically). > > Also, try this: > > class Item > # ... > joins_many Tag > # ... > end > > class Tag > # ... > belongs_to Item > # ... > end > > so Tags get deleted if the Item is deleted, I don't know why you would > want to remove the Items if a Tag is removed... > > can't test these out, in a hurry. > > -Rayman > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From d454d at web.de Mon Aug 21 14:52:39 2006 From: d454d at web.de (Stephan Mueller) Date: Mon, 21 Aug 2006 20:52:39 +0200 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: References: <44E95F29.3010909@walkingwoods.com> Message-ID: <20060821185239.GA28485@X.thorsten.dyndns.org> * George Moschovitis [21.08.2006]: > This should work, can anyone verify this ? I will try it. Please give me one or two days... ;) Cheers, Steph. > On 8/21/06, Riku R?is?nen wrote: > > Try to set the relation only to other of the classes (it's two-way > > automatically). > > > > Also, try this: > > > > class Item > > # ... > > joins_many Tag > > # ... > > end > > > > class Tag > > # ... > > belongs_to Item > > # ... > > end > > > > so Tags get deleted if the Item is deleted, I don't know why you would > > want to remove the Items if a Tag is removed... > > > > can't test these out, in a hurry. From john at oxyliquit.de Mon Aug 21 14:54:21 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 21 Aug 2006 20:54:21 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Hi. > can you provide a patch bundle with all patches related to rescues > against my repo? This will help a LOT (and allow me to apply the patch > immediately) Aye, worked a bit on the rescues can't remove all though, since at some it's not known which error is being thrown, for example the ones in sql.rb. There should be some common OgError or something to be able to remove the remaining `rescue Object`s. I removed some rescues completely, as I think the error should indeed get thrown instead of just swallowed. You might want to review the patches case by case. :) I also simplified `def file_and_line_no(step)` in error.rb as it was overcomplicated. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: rescues.patch.tar.bz2 Type: application/bzip2 Size: 6978 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060821/7c42818b/attachment-0001.bin From george.moschovitis at gmail.com Mon Aug 21 15:02:29 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 21 Aug 2006 21:02:29 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Ok, will have a look at them a bit later today. If all is ok, I will add them to the repo tommorow. *many* thanks, George. On 8/21/06, Jonathan Buch wrote: > Hi. > > > can you provide a patch bundle with all patches related to rescues > > against my repo? This will help a LOT (and allow me to apply the patch > > immediately) > > Aye, worked a bit on the rescues can't remove all though, since at some > it's not known which error is being thrown, for example the ones in > sql.rb. There should be some common OgError or something to be able to > remove the remaining `rescue Object`s. > > I removed some rescues completely, as I think the error should indeed get > thrown instead of just swallowed. You might want to review the patches > case by case. :) > > I also simplified `def file_and_line_no(step)` in error.rb as it was > overcomplicated. > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Tue Aug 22 11:13:02 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 Aug 2006 18:13:02 +0300 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Hello, from what I see this patch just adds a bunch of FIXME comments, it doesnt actually fix anything. Perhaps you have sent me the wrong patch? -g. On 8/21/06, Jonathan Buch wrote: > Hi. > > > can you provide a patch bundle with all patches related to rescues > > against my repo? This will help a LOT (and allow me to apply the patch > > immediately) > > Aye, worked a bit on the rescues can't remove all though, since at some > it's not known which error is being thrown, for example the ones in > sql.rb. There should be some common OgError or something to be able to > remove the remaining `rescue Object`s. > > I removed some rescues completely, as I think the error should indeed get > thrown instead of just swallowed. You might want to review the patches > case by case. :) > > I also simplified `def file_and_line_no(step)` in error.rb as it was > overcomplicated. > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From transfire at gmail.com Tue Aug 22 11:45:49 2006 From: transfire at gmail.com (TRANS) Date: Tue, 22 Aug 2006 11:45:49 -0400 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: <4b6f054f0608220845p43d1d09ckb0cdcfb62f12a0c1@mail.gmail.com> On 8/22/06, George Moschovitis wrote: > Hello, > > from what I see this patch just adds a bunch of FIXME comments, it > doesnt actually fix anything. Perhaps you have sent me the wrong > patch? Pretty sure that's all he ever said it did. And that each case has to be dealt with individually. T. From john at oxyliquit.de Tue Aug 22 12:26:01 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 22 Aug 2006 18:26:01 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Hi, > from what I see this patch just adds a bunch of FIXME comments, it > doesnt actually fix anything. Perhaps you have sent me the wrong > patch? Um, I think I patched 3 or 4 of them :) They're just too many ;) Right now I'm working on the ones in sql.rb by adding a .store_exception to the manager which gets changed by each Adapter, not sure how it'll work out yet since I can't see where exactly I should add it.. *think* Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Tue Aug 22 13:53:37 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 Aug 2006 19:53:37 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: there is no single patch i think, only comments... can you review the patch please? -g. On 8/22/06, Jonathan Buch wrote: > Hi, > > > from what I see this patch just adds a bunch of FIXME comments, it > > doesnt actually fix anything. Perhaps you have sent me the wrong > > patch? > > Um, I think I patched 3 or 4 of them :) They're just too many ;) > > Right now I'm working on the ones in sql.rb by adding a .store_exception > to the manager which gets changed by each Adapter, not sure how it'll work > out yet since I can't see where exactly I should add it.. *think* > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Tue Aug 22 15:19:34 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 22 Aug 2006 21:19:34 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Hi, > there is no single patch i think, only comments... > can you review the patch please? huh.... The darcs send seems to have ignored the one patch from me. I think this bundle hopefully does incorporate that one now plus a new one from today. But, that one adds even more fixmes than it removes ;) Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: r.ptch.tar.bz2 Type: application/bzip2 Size: 8746 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060822/21f55029/attachment.bin From d454d at web.de Tue Aug 22 15:32:43 2006 From: d454d at web.de (Stephan Mueller) Date: Tue, 22 Aug 2006 21:32:43 +0200 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: <20060821185239.GA28485@X.thorsten.dyndns.org> References: <44E95F29.3010909@walkingwoods.com> <20060821185239.GA28485@X.thorsten.dyndns.org> Message-ID: <20060822193243.GB6127@X.thorsten.dyndns.org> Hi, I tried now the suggested solution but have to say, it does not work as intended. > > > Try to set the relation only to other of the classes (it's two-way > > > automatically). > > > > > > Also, try this: > > > > > > class Item > > > # ... > > > joins_many Tag > > > # ... > > > end > > > > > > class Tag > > > # ... > > > belongs_to Item > > > # ... > > > end > > > > > > so Tags get deleted if the Item is deleted, I don't know why you would > > > want to remove the Items if a Tag is removed... This does not work for me because i need to have the tags independent from the items. An item can have a list of different tags and a tag can belong to several items. So i tried to set the relation only in one class, code follows: cat m_n.rb #!/usr/bin/ruby # require 'rubygems' require 'og' class Item property :name, String joins_many Tag def to_s @name end end class Tag property :name, String def to_s @name end end Og.setup(:store => :sqlite, :name => 'm_n') (1..3).each { | n | t = Tag.new t.name = "Tag_" + n.to_s t.save puts "created tag with oid " + t.oid.to_s } # see if i can get a tag back from th db t = Tag.find_by_name("Tag_1") t.nil? ? puts("no tag found") : puts("found tag: " + t.name) i1 = Item.new i1.name = "Item_1" i1.save i1.add_tag(Tag.find_by_name("Tag_1")) i1.add_tag(Tag.find_by_name("Tag_2")) i1.save i2 = Item.new i2.name = "Item_2" i2.save i2.add_tag(Tag.find_by_name("Tag_2")) i2.add_tag(Tag.find_by_name("Tag_3")) i2.save # part 2 puts "please inspect db now :)\n" gets i1.delete i2.delete puts "and again...\n" Here are my results from the db: First part: sqlite> select * from ogitem; Item_1|1 Item_2|2 sqlite> select * from ogtag; Tag_1|1 Tag_2|2 Tag_3|3 sqlite> select * from ogj_item_tag; 1|1 1|2 2|2 2|3 Second part (after deleting i1 and i2) sqlite> select * from ogj_item_tag; 1|1 1|2 2|2 2|3 sqlite> select * from ogtag; Tag_1|1 Tag_2|2 Tag_3|3 sqlite> select * from ogitem; ogj_item_tag is still not empty... ;) Any ideas? Cheers, Steph. From george.moschovitis at gmail.com Wed Aug 23 07:51:06 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Aug 2006 14:51:06 +0300 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: <20060822193243.GB6127@X.thorsten.dyndns.org> References: <44E95F29.3010909@walkingwoods.com> <20060821185239.GA28485@X.thorsten.dyndns.org> <20060822193243.GB6127@X.thorsten.dyndns.org> Message-ID: I will test this later today, and let you know tommorow. regards, George. On 8/22/06, Stephan Mueller wrote: > Hi, > > I tried now the suggested solution but have to say, it does not work as > intended. > > > > > Try to set the relation only to other of the classes (it's two-way > > > > automatically). > > > > > > > > Also, try this: > > > > > > > > class Item > > > > # ... > > > > joins_many Tag > > > > # ... > > > > end > > > > > > > > class Tag > > > > # ... > > > > belongs_to Item > > > > # ... > > > > end > > > > > > > > so Tags get deleted if the Item is deleted, I don't know why you would > > > > want to remove the Items if a Tag is removed... > > This does not work for me because i need to have the tags independent > from the items. An item can have a list of different tags and a tag can > belong to several items. > > So i tried to set the relation only in one class, code follows: > > cat m_n.rb > > #!/usr/bin/ruby > # > > require 'rubygems' > require 'og' > > class Item > property :name, String > > joins_many Tag > > def to_s > @name > end > end > > class Tag > property :name, String > > def to_s > @name > end > end > > Og.setup(:store => :sqlite, :name => 'm_n') > > (1..3).each { | n | > t = Tag.new > t.name = "Tag_" + n.to_s > t.save > puts "created tag with oid " + t.oid.to_s > } > > # see if i can get a tag back from th db > t = Tag.find_by_name("Tag_1") > t.nil? ? puts("no tag found") : puts("found tag: " + t.name) > > i1 = Item.new > i1.name = "Item_1" > i1.save > i1.add_tag(Tag.find_by_name("Tag_1")) > i1.add_tag(Tag.find_by_name("Tag_2")) > i1.save > > i2 = Item.new > i2.name = "Item_2" > i2.save > i2.add_tag(Tag.find_by_name("Tag_2")) > i2.add_tag(Tag.find_by_name("Tag_3")) > i2.save > > # part 2 > puts "please inspect db now :)\n" > gets > i1.delete > i2.delete > puts "and again...\n" > > > > Here are my results from the db: > > First part: > > sqlite> select * from ogitem; > Item_1|1 > Item_2|2 > sqlite> select * from ogtag; > Tag_1|1 > Tag_2|2 > Tag_3|3 > sqlite> select * from ogj_item_tag; > 1|1 > 1|2 > 2|2 > 2|3 > > Second part (after deleting i1 and i2) > > sqlite> select * from ogj_item_tag; > 1|1 > 1|2 > 2|2 > 2|3 > sqlite> select * from ogtag; > Tag_1|1 > Tag_2|2 > Tag_3|3 > sqlite> select * from ogitem; > > ogj_item_tag is still not empty... ;) > > Any ideas? > > > Cheers, > > Steph. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Wed Aug 23 09:28:02 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 23 Aug 2006 15:28:02 +0200 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: <44E95F29.3010909@walkingwoods.com> References: <44E95F29.3010909@walkingwoods.com> Message-ID: Hi, > Try to set the relation only to other of the classes (it's two-way > automatically). > so Tags get deleted if the Item is deleted, I don't know why you would > want to remove the Items if a Tag is removed... Well, with Tags you're quite right, but you may think of a online shop, where you have a `ShoppingCart` and `ShoppingCartItem`'s. When the User shops and suddenly logs out, the easiest thing to do is just to delete the shopping cart, which will then 'cascade' and delete the other items as well. We have two different cases now, this means that this should be configurable. I think this is a classic case of constraints like used in PostgreSQL and any other serious DB. Right now I have this idea in my head that Og could utilize information from the DB or simulate when the DB doesn't support constraints. An example: class OgModel has_one :item, Item, :on_delete => 'cascade' end where the settings are: * `:on_delete` * `:on_update` and possible values are: * 'cascade' (update/delete all referenced items), * 'restrict' (don't do anything to referenced items), * 'set null' (set the property on the referenced item to 'NULL'), * 'set default' (reset the property of referenced item to it's 'DEFAULT' value). Not sure how this could be implemented (from th Og side). Something with callbacks on `:on_delete` which I think is already there plus some book-keeping within the OgModel... Jo PS: Uh, that lead me to a similar thought. PostgreSQL also has other constraints like 'UNIQUE', 'CHECK (price > discounted_price)'. Maybe the current validation system can be intercepted at some point and create the same constraints in the DB too if possible. Then you could write class OgModel property :price, Integer validate_unique :price end instead of class OgModel property :price, Integer, :unique => true validate_unique :price end This could then also be used to _assume_ validity. When the DB is able to validate 'UNIQUE' at input/update time (and throw errors if failed) then the validator could just go ahaid and assume that the validity of that particular constraint is fullfilled. This would lessen the overhead of valdation due to fewer roundtrips to DB. PPS: Maybe another recognized option for `property`: class OgModel property :price, Integer, :constraint => 'check(...)' end Right now I would use `:sql =>` for that, but what is when I use the VarChar(20) option? The `:sql` from it would get overridden.... Or use the undocumented `:extra_sql`? But what about non-sql stores... That thought isn't finished, so don't mind me, I find it useful to write while developing my thoughts ;) PPPS: I haven't found the constraint code for postgres in 0.40... did I overlook it or is it being reworked, revoked or otherwise? It was quite some hackish code and didn't work well with Polymorphic stuff, I liked it though... -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Wed Aug 23 14:23:41 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 23 Aug 2006 20:23:41 +0200 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Hi, another patch, this time for the `rescue Object`'s in sql.rb. This is quite a change, since it'll be a requirement to add these 'Overrides' in each Adapter to come. It adds a new setting called `:store_exception` to each Adapter, which is then used in sql.rb to rescue on the right error class. Good? Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: r2.ptch.tar.bz2 Type: application/bzip2 Size: 7057 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060823/c9cac8bb/attachment.bin From fabian at oggu.de Thu Aug 24 09:34:36 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 24 Aug 2006 15:34:36 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <20060817120422.GA23941@none.at> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> <20060817103850.GA18733@none.at> <20060817120422.GA23941@none.at> Message-ID: <7677807C-419A-44D9-BD84-9419335E21F9@oggu.de> I had a look at your Patch. Looks good so far and works nice on my machine. Two small issues I see: - It seems to use the Logger of Mongrel, which looks different than the Logger usually used in Nitro. Maybe this could be changed? - Is the method stop() even called? With Webrick I see a ..shutdown when doing ctrl+c, with Mongrel I don't (both, old adapter and yours). But maybe this is only a logging issue too. I reworked your patch as Darcs patch, so it could be applied to the repo (attachment included to this mail), but before that maybe you could have a small look at the two tiny issues listed above and send in a new patch. If you don't mind installing darcs it'd be nice to have it as darcs patch, if not, don't worry, I can review and make a darcs patch of it. Fabian -------------- next part -------------- A non-text attachment was scrubbed... Name: al_mongrel_changes.darcs.patch.gz Type: application/x-gzip Size: 7590 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060824/b1f28d2d/attachment-0001.gz -------------- next part -------------- -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From john at oxyliquit.de Thu Aug 24 10:43:12 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 24 Aug 2006 16:43:12 +0200 Subject: [Nitro] STI patch Message-ID: Hi, had a little debug session with manveru today, but at last we solved it. it seems like a complete waste of time... a whole 2 days for a 7-lines patch This error prevented at least tc_inheritance2.rb and tc_ez.rb from succeeding because it produced wrong "CREATE TABLE" code. [CREATE TABLE ogtc_oginheritance2_project (ogtype VARCHAR(30), koko text, oid serial PRIMARY KEY, kaka , haha );] Big picture (as I understood it): The annotations used for getting the correct sql type are partly in the parent class but also in the child classes, which didn't get asked. It now loops over the child classes to collect the correct annotations. Furthermore a second bug was fixed where all properties from parent class plus child classes were accumulated, which resulted in sql like: [CREATE TABLE ogtc_oginheritance2_project (ogtype VARCHAR(30), koko text, oid serial PRIMARY KEY, koko text, oid serial PRIMARY KEY, kaka , koko text, oid serial PRIMARY KEY, haha );] Anyway, solved now too, by a .uniq at the right place :) All thanks go to manveru :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: sti.ptch.tar.bz2 Type: application/bzip2 Size: 6364 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060824/d5de43b0/attachment.bin From john at oxyliquit.de Thu Aug 24 10:49:24 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 24 Aug 2006 16:49:24 +0200 Subject: [Nitro] STI patch In-Reply-To: References: Message-ID: Some followup, I was too fast, or better, manv was too fast in checking everything :P [16:37] added something else... [16:37] to get rid of the warnings [16:37] the [16:37] WARN: Obsolete field 'ogtype' found on table 'ogtc_oginheritance2_project'! [16:37] WARN: Obsolete field 'haha' found on table 'ogtc_oginheritance2_project'! [16:37] WARN: Obsolete field 'kaka' found on table 'ogtc_oginheritance2_project'! [16:37] from evolution :) [16:37] i'm just covering one level of inheritance with that... but atm it's enough Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: sti2.ptch.tar.bz2 Type: application/bzip2 Size: 6330 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060824/2ae5434d/attachment.bin From george.moschovitis at gmail.com Thu Aug 24 12:48:16 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 19:48:16 +0300 Subject: [Nitro] Road To Perdition, or: Fixme status In-Reply-To: References: Message-ID: Ok, applied... -g. On 8/23/06, Jonathan Buch wrote: > Hi, > > another patch, this time for the `rescue Object`'s in sql.rb. > > This is quite a change, since it'll be a requirement to add these > 'Overrides' in each Adapter to come. It adds a new setting called > `:store_exception` to each Adapter, which is then used in sql.rb to rescue > on the right error class. > > Good? > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 24 12:50:24 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 19:50:24 +0300 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <7677807C-419A-44D9-BD84-9419335E21F9@oggu.de> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> <20060817103850.GA18733@none.at> <20060817120422.GA23941@none.at> <7677807C-419A-44D9-BD84-9419335E21F9@oggu.de> Message-ID: Thanks Fabian, if you finalize this patch I would gladly have a look at this and include this. -g. On 8/24/06, Fabian Buch wrote: > I had a look at your Patch. Looks good so far and works nice on my > machine. > > Two small issues I see: > - It seems to use the Logger of Mongrel, which looks different > than the Logger usually used in Nitro. Maybe this could be changed? > - Is the method stop() even called? With Webrick I see > a ..shutdown when doing ctrl+c, with Mongrel I don't (both, old > adapter and yours). But maybe this is only a logging issue too. > > I reworked your patch as Darcs patch, so it could be applied to the > repo (attachment included to this mail), but before that maybe you > could have a small look at the two tiny issues listed above and send > in a new patch. If you don't mind installing darcs it'd be nice to > have it as darcs patch, if not, don't worry, I can review and make a > darcs patch of it. > > Fabian > > > > > > -- > Nitro Q&A: http://oxyliquit.de/ > Blog: http://blog.fabian-buch.de > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 24 12:57:31 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 19:57:31 +0300 Subject: [Nitro] STI patch In-Reply-To: References: Message-ID: applied, thanks! -g. On 8/24/06, Jonathan Buch wrote: > Some followup, I was too fast, or better, manv was too fast in checking > everything :P > > [16:37] added something else... > [16:37] to get rid of the warnings > [16:37] the > [16:37] WARN: Obsolete field 'ogtype' found on table > 'ogtc_oginheritance2_project'! > [16:37] WARN: Obsolete field 'haha' found on table > 'ogtc_oginheritance2_project'! > [16:37] WARN: Obsolete field 'kaka' found on table > 'ogtc_oginheritance2_project'! > [16:37] from evolution :) > [16:37] i'm just covering one level of inheritance with that... > but atm it's enough > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 24 13:29:00 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 20:29:00 +0300 Subject: [Nitro] Ebook Message-ID: Dear devs, can someone suggest an OSS programm for preparing an e-book? Ideally this programm should run under Gnome (An ubuntu .deb is perfect). thanks, George. -- http://www.gmosx.com http://www.nitroproject.org From al-nitrogen at none.at Thu Aug 24 13:41:30 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 24 Aug 2006 19:41:30 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <7677807C-419A-44D9-BD84-9419335E21F9@oggu.de> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> <20060817103850.GA18733@none.at> <20060817120422.GA23941@none.at> <7677807C-419A-44D9-BD84-9419335E21F9@oggu.de> Message-ID: <20060824174130.GA5819@none.at> On Don 24.08.2006 15:34, Fabian Buch wrote: >I had a look at your Patch. Looks good so far and works nice on my >machine. Cool thanks ;-) >Two small issues I see: > - It seems to use the Logger of Mongrel, which looks different than > the Logger usually used in Nitro. Maybe this could be changed? Sorry but i don't know *how* the logging in Nitro works, could anybody help in this issue?! > - Is the method stop() even called? With Webrick I see a ..shutdown > when doing ctrl+c, with Mongrel I don't (both, old adapter and > yours). But maybe this is only a logging issue too. I think you should replace the this line: --- trap('INT') { exit } # works until you use breakpoint... why? --- with a stop call, but i haven't a chance in the next time to test it :-( >I reworked your patch as Darcs patch, so it could be applied to the >repo (attachment included to this mail), but before that maybe you >could have a small look at the two tiny issues listed above and send in >a new patch. If you don't mind installing darcs it'd be nice to have it >as darcs patch, if not, don't worry, I can review and make a darcs >patch of it. Thanks for your work ;-) Regards Alex From transfire at gmail.com Thu Aug 24 13:58:08 2006 From: transfire at gmail.com (TRANS) Date: Thu, 24 Aug 2006 13:58:08 -0400 Subject: [Nitro] Ebook In-Reply-To: References: Message-ID: <4b6f054f0608241058i2aaf734ctff29f3b3a9b84a9f@mail.gmail.com> What formts do you want to export? From george.moschovitis at gmail.com Thu Aug 24 14:16:07 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 21:16:07 +0300 Subject: [Nitro] STI patch In-Reply-To: References: Message-ID: Saddly this patch has problems, so I removed it. I cannot examine this in detail, but try to use it with a new web app (ie when Og tries to create the schema for the first time) and this will probably show up. regards, George. On 8/24/06, George Moschovitis wrote: > applied, thanks! > > -g. > > On 8/24/06, Jonathan Buch wrote: > > Some followup, I was too fast, or better, manv was too fast in checking > > everything :P > > > > [16:37] added something else... > > [16:37] to get rid of the warnings > > [16:37] the > > [16:37] WARN: Obsolete field 'ogtype' found on table > > 'ogtc_oginheritance2_project'! > > [16:37] WARN: Obsolete field 'haha' found on table > > 'ogtc_oginheritance2_project'! > > [16:37] WARN: Obsolete field 'kaka' found on table > > 'ogtc_oginheritance2_project'! > > [16:37] from evolution :) > > [16:37] i'm just covering one level of inheritance with that... > > but atm it's enough > > > > Jo > > > > -- > > Feel the love > > http://pinkjuice.com/pics/ruby.png > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > -- > http://www.gmosx.com > http://www.nitroproject.org > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 24 14:16:56 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 21:16:56 +0300 Subject: [Nitro] Ebook In-Reply-To: <4b6f054f0608241058i2aaf734ctff29f3b3a9b84a9f@mail.gmail.com> References: <4b6f054f0608241058i2aaf734ctff29f3b3a9b84a9f@mail.gmail.com> Message-ID: .PDF -g. On 8/24/06, TRANS wrote: > What formts do you want to export? > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Thu Aug 24 14:18:08 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 24 Aug 2006 20:18:08 +0200 Subject: [Nitro] Ebook In-Reply-To: References: Message-ID: Hi, > can someone suggest an OSS programm for preparing an e-book? Ideally > this programm should run under Gnome (An ubuntu .deb is perfect). Depends on what you mean by preparing :) I guess that highly depends on in which language the book is written. I personally would probably use LaTeX. It's basically fast to write and looks good. It's easy to convert to pdf, which is probably the best end-format for an ebook. `pdflatex` would then be the program of choice to convert to pdf for screen use. The package 'listings' is quite good for code and LyX (a Wysiwym program :P) helps the more visual type to write good LaTeX without knowing about the nitty gritty details. (not sure if in Ubuntu .deb, but it's available for Debian...) :) If the source is already available in html form, `htmldoc` might be of help to convert to pdf. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From Reid.Thompson at ateb.com Thu Aug 24 14:51:39 2006 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Thu, 24 Aug 2006 14:51:39 -0400 Subject: [Nitro] Ebook In-Reply-To: References: Message-ID: <1156445499.10903.58.camel@jhereg> On Thu, 2006-08-24 at 20:29 +0300, George Moschovitis wrote: > Dear devs, > > can someone suggest an OSS programm for preparing an e-book? Ideally > this programm should run under Gnome (An ubuntu .deb is perfect). > > thanks, > George. > > ubuntu has debs for openoffice 2.x -- this will export directly to pdf. From george.moschovitis at gmail.com Thu Aug 24 15:04:52 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 22:04:52 +0300 Subject: [Nitro] Ebook In-Reply-To: <1156445499.10903.58.camel@jhereg> References: <1156445499.10903.58.camel@jhereg> Message-ID: i would like to be able to prepate a color cover for this book without page borders. Can latex do this? -g. On 8/24/06, Reid Thompson wrote: > On Thu, 2006-08-24 at 20:29 +0300, George Moschovitis wrote: > > Dear devs, > > > > can someone suggest an OSS programm for preparing an e-book? Ideally > > this programm should run under Gnome (An ubuntu .deb is perfect). > > > > thanks, > > George. > > > > > ubuntu has debs for openoffice 2.x -- this will export directly to pdf. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 24 15:05:25 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Aug 2006 22:05:25 +0300 Subject: [Nitro] Ebook In-Reply-To: References: <1156445499.10903.58.camel@jhereg> Message-ID: Is there a DTP programm for gnome? I know about Scribus for Qt (has anyone used this?) -g. On 8/24/06, George Moschovitis wrote: > i would like to be able to prepate a color cover for this book without > page borders. Can latex do this? > > -g. > > On 8/24/06, Reid Thompson wrote: > > On Thu, 2006-08-24 at 20:29 +0300, George Moschovitis wrote: > > > Dear devs, > > > > > > can someone suggest an OSS programm for preparing an e-book? Ideally > > > this programm should run under Gnome (An ubuntu .deb is perfect). > > > > > > thanks, > > > George. > > > > > > > > ubuntu has debs for openoffice 2.x -- this will export directly to pdf. > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > http://www.gmosx.com > http://www.nitroproject.org > -- http://www.gmosx.com http://www.nitroproject.org From transfire at gmail.com Thu Aug 24 15:25:07 2006 From: transfire at gmail.com (TRANS) Date: Thu, 24 Aug 2006 15:25:07 -0400 Subject: [Nitro] Ebook In-Reply-To: References: <1156445499.10903.58.camel@jhereg> Message-ID: <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> Use Lyx --Latex document processor. It's the bomb! For a cover just use an vector drawing program like Inskscape. T. From john at oxyliquit.de Thu Aug 24 15:48:25 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 24 Aug 2006 21:48:25 +0200 Subject: [Nitro] Ebook In-Reply-To: <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> References: <1156445499.10903.58.camel@jhereg> <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> Message-ID: Hi, > Use Lyx --Latex document processor. It's the bomb! For a cover just > use an vector drawing program like Inskscape. aight! http://software.newsforge.com/article.pl?sid=06/08/15/1859251&from=rss Just got this via rss and thought I'd share, maybe it helps George? Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From lionel.orry at gmail.com Fri Aug 25 03:13:20 2006 From: lionel.orry at gmail.com (Lionel Orry) Date: Fri, 25 Aug 2006 09:13:20 +0200 Subject: [Nitro] Ebook In-Reply-To: <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> References: <1156445499.10903.58.camel@jhereg> <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> Message-ID: <44EEA310.6020309@gmail.com> I totally agree. it is a very good way to enter the LaTeX world. It can even process docbook documents in some cases... Actually my preferred combo is LyX + pdflatex. Even generates pdf bookmarks. To participate to other suggestions: - Scribus: I've given this software a try (on Windows, but I guess there must not be many differences because of QT), and it rocks. But I think it is more targetted to professional publishers (the amount of options to define layouts and printing configuration is astounding). It would be a good software to prepare a flyer for example, but not a book IMHO. - Inkscape is indeed a wonderful vetor drawing application. I often use it and you can make beautiful compositions in no time! (took me about 20 minutes to make a flyer for my company. Direct Postscript export, and here you have your cover page). regards Lionel TRANS wrote: > Use Lyx --Latex document processor. It's the bomb! For a cover just > use an vector drawing program like Inskscape. > > T. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From alex at msgpad.com Sat Aug 26 03:21:25 2006 From: alex at msgpad.com (Alex Pooley) Date: Sat, 26 Aug 2006 15:21:25 +0800 Subject: [Nitro] re-using a db and threading headaches Message-ID: <1156576885.18642.30.camel@woof> Yo! I've been working around two issues. One I have a solution for, and the other issue I have a test case courtesy of manveru. 1. When I try to re-use an existing database Og dies on an exception that the table already exists. I'm using sqlite. The easy fix is to catch the exception in sql.rb at line 139. So instead of klass.allocate.og_create_schema(self) You end up with something more like begin klass.allocate.og_create_schema(self) rescue Exception end 2. I'm running two threads. The first thread is running tests, and the second thread is a mongrel server. Each thread is accessing the Og store. Og will die trying to close the store in manager.rb (line 101), because @store is nil. manveru came up with this test case while discussing the problem on IRC: http://pastie.caboo.se/10334 . This occurs in both the repo.nitroproject.org repository, and manveru's latest. -- Alex Pooley (msgpad founder) w: http://msgpad.com e: alex at msgpad.com b: http://alexpooley.com From fabian at oggu.de Sat Aug 26 06:38:30 2006 From: fabian at oggu.de (Fabian Buch) Date: Sat, 26 Aug 2006 12:38:30 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: <20060824174130.GA5819@none.at> References: <20060805132241.GA11050@none.at> <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> <20060817103850.GA18733@none.at> <20060817120422.GA23941@none.at> <7677807C-419A-44D9-BD84-9419335E21F9@oggu.de> <20060824174130.GA5819@none.at> Message-ID: Am 24.08.2006 um 19:41 schrieb Alexander Lazic: > I think you should replace the this line: > > --- > trap('INT') { exit } # works until you use breakpoint... why? > --- Done. I've fixed it a little more, including logging. It's not perfect yet, but this patch improved as much that I think it can be included into the repo. George, darcs patch as attachment to this mail. Should apply cleanly. Fabian -------------- next part -------------- A non-text attachment was scrubbed... Name: al_mongrel_changes.new.darcs.patch.gz Type: application/x-gzip Size: 7699 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060826/b75f8b7f/attachment.gz -------------- next part -------------- From nusgnaf at gmail.com Sat Aug 26 08:32:45 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sat, 26 Aug 2006 12:32:45 +0000 Subject: [Nitro] re-using a db and threading headaches In-Reply-To: <1156576885.18642.30.camel@woof> References: <1156576885.18642.30.camel@woof> Message-ID: <716700c90608260532v645927f1m604d793ba47c4a76@mail.gmail.com> instance var @store defined in Og::Manager looks very suspecious.from the comment in the code: -------8<----------- # The store used for persistence. This is a virtual field # when running in thread_safe mode. attr_accessor :store -------8<------------ and in close_store it gets called: @store.close I add simple p @store in the og/manager.rb, it seems that it is always nil, that can explain the error you saw. But how does @store get used? I still don't know Og enought, hope George may give better explanation on Og intervals. On 8/26/06, Alex Pooley wrote: > Yo! > > I've been working around two issues. One I have a solution for, and the > other issue I have a test case courtesy of manveru. > > 1. When I try to re-use an existing database Og dies on an exception > that the table already exists. I'm using sqlite. The easy fix is to > catch the exception in sql.rb at line 139. So instead of > > klass.allocate.og_create_schema(self) > > You end up with something more like > > begin > klass.allocate.og_create_schema(self) > rescue Exception > end > > > 2. I'm running two threads. The first thread is running tests, and the > second thread is a mongrel server. Each thread is accessing the Og > store. Og will die trying to close the store in manager.rb (line 101), > because @store is nil. manveru came up with this test case while > discussing the problem on IRC: http://pastie.caboo.se/10334 . This > occurs in both the repo.nitroproject.org repository, and manveru's > latest. > > > -- > Alex Pooley (msgpad founder) > w: http://msgpad.com > e: alex at msgpad.com > b: http://alexpooley.com > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From nusgnaf at gmail.com Sat Aug 26 09:05:09 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sat, 26 Aug 2006 13:05:09 +0000 Subject: [Nitro] re-using a db and threading headaches In-Reply-To: <716700c90608260532v645927f1m604d793ba47c4a76@mail.gmail.com> References: <1156576885.18642.30.camel@woof> <716700c90608260532v645927f1m604d793ba47c4a76@mail.gmail.com> Message-ID: <716700c90608260605o24c1b5d9o400e9cd4dedd4002@mail.gmail.com> The fix is very simple, right now we use @store to maintain database connection is Og isnot threadsafe, while in threadsafe mode we use dynamic @pool, in close_store, we fall back to @store.close by checking the size of @pool, that's not correct. The following patch is again lastest repo, please apply. On 8/26/06, Fang Sun wrote: > instance var @store defined in Og::Manager looks very suspecious.from > the comment in the code: > -------8<----------- > # The store used for persistence. This is a virtual field > # when running in thread_safe mode. > > attr_accessor :store > -------8<------------ > and in close_store it gets called: > @store.close > > I add simple p @store in the og/manager.rb, it seems that it is always > nil, that can explain the error you saw. But how does @store get used? > I still don't know Og enought, hope George may give better explanation > on Og intervals. > > On 8/26/06, Alex Pooley wrote: > > Yo! > > > > I've been working around two issues. One I have a solution for, and the > > other issue I have a test case courtesy of manveru. > > > > 1. When I try to re-use an existing database Og dies on an exception > > that the table already exists. I'm using sqlite. The easy fix is to > > catch the exception in sql.rb at line 139. So instead of > > > > klass.allocate.og_create_schema(self) > > > > You end up with something more like > > > > begin > > klass.allocate.og_create_schema(self) > > rescue Exception > > end > > > > > > 2. I'm running two threads. The first thread is running tests, and the > > second thread is a mongrel server. Each thread is accessing the Og > > store. Og will die trying to close the store in manager.rb (line 101), > > because @store is nil. manveru came up with this test case while > > discussing the problem on IRC: http://pastie.caboo.se/10334 . This > > occurs in both the repo.nitroproject.org repository, and manveru's > > latest. > > > > > > -- > > Alex Pooley (msgpad founder) > > w: http://msgpad.com > > e: alex at msgpad.com > > b: http://alexpooley.com > > > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: og.fix.patch.tgz Type: application/x-gzip Size: 7185 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060826/eb70f72e/attachment-0001.tgz From al-nitrogen at none.at Sat Aug 26 10:32:42 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Sat, 26 Aug 2006 16:32:42 +0200 Subject: [Nitro] [PATCH] first attempt for *new* mongrel-adapter In-Reply-To: References: <20060817085234.GA11823@none.at> <55AF8E2A-1765-47A0-AC86-05F7489DE5BB@oggu.de> <20060817093148.GA14286@none.at> <20060817103850.GA18733@none.at> <20060817120422.GA23941@none.at> <7677807C-419A-44D9-BD84-9419335E21F9@oggu.de> <20060824174130.GA5819@none.at> Message-ID: <20060826143242.GC29638@none.at> On Sam 26.08.2006 12:38, Fabian Buch wrote: > >Am 24.08.2006 um 19:41 schrieb Alexander Lazic: >>I think you should replace the this line: >> >>trap('INT') { exit } # works until you use breakpoint... why? > >Done. > >I've fixed it a little more, including logging. It's not perfect yet, >but this patch improved as much that I think it can be included into >the repo. Thanks Fabian to take this task ;-) Regards Alex From nusgnaf at gmail.com Sun Aug 27 02:42:56 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sun, 27 Aug 2006 06:42:56 +0000 Subject: [Nitro] re-using a db and threading headaches In-Reply-To: <716700c90608260605o24c1b5d9o400e9cd4dedd4002@mail.gmail.com> References: <1156576885.18642.30.camel@woof> <716700c90608260532v645927f1m604d793ba47c4a76@mail.gmail.com> <716700c90608260605o24c1b5d9o400e9cd4dedd4002@mail.gmail.com> Message-ID: <716700c90608262342o3d70bcfbgd652b6e81dae8f3f@mail.gmail.com> Hi, Alex, does the og in repo.nitroproject.org work for you? I cannot get glycerin to work with your script, so the patch is indeed cooked out on installed Og 0.31 gem and ported to glycerin. Anyway the fix is obvious, please let me know if it works for you. From d454d at web.de Sun Aug 27 03:57:42 2006 From: d454d at web.de (Stephan Mueller) Date: Sun, 27 Aug 2006 09:57:42 +0200 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: References: <44E95F29.3010909@walkingwoods.com> Message-ID: <20060827075742.GA16244@X.thorsten.dyndns.org> Hello again, * Jonathan Buch [23.08.2006]: > > Try to set the relation only to other of the classes (it's two-way > > automatically). > > > so Tags get deleted if the Item is deleted, I don't know why you would > > want to remove the Items if a Tag is removed... > > Well, with Tags you're quite right, but you may think of a online shop, > where you have a `ShoppingCart` and `ShoppingCartItem`'s. When the User > shops and suddenly logs out, the easiest thing to do is just to delete the > shopping cart, which will then 'cascade' and delete the other items as > well. I think I did not make my point clear: My problem ist not wether tags or items get removed according to their relation. The problem ist the mapping table og creates to maintain many to X relations. Entries in this table do not get removed, even if neccesary. I added some code to my previous example, to show the real problem: >>>> #!/usr/bin/ruby # require 'rubygems' require 'og' class Item property :name, String joins_many Tag def to_s @name end end class Tag property :name, String def to_s @name end end Og.setup(:store => :sqlite, :name => 'm_n') (1..3).each { | n | t = Tag.new t.name = "Tag_" + n.to_s t.save puts "created tag with oid " + t.oid.to_s } # see if i can get a tag back from th db t = Tag.find_by_name("Tag_1") t.nil? ? puts("no tag found") : puts("found tag: " + t.name) i1 = Item.new i1.name = "Item_1" i1.save i1.add_tag(Tag.find_by_name("Tag_1")) i1.add_tag(Tag.find_by_name("Tag_2")) i1.save i2 = Item.new i2.name = "Item_2" i2.save i2.add_tag(Tag.find_by_name("Tag_2")) i2.add_tag(Tag.find_by_name("Tag_3")) i2.save puts "please inspect db now :)\n" gets i1.delete i2.delete puts "and again...\n" # the following code is new an triggers an exception due to existing # items in the mapping table i3 = Item.new i3.name = "Item_3" i3.save i3.add_tag(Tag.find_by_name("Tag_1")) i3.add_tag(Tag.find_by_name("Tag_2")) i3.save >>>> This results in the folowing exception: % ruby m_n_with_og.rb INFO: Og uses the Sqlite store. INFO: Created table 'ogtag'. INFO: Created table 'ogitem'. created tag with oid 1 created tag with oid 2 created tag with oid 3 found tag: Tag_1 please inspect db now :) and again... /usr/lib/ruby/1.8/sqlite3/errors.rb:94:in `check': SQL logic error or missing database (SQLite3::SQLException) from /usr/lib/ruby/1.8/sqlite3/resultset.rb:76:in `check' from /usr/lib/ruby/1.8/sqlite3/resultset.rb:68:in `commence' from /usr/lib/ruby/1.8/sqlite3/resultset.rb:61:in `initialize' from /usr/lib/ruby/1.8/sqlite3/statement.rb:158:in `execute' from /usr/lib/ruby/1.8/sqlite3/database.rb:274:in `query' from /usr/lib/ruby/gems/1.8/gems/og-0.31.0/lib/og/store/sqlite.rb:92:in `exec' from /usr/lib/ruby/gems/1.8/gems/og-0.31.0/lib/og/store/sql.rb:582:in `join' from (eval):26:in `add_tag' from m_n_with_og.rb:63 > Right now I have this idea in my head that Og could utilize information > from the DB or simulate when the DB doesn't support constraints. I think this does not apply to my problem but in general i like your idea. On the other hand we already have information about these constraints due to the knowledge about their relation. > Feel the love > http://pinkjuice.com/pics/ruby.png nice picture! :) Cheers, Steph. From nusgnaf at gmail.com Sun Aug 27 04:23:49 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sun, 27 Aug 2006 08:23:49 +0000 Subject: [Nitro] Og in glycerin is broken now. Message-ID: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> Hello, everyone For some reason, Og cannot enchant class now. This is og 0.31 ------>8-------- irb(main):001:0> require 'og' => true irb(main):002:0> class U ;property :name, String; end => U irb(main):003:0> Og.start INFO: Og uses the Sqlite store. INFO: Created table 'ogu'. -------->8------- with glycerin... -------------------8<------------ irb#1(main):001:0> require 'glycerin' => true irb(main):002:0> require 'og' => true irb(main):003:0> class U; attr_accessor :name, String;end => nil irb(main):007:0> Og.start INFO: Og uses the Sqlite store. => #:sqlite, :name=>"data", :called_by_og_setup=>true}, @entities={}, @pool=[# u = U.new.name = "haha" => "haha" irb(main):009:0> u.save! NoMethodError: undefined method `save!' for "haha":String from (irb):9 ---------------------8<----------- So Og cannot capture user defined class.How to debug this? From nusgnaf at gmail.com Sun Aug 27 04:35:40 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sun, 27 Aug 2006 08:35:40 +0000 Subject: [Nitro] Og in glycerin is broken now. In-Reply-To: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> References: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> Message-ID: <716700c90608270135t150b174avad81b97dc5737bb@mail.gmail.com> Ah, better example to demonstrate this: ----------8<--------- require 'repo.nitroproject.org/glycerin' require 'og' class U property :name, String end Og.start u = U.new u.name = "haha" u.save! fang at fang:~/Ruby/code$ ruby a.rb INFO: Og uses the Sqlite store. a.rb:10: undefined method `save!' for # (NoMethodError) -----------8<-------- recheck data.db find out the table isnot created. Uncomment the first line, rerun the script ======= fang at fang:~/Ruby/code$ ruby a.rb INFO: Og uses the Sqlite store. INFO: Created table 'ogu' fang at fang:~/Ruby/code$ sqlite3 data.db '.dump' BEGIN TRANSACTION; CREATE TABLE ogu (name text, oid integer PRIMARY KEY); INSERT INTO "ogu" VALUES('haha', 1); COMMIT; ======= From george.moschovitis at gmail.com Sun Aug 27 04:52:41 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 27 Aug 2006 11:52:41 +0300 Subject: [Nitro] Og in glycerin is broken now. In-Reply-To: <716700c90608270135t150b174avad81b97dc5737bb@mail.gmail.com> References: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> <716700c90608270135t150b174avad81b97dc5737bb@mail.gmail.com> Message-ID: Ok will have a look at this today. I will also review your og threading bug. thanks, George. On 8/27/06, Fang Sun wrote: > Ah, better example to demonstrate this: > ----------8<--------- > require 'repo.nitroproject.org/glycerin' > require 'og' > class U > property :name, String > end > > Og.start > u = U.new > u.name = "haha" > u.save! > > fang at fang:~/Ruby/code$ ruby a.rb > INFO: Og uses the Sqlite store. > a.rb:10: undefined method `save!' for # > (NoMethodError) > -----------8<-------- > > recheck data.db find out the table isnot created. Uncomment the first > line, rerun the script > ======= > fang at fang:~/Ruby/code$ ruby a.rb > INFO: Og uses the Sqlite store. > INFO: Created table 'ogu' > > fang at fang:~/Ruby/code$ sqlite3 data.db '.dump' > BEGIN TRANSACTION; > CREATE TABLE ogu (name text, oid integer PRIMARY KEY); > INSERT INTO "ogu" VALUES('haha', 1); > COMMIT; > ======= > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From nusgnaf at gmail.com Sun Aug 27 06:03:32 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Sun, 27 Aug 2006 10:03:32 +0000 Subject: [Nitro] Og in glycerin is broken now. In-Reply-To: References: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> <716700c90608270135t150b174avad81b97dc5737bb@mail.gmail.com> Message-ID: <716700c90608270303i5d0d7441udeb32ede0f7d0496@mail.gmail.com> Hi, George, it seems to be related with facets-1.7, I downgrade to 1.4.5 and everythinng seems to be Ok now. How can I specify nitro to use specific facets version at one place? It seems that nitro require facets here and there, and manually change all those files is not practical. On the other hand, I've track down that while use facets-1.7.x, the glue/attributes cannot serialize class attibutes right. Hope this info helps. On 8/27/06, George Moschovitis wrote: > Ok will have a look at this today. I will also review your og threading bug. > > thanks, > George. > > On 8/27/06, Fang Sun wrote: > > Ah, better example to demonstrate this: > > ----------8<--------- > > require 'repo.nitroproject.org/glycerin' > > require 'og' > > class U > > property :name, String > > end > > > > Og.start > > u = U.new > > u.name = "haha" > > u.save! > > > > fang at fang:~/Ruby/code$ ruby a.rb > > INFO: Og uses the Sqlite store. > > a.rb:10: undefined method `save!' for # > > (NoMethodError) > > -----------8<-------- > > > > recheck data.db find out the table isnot created. Uncomment the first > > line, rerun the script > > ======= > > fang at fang:~/Ruby/code$ ruby a.rb > > INFO: Og uses the Sqlite store. > > INFO: Created table 'ogu' > > > > fang at fang:~/Ruby/code$ sqlite3 data.db '.dump' > > BEGIN TRANSACTION; > > CREATE TABLE ogu (name text, oid integer PRIMARY KEY); > > INSERT INTO "ogu" VALUES('haha', 1); > > COMMIT; > > ======= > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > http://www.gmosx.com > http://www.nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From george.moschovitis at gmail.com Sun Aug 27 06:57:17 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 27 Aug 2006 13:57:17 +0300 Subject: [Nitro] Og in glycerin is broken now. In-Reply-To: <716700c90608270303i5d0d7441udeb32ede0f7d0496@mail.gmail.com> References: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> <716700c90608270135t150b174avad81b97dc5737bb@mail.gmail.com> <716700c90608270303i5d0d7441udeb32ede0f7d0496@mail.gmail.com> Message-ID: I am using facets 1.4.3 for my applications. Have not updated to facets 1.7.xx yet. -g. On 8/27/06, Fang Sun wrote: > Hi, George, it seems to be related with facets-1.7, I downgrade to > 1.4.5 and everythinng seems to be Ok now. How can I specify nitro to > use specific facets version at one place? It seems that nitro require > facets here and there, and manually change all those files is not > practical. > On the other hand, I've track down that while use facets-1.7.x, the > glue/attributes cannot serialize class attibutes right. Hope this info > helps. > On 8/27/06, George Moschovitis wrote: > > Ok will have a look at this today. I will also review your og threading bug. > > > > thanks, > > George. > > > > On 8/27/06, Fang Sun wrote: > > > Ah, better example to demonstrate this: > > > ----------8<--------- > > > require 'repo.nitroproject.org/glycerin' > > > require 'og' > > > class U > > > property :name, String > > > end > > > > > > Og.start > > > u = U.new > > > u.name = "haha" > > > u.save! > > > > > > fang at fang:~/Ruby/code$ ruby a.rb > > > INFO: Og uses the Sqlite store. > > > a.rb:10: undefined method `save!' for # > > > (NoMethodError) > > > -----------8<-------- > > > > > > recheck data.db find out the table isnot created. Uncomment the first > > > line, rerun the script > > > ======= > > > fang at fang:~/Ruby/code$ ruby a.rb > > > INFO: Og uses the Sqlite store. > > > INFO: Created table 'ogu' > > > > > > fang at fang:~/Ruby/code$ sqlite3 data.db '.dump' > > > BEGIN TRANSACTION; > > > CREATE TABLE ogu (name text, oid integer PRIMARY KEY); > > > INSERT INTO "ogu" VALUES('haha', 1); > > > COMMIT; > > > ======= > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > -- > > http://www.gmosx.com > > http://www.nitroproject.org > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Sun Aug 27 12:40:43 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 27 Aug 2006 18:40:43 +0200 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: <20060827075742.GA16244@X.thorsten.dyndns.org> References: <44E95F29.3010909@walkingwoods.com> <20060827075742.GA16244@X.thorsten.dyndns.org> Message-ID: Hi, > I think I did not make my point clear: My problem ist not wether tags or > items get removed according to their relation. The problem ist the > mapping table og creates to maintain many to X relations. Entries in > this table do not get removed, even if neccesary. > > I added some code to my previous example, to show the real problem: Yes, I made a testcase for Og. Relations don't get killed alright. The reason there is a error message is that sqlite apparently reuses old oids when they get removed, which is weird imo. I'm not sure if the standard should be to kill m:n relations when not otherwise specified. a = Item.new a.tags << Tag.new a.delete(true) # << this makes a cascade while deleting, should also remove the relations This should work, although it didn't when I tried. This was probably because of 0.40 is still kinda flaky... > I think this does not apply to my problem but in general i like your > idea. On the other hand we already have information about these > constraints due to the knowledge about their relation. The relationship constraints (foreign keys) are only one facet of constraints. In my mail before I showed a few other useful ones, of which a few are already nicely implemented (primary key, unique). > nice picture! :) Of course ;D Best description of my feelings regarding Ruby ever :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Sun Aug 27 14:01:56 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 27 Aug 2006 20:01:56 +0200 Subject: [Nitro] og: automatic deletion of records in M:N relations? In-Reply-To: References: <44E95F29.3010909@walkingwoods.com> <20060827075742.GA16244@X.thorsten.dyndns.org> Message-ID: Hi, > a = Item.new > a.tags << Tag.new > a.delete(true) # << this makes a cascade while deleting, should also > remove the relations on the other hand, while researching the matter, I found out that cascading is the default. And yes, works with relations, not with many_to_many though... Only with simple belongs_to... I have a solution right here, but it ain't exactly nice... put in place in joins_many.rb, enchant: ... if through = self[:through] # A custom class is used for the join. Use the class # table and don't create a new table. through = Relation.symbol_to_class(through, owner_class) if through.is_a?(Symbol) join_table = self[:join_table] = store.table(through) tmp_join_class = through else # Calculate the name of the join table. join_table = self[:join_table] = join_table_info[:table] # Create a join table. owner_class.ann :self, :join_tables => [] unless owner_class.ann.self.join_tables? owner_class.ann.self.join_tables! << join_table_info # handle for ann.descendants to cascade deletes tmp_join_class_name = "OgTempJ_#{owner_class.to_s.demodulize}_#{join_class.to_s.demodulize}" eval("class #{tmp_join_class_name}; OGTABLE = '#{join_table}'; end;") tmp_join_class = constant(tmp_join_class_name) end owner_key = join_table_info[:owner_key] target_key = join_table_info[:target_key] unless owner_class.ann.self[:descendants] owner_class.ann(:self, :descendants => []) end owner_class.ann.self.descendants! << [tmp_join_class, owner_key] owner_class.module_eval %{ attr_accessor :#{target_plural_name} ... Not exacytly nice, but does what you want :) It will delete the relationship with the Tag, not the Tag itself. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Sun Aug 27 18:51:25 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 28 Aug 2006 00:51:25 +0200 Subject: [Nitro] Bug in Taggable and .delete_all_tags Message-ID: Hi, bug in taggable in 0.40. a1.delete_all_tags assert_equal 0, a1.tags.size assert_equal 4, Tag.count # << raises, sais 3 While writing that and debugging while doing it I found the bug in taggable. The problem is, that the 'tags' array and the tags inside don't get reloaded, even if a new tag was added and incremented the `.count`. Solution would be, to add a `tag.reload` before doing the `tag.unlink`. def delete_all_tags for tag in tags tag.reload tag.unlink end tags.clear end Not sure if I like it, it's not really efficient, too many roundtrips to DB. Hypothetically: could `Tag` (or any other entity) be told to always return the "same" (same `.object_id`) Object instead of a new one? The information would be shared then and wouldn't have to be reloaded, but I'm really not sure how this would work, I guess one would need caching... A side note: should `.reload` return the object instead of a Fixnum as it does right now? Anyway, attached is a patch which adds the reload and the test case, nasty thing took me quite some time to find out why it deleted every tag and not just the 2, wasted time ;/ Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: tagfix.ptch.tar.bz2 Type: application/bzip2 Size: 6627 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060828/e36a8de7/attachment.bin From surrender_it at yahoo.it Sun Aug 27 20:02:13 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 28 Aug 2006 02:02:13 +0200 Subject: [Nitro] STI patch In-Reply-To: References: Message-ID: George Moschovitis ha scritto: > Saddly this patch has problems, so I removed it. I cannot examine this > in detail, but try to use it with a new web app (ie when Og tries to > create the schema for the first time) and this will probably show up. george, could you provide a test case? -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From manveru at weez-int.com Thu Aug 24 21:02:54 2006 From: manveru at weez-int.com (Michael Fellinger) Date: Fri, 25 Aug 2006 10:02:54 +0900 Subject: [Nitro] STI patch In-Reply-To: References: Message-ID: <200608251002.55093.manveru@weez-int.com> On Friday 25 August 2006 03:16, George Moschovitis wrote: > Saddly this patch has problems, so I removed it. I cannot examine this > in detail, but try to use it with a new web app (ie when Og tries to > create the schema for the first time) and this will probably show up. Yeah, we just noticed that... didn't run it against the other testcases and it was already late, so i just hoped for the best :| anyway, we'll work that one out today, almost got something working now :) MfG manveru > > regards, > George. > > On 8/24/06, George Moschovitis wrote: > > applied, thanks! > > > > -g. > > > > On 8/24/06, Jonathan Buch wrote: > > > Some followup, I was too fast, or better, manv was too fast in checking > > > everything :P > > > > > > [16:37] added something else... > > > [16:37] to get rid of the warnings > > > [16:37] the > > > [16:37] WARN: Obsolete field 'ogtype' found on > > > table 'ogtc_oginheritance2_project'! > > > [16:37] WARN: Obsolete field 'haha' found on > > > table 'ogtc_oginheritance2_project'! > > > [16:37] WARN: Obsolete field 'kaka' found on > > > table 'ogtc_oginheritance2_project'! > > > [16:37] from evolution :) > > > [16:37] i'm just covering one level of > > > inheritance with that... but atm it's enough > > > > > > Jo > > > > > > -- > > > Feel the love > > > http://pinkjuice.com/pics/ruby.png > > > > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- > > http://www.gmosx.com > > http://www.nitroproject.org -- Weez International Limited East Roppongi Bldg 5F, 509 3-16-35 Roppongi, Minato-ku Tokyo #106-0032 Tel: 81-(0)3-3505-3881 Fax: 81-(0)3-3505-3883 E-mail: manveru at weez-int.com Website: http://weez-int.com From nusgnaf at gmail.com Mon Aug 28 01:03:23 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Mon, 28 Aug 2006 05:03:23 +0000 Subject: [Nitro] Finally coming along... In-Reply-To: References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> Message-ID: <716700c90608272203j3cd5cf54g6ded7c02384e1fe6@mail.gmail.com> Hi, Trans, I am tring to integrate latest facets-1.7.30 with nitro, with the latest annotation implementation, the following class level Class A ann self, :h => "metadata_h" end can only be accessed by A.ann(A) =>#"hoo"}>> A.ann.self => #NoMethodError: undefined method `self' for # It looks that A.ann.self refers to metadata for explicite annotation like ann :self, blahblah this break the annotation usage in nitro. would you please bring back klass.ann.self as a quick set/get method to class level metadata? From fabian at oggu.de Mon Aug 28 04:10:32 2006 From: fabian at oggu.de (Fabian Buch) Date: Mon, 28 Aug 2006 10:10:32 +0200 Subject: [Nitro] controls_for in glycerin 0.40 Message-ID: <73FFB41C-0CB5-4A15-8AE5-EC0ED670C890@oggu.de> I'm missing controls_for in 0.40 repo which was in 0.31. Where did it go? They weren't perfect, but it was a nice tradeoff between form_for and doing all bits by hand. Oxyliquit and two newer apps by me use it heavily. Is there a replacement that I didn't notice yet? Maybe in new scaffolding of riffraff? Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From fabian at oggu.de Mon Aug 28 04:16:20 2006 From: fabian at oggu.de (Fabian Buch) Date: Mon, 28 Aug 2006 10:16:20 +0200 Subject: [Nitro] Og in glycerin is broken now. In-Reply-To: <716700c90608270303i5d0d7441udeb32ede0f7d0496@mail.gmail.com> References: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> <716700c90608270135t150b174avad81b97dc5737bb@mail.gmail.com> <716700c90608270303i5d0d7441udeb32ede0f7d0496@mail.gmail.com> Message-ID: <38EFCB63-64B4-4C72-B3A8-AFA9087A62D1@oggu.de> Am 27.08.2006 um 12:03 schrieb Fang Sun: > Hi, George, it seems to be related with facets-1.7, I downgrade to > 1.4.5 and everythinng seems to be Ok now. How can I specify nitro to > use specific facets version at one place? It seems that nitro require > facets here and there, and manually change all those files is not > practical. It seems you're using rubygems, so just do the following in your run.rb: require 'rubygems' require_gem 'facets', '=1.4.5' require 'nitro' require 'og' Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From surrender_it at yahoo.it Mon Aug 28 04:23:18 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 28 Aug 2006 10:23:18 +0200 Subject: [Nitro] controls_for in glycerin 0.40 In-Reply-To: <73FFB41C-0CB5-4A15-8AE5-EC0ED670C890@oggu.de> References: <73FFB41C-0CB5-4A15-8AE5-EC0ED670C890@oggu.de> Message-ID: Fabian Buch ha scritto: > I'm missing controls_for in 0.40 repo which was in 0.31. Where did it > go? They weren't perfect, but it was a nice tradeoff between form_for > and doing all bits by hand. Oxyliquit and two newer apps by me use it > heavily. > > Is there a replacement that I didn't notice yet? Maybe in new > scaffolding of riffraff? I wonder if the code in 0.31 was a patch that still has to be applied to 0.40, because it seem a more modular implementation of controls. Anyway, there is a control_for in 0.40 too, belonging to FormXmlBuilder even if I'm not sure it is what you want. The right way seem to be something like: form(@object) do |f| f.attr(:some_attribute) #renders label+field for attribute f.attr(:other) end -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com jabber : rff.rff at gmail dot com From nusgnaf at gmail.com Mon Aug 28 04:38:15 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Mon, 28 Aug 2006 08:38:15 +0000 Subject: [Nitro] Og in glycerin is broken now. In-Reply-To: <38EFCB63-64B4-4C72-B3A8-AFA9087A62D1@oggu.de> References: <716700c90608270123x1f6899c5p413917dd8b56cbb1@mail.gmail.com> <716700c90608270135t150b174avad81b97dc5737bb@mail.gmail.com> <716700c90608270303i5d0d7441udeb32ede0f7d0496@mail.gmail.com> <38EFCB63-64B4-4C72-B3A8-AFA9087A62D1@oggu.de> Message-ID: <716700c90608280138m6892893bic2fee96dbd7c6956@mail.gmail.com> Thanks a lot! On 8/28/06, Fabian Buch wrote: > > Am 27.08.2006 um 12:03 schrieb Fang Sun: > > Hi, George, it seems to be related with facets-1.7, I downgrade to > > 1.4.5 and everythinng seems to be Ok now. How can I specify nitro to > > use specific facets version at one place? It seems that nitro require > > facets here and there, and manually change all those files is not > > practical. > > It seems you're using rubygems, so just do the following in your run.rb: > > require 'rubygems' > require_gem 'facets', '=1.4.5' > require 'nitro' > require 'og' > > Fabian > > > > > -- > Nitro Q&A: http://oxyliquit.de/ > Blog: http://blog.fabian-buch.de > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From john at oxyliquit.de Mon Aug 28 06:27:57 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 28 Aug 2006 12:27:57 +0200 Subject: [Nitro] Make Postgres work again Message-ID: Hi, Michael Fellinger and me have been working very hard to make things look a little better when using the Postgres adapter. It's quite a massive patch, rough changelog: * Fix the testcases. Many just were out of date and didn't reflect the recent changes. * Implement transactions in Postgresql * Create a compatibility layer when the postgres-pr library is used for Postgres. * Hide the NOTICE messages when not needed (Logger.debug instead of $stdout) * Change aggregation calculation, use the `resolve_options` instead of incompletely duplicating the work it does. * Results of psql have been of type PGresult where it should've been PGrow * rename all occurances of prop_accessor by attr_accessor * add `String` to each Og `property` where it was missing * Many many more small bugfixes around Og tests George, please apply. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: postgres.ptch.tar.bz2 Type: application/bzip2 Size: 14494 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060828/7bbba3bf/attachment.bin From transfire at gmail.com Mon Aug 28 07:24:07 2006 From: transfire at gmail.com (TRANS) Date: Mon, 28 Aug 2006 07:24:07 -0400 Subject: [Nitro] Finally coming along... In-Reply-To: <716700c90608272203j3cd5cf54g6ded7c02384e1fe6@mail.gmail.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> <716700c90608272203j3cd5cf54g6ded7c02384e1fe6@mail.gmail.com> Message-ID: <4b6f054f0608280424j5ecb7a13j9539e90c7f029665@mail.gmail.com> On 8/28/06, Fang Sun wrote: > Hi, Trans, I am tring to integrate latest facets-1.7.30 with nitro, > with the latest annotation implementation, the following class level > Class A > ann self, :h => "metadata_h" > end > can only be accessed by > A.ann(A) =>#"hoo"}>> > A.ann.self => #NoMethodError: undefined method `self' for > # > It looks that A.ann.self refers to metadata for explicite annotation like > ann :self, blahblah > this break the annotation usage in nitro. would you please bring back > klass.ann.self as a quick set/get method to class level metadata? Ah, I was wondering if that worked or not. Okay I'll fix it. BTW, have you gotten a feel at all for the annotations storing the name and container? Is that workable or is it problematic? T. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- ( o- // trans. / / transfire at gmail.com From george.moschovitis at gmail.com Mon Aug 28 08:09:40 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Aug 2006 15:09:40 +0300 Subject: [Nitro] Make Postgres work again In-Reply-To: References: Message-ID: Ok, I will try to review and apply your stuff... Thanks for your work! -g. On 8/28/06, Jonathan Buch wrote: > Hi, > > Michael Fellinger and me have been working very hard to make things look a > little better when using the Postgres adapter. > > It's quite a massive patch, rough changelog: > > * Fix the testcases. Many just were out of date and didn't reflect the > recent changes. > * Implement transactions in Postgresql > * Create a compatibility layer when the postgres-pr library is used for > Postgres. > * Hide the NOTICE messages when not needed (Logger.debug instead of > $stdout) > * Change aggregation calculation, use the `resolve_options` instead of > incompletely duplicating the work it does. > * Results of psql have been of type PGresult where it should've been PGrow > * rename all occurances of prop_accessor by attr_accessor > * add `String` to each Og `property` where it was missing > * Many many more small bugfixes around Og tests > > George, please apply. > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Mon Aug 28 08:37:17 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Aug 2006 15:37:17 +0300 Subject: [Nitro] Ebook In-Reply-To: <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> References: <1156445499.10903.58.camel@jhereg> <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> Message-ID: Is there a program that allows me to 'join' 2 pdf documents? Ie if I create the cover with Inkscape and export as pdf, and create the content with Lyx can I join the 2 pdfs? Of course both pdfs will be of the same dimensions. regards, George. On 8/24/06, TRANS wrote: > Use Lyx --Latex document processor. It's the bomb! For a cover just > use an vector drawing program like Inskscape. > > T. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From lionel.orry at gmail.com Mon Aug 28 09:02:09 2006 From: lionel.orry at gmail.com (Lionel Orry) Date: Mon, 28 Aug 2006 15:02:09 +0200 Subject: [Nitro] Ebook In-Reply-To: References: <1156445499.10903.58.camel@jhereg> <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> Message-ID: <44F2E951.9000006@gmail.com> I think you can use this little combo: 1. pdftops (and not pdf2ps if you want to keep you fonts embedded in the final pdf) 2. psjoin (perl script attached. I found it quite useful - author: Tom Sato => http://homepage3.nifty.com/tsato/) 3. ps2pdf or pstopdf enjoy. Lionel George Moschovitis wrote: > Is there a program that allows me to 'join' 2 pdf documents? Ie if I > create the cover with Inkscape and export as pdf, and create the > content with Lyx can I join the 2 pdfs? Of course both pdfs will be of > the same dimensions. > > regards, > George. > > On 8/24/06, TRANS wrote: >> Use Lyx --Latex document processor. It's the bomb! For a cover just >> use an vector drawing program like Inskscape. >> >> T. >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: psjoin Url: http://rubyforge.org/pipermail/nitro-general/attachments/20060828/bb4d14d1/attachment.pl From nusgnaf at gmail.com Mon Aug 28 09:43:37 2006 From: nusgnaf at gmail.com (Fang Sun) Date: Mon, 28 Aug 2006 13:43:37 +0000 Subject: [Nitro] Finally coming along... In-Reply-To: <4b6f054f0608280424j5ecb7a13j9539e90c7f029665@mail.gmail.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> <716700c90608272203j3cd5cf54g6ded7c02384e1fe6@mail.gmail.com> <4b6f054f0608280424j5ecb7a13j9539e90c7f029665@mail.gmail.com> Message-ID: <716700c90608280643m11394e36m93679e4e983eb264@mail.gmail.com> Would you mind explain the idea of container? I am not familiar with advanced software engineering techniques. >From the annotation usage of Nitro, it mainly use it to implement configuration system and setup ORM relation, so it's a great playground to test the power of annotations. On 8/28/06, TRANS wrote: > On 8/28/06, Fang Sun wrote: > > Hi, Trans, I am tring to integrate latest facets-1.7.30 with nitro, > > with the latest annotation implementation, the following class level > > Class A > > ann self, :h => "metadata_h" > > end > > can only be accessed by > > A.ann(A) =>#"hoo"}>> > > A.ann.self => #NoMethodError: undefined method `self' for > > # > > It looks that A.ann.self refers to metadata for explicite annotation like > > ann :self, blahblah > > this break the annotation usage in nitro. would you please bring back > > klass.ann.self as a quick set/get method to class level metadata? > > Ah, I was wondering if that worked or not. Okay I'll fix it. > > BTW, have you gotten a feel at all for the annotations storing the > name and container? Is that workable or is it problematic? > > T. > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > ( o- > // trans. > / / transfire at gmail.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From Reid.Thompson at ateb.com Mon Aug 28 10:43:25 2006 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Mon, 28 Aug 2006 10:43:25 -0400 Subject: [Nitro] Ebook In-Reply-To: References: <1156445499.10903.58.camel@jhereg> <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> Message-ID: <1156776205.5746.55.camel@jhereg> On Mon, 2006-08-28 at 15:37 +0300, George Moschovitis wrote: > Is there a program that allows me to 'join' 2 pdf documents? Ie if I > create the cover with Inkscape and export as pdf, and create the > content with Lyx can I join the 2 pdfs? Of course both pdfs will be of > the same dimensions. > > regards, > George. > > On 8/24/06, TRANS wrote: > > Use Lyx --Latex document processor. It's the bomb! For a cover just > > use an vector drawing program like Inskscape. > > > > T. > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic/firth/software/pdfjam/ PDFjam is a small collection of shell scripts which provide a simple interface to some of the functionality of the excellent pdfpages package (by Andreas Matthias) for pdfLaTeX. At present the utilities available are: * pdfnup, which allows PDF files to be "n-upped" in roughly the way that psnup does for PostScript files. * pdfjoin, which concatenates the pages of multiple PDF files together into a single file * pdf90, which rotates the pages of one or more PDF files through 90 degrees (anti-clockwise). In every case, source files are left unchanged. From transfire at gmail.com Mon Aug 28 11:46:08 2006 From: transfire at gmail.com (TRANS) Date: Mon, 28 Aug 2006 11:46:08 -0400 Subject: [Nitro] Finally coming along... In-Reply-To: <716700c90608280643m11394e36m93679e4e983eb264@mail.gmail.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> <716700c90608272203j3cd5cf54g6ded7c02384e1fe6@mail.gmail.com> <4b6f054f0608280424j5ecb7a13j9539e90c7f029665@mail.gmail.com> <716700c90608280643m11394e36m93679e4e983eb264@mail.gmail.com> Message-ID: <4b6f054f0608280846o7c53baqc69e433f929804a@mail.gmail.com> Container being the class or module the annotation belongs to. I really need to look at this again actually. I'm thinking back on it now and worrying that the it will restrict reusablily if an annotation is defined in a module then included into a class. I'll keep you posted. I should be able to work on it in the next day or two. Also I have an idea for a middle ground of the "crazy" annotation idea I presented about a month ago and what we do now. The best part is that the current notation can still be supported and the new notation just added on. Presently we do: ann :foo, Integer, :default => 10 which is great. But we could also do: ann :foo do type Integer default 10 end or mix the two: ann :foo, Integer do default 10 end T. From george.moschovitis at gmail.com Mon Aug 28 12:23:47 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Aug 2006 19:23:47 +0300 Subject: [Nitro] STI patch In-Reply-To: <200608251002.55093.manveru@weez-int.com> References: <200608251002.55093.manveru@weez-int.com> Message-ID: ok, waiting for this ;-) -g. On 8/25/06, Michael Fellinger wrote: > On Friday 25 August 2006 03:16, George Moschovitis wrote: > > Saddly this patch has problems, so I removed it. I cannot examine this > > in detail, but try to use it with a new web app (ie when Og tries to > > create the schema for the first time) and this will probably show up. > > Yeah, we just noticed that... > didn't run it against the other testcases and it was already late, so i just > hoped for the best :| > > anyway, we'll work that one out today, almost got something working now :) > > MfG > manveru > > > > > regards, > > George. > > > > On 8/24/06, George Moschovitis wrote: > > > applied, thanks! > > > > > > -g. > > > > > > On 8/24/06, Jonathan Buch wrote: > > > > Some followup, I was too fast, or better, manv was too fast in checking > > > > everything :P > > > > > > > > [16:37] added something else... > > > > [16:37] to get rid of the warnings > > > > [16:37] the > > > > [16:37] WARN: Obsolete field 'ogtype' found on > > > > table 'ogtc_oginheritance2_project'! > > > > [16:37] WARN: Obsolete field 'haha' found on > > > > table 'ogtc_oginheritance2_project'! > > > > [16:37] WARN: Obsolete field 'kaka' found on > > > > table 'ogtc_oginheritance2_project'! > > > > [16:37] from evolution :) > > > > [16:37] i'm just covering one level of > > > > inheritance with that... but atm it's enough > > > > > > > > Jo > > > > > > > > -- > > > > Feel the love > > > > http://pinkjuice.com/pics/ruby.png > > > > > > > > _______________________________________________ > > > > Nitro-general mailing list > > > > Nitro-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > > > http://www.gmosx.com > > > http://www.nitroproject.org > > -- > Weez International Limited > > East Roppongi Bldg 5F, 509 > 3-16-35 Roppongi, Minato-ku Tokyo #106-0032 > Tel: 81-(0)3-3505-3881 Fax: 81-(0)3-3505-3883 > E-mail: manveru at weez-int.com > Website: http://weez-int.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Mon Aug 28 12:25:10 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Aug 2006 19:25:10 +0300 Subject: [Nitro] Ebook In-Reply-To: <1156776205.5746.55.camel@jhereg> References: <1156445499.10903.58.camel@jhereg> <4b6f054f0608241225n4780a337k8498a407b6752bff@mail.gmail.com> <1156776205.5746.55.camel@jhereg> Message-ID: Interesting, thanks everyone ;-) -g. On 8/28/06, Reid Thompson wrote: > On Mon, 2006-08-28 at 15:37 +0300, George Moschovitis wrote: > > Is there a program that allows me to 'join' 2 pdf documents? Ie if I > > create the cover with Inkscape and export as pdf, and create the > > content with Lyx can I join the 2 pdfs? Of course both pdfs will be of > > the same dimensions. > > > > regards, > > George. > > > > On 8/24/06, TRANS wrote: > > > Use Lyx --Latex document processor. It's the bomb! For a cover just > > > use an vector drawing program like Inskscape. > > > > > > T. > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic/firth/software/pdfjam/ > > PDFjam is a small collection of shell scripts which provide a simple > interface to some of the functionality of the excellent pdfpages package > (by Andreas Matthias) for pdfLaTeX. At present the utilities available > are: > > * pdfnup, which allows PDF files to be "n-upped" in roughly the > way that psnup does for PostScript files. > * pdfjoin, which concatenates the pages of multiple PDF files > together into a single file > * pdf90, which rotates the pages of one or more PDF files through > 90 degrees (anti-clockwise). > > In every case, source files are left unchanged. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Mon Aug 28 12:28:50 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Aug 2006 19:28:50 +0300 Subject: [Nitro] Finally coming along... In-Reply-To: <4b6f054f0608280846o7c53baqc69e433f929804a@mail.gmail.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <0380AFBD-710D-40FC-B2D7-51283E559DCD@oggu.de> <716700c90608272203j3cd5cf54g6ded7c02384e1fe6@mail.gmail.com> <4b6f054f0608280424j5ecb7a13j9539e90c7f029665@mail.gmail.com> <716700c90608280643m11394e36m93679e4e983eb264@mail.gmail.com> <4b6f054f0608280846o7c53baqc69e433f929804a@mail.gmail.com> Message-ID: > Container being the class or module the annotation belongs to. you mean the implementation in 1.7.x also stores name/container is i requested some time ago? this will simplify nitro code a lot (will require lots of rewrites too, though ;-)) > ann :foo do > type Integer > default 10 > end > > or mix the two: > > ann :foo, Integer do > default 10 > end very nice as well ;-) -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Mon Aug 28 12:41:09 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Aug 2006 19:41:09 +0300 Subject: [Nitro] Bug in Taggable and .delete_all_tags In-Reply-To: References: Message-ID: btw, *please* add [PATCH] in the subject of email containing patches so I can better track them. thanks, George. On 8/28/06, Jonathan Buch wrote: > Hi, > > bug in taggable in 0.40. > > a1.delete_all_tags > assert_equal 0, a1.tags.size > > assert_equal 4, Tag.count # << raises, sais 3 > > While writing that and debugging while doing it I found the bug in > taggable. The problem is, that the 'tags' array and the tags inside don't > get reloaded, even if a new tag was added and incremented the `.count`. > Solution would be, to add a `tag.reload` before doing the `tag.unlink`. > > def delete_all_tags > for tag in tags > tag.reload > tag.unlink > end > tags.clear > end > > Not sure if I like it, it's not really efficient, too many roundtrips to > DB. Hypothetically: could `Tag` (or any other entity) be told to always > return the "same" (same `.object_id`) Object instead of a new one? The > information would be shared then and wouldn't have to be reloaded, but I'm > really not sure how this would work, I guess one would need caching... > > A side note: should `.reload` return the object instead of a Fixnum as it > does right now? > > Anyway, attached is a patch which adds the reload and the test case, nasty > thing took me quite some time to find out why it deleted every tag and not > just the 2, wasted time ;/ > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Mon Aug 28 13:15:11 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Aug 2006 20:15:11 +0300 Subject: [Nitro] Make Postgres work again In-Reply-To: References: Message-ID: Hello, I applied the patch and get errors like this with mysql: ERROR: `@COUNT(*)' is not allowed as an instance variable name /home/gmosx/Code/public/og/lib/og/store/sql.rb:1037:in `instance_variable_set' /home/gmosx/Code/public/og/lib/og/store/sql.rb:1037:in `read_row' /home/gmosx/Code/public/nitro/lib/nitro/compiler.rb:333:in `each_with_index' /home/gmosx/Code/public/og/lib/og/store/sql.rb:1036:in `read_row' /home/gmosx/Code/public/og/lib/og/store/sql.rb:1102:in `read_all' /home/gmosx/Code/public/og/lib/og/adapter/mysql/override.rb:17:in `each_row' /home/gmosx/Code/public/og/lib/og/adapter/mysql/override.rb:16:in `each_row' /home/gmosx/Code/public/og/lib/og/store/sql.rb:1100:in `read_all' /home/gmosx/Code/public/og/lib/og/store/sql.rb:235:in `find' /home/gmosx/Code/public/og/lib/og/entity.rb:220:in `all' /home/gmosx/Code/public/nitro/lib/nitro/helper/pager.rb:292:in `paginate' I have to work on something else today, could you please play a bit more with the patch (perhaps add the fix to STI that manveru talked about) and send me an improved version? Else, I will probably have a look at this myself later in this week. But it would *really* help to have an improved version. Once again, thanks a lot for your efforts! regards, George. PS: BTW, rubust postgres support is the showstopper for releasing 0.40.0 so it would be great to resolve this ;-) On 8/28/06, George Moschovitis wrote: > Ok, I will try to review and apply your stuff... Thanks for your work! > > -g. > > On 8/28/06, Jonathan Buch wrote: > > Hi, > > > > Michael Fellinger and me have been working very hard to make things look a > > little better when using the Postgres adapter. > > > > It's quite a massive patch, rough changelog: > > > > * Fix the testcases. Many just were out of date and didn't reflect the > > recent changes. > > * Implement transactions in Postgresql > > * Create a compatibility layer when the postgres-pr library is used for > > Postgres. > > * Hide the NOTICE messages when not needed (Logger.debug instead of > > $stdout) > > * Change aggregation calculation, use the `resolve_options` instead of > > incompletely duplicating the work it does. > > * Results of psql have been of type PGresult where it should've been PGrow > > * rename all occurances of prop_accessor by attr_accessor > > * add `String` to each Og `property` where it was missing > > * Many many more small bugfixes around Og tests > > > > George, please apply. > > > > Jo > > > > -- > > Feel the love > > http://pinkjuice.com/pics/ruby.png > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > -- > http://www.gmosx.com > http://www.nitroproject.org > -- http://www.gmosx.com http://www.nitroproject.org From transfire at gmail.com Mon Aug 28 16:40:10 2006 From: transfire at gmail.com (TRANS) Date: Mon, 28 Aug 2006 16:40:10 -0400 Subject: [Nitro] Sorry, Just had to let it out.... Message-ID: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> Code organization is a bitch! :[ T. From dylanb at digitalvalence.com Mon Aug 28 17:10:20 2006 From: dylanb at digitalvalence.com (Dylan Bruzenak) Date: Mon, 28 Aug 2006 16:10:20 -0500 Subject: [Nitro] Sorry, Just had to let it out.... In-Reply-To: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> References: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> Message-ID: <44F35BBC.5020200@digitalvalence.com> I'm there with you. I'm wondering if I should just build a code db with tagging or something... and require tag. Assuming that is what you are talking about. A few file level refactorings would be good also ;) > Code organization is a bitch! > > :[ T. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > From john at oxyliquit.de Mon Aug 28 18:37:23 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 29 Aug 2006 00:37:23 +0200 Subject: [Nitro] Sorry, Just had to let it out.... In-Reply-To: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> References: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> Message-ID: > Code organization is a bitch! > > :[ T. Yeh, I'm hearin' ya! More so if someone else reorganized the code, right G. ? ;) Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Mon Aug 28 18:37:27 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 29 Aug 2006 00:37:27 +0200 Subject: [Nitro] Make Postgres work again In-Reply-To: References: Message-ID: Hi, > I applied the patch and get errors like this with mysql: Also with postgresql, I located the source of the problem, but the :select option which turns extra rows into instance variables maybe should check for validity of variable names... not sure. > I have to work on something else today, could you please play a bit > more with the patch (perhaps add the fix to STI that manveru talked > about) and send me an improved version? Else, I will probably have a > look at this myself later in this week. But it would *really* help to > have an improved version. Aye, done. And would you please add those patches to http://repo.nitroproject.org? I have a little trouble when trying to send patches because that repo doesn't know of anything, I have to sort quite some other patches out and I have to 'add' more patches than actually required. The STI is a little heavier of a problem and I'd rather let manveru do this. But I'll gladly post his patch when it's ready. :P > Once again, thanks a lot for your efforts! No problem, sometimes it's a little frustrating, all that bug hunting I mean. Sometimes I wonder what the big Og reorganization did except create problems and remove psql constraints, but overall I just can't help but work on it so I can use it with new Oxy and live happily ever after. :P Blame the nice community on IRC. :P > PS: BTW, rubust postgres support is the showstopper for releasing > 0.40.0 so it would be great to resolve this ;-) Aye! It would :P Showstopper indeed, and could you please look into the constraint code again for 0.41? Pretty please with sugar on top ^^; Jo -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: aggregations.ptch.tar.bz2 Type: application/bzip2 Size: 7907 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060829/cd2c6ff3/attachment.bin From john at oxyliquit.de Mon Aug 28 18:38:01 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 29 Aug 2006 00:38:01 +0200 Subject: [Nitro] Bug in Taggable and .delete_all_tags In-Reply-To: References: Message-ID: On Mon, 28 Aug 2006 18:41:09 +0200, George Moschovitis wrote: > btw, *please* add [PATCH] in the subject of email containing patches > so I can better track them. *nod* sorry, will try to think of that :) Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From manveru at weez-int.com Mon Aug 28 21:07:40 2006 From: manveru at weez-int.com (Michael Fellinger) Date: Tue, 29 Aug 2006 10:07:40 +0900 Subject: [Nitro] Finally coming along... In-Reply-To: References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <4b6f054f0608280846o7c53baqc69e433f929804a@mail.gmail.com> Message-ID: <200608291007.40896.manveru@weez-int.com> On Tuesday 29 August 2006 01:28, George Moschovitis wrote: > > Container being the class or module the annotation belongs to. > > you mean the implementation in 1.7.x also stores name/container is i > requested some time ago? this will simplify nitro code a lot (will > require lots of rewrites too, though ;-)) rewrites? again? OMG... anns are one of the things that cost me the most sanity while trying to figure out og... especially the way they just pop out of nowhere, just to save one or two lines... > > > ann :foo do > > type Integer > > default 10 > > end > > > > or mix the two: > > > > ann :foo, Integer do > > default 10 > > end > > very nice as well ;-) > > -g. -- Weez International Limited East Roppongi Bldg 5F, 509 3-16-35 Roppongi, Minato-ku Tokyo #106-0032 Tel: 81-(0)3-3505-3881 Fax: 81-(0)3-3505-3883 E-mail: manveru at weez-int.com Website: http://weez-int.com From transfire at gmail.com Mon Aug 28 21:40:38 2006 From: transfire at gmail.com (TRANS) Date: Mon, 28 Aug 2006 21:40:38 -0400 Subject: [Nitro] Finally coming along... In-Reply-To: <200608291007.40896.manveru@weez-int.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <4b6f054f0608280846o7c53baqc69e433f929804a@mail.gmail.com> <200608291007.40896.manveru@weez-int.com> Message-ID: <4b6f054f0608281840r492ffbc3r892b817382d534fb@mail.gmail.com> On 8/28/06, Michael Fellinger wrote: > On Tuesday 29 August 2006 01:28, George Moschovitis wrote: > > > Container being the class or module the annotation belongs to. > > > > you mean the implementation in 1.7.x also stores name/container is i > > requested some time ago? this will simplify nitro code a lot (will > > require lots of rewrites too, though ;-)) > > rewrites? > again? > OMG... It needed a rewrite very badly b/c it was way too complicated. The interface is still the same but code wise it's been much improved. > anns are one of the things that cost me the most sanity while trying to figure > out og... > especially the way they just pop out of nowhere, just to save one or two > lines... pop out of nowhere, to save one or two lines? how so? T. From transfire at gmail.com Mon Aug 28 21:44:17 2006 From: transfire at gmail.com (TRANS) Date: Mon, 28 Aug 2006 21:44:17 -0400 Subject: [Nitro] Finally coming along... In-Reply-To: <4b6f054f0608281840r492ffbc3r892b817382d534fb@mail.gmail.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <4b6f054f0608280846o7c53baqc69e433f929804a@mail.gmail.com> <200608291007.40896.manveru@weez-int.com> <4b6f054f0608281840r492ffbc3r892b817382d534fb@mail.gmail.com> Message-ID: <4b6f054f0608281844m68826630i8530e0dbc57ce49a@mail.gmail.com> On 8/28/06, TRANS wrote: > On 8/28/06, Michael Fellinger wrote: > > On Tuesday 29 August 2006 01:28, George Moschovitis wrote: > > > > Container being the class or module the annotation belongs to. > > > > > > you mean the implementation in 1.7.x also stores name/container is i > > > requested some time ago? this will simplify nitro code a lot (will > > > require lots of rewrites too, though ;-)) > > > > rewrites? > > again? > > OMG... > > It needed a rewrite very badly b/c it was way too complicated. The > interface is still the same but code wise it's been much improved. > > > anns are one of the things that cost me the most sanity while trying to figure > > out og... > > especially the way they just pop out of nowhere, just to save one or two > > lines... > > pop out of nowhere, to save one or two lines? how so? My bad. I misunderstood --You were refereing to the Nitro code that uses annotations. Well, that doesn't need to be done all in one fell swoop. And indeed it should not be, since we need annotations through the paces to makes sure storing the name and container this way pans out. T. From transfire at gmail.com Tue Aug 29 13:05:19 2006 From: transfire at gmail.com (TRANS) Date: Tue, 29 Aug 2006 13:05:19 -0400 Subject: [Nitro] Finally coming along... In-Reply-To: <4b6f054f0608281844m68826630i8530e0dbc57ce49a@mail.gmail.com> References: <4b6f054f0608201355lc110520g940ce3a321c43729@mail.gmail.com> <4b6f054f0608280846o7c53baqc69e433f929804a@mail.gmail.com> <200608291007.40896.manveru@weez-int.com> <4b6f054f0608281840r492ffbc3r892b817382d534fb@mail.gmail.com> <4b6f054f0608281844m68826630i8530e0dbc57ce49a@mail.gmail.com> Message-ID: <4b6f054f0608291005w1ed498ckc663fd24fcfae34d@mail.gmail.com> Okay in the spirit of "finally coming along..." I'm about to release the new version of Reap .... well sort of ... I've really taken Fabian's advice to heart (thanks Fabian!) and have merged the following projects into one: Reap, Sow, Rolls and (the unheard of) Sake. The components, or more precicely "slices" of the system retain their respective names (more or less) but they all partake of same code base now --which turned out be a huge benefit! For the time being there's just the one total package, but I will probably offer separate "mini-packages" for each slice in the future. So anyway, as I said, I'm close to release and the project will be called .... well, either Ratchets or Rachets. I haven't decided which. Is it better to use the most common spelling of a word, or the less common variant to help distinguish it from the crowd? T. From george.moschovitis at gmail.com Wed Aug 30 08:49:07 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 30 Aug 2006 15:49:07 +0300 Subject: [Nitro] Sorry, Just had to let it out.... In-Reply-To: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> References: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> Message-ID: erm, what exactly do you mean? ;-) -g. On 8/28/06, TRANS wrote: > Code organization is a bitch! > > :[ T. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Wed Aug 30 08:51:18 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 30 Aug 2006 15:51:18 +0300 Subject: [Nitro] Make Postgres work again In-Reply-To: References: Message-ID: Thanks for the patch, will check this out ASAP. -g. -- http://www.gmosx.com http://www.nitroproject.org From transfire at gmail.com Wed Aug 30 09:01:00 2006 From: transfire at gmail.com (TRANS) Date: Wed, 30 Aug 2006 09:01:00 -0400 Subject: [Nitro] Sorry, Just had to let it out.... In-Reply-To: References: <4b6f054f0608281340k158a0ddeja609b138da4a8445@mail.gmail.com> Message-ID: <4b6f054f0608300601w7ce11308k5daf7010fc81fd3b@mail.gmail.com> On 8/30/06, George Moschovitis wrote: > erm, what exactly do you mean? ;-) The whole deal. What to name files, where to put them, what to name modules and classes, when to use a module vs a class, and what modules to put in other modules etc. In particular what was driving me crazy when I wrote that was wanting to have a module to include in another, like so: module M def c(*args) C.new(*args) end class C ... end end module N inlcude M end I wanted the instance_methods of M to go into N. But I couldn't do it b/c N::C also existed and M::C would clobber it. There are plenty of other cases of course. Just what to name things I find particularly tiresome. T. From fabian at oggu.de Wed Aug 30 13:17:58 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 30 Aug 2006 19:17:58 +0200 Subject: [Nitro] [PATCH] bugfix for latest Runner to Nitro changes in proto Message-ID: There was a little bug in proto/public/error.xhtml that stopped error.xhtml from working. Attached patch fixes this. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de -------------- next part -------------- A non-text attachment was scrubbed... Name: run_nitro_mode.patch.gz Type: application/x-gzip Size: 7289 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060830/47455070/attachment.gz -------------- next part -------------- From george.moschovitis at gmail.com Wed Aug 30 13:37:14 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 30 Aug 2006 20:37:14 +0300 Subject: [Nitro] [PATCH] bugfix for latest Runner to Nitro changes in proto In-Reply-To: References: Message-ID: have already fixed localy, but forgot to upload the changes, will do so now. -g. On 8/30/06, Fabian Buch wrote: > There was a little bug in proto/public/error.xhtml that stopped > error.xhtml from working. Attached patch fixes this. > > Fabian > > > -- > Nitro Q&A: http://oxyliquit.de/ > Blog: http://blog.fabian-buch.de > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Wed Aug 30 14:29:16 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 30 Aug 2006 21:29:16 +0300 Subject: [Nitro] request params -> action params Message-ID: Dear devs, I made some changes to the way the request uri parameters are converted to action parameters. I am wondering if these changes fix an older reported bug. It does work more reliabbly for me (and the implementation is a lot cleaner). -g. -- http://www.gmosx.com http://www.nitroproject.org From fabian at oggu.de Wed Aug 30 15:28:04 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 30 Aug 2006 21:28:04 +0200 Subject: [Nitro] [PATCH] FileControl and PasswordControl added Message-ID: <9E65BAC3-6672-4151-8CD7-199719BEF6FA@oggu.de> Patch attached -------------- next part -------------- A non-text attachment was scrubbed... Name: filecontrol_and_passwordcontrol.patch.gz Type: application/x-gzip Size: 7656 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060830/c4cb7313/attachment.gz From al-nitrogen at none.at Wed Aug 30 15:32:31 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Wed, 30 Aug 2006 21:32:31 +0200 Subject: [Nitro] request params -> action params In-Reply-To: References: Message-ID: <20060830193231.GB3440@none.at> On Mit 30.08.2006 21:29, George Moschovitis wrote: > >I made some changes to the way the request uri parameters are converted >to action parameters. I am wondering if these changes fix an older >reported bug. It does work more reliabbly for me (and the >implementation is a lot cleaner). please can anybody tell me how can I get the dev version from http://repo.nitroproject.org/, sorry I'am new with dracs, is this the revision system?! Regards Alex From fabian at oggu.de Wed Aug 30 15:41:30 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 30 Aug 2006 21:41:30 +0200 Subject: [Nitro] request params -> action params In-Reply-To: <20060830193231.GB3440@none.at> References: <20060830193231.GB3440@none.at> Message-ID: <6C581F09-369D-4139-9A86-92EA1BBA8D01@oggu.de> Am 30.08.2006 um 21:32 schrieb Alexander Lazic: > please can anybody tell me how can I get the dev version from > http://repo.nitroproject.org/, sorry I'am new with dracs, is this the > revision system?! darcs get --partial http://repo.nitroproject.org/ For making/submitting patches see http://oxyliquit.de/tip/18 even though it's a little outdated, but still works as described there. Just use http://repo.nitroproject.org/ instead of devlab to darcs send patches to. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From john at oxyliquit.de Wed Aug 30 15:43:44 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 30 Aug 2006 21:43:44 +0200 Subject: [Nitro] request params -> action params In-Reply-To: References: Message-ID: Hi, > I made some changes to the way the request uri parameters are > converted to action parameters. I am wondering if these changes fix an > older reported bug. It does work more reliabbly for me (and the > implementation is a lot cleaner). Would be cool if that fixes the bug. Will test it with Oxy when you provide the patch via email or repo :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From fabian at oggu.de Wed Aug 30 15:45:55 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 30 Aug 2006 21:45:55 +0200 Subject: [Nitro] request params -> action params In-Reply-To: <6C581F09-369D-4139-9A86-92EA1BBA8D01@oggu.de> References: <20060830193231.GB3440@none.at> <6C581F09-369D-4139-9A86-92EA1BBA8D01@oggu.de> Message-ID: <380FDEA4-AC1D-4033-AD88-CE835E9BBBF7@oggu.de> Am 30.08.2006 um 21:41 schrieb Fabian Buch: > Am 30.08.2006 um 21:32 schrieb Alexander Lazic: >> please can anybody tell me how can I get the dev version from >> http://repo.nitroproject.org/, sorry I'am new with dracs, is this the >> revision system?! > > darcs get --partial http://repo.nitroproject.org/ > > For making/submitting patches see http://oxyliquit.de/tip/18 even > though it's a little outdated, but still works as described there. > Just use http://repo.nitroproject.org/ instead of devlab to darcs > send patches to. My brother just updated the above tip, so it's not outdated anymore. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From al-nitrogen at none.at Wed Aug 30 17:38:57 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Wed, 30 Aug 2006 23:38:57 +0200 Subject: [Nitro] nitro from darcs and ruby gem Message-ID: <20060830213857.GA10381@none.at> Hi, today I got the current dev-code, thanks to Fabian for his help, now i have try to run it but i have some errors :-( What i have done: (My ruby is in /home/al/progs/ruby installed) 1.) darcs get http://repo.nitroproject.org/ nitro_2006-08-30 2.) gem install mongrel --source=http://mongrel.rubyforge.org/releases/ 3.) gem install nitro 4.) gem update ---gem update Updating installed gems... Attempting remote update of RedCloth Successfully installed RedCloth-3.0.4 Attempting remote update of daemons Successfully installed daemons-1.0.1 Installing ri documentation for daemons-1.0.1... Installing RDoc documentation for daemons-1.0.1... Attempting remote update of facets Successfully installed facets-1.7.30 Installing ri documentation for facets-1.7.30... While generating documentation for facets-1.7.30 ... MESSAGE: Unhandled special: Special: type=17, text="Append" ... RDOC args: --ri --op /home/al/progs/ruby/lib/ruby/gems/1.8/doc/facets-1.7.30/ri --quiet lib (continuing with the rest of the installation) Installing RDoc documentation for facets-1.7.30... Gems: [RedCloth, daemons, facets] updated --- 4.) cd nitro_2006-08-30/ 5.) mv ~/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0 \ ~/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0_orig 6.) mv nitro ~/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0 7.) cd examples/why_wiki/ 8.) gem update --system --- Updating RubyGems... Attempting remote update of rubygems-update Successfully installed rubygems-update-0.9.0 Updating version of RubyGems to 0.9.0 Installing RubyGems 0.9.0 . . As of RubyGems 0.8.0, library stubs are no longer needed. Searching $LOAD_PATH for stubs to optionally delete (may take a while)... ...done. No library stubs found. Successfully built RubyGem Name: sources Version: 0.0.1 File: sources-0.0.1.gem RubyGems system software updated --- 9.) ruby -d -rubygems run.rb -m -d --- Exception `LoadError' at /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- redcloth /home/al/progs/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.4/lib/redcloth.rb:630: warning: ambiguous first argument; put parentheses or even spaces /home/al/progs/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.4/lib/redcloth.rb:847: warning: ambiguous first argument; put parentheses or even spaces Exception `LoadError' at /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- nitro Exception `Gem::Exception' at /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:196 - can't activate RedCloth (= 3.0.3), already activated RedCloth-3.0.4] /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:196:in `activate': can't activate RedCloth (= 3.0.3), already activated RedCloth-3.0.4] (Gem::Exception) from /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate' from /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:213:in `activate' from /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' from run.rb:5 --- I think I haven't something make which is needed :-( Please can anybody help, maybe offlist? --- which ruby (self compiled) /home/al/progs/ruby/bin/ruby which gem /home/al/progs/ruby/bin/gem ruby -v ruby 1.8.4 (2005-12-24) [i686-linux] gem -v 0.9.0 uname -a Linux home1 2.6.17-2-686 #1 SMP Fri Aug 11 20:25:51 UTC 2006 i686 GNU/Linux --- Regards Alex From manveru at weez-int.com Wed Aug 30 22:09:05 2006 From: manveru at weez-int.com (Michael Fellinger) Date: Thu, 31 Aug 2006 11:09:05 +0900 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <20060830213857.GA10381@none.at> References: <20060830213857.GA10381@none.at> Message-ID: <200608311109.05361.manveru@weez-int.com> On Thursday 31 August 2006 06:38, Alexander Lazic wrote: > Hi, > > today I got the current dev-code, thanks to Fabian for his help, now i > have try to run it but i have some errors :-( > > What i have done: [long snip ... snap] i see several issues here :) you try to use gems along with the repo... but well, that is possible - i just found it redunant. another thing is, you use facets 1.7.30 - nitro still runs on 1.4.5 and no idea when some wizard will get it running on the new facets... there are always odd things that i have no idea of how they should work and when they break i have even less ideas of how or why or where they broke... (we should work on that *hint hint*) next thing - you copy nitro to the gems-dir? it's not going to work unless you'd copy glue/gen/og as well... and to avoid all that hassle there is a simpler way there is a file named 'glycerin.rb' within the repo-root, and require 'your/path/to/repo/glycerin' will modify your path and sneak in the repo-paths, so that you can just use require 'nitro' afterwards. what else... we really should get rid of this redcloth-dependency (kashia made a patch for that, not sure if he's submitted it to G. though) also it might be good to remove the og-dependency from nitro... it's not really needed - also on the other side, no dependency from og to nitro... not so sure about that ?_? ok, now a summary for everybody to write down :) darcs get http://repo.nitroproject.org/ repo # this as su or maybe via sudo... ( hope i didn't forget anything ) gem install facets --version=1.4.5 gem install ruby-breakpoint RedCloth mongrel daemons -y ok, that's it. To get a simple test, try wget -O run.rb http://pastie.caboo.se/10995/download and then issue the simple ruby run.rb hope this made clearer how to use the repo :) for questions, just mail (or rather, ask on irc, freenode #nitro) MfG manveru > > (My ruby is in /home/al/progs/ruby installed) > > 1.) darcs get http://repo.nitroproject.org/ nitro_2006-08-30 > 2.) gem install mongrel --source=http://mongrel.rubyforge.org/releases/ > 3.) gem install nitro > 4.) gem update > ---gem update > Updating installed gems... > Attempting remote update of RedCloth > Successfully installed RedCloth-3.0.4 > Attempting remote update of daemons > Successfully installed daemons-1.0.1 > Installing ri documentation for daemons-1.0.1... > Installing RDoc documentation for daemons-1.0.1... > Attempting remote update of facets > Successfully installed facets-1.7.30 > Installing ri documentation for facets-1.7.30... > While generating documentation for facets-1.7.30 > ... MESSAGE: Unhandled special: Special: type=17, text="Append" > ... RDOC args: --ri --op > /home/al/progs/ruby/lib/ruby/gems/1.8/doc/facets-1.7.30/ri --quiet lib > (continuing with the rest of the installation) > Installing RDoc documentation for facets-1.7.30... > Gems: [RedCloth, daemons, facets] updated > --- > 4.) cd nitro_2006-08-30/ > > 5.) mv ~/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0 \ > ~/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0_orig > > 6.) mv nitro ~/progs/ruby/lib/ruby/gems/1.8/gems/nitro-0.31.0 > 7.) cd examples/why_wiki/ > 8.) gem update --system > --- > Updating RubyGems... > Attempting remote update of rubygems-update > Successfully installed rubygems-update-0.9.0 > Updating version of RubyGems to 0.9.0 > Installing RubyGems 0.9.0 > . > . > As of RubyGems 0.8.0, library stubs are no longer needed. > Searching $LOAD_PATH for stubs to optionally delete (may take a while)... > ...done. > No library stubs found. > > Successfully built RubyGem > Name: sources > Version: 0.0.1 > File: sources-0.0.1.gem > RubyGems system software updated > --- > > 9.) ruby -d -rubygems run.rb -m -d > > --- > Exception `LoadError' at > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 > - no such file to load -- redcloth > > /home/al/progs/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.4/lib/redcloth.rb:6 >30: warning: ambiguous first argument; put parentheses or even spaces > > /home/al/progs/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.4/lib/redcloth.rb:8 >47: warning: ambiguous first argument; put parentheses or even spaces > > Exception `LoadError' at > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 > - no such file to load -- nitro > > Exception `Gem::Exception' at > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:196 - can't > activate RedCloth (= 3.0.3), already activated RedCloth-3.0.4] > > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:196:in > `activate': can't activate RedCloth (= 3.0.3), already activated > RedCloth-3.0.4] (Gem::Exception) > > from > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:214:in > `activate' > > from > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:213:in > `activate' > > from > /home/al/progs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:i >n `require' > > from run.rb:5 > --- > > I think I haven't something make which is needed :-( > > Please can anybody help, maybe offlist? > > --- > which ruby (self compiled) > /home/al/progs/ruby/bin/ruby > > which gem > /home/al/progs/ruby/bin/gem > > ruby -v > ruby 1.8.4 (2005-12-24) [i686-linux] > > gem -v > 0.9.0 > > uname -a > Linux home1 2.6.17-2-686 #1 SMP Fri Aug 11 20:25:51 UTC 2006 i686 > GNU/Linux > --- > > Regards > > Alex > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -- Weez International Limited East Roppongi Bldg 5F, 509 3-16-35 Roppongi, Minato-ku Tokyo #106-0032 Tel: 81-(0)3-3505-3881 Fax: 81-(0)3-3505-3883 E-mail: manveru at weez-int.com Website: http://weez-int.com From manveru at weez-int.com Wed Aug 30 22:12:30 2006 From: manveru at weez-int.com (Michael Fellinger) Date: Thu, 31 Aug 2006 11:12:30 +0900 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <200608311109.05361.manveru@weez-int.com> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> Message-ID: <200608311112.30804.manveru@weez-int.com> On Thursday 31 August 2006 11:09, Michael Fellinger wrote: > On Thursday 31 August 2006 06:38, Alexander Lazic wrote: > > Hi, > > > > today I got the current dev-code, thanks to Fabian for his help, now i > > have try to run it but i have some errors :-( > > > > What i have done: > > [long snip ... snap] Oh damn, i thought i really cutted it out :) -- Weez International Limited East Roppongi Bldg 5F, 509 3-16-35 Roppongi, Minato-ku Tokyo #106-0032 Tel: 81-(0)3-3505-3881 Fax: 81-(0)3-3505-3883 E-mail: manveru at weez-int.com Website: http://weez-int.com From fabian at oggu.de Thu Aug 31 04:06:08 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 31 Aug 2006 10:06:08 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <200608311109.05361.manveru@weez-int.com> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> Message-ID: <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> Am 31.08.2006 um 04:09 schrieb Michael Fellinger: > another thing is, you use facets 1.7.30 - nitro still runs on 1.4.5 > and no > idea when some wizard will get it running on the new facets... > there are > always odd things that i have no idea of how they should work and > when they > break i have even less ideas of how or why or where they broke... > (we should > work on that *hint hint*) Not before Trans releases next facets version. > what else... we really should get rid of this redcloth-dependency > (kashia made > a patch for that, not sure if he's submitted it to G. though) also > it might > be good to remove the og-dependency from nitro... it's not really > needed - > also on the other side, no dependency from og to nitro... not so > sure about > that ?_? There are some parts of Nitro that depend on Og (webfile for example). And who'd want to use Nitro without Og? Maybe Og without Nitro, but the other way round sounds odd. You don't get Rails without ActiveRecord either. > wget -O run.rb http://pastie.caboo.se/10995/download If there's still a problem, try: require 'rubygems' require 'repo/glycerin' require_gem 'facets', '=1.4.5' # <-- require 'nitro' class HelloController def index "Hello, World!" end end Nitro.run HelloController Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From al-nitrogen at none.at Thu Aug 31 04:13:09 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 31 Aug 2006 10:13:09 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <200608311109.05361.manveru@weez-int.com> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> Message-ID: <20060831081309.GA14076@none.at> Hi, On Don 31.08.2006 11:09, Michael Fellinger wrote: >On Thursday 31 August 2006 06:38, Alexander Lazic wrote: >> >> today I got the current dev-code, thanks to Fabian for his help, now >> i have try to run it but i have some errors :-( >> >> What i have done: > >[long snip ... snap] > >i see several issues here :) >you try to use gems along with the repo... but well, that is possible - >i just found it redunant. should i uninstall the nitro from gems?! >another thing is, you use facets 1.7.30 - nitro still runs on 1.4.5 and >no idea when some wizard will get it running on the new facets... there >are always odd things that i have no idea of how they should work and >when they break i have even less ideas of how or why or where they >broke... (we should work on that *hint hint*) Ok i have remove all except 1.4.5. >next thing - you copy nitro to the gems-dir? >it's not going to work unless you'd copy glue/gen/og as well... and to >avoid all that hassle there is a simpler way there is a file named >'glycerin.rb' within the repo-root, and require >'your/path/to/repo/glycerin' will modify your path and sneak in the >repo-paths, so that you can just use require 'nitro' afterwards. I have thought that a 'mv nitro' could be all, that was the reason why I have asked ;-) >ok, now a summary for everybody to write down :) ;-) >darcs get http://repo.nitroproject.org/ repo > ># this as su or maybe via sudo... ( hope i didn't forget anything ) >gem install facets --version=1.4.5 >gem install ruby-breakpoint RedCloth mongrel daemons -y Done. >ok, that's it. To get a simple test, try > >wget -O run.rb http://pastie.caboo.se/10995/download > >and then issue the simple > >ruby run.rb Also done but I can't run it with mongrel :-( ruby -d run.rb -m -D > run.out 2>&1 --- . . many many warnings from facets-1.4.5 . [2006-08-31 10:02:27] INFO WEBrick 1.<3.1 --- You can get the full output from http://none.at/run.out Here the current installed gems: --- gem list --local|egrep '^[a-zA-Z]' daemons (1.0.1, 0.4.4) facets (1.4.5) gem_plugin (0.2.1) gen (0.31.0) glue (0.31.0) mongrel (0.3.13.4) mongrel_cluster (0.2.0) nitro (0.31.0) og (0.31.0) rake (0.7.1) RedCloth (3.0.4, 3.0.3) ruby-breakpoint (0.5.1) rubygems-update (0.9.0) sources (0.0.1) sqlite3-ruby (1.1.0) --- >hope this made clearer how to use the repo :) Yep super thanks for your explanation ;-))) >for questions, just mail (or rather, ask on irc, freenode #nitro) I will try to contact the irc at the early afternoon, thanks again for your help. Regards Alex From aglarond at gmail.com Thu Aug 31 04:40:01 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Thu, 31 Aug 2006 10:40:01 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> Message-ID: <55c107bf0608310140k133d3339y1d239d2d4fac7365@mail.gmail.com> On 8/31/06, Fabian Buch wrote: > > > There are some parts of Nitro that depend on Og (webfile for > example). And who'd want to use Nitro without Og? I would. :) I have several mini-apps that don't use Og at all, but do use Nitro's features. Reading and displaying logfiles is one application - I have yet to write a File adapter for Og so that this would be easier. - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060831/596b96b7/attachment.html From george.moschovitis at gmail.com Thu Aug 31 08:15:50 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 Aug 2006 15:15:50 +0300 Subject: [Nitro] request params -> action params In-Reply-To: References: Message-ID: > Would be cool if that fixes the bug. Will test it with Oxy when you > provide the patch via email or repo :P I submitted to the repo. -g. -- http://www.gmosx.com http://www.nitroproject.org From fabian at oggu.de Thu Aug 31 09:47:15 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 31 Aug 2006 15:47:15 +0200 Subject: [Nitro] [PATCH] Runner bugfix Message-ID: <82BE67A0-C476-48E8-A03C-097DB0FF7294@oggu.de> Runner didn't follow console options anymore, for example ruby run.rb -m always started webrick, not mongrel. Fixed with the attached patch. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de -------------- next part -------------- A non-text attachment was scrubbed... Name: runner_bug_fix.patch.gz Type: application/x-gzip Size: 7412 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060831/88cbdae7/attachment.gz -------------- next part -------------- From george.moschovitis at gmail.com Thu Aug 31 11:26:09 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 Aug 2006 18:26:09 +0300 Subject: [Nitro] [PATCH] Runner bugfix In-Reply-To: <82BE67A0-C476-48E8-A03C-097DB0FF7294@oggu.de> References: <82BE67A0-C476-48E8-A03C-097DB0FF7294@oggu.de> Message-ID: btw you can use: $nitro mongrel or $nitro --adapter mongrel or $nitro -a mongrel with the repo version. -g. On 8/31/06, Fabian Buch wrote: > Runner didn't follow console options anymore, for example ruby run.rb > -m always started webrick, not mongrel. Fixed with the attached patch. > > Fabian > > > > -- > Nitro Q&A: http://oxyliquit.de/ > Blog: http://blog.fabian-buch.de > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 31 11:30:43 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 Aug 2006 18:30:43 +0300 Subject: [Nitro] [PATCH] FileControl and PasswordControl added In-Reply-To: <9E65BAC3-6672-4151-8CD7-199719BEF6FA@oggu.de> References: <9E65BAC3-6672-4151-8CD7-199719BEF6FA@oggu.de> Message-ID: applied. -g. On 8/30/06, Fabian Buch wrote: > Patch attached > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 31 11:33:00 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 31 Aug 2006 18:33:00 +0300 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <55c107bf0608310140k133d3339y1d239d2d4fac7365@mail.gmail.com> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> <55c107bf0608310140k133d3339y1d239d2d4fac7365@mail.gmail.com> Message-ID: Hmm, anyone has investigated where are the dependencies on Og ? I could try to remove them, but dont have time for searching at the moment. -g. On 8/31/06, Dimitri Aivaliotis wrote: > > On 8/31/06, Fabian Buch wrote: > > > > There are some parts of Nitro that depend on Og (webfile for > > example). And who'd want to use Nitro without Og? > > I would. :) > > I have several mini-apps that don't use Og at all, but do use Nitro's > features. Reading and displaying logfiles is one application - I have yet > to write a File adapter for Og so that this would be easier. > > - Dimitri > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://www.gmosx.com http://www.nitroproject.org From fabian at oggu.de Thu Aug 31 11:49:24 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 31 Aug 2006 17:49:24 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> <55c107bf0608310140k133d3339y1d239d2d4fac7365@mail.gmail.com> Message-ID: Am 31.08.2006 um 17:33 schrieb George Moschovitis: > Hmm, anyone has investigated where are the dependencies on Og ? > I could try to remove them, but dont have time for searching at > the moment. At least WebFile does, which is in nitro/glue. Other dependencies have to be investigated, don't have any other in mind yet. Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From fabian at oggu.de Thu Aug 31 11:54:40 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 31 Aug 2006 17:54:40 +0200 Subject: [Nitro] [PATCH] Runner bugfix In-Reply-To: References: <82BE67A0-C476-48E8-A03C-097DB0FF7294@oggu.de> Message-ID: <6495A450-6854-47D6-9937-B8B6646ECA05@oggu.de> Am 31.08.2006 um 17:26 schrieb George Moschovitis: > btw you can use: > > $nitro mongrel It has to work without nitro command, just with ruby run.rb, because it's not always applicable to put the nitro command (nitro/bin/nitro) into $PATH, for example us developers who have multiple repos laying around.. For many it'll stay the preferred option to start Nitro apps via ruby run.rb, so it's options should work. please apply my patch Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From transfire at gmail.com Thu Aug 31 12:04:00 2006 From: transfire at gmail.com (TRANS) Date: Thu, 31 Aug 2006 12:04:00 -0400 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> Message-ID: <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> On 8/31/06, Fabian Buch wrote: > Not before Trans releases next facets version. Okay, next verison up to bat. Swing away.... T. From john at oxyliquit.de Thu Aug 31 12:35:33 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 31 Aug 2006 18:35:33 +0200 Subject: [Nitro] request params -> action params In-Reply-To: References: Message-ID: On Thu, 31 Aug 2006 14:15:50 +0200, George Moschovitis wrote: >> Would be cool if that fixes the bug. Will test it with Oxy when you >> provide the patch via email or repo :P > > I submitted to the repo. Are you sure? The last patch on your repo is * Added support for mongrel, execution modes and more in the nitro startup script (bin/nitro). Which patch do you mean? Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Thu Aug 31 12:37:59 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 31 Aug 2006 18:37:59 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> Message-ID: On Thu, 31 Aug 2006 18:04:00 +0200, TRANS wrote: > On 8/31/06, Fabian Buch wrote: > >> Not before Trans releases next facets version. > > Okay, next verison up to bat. Swing away.... Quite funny how the version 'swings away' again ;D Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From fabian at oggu.de Thu Aug 31 12:38:23 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 31 Aug 2006 18:38:23 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> Message-ID: Am 31.08.2006 um 18:04 schrieb TRANS: > On 8/31/06, Fabian Buch wrote: > >> Not before Trans releases next facets version. > > Okay, next verison up to bat. Swing away.... 1.7.38, just saw it, vanished a few seconds later.. ;) Fabian -- Nitro Q&A: http://oxyliquit.de/ Blog: http://blog.fabian-buch.de From al-nitrogen at none.at Thu Aug 31 12:51:52 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 31 Aug 2006 18:51:52 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <20060830213857.GA10381@none.at> References: <20060830213857.GA10381@none.at> Message-ID: <20060831165152.GA18531@none.at> On Mit 30.08.2006 23:38, Alexander Lazic wrote: > >today I got the current dev-code, thanks to Fabian for his help, now i >have try to run it but i have some errors :-( Thanks to all on irc for there help now I have a nitro with mongrel ;-))) regards Alex From transfire at gmail.com Thu Aug 31 16:42:11 2006 From: transfire at gmail.com (TRANS) Date: Thu, 31 Aug 2006 16:42:11 -0400 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> Message-ID: <4b6f054f0608311342j6e8d5a4eh7d9d633bbcd283d5@mail.gmail.com> On 8/31/06, Fabian Buch wrote: > > Am 31.08.2006 um 18:04 schrieb TRANS: > > On 8/31/06, Fabian Buch wrote: > > > >> Not before Trans releases next facets version. > > > > Okay, next verison up to bat. Swing away.... > > 1.7.38, just saw it, vanished a few seconds later.. ;) ? From al-nitrogen at none.at Thu Aug 31 17:15:59 2006 From: al-nitrogen at none.at (Alexander Lazic) Date: Thu, 31 Aug 2006 23:15:59 +0200 Subject: [Nitro] [PATCH] Runner bugfix In-Reply-To: References: <82BE67A0-C476-48E8-A03C-097DB0FF7294@oggu.de> Message-ID: <20060831211559.GA735@none.at> Hi, On Don 31.08.2006 18:26, George Moschovitis wrote: >btw you can use: > >$nitro mongrel > >or > >$nitro --adapter mongrel > >or > >$nitro -a mongrel > >with the repo version. I have get the repo at ~22:00 and have try to call nitro with this options but i *always* get webrick: What I have done: darcs get http://repo.nitroproject.org/ repo ---run.rb require 'rubygems' require 'repo/glycerin' require 'nitro' class HelloController def index "Hello, World!" end end Nitro.run HelloController --- ruby run.rb -m -D ==> Listening at 0.0.0.0:9999. [WEBRICK] ruby run.rb --adapter mongrel ==> Listening at 0.0.0.0:9999. [WEBRICK] ruby run.rb -a mongrel --- "" ---- ruby run.rb mongrel --- "" ---- Sorry but with the current repo i can't call mongrel or some other adapter: ruby run.rb --scgi ==> Listening at 0.0.0.0:9999. [WEBRICK] Regards Alex From george.moschovitis at gmail.com Thu Aug 31 17:35:06 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Sep 2006 00:35:06 +0300 Subject: [Nitro] request params -> action params In-Reply-To: References: Message-ID: Check again ;-) -g. On 8/31/06, Jonathan Buch wrote: > On Thu, 31 Aug 2006 14:15:50 +0200, George Moschovitis > wrote: > > >> Would be cool if that fixes the bug. Will test it with Oxy when you > >> provide the patch via email or repo :P > > > > I submitted to the repo. > > Are you sure? > > The last patch on your repo is > > * Added support for mongrel, execution modes and more in the nitro startup > script (bin/nitro). > > Which patch do you mean? > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu Aug 31 17:36:00 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Sep 2006 00:36:00 +0300 Subject: [Nitro] [PATCH] Runner bugfix In-Reply-To: <20060831211559.GA735@none.at> References: <82BE67A0-C476-48E8-A03C-097DB0FF7294@oggu.de> <20060831211559.GA735@none.at> Message-ID: Ok, ok, will have a look at this. Strange it worked for me. -g. On 9/1/06, Alexander Lazic wrote: > Hi, > > On Don 31.08.2006 18:26, George Moschovitis wrote: > >btw you can use: > > > >$nitro mongrel > > > >or > > > >$nitro --adapter mongrel > > > >or > > > >$nitro -a mongrel > > > >with the repo version. > > I have get the repo at ~22:00 and have try to call nitro with this > options but i *always* get webrick: > > What I have done: > > darcs get http://repo.nitroproject.org/ repo > ---run.rb > require 'rubygems' > require 'repo/glycerin' > require 'nitro' > > class HelloController > def index > "Hello, World!" > end > end > > Nitro.run HelloController > --- > > ruby run.rb -m -D ==> Listening at 0.0.0.0:9999. [WEBRICK] > ruby run.rb --adapter mongrel ==> Listening at 0.0.0.0:9999. [WEBRICK] > ruby run.rb -a mongrel --- "" ---- > ruby run.rb mongrel --- "" ---- > > Sorry but with the current repo i can't call mongrel or some other > adapter: > > ruby run.rb --scgi ==> Listening at 0.0.0.0:9999. [WEBRICK] > > Regards > > Alex > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.nitroproject.org From fabian at oggu.de Thu Aug 31 18:59:48 2006 From: fabian at oggu.de (Fabian Buch) Date: Fri, 1 Sep 2006 00:59:48 +0200 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <4b6f054f0608311342j6e8d5a4eh7d9d633bbcd283d5@mail.gmail.com> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> <4b6f054f0608311342j6e8d5a4eh7d9d633bbcd283d5@mail.gmail.com> Message-ID: <293CB9FE-8230-44B0-9A24-37D537ACA7FB@oggu.de> Am 31.08.2006 um 22:42 schrieb TRANS: > On 8/31/06, Fabian Buch wrote: >> >> Am 31.08.2006 um 18:04 schrieb TRANS: >>> On 8/31/06, Fabian Buch wrote: >>> >>>> Not before Trans releases next facets version. >>> >>> Okay, next verison up to bat. Swing away.... >> >> 1.7.38, just saw it, vanished a few seconds later.. ;) > > ? Oh well, installs now, maybe wasn't on all rubyforge mirrors yet. Fabian From transfire at gmail.com Thu Aug 31 19:57:30 2006 From: transfire at gmail.com (TRANS) Date: Thu, 31 Aug 2006 19:57:30 -0400 Subject: [Nitro] nitro from darcs and ruby gem In-Reply-To: <293CB9FE-8230-44B0-9A24-37D537ACA7FB@oggu.de> References: <20060830213857.GA10381@none.at> <200608311109.05361.manveru@weez-int.com> <86C24AC5-F087-4430-A6ED-0ADDA028EDC7@oggu.de> <4b6f054f0608310904g82ecb25p36e9bdc2cb3f5417@mail.gmail.com> <4b6f054f0608311342j6e8d5a4eh7d9d633bbcd283d5@mail.gmail.com> <293CB9FE-8230-44B0-9A24-37D537ACA7FB@oggu.de> Message-ID: <4b6f054f0608311657g23a0f83dx5064fedaaa89ca1d@mail.gmail.com> On 8/31/06, Fabian Buch wrote: > > Am 31.08.2006 um 22:42 schrieb TRANS: > > > On 8/31/06, Fabian Buch wrote: > >> > >> Am 31.08.2006 um 18:04 schrieb TRANS: > >>> On 8/31/06, Fabian Buch wrote: > >>> > >>>> Not before Trans releases next facets version. > >>> > >>> Okay, next verison up to bat. Swing away.... > >> > >> 1.7.38, just saw it, vanished a few seconds later.. ;) > > > > ? > > Oh well, installs now, maybe wasn't on all rubyforge mirrors yet. Heard that Rubyforge was having some issue today. So that was probably it. T.