From bryan.a.soto at gmail.com Tue May 2 03:11:01 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 2 May 2006 00:11:01 -0700 Subject: [Nitro] [PATCH][FIX] fix-nitro-compiler-param-processing In-Reply-To: References: Message-ID: On 4/29/06, Jonathan Buch wrote: > Hi, > > > assert_match(/#{params}/, get(:uri => '/test', :params => { 'params' => > > '1', 'arg2'=>'2' })) > > > > this line fails with > > > > <"arg1=&arg2="> expected to be =~ . > > Now that I think about it, I think it is correct to fail here. > > Why should this url: > /test?params=1&arg2=2 > map to the same as: > /test/1/2 ? > Actually, what happens with /test/1/2 is that the args are formatted as 1;2 in headers[query_string]. In the compiler, this is parse (code duplication from cgi.rb). I'm trying to see if I can remove the duplication. > Wouldn't it complicate matters too much, if this is allowed? > Perhaps that's why Nitro is so complicated. :) By the way, I assume you unpulled this crap patch, right? :) > I'm really not sure about all this... Maybe thats where the error > originates from? > > Kashia > > -- > 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 > -- "Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." ?General George S. Patton From bryan.a.soto at gmail.com Tue May 2 03:12:22 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 2 May 2006 00:12:22 -0700 Subject: [Nitro] [PATCH]: More patches against the devlab repo In-Reply-To: References: Message-ID: I had to fix a few tests and resolve a conflict. I'll double check against a clean repo, and if all goes well, I'll apply these tomorrow. On 4/29/06, George Moschovitis wrote: > and the attachment... > > -g. > > On 4/29/06, George Moschovitis wrote: > > Hello Bryan, > > > > I hope you can add these too ;-) > > > > regards, > > George. > > > > -- > > http://www.gmosx.com > > http://www.navel.gr > > http://www.nitrohq.com > > > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- "Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." ?General George S. Patton From john at oxyliquit.de Tue May 2 04:04:00 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 02 May 2006 10:04:00 +0200 Subject: [Nitro] [PATCH][FIX] fix-nitro-compiler-param-processing In-Reply-To: References: Message-ID: Hi, > Actually, what happens with /test/1/2 is that the args are formatted > as 1;2 in headers[query_string]. In the compiler, this is parse (code > duplication from cgi.rb). I'm trying to see if I can remove the > duplication. Is the 1;2 distinguishable from the rest of the arguments? I'm not sure if this helps, but would it be possible, to make a look- ahaid, to decide what to do with arguments? POST /test/1/2?a=2&b=45 irb(main):006:0> def asdf(a,b); end irb(main):008:0> (method :asdf).arity => 2 if I have the information that the function takes 2 parameters then I can use the "1;2". I'm not sure about "tags(*tgs)" => /tags/a/b/c/d/e => arity => -1 So, that idea isn't finished, but maybe it could be used somehow? Not sure about /test?b=45&a=1 either.. what should happen here? The two arguments would not match to: test(1,45) it would match to test(45,1), wouldn't it? This is highly misleading imho. What do others think about this matter? Should these cases be completely interchangeable: /test/1/2 /test?b=1&a=2 /test?a=1&b=2 /test/1&b=2 etc.. (why didn't I get bitten by this matter before... This sounds so silly... yet it always worked somehow until recently.. I don't even remember what I really did...) > Perhaps that's why Nitro is so complicated. :) So a vote from me to big G: please make Nitro less complicated ;D Yes, that is a joke :P > By the way, I assume you unpulled this crap patch, right? :) Sure did (now) :P Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From itsme213 at hotmail.com Tue May 2 11:03:19 2006 From: itsme213 at hotmail.com (itsme213) Date: Tue, 2 May 2006 10:03:19 -0500 Subject: [Nitro] [PATCH][FIX] fix-nitro-compiler-param-processing References: Message-ID: I'm doing some guessing here since I don't know internals of Nitro ... apologies if this is off-base, or all already covered anyway. > if I have the information that the function takes 2 parameters then I > can use the "1;2". The more we exploit declarative method information the more convenient (robust/intuitive) we can make automatic support for general method invocations, just as we use declarative og meta-data for corresponding scaffolding of CRUD methods on relations. Among the things we could use: 1. number of params: Provided by Ruby #arity, but with a bit more metadata we can know and use stuff inside argument hashes, *args etc. 2. names of params: Can inform both view and controller 3. types of params: Can inform view to generate automatic scaffolding for selection of single or list-type arguments based on type. Can inform controller in cases of multi-step selection. class Customer def order(product) end params :order, :product=>Product end 4. set constraints on params: Can inform view to generate automatic scaffolding for selection of arguments based on a method or relation that returns a set of valid objects to choose from. Can even generate Ajax/javascript to constrain selection of some arguments based on selection of other arguments. Importantly, #3 can be treated as a special case of this one. class Customer has_many :authorized_products, Product def order(product, shipping) # product must be chosen from #authorized_products # shipping must be one of the ship_options # for that customer and product end params :order, :product=>[:self, :authorized_products], :shipping=>[:self, :ship_options, :product] # for self.ship_options(product) # or :shipping=>[:product, :ship_options] # for product.ship_options def ship_options (product) # return set of valid shipping options end end Having this worked out, we could then use conventions as shortcuts, remaining consistent with og conventions wherever possible e.g. - the first :self can be made the default with appropriate checks - parameter :p must be selected from #p_candidates (if exists) - parameter :p must be an instance of class P - parameter :ps must be a list of instances of class P Just my 2c From m.fellinger at gmail.com Tue May 2 11:21:55 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 3 May 2006 00:21:55 +0900 Subject: [Nitro] [PATCH] two patches, one fix for the arity-problem with POST, , , , Message-ID: <9c00d3e00605020821q50a8cc16l2e77eafa11f608b8@mail.gmail.com> two patches, one fixes the problem with arity and using POST, where you get ugly errors... the other one fixes ez-queries for booleans won't show example-code here because gmail messes with my mails and i have no proper client around. -------------- next part -------------- A non-text attachment was scrubbed... Name: bundles.tar.gz Type: application/x-gzip Size: 30626 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060502/1069a066/attachment.gz -------------- next part -------------- A non-text attachment was scrubbed... Name: arity_fix Type: application/octet-stream Size: 49385 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060502/1069a066/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: ez_fix Type: application/octet-stream Size: 49518 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060502/1069a066/attachment-0001.obj From george.moschovitis at gmail.com Tue May 2 14:01:49 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 2 May 2006 21:01:49 +0300 Subject: [Nitro] [PATCH] One more patch Message-ID: Have fun... -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle.zip Type: application/zip Size: 26882 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060502/f82167f6/attachment.zip From george.moschovitis at gmail.com Tue May 2 14:02:20 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 2 May 2006 21:02:20 +0300 Subject: [Nitro] [PATCH]: More patches against the devlab repo In-Reply-To: References: Message-ID: Dont forget to have a look at the new patch I just send. -g. On 5/2/06, Bryan Soto wrote: > I had to fix a few tests and resolve a conflict. I'll double check > against a clean repo, and if all goes well, I'll apply these tomorrow. > > On 4/29/06, George Moschovitis wrote: > > and the attachment... > > > > -g. > > > > On 4/29/06, George Moschovitis wrote: > > > Hello Bryan, > > > > > > I hope you can add these too ;-) > > > > > > regards, > > > George. > > > > > > -- > > > http://www.gmosx.com > > > http://www.navel.gr > > > http://www.nitrohq.com > > > > > > > > > -- > > http://www.gmosx.com > > http://www.navel.gr > > http://www.nitrohq.com > > > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > -- > "Never tell people how to do things. Tell them what to do and they > will surprise you with their ingenuity." ?General George S. Patton > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 2 14:05:53 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 2 May 2006 21:05:53 +0300 Subject: [Nitro] Nitro 0.30.0 Message-ID: Dear devs, the original plan was to finish the new nitroproject.org site before releasing version 0.30.0. However, I would like to take some extra time to make this site. Moreover, the release of nitro 0.30.0 has been postponed too many times. This will be the longest release in development. Anyway, the new plan is to release 0.30.0 on thursday or Friday. I would like to ask Bryan to apply me latest patch against the devlab repo, and everyone else to report any problems. There is still some work to be done on little things (ProjectInfos, tests, release docs etc) but I am confident we can make a great release (in the spirit of Nitro's 'release early and often' policy). thanks, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 2 14:06:40 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 2 May 2006 21:06:40 +0300 Subject: [Nitro] Dimitri's Transformer. In-Reply-To: <55c107bf0604301109m6a03113fkdef105bec7c53805@mail.gmail.com> References: <55c107bf0604301109m6a03113fkdef105bec7c53805@mail.gmail.com> Message-ID: > No problem. Just let me know if I can be of any assistance. And do update > me on when this idea is better developed/integrated with Nitro. I've been > using it on all of my current projects, and would need to adapt them to > whatever the official system becomes. Ok :) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Tue May 2 15:28:30 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 02 May 2006 12:28:30 -0700 Subject: [Nitro] YARV + Nitro Message-ID: <4457B2DE.1050104@neurogami.com> Has anyone tried running Og/Nitro with YARV? Any tales to tell? -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From bryan.a.soto at gmail.com Tue May 2 15:45:34 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 2 May 2006 12:45:34 -0700 Subject: [Nitro] YARV + Nitro In-Reply-To: <4457B2DE.1050104@neurogami.com> References: <4457B2DE.1050104@neurogami.com> Message-ID: On 5/2/06, James Britt wrote: > Has anyone tried running Og/Nitro with YARV? > > Any tales to tell? > Manveru did. See http://rubyforge.org/pipermail/nitro-general/2006-April/004086.html From bryan.a.soto at gmail.com Tue May 2 17:16:13 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 2 May 2006 14:16:13 -0700 Subject: [Nitro] [PATCH] One more patch In-Reply-To: References: Message-ID: On 5/2/06, George Moschovitis wrote: > Have fun... > I just went ahead and applied it to devlab. From james_b at neurogami.com Tue May 2 17:25:22 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 02 May 2006 14:25:22 -0700 Subject: [Nitro] YARV + Nitro In-Reply-To: References: <4457B2DE.1050104@neurogami.com> Message-ID: <4457CE42.3040500@neurogami.com> Bryan Soto wrote: > On 5/2/06, James Britt wrote: > >> Has anyone tried running Og/Nitro with YARV? >> >> Any tales to tell? >> > > Manveru did. See > http://rubyforge.org/pipermail/nitro-general/2006-April/004086.html Ah, I see. I, too, have hit a wall with rubygems. Is there a reasonably simple way to get all of the code needed to run Nitro+Og into a local directory? Something a little better than manually figuring out all the dependencies and downloading tarballs one by one? (A single SVN or darcs fetch would be the ideal ...) -- James Britt "Blanket statements are over-rated" From surrender_it at yahoo.it Tue May 2 18:43:10 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 03 May 2006 00:43:10 +0200 Subject: [Nitro] Nitro 0.30.0 In-Reply-To: References: Message-ID: George Moschovitis ha scritto: > Dear devs, > > the original plan was to finish the new nitroproject.org site before > releasing version 0.30.0. However, I would like to take some extra > time to make this site. Moreover, the release of nitro 0.30.0 has been > postponed too many times. This will be the longest release in > development. maybe in the meanwhile you could add a link to Oxyliquit to the home of nitroproject.org? > Anyway, the new plan is to release 0.30.0 on thursday or Friday. I > would like to ask Bryan to apply me latest patch against the devlab > repo, and everyone else to report any problems. There is still some > work to be done on little things (ProjectInfos, tests, release docs > etc) but I am confident we can make a great release (in the spirit of > Nitro's 'release early and often' policy). I notice a small issue in nitro's tests: test_gc(TC_Session) is failing with cache_type= file on Windows XP, It seems a problem related to timing but sadly it's nearly one AM here ATM so I can't really investigate it :) From bryan.a.soto at gmail.com Tue May 2 19:42:22 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 2 May 2006 16:42:22 -0700 Subject: [Nitro] YARV + Nitro In-Reply-To: <4457CE42.3040500@neurogami.com> References: <4457B2DE.1050104@neurogami.com> <4457CE42.3040500@neurogami.com> Message-ID: On 5/2/06, James Britt wrote: > Ah, I see. I, too, have hit a wall with rubygems. > > Is there a reasonably simple way to get all of the code needed to run > Nitro+Og into a local directory? > > Something a little better than manually figuring out all the > dependencies and downloading tarballs one by one? > > (A single SVN or darcs fetch would be the ideal ...) > You mean something along the lines of: nitro-container/ lib/ daemons/ facets/ glue/ nitro/ og/ RedCloth/ and whatever else it requires so that you could run $ ruby -I nitro-container/lib If so, I don't think there's anything like that. Bryan From james_b at neurogami.com Tue May 2 23:30:54 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 02 May 2006 20:30:54 -0700 Subject: [Nitro] YARV + Nitro In-Reply-To: References: <4457B2DE.1050104@neurogami.com> <4457CE42.3040500@neurogami.com> Message-ID: <445823EE.4040302@neurogami.com> Bryan Soto wrote: > ... > > You mean something along the lines of: > > nitro-container/ > lib/ > daemons/ > facets/ > glue/ > nitro/ > og/ > RedCloth/ > > and whatever else it requires so that you could run > > $ ruby -I nitro-container/lib > Exactly. > If so, I don't think there's anything like that. > If I have a list of all the dependencies I can just untar the gems into a local directory, so that may be the simplest way. And I can figure out the dependencies by running code and seeing what breaks. :) -- James Britt "In Ruby, no one cares who your parents were, all they care about is if you know what you are talking about." - Logan Capaldo From bryan.a.soto at gmail.com Wed May 3 00:00:36 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 2 May 2006 21:00:36 -0700 Subject: [Nitro] YARV + Nitro In-Reply-To: <445823EE.4040302@neurogami.com> References: <4457B2DE.1050104@neurogami.com> <4457CE42.3040500@neurogami.com> <445823EE.4040302@neurogami.com> Message-ID: On 5/2/06, James Britt wrote: > Bryan Soto wrote: > > > ... > > > > You mean something along the lines of: > > > > nitro-container/ > > lib/ > > daemons/ > > facets/ > > glue/ > > nitro/ > > og/ > > RedCloth/ > > > > and whatever else it requires so that you could run > > > > $ ruby -I nitro-container/lib > > > > Exactly. > > > If so, I don't think there's anything like that. > > > > If I have a list of all the dependencies I can just untar the gems into > a local directory, so that may be the simplest way. > > And I can figure out the dependencies by running code and seeing what > breaks. > Well, as a start: # Required - [ nitro, '= 0.30.0' ] - [ og, '= 0.30.0' ] - [ gen, '= 0.30.0' ] - [ glue, '= 0.30.0' ] - [ facets, '= 1.0.3' ] - [ cmdparse, '= 2.0.0' ] - [ RedCloth, '= 3.0.3' ] # Optional, I believe. - [ ruby-breakpoint, '= 0.5' ] - [ daemons, '= 0.4.2' ] > :) > Hope that helps. From bryan.a.soto at gmail.com Wed May 3 01:35:30 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 2 May 2006 22:35:30 -0700 Subject: [Nitro] Nitro 0.30.0 In-Reply-To: References: Message-ID: On 5/2/06, gabriele renzi wrote: > I notice a small issue in nitro's tests: > test_gc(TC_Session) is failing with cache_type= file on Windows XP, It > seems a problem related to timing but sadly it's nearly one AM here ATM > so I can't really investigate it :) > That one has been around for awhile. Most people here don't use Windows and since there was always somthing to work on, I never got around to figuring it out. From james_b at neurogami.com Wed May 3 02:43:40 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 02 May 2006 23:43:40 -0700 Subject: [Nitro] YARV + Nitro In-Reply-To: References: <4457B2DE.1050104@neurogami.com> <4457CE42.3040500@neurogami.com> <445823EE.4040302@neurogami.com> Message-ID: <4458511C.1090902@neurogami.com> Bryan Soto wrote: ... > > Well, as a start: .. > > Hope that helps. Oh, very much. Thanks! -- James Britt "In Ruby, no one cares who your parents were, all they care about is if you know what you are talking about." - Logan Capaldo From vseguip at gmail.com Wed May 3 09:48:37 2006 From: vseguip at gmail.com (vseguip at gmail.com) Date: Wed, 3 May 2006 15:48:37 +0200 Subject: [Nitro] Nitro 0.30.0 In-Reply-To: References: Message-ID: Hi George, I don't want to pester you, but could we do a last attempt to solve the GTK2 naming clash? As far as I can recall it appears that no satisfactory alternative name was found so the issue is stalled. We (I?) need the lead developers to break through this with a final decision or else the issue will be again delayed until 0.31. I know this is probably a non issue for 99.9% of Og users but making rad database application possible with ruby-gnome2 & Og could expose the fantastic stuff that Og and nitro do to a wider audience. Cheers, V. Segu? On 5/2/06, George Moschovitis wrote: > > Anyway, the new plan is to release 0.30.0 on thursday or Friday. I > would like to ask Bryan to apply me latest patch against the devlab > repo, and everyone else to report any problems. There is still some > work to be done on little things (ProjectInfos, tests, release docs > etc) but I am confident we can make a great release (in the spirit of > Nitro's 'release early and often' policy). > > thanks, > George. > From transfire at gmail.com Wed May 3 12:14:58 2006 From: transfire at gmail.com (TRANS) Date: Wed, 3 May 2006 12:14:58 -0400 Subject: [Nitro] Reap Choice Message-ID: <4b6f054f0605030914p36a5c056v1192eb66f429780f@mail.gmail.com> I have to make a decision about this today. Presently I have Reap allowing any name for a reap task, and the YAML type is used to specify the kind of task. Here's an example: mypkgtask: !!package distribute : [ gem, tar.bz2 ] dependencies : [ facets ] executables : [ reap, rubytest ] dir: '../DISTRIBUTION' Notice the map key 'mypkgtask' can be any word you like. This is a very flexible option. OTOH I'm not sure I like it b/c it gets away from having standard names for certain tasks. I.e. you couldn't depend on them being the same from one project to the next. Yet there are still occasions when you need more than one of the same kind of task, so something is still needed, in this case it would be a task suffix. package-reap: distribute : [ gem, tar.bz2 ] ... or perhaps package/reap: distribute : [ gem, tar.bz2 ] ... For the reap command line interface one could then put something like: reap package -s reap Whereas just 'reap package' would run all package tasks. Via Rake the task would be 'package-reap' of course but there still could be a plain 'package' task too. So which of the two ways would you all prefer? Either fully customizable task names, or task name consistency with optional suffixes? Thanks, T. From bryan.a.soto at gmail.com Wed May 3 15:16:57 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 3 May 2006 12:16:57 -0700 Subject: [Nitro] Bug in Facets/Aspects. Message-ID: A resend of a past email re: a bug in facets 1.3.2. Includes patch. ---------- Forwarded message ---------- From: Bryan Soto Date: Apr 24, 2006 11:26 PM Subject: Patch applied. To: General discussion about Nitro I've updated the repo to facets 1.3.2. Facets currently has a bug in aspects. Attached patch to facets-1.3.2/lib/facets/more/aspects.rb fixes. -- "Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." ?General George S. Patton -------------- next part -------------- A non-text attachment was scrubbed... Name: aspects.patch Type: text/x-patch Size: 823 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060503/821f9cf1/attachment.bin From transfire at gmail.com Wed May 3 15:27:12 2006 From: transfire at gmail.com (TRANS) Date: Wed, 3 May 2006 15:27:12 -0400 Subject: [Nitro] Bug in Facets/Aspects. In-Reply-To: References: Message-ID: <4b6f054f0605031227v5cbe43f6re873a7c56537ea20@mail.gmail.com> > I've updated the repo to facets 1.3.2. Facets currently has a bug in > aspects. Attached patch to facets-1.3.2/lib/facets/more/aspects.rb > fixes. Yep. Already fixed this and one other bug, and will release shortly (would you prefer I go to 1.3.3 or just re-release?). The only thing holding me up is figuring this thing with Reap so I can update Facets ProjectInfo file accordingly. Then I can update all Nitro's ProjectInfo files too. That why I really need to get the Reap thing done today. So please offer insights. Thanks, T. From bryan.a.soto at gmail.com Wed May 3 17:44:00 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 3 May 2006 14:44:00 -0700 Subject: [Nitro] Bug in Facets/Aspects. In-Reply-To: <4b6f054f0605031227v5cbe43f6re873a7c56537ea20@mail.gmail.com> References: <4b6f054f0605031227v5cbe43f6re873a7c56537ea20@mail.gmail.com> Message-ID: On 5/3/06, TRANS wrote: > > I've updated the repo to facets 1.3.2. Facets currently has a bug in > > aspects. Attached patch to facets-1.3.2/lib/facets/more/aspects.rb > > fixes. > > Yep. Already fixed this and one other bug, and will release shortly > (would you prefer I go to 1.3.3 or just re-release?). The only thing > holding me up is figuring this thing with Reap so I can update Facets > ProjectInfo file accordingly. Then I can update all Nitro's > ProjectInfo files too. That why I really need to get the Reap thing > done today. So please offer insights. > Go for 1.3.3 or even 1.3.2.1. Just something that will be tagged as an update or else people will have to know to reinstall it. Re: Reap, will do. I've been pondering that quite a bit since your last email. Your intent for Reap seems to be much more ambitous than I had understood at first. :) From bryan.a.soto at gmail.com Wed May 3 18:09:42 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 3 May 2006 15:09:42 -0700 Subject: [Nitro] Reap Choice In-Reply-To: <4b6f054f0605030914p36a5c056v1192eb66f429780f@mail.gmail.com> References: <4b6f054f0605030914p36a5c056v1192eb66f429780f@mail.gmail.com> Message-ID: On 5/3/06, TRANS wrote: > So which of the two ways would you all prefer? Either fully > customizable task names, or task name consistency with optional > suffixes? > I personally like task name consistency with optional suffixes. I'm curious though (not being familiar with YAML), rather than a suffix, how would a hash of hashes work in this particular case? Basically, having a package hash with keys of gem, tar, bz2. It'd have a benefit in the ProjectInfo file of keeping all the related tasks together. By suffix, it'd be up to a users discipline to keep all the related tasks together. Just a thought. Bryan From transfire at gmail.com Wed May 3 19:00:36 2006 From: transfire at gmail.com (TRANS) Date: Wed, 3 May 2006 19:00:36 -0400 Subject: [Nitro] Reap Choice In-Reply-To: References: <4b6f054f0605030914p36a5c056v1192eb66f429780f@mail.gmail.com> Message-ID: <4b6f054f0605031600s1bec0f82le1b121b15d1248bb@mail.gmail.com> On 5/3/06, Bryan Soto wrote: > On 5/3/06, TRANS wrote: > > So which of the two ways would you all prefer? Either fully > > customizable task names, or task name consistency with optional > > suffixes? > > > > I personally like task name consistency with optional suffixes. > > I'm curious though (not being familiar with YAML), rather than a > suffix, how would a hash of hashes work in this particular case? > Basically, having a package hash with keys of gem, tar, bz2. It'd have > a benefit in the ProjectInfo file of keeping all the related tasks > together. By suffix, it'd be up to a users discipline to keep all the > related tasks together. That's a possiblit. Only problem here is it would require a way to ensure that Reap could tell the difference between a single task and a mulitple -- that would probably mean a sepcial type. Eg. package: !!multireap option1: ... option2: ... T. From george.moschovitis at gmail.com Thu May 4 16:16:28 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 4 May 2006 22:16:28 +0200 Subject: [Nitro] Nitro 0.30.0 In-Reply-To: References: Message-ID: Hm, I will *try* to come up with a solution tommorow, before the release. regards, George. On 5/3/06, vseguip at gmail.com wrote: > Hi George, > I don't want to pester you, but could we do a last attempt to solve > the GTK2 naming clash? > As far as I can recall it appears that no satisfactory alternative > name was found so the issue is stalled. We (I?) need the lead > developers to break through this with a final decision or else the > issue will be again delayed until 0.31. I know this is probably a non > issue for 99.9% of Og users but making rad database application > possible with ruby-gnome2 & Og could expose the fantastic stuff that > Og and nitro do to a wider audience. > > Cheers, > V. Segu? > > On 5/2/06, George Moschovitis wrote: > > > > Anyway, the new plan is to release 0.30.0 on thursday or Friday. I > > would like to ask Bryan to apply me latest patch against the devlab > > repo, and everyone else to report any problems. There is still some > > work to be done on little things (ProjectInfos, tests, release docs > > etc) but I am confident we can make a great release (in the spirit of > > Nitro's 'release early and often' policy). > > > > thanks, > > George. > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu May 4 16:22:28 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 4 May 2006 22:22:28 +0200 Subject: [Nitro] YARV + Nitro In-Reply-To: References: <4457B2DE.1050104@neurogami.com> <4457CE42.3040500@neurogami.com> <445823EE.4040302@neurogami.com> Message-ID: Hmmm perhaps this could be a feature of Reap. All the information you describe Bryan is defined in ProjectInfos. Tom what do you think? regards, George. On 5/3/06, Bryan Soto wrote: > On 5/2/06, James Britt wrote: > > Bryan Soto wrote: > > > > > ... > > > > > > You mean something along the lines of: > > > > > > nitro-container/ > > > lib/ > > > daemons/ > > > facets/ > > > glue/ > > > nitro/ > > > og/ > > > RedCloth/ > > > > > > and whatever else it requires so that you could run > > > > > > $ ruby -I nitro-container/lib > > > > > > > Exactly. > > > > > If so, I don't think there's anything like that. > > > > > > > If I have a list of all the dependencies I can just untar the gems into > > a local directory, so that may be the simplest way. > > > > And I can figure out the dependencies by running code and seeing what > > breaks. > > > > Well, as a start: > > # Required > - [ nitro, '= 0.30.0' ] > - [ og, '= 0.30.0' ] > - [ gen, '= 0.30.0' ] > - [ glue, '= 0.30.0' ] > > - [ facets, '= 1.0.3' ] > > - [ cmdparse, '= 2.0.0' ] > - [ RedCloth, '= 3.0.3' ] > > # Optional, I believe. > - [ ruby-breakpoint, '= 0.5' ] > - [ daemons, '= 0.4.2' ] > > > :) > > > > Hope that helps. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu May 4 16:24:26 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 4 May 2006 22:24:26 +0200 Subject: [Nitro] Bug in Facets/Aspects. In-Reply-To: <4b6f054f0605031227v5cbe43f6re873a7c56537ea20@mail.gmail.com> References: <4b6f054f0605031227v5cbe43f6re873a7c56537ea20@mail.gmail.com> Message-ID: > (would you prefer I go to 1.3.3 or just re-release?). The only thing Please rerelease! > holding me up is figuring this thing with Reap so I can update Facets > ProjectInfo file accordingly. Then I can update all Nitro's > ProjectInfo files too. That why I really need to get the Reap thing > done today. So please offer insights. Please, keep in mind that the release of Nitro 0.30.0 is iminent. Perhaps you could postpone the changes for 1-2 days. thanks, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu May 4 16:24:42 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 4 May 2006 22:24:42 +0200 Subject: [Nitro] [PATCH] One more patch In-Reply-To: References: Message-ID: thanks! -g. On 5/2/06, Bryan Soto wrote: > On 5/2/06, George Moschovitis wrote: > > Have fun... > > > > I just went ahead and applied it to devlab. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu May 4 16:27:06 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 4 May 2006 22:27:06 +0200 Subject: [Nitro] [PATCH] two patches, one fix for the arity-problem with POST, , , , In-Reply-To: <9c00d3e00605020821q50a8cc16l2e77eafa11f608b8@mail.gmail.com> References: <9c00d3e00605020821q50a8cc16l2e77eafa11f608b8@mail.gmail.com> Message-ID: thanks! -g. On 5/2/06, Michael Fellinger wrote: > two patches, one fixes the problem with arity and using POST, where > you get ugly errors... > the other one fixes ez-queries for booleans > > won't show example-code here because gmail messes with my mails and i > have no proper client around. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From transfire at gmail.com Thu May 4 17:01:27 2006 From: transfire at gmail.com (TRANS) Date: Thu, 4 May 2006 17:01:27 -0400 Subject: [Nitro] YARV + Nitro In-Reply-To: References: <4457B2DE.1050104@neurogami.com> <4457CE42.3040500@neurogami.com> <445823EE.4040302@neurogami.com> Message-ID: <4b6f054f0605041401n1c39b9d2hc20a83452624eed8@mail.gmail.com> On 5/4/06, George Moschovitis wrote: > Hmmm perhaps this could be a feature of Reap. All the information you > describe Bryan is defined in ProjectInfos. > > Tom what do you think? Yes. One way or another it will. Within the next release or two I will be replacing the setup.rb system with a new one --I've been considering using package.rb instead, since it does more of what's needed, but on further consideration I may just write a system from scratch. With that in hand it shouldn't be too difficult to create super-packaging task that rolls together all dependencies into a single unit. Once the new packaging system is in place I'll bring this topic up again. T. From transfire at gmail.com Thu May 4 17:05:10 2006 From: transfire at gmail.com (TRANS) Date: Thu, 4 May 2006 17:05:10 -0400 Subject: [Nitro] Bug in Facets/Aspects. In-Reply-To: References: <4b6f054f0605031227v5cbe43f6re873a7c56537ea20@mail.gmail.com> Message-ID: <4b6f054f0605041405q3fa1149bg6484d0760660fec6@mail.gmail.com> On 5/4/06, George Moschovitis wrote: > > (would you prefer I go to 1.3.3 or just re-release?). The only thing > > Please rerelease! > > > holding me up is figuring this thing with Reap so I can update Facets > > ProjectInfo file accordingly. Then I can update all Nitro's > > ProjectInfo files too. That why I really need to get the Reap thing > > done today. So please offer insights. > > > Please, keep in mind that the release of Nitro 0.30.0 is iminent. > Perhaps you could postpone the changes for 1-2 days. Unfortunately I am in the midst of them --but they are almost complete now. I'll have the next version of Reap out in a matter of hours, then I'll release Facets accordingly, and then pull down and modify Nitro ProjectInfo's to match. T. From transfire at gmail.com Thu May 4 19:15:32 2006 From: transfire at gmail.com (TRANS) Date: Thu, 4 May 2006 19:15:32 -0400 Subject: [Nitro] Reap 5.0 Message-ID: <4b6f054f0605041615y3bfc2d73lbb07fb7aba03863@mail.gmail.com> A N N O U N C I N G Reap, v5.0.0 The Flexible Ruby Project Management Assistant http://reap.rubyforge.org REAP THE REWARDS! ABSTRACT -------- Reap comprises a set of tasks commonly needed by Ruby package developers/deployers, such as testing, packaging, releasing, etc. You can also use Reap to create your own custom tasks. Reap utilizes a YAML configuration file to harvest common project information, significantly simplifying these chores. RELEASE MEMO ------------ And just like that *snap* we arrive at version 5.0. Why a major version change? Becuase Reap tasks now have a new "formulary". They are defined as true blue YAML types. This means you can even name a Reap task anything you like (although it's wise to stick with the conventional names unless otherwise neccessary). Here's an example from Facets' own ProjecInfo file: rdoc-core: !!rdoc dir: web/doc/api/core template: jamis options: ['--all', '--inline-source'] include: - 'lib/facets/core/**/*' - '[A-Z]*' rdoc-more: !!rdoc dir: web/doc/api/more template: jamis options: ['--all', '--inline-source'] include: - 'lib/facets/more/**/*' - '[A-Z]*' With this release we have also tightened Rake interoperability. Simply place require 'rake' require 'reap/rake' in your Rakefile and all tasks defined in the ProjectInfo file will be available via the rake command. Enjoy, T. Generated by ___ | _ \___ __ _ _ __ | ) -_) _` | '_ \ |_|_\___\__,_| .__) |_| The Ruby Project Assistant Do you Ruby? (http://www.ruby-lang.org) From surrender_it at yahoo.it Thu May 4 21:08:57 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 05 May 2006 03:08:57 +0200 Subject: [Nitro] Logger.error not working in tests? Message-ID: Hi people, running "script/test.rb og" I had an output like this: Loading tests for 'og'. ./test/glue/tc_revisable.rb:20: undefined method `manage_classes' for nil:NilClass (NoMethodError) from script/test.rb:20 this was related to having Og.setup fail cause I did not have a mysql server running and errors are hidden from this line in CONFIG.rb: Logger.set(Logger.new(StringIO.new)) unless $DBG I think it would be much better if errors and warnings were still shown to the user during tests, even if I understand why INFO and DEBUG would not be nice. Maybe replacing that line with this could be ok? Logger.get.level = Logger::WARN unless $DBG This shows only warnings, errors and fatals thus massively reducing the output but still allows a quick check of what is wrong. (I still have the feeling that an exception like this should flow to the user instead of being just logged, anyway) From transfire at gmail.com Thu May 4 22:52:22 2006 From: transfire at gmail.com (TRANS) Date: Thu, 4 May 2006 22:52:22 -0400 Subject: [Nitro] Facet 1.3.3 Message-ID: <4b6f054f0605041952i13cb0b01g63ff243565419848@mail.gmail.com> Okay please try out Facets 1.3.3. I'll update Nitro's ProjectInfo files in the morning. T. From bryan.a.soto at gmail.com Fri May 5 02:05:39 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 4 May 2006 23:05:39 -0700 Subject: [Nitro] Logger.error not working in tests? In-Reply-To: References: Message-ID: On 5/4/06, gabriele renzi wrote: > Maybe replacing that line with this could be ok? > > Logger.get.level = Logger::WARN unless $DBG > > This shows only warnings, errors and fatals thus massively reducing the > output but still allows a quick check of what is wrong. > Perhaps. If things work, it should be silent in my opinion. Adding levels is a good idea though. > (I still have the feeling that an exception like this should flow to the > user instead of being just logged, anyway) > I agree with you that Og.setup should exit on errors. Would you like to submit a patch? :) Bryan From surrender_it at yahoo.it Fri May 5 04:19:16 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 05 May 2006 10:19:16 +0200 Subject: [Nitro] Logger.error not working in tests? In-Reply-To: References: Message-ID: Bryan Soto ha scritto: > I agree with you that Og.setup should exit on errors. Would you like > to submit a patch? :) > You mean I can go around checking for places like this, or just for this single case? In both case I can try to send a patch quickly, but before I do I'd like to have some darcs-related explanation. If I'm correct I need to do a darcs record && darcs send -o patchfile to create a patch but It seem to me that the resulting file is just *huge*. For example I did a patch for the above one-liner change, and it resulted more than 1000 lines long. Am I doing something wrong? From john at oxyliquit.de Fri May 5 06:12:18 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 05 May 2006 12:12:18 +0200 Subject: [Nitro] Logger.error not working in tests? In-Reply-To: References: Message-ID: Hi, > If I'm correct I need to do a darcs record && darcs send -o patchfile > to create a patch but It seem to me that the resulting file is just > *huge*. > For example I did a patch for the above one-liner change, and it > resulted more than 1000 lines long. Yes, that is a "flaw" in darcs, which is also it's biggest advantage. This patch file doesn't only have your patch in it, it also provides more context, for example if it depends on other patches. > Am I doing something wrong? Everything fine, just make a tar.gz/zip out of it before sending :P Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Fri May 5 06:15:29 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 05 May 2006 12:15:29 +0200 Subject: [Nitro] Facet 1.3.3 In-Reply-To: <4b6f054f0605041952i13cb0b01g63ff243565419848@mail.gmail.com> References: <4b6f054f0605041952i13cb0b01g63ff243565419848@mail.gmail.com> Message-ID: Hi, > Okay please try out Facets 1.3.3. I'll update Nitro's ProjectInfo > files in the morning. Works fine with newest glycerin here, not extensively tested though. Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From surrender_it at yahoo.it Fri May 5 06:30:46 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 05 May 2006 12:30:46 +0200 Subject: [Nitro] Logger.error not working in tests? In-Reply-To: References: Message-ID: Jonathan Buch ha scritto: >>For example I did a patch for the above one-liner change, and it >>resulted more than 1000 lines long. > > > Yes, that is a "flaw" in darcs, which is also it's biggest advantage. > This patch file doesn't only have your patch in it, it also provides > more context, for example if it depends on other patches. yup, I supposed this, but I was thinking there was some kind of switch to make it more concise, just like there is a --partial for "get" > >>Am I doing something wrong? > > > Everything fine, just make a tar.gz/zip out of it before sending :P I will, thanks :) From surrender_it at yahoo.it Fri May 5 08:45:41 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 05 May 2006 14:45:41 +0200 Subject: [Nitro] Logger.error not working in tests? In-Reply-To: References: Message-ID: > I agree with you that Og.setup should exit on errors. Would you like > to submit a patch? :) done, I even added a test case for Og.setup but it may need some work from people that know the testing framework better than me. Also, I changed one line in the setup definition to allow incremental adding of options to the setup, cause as of now one cannot write Og.setup(:destroy=>true) withouth losing the default value for :store Patch attached to a new ticket in Trac. From transfire at gmail.com Fri May 5 09:11:51 2006 From: transfire at gmail.com (TRANS) Date: Fri, 5 May 2006 09:11:51 -0400 Subject: [Nitro] Number of patches Message-ID: <4b6f054f0605050611k1c0e15d4tb33aa679579e1aef@mail.gmail.com> 674 patches? Will these be "incorporated" with the 0.30 release so they don;t show up nay more? How does that work? T. From transfire at gmail.com Fri May 5 10:22:28 2006 From: transfire at gmail.com (TRANS) Date: Fri, 5 May 2006 10:22:28 -0400 Subject: [Nitro] ProjectInfo patchset Message-ID: <4b6f054f0605050722p3983f1c2p50743e0e9ab89fd4@mail.gmail.com> Here's the patchset for changes to ProjectInfo files to bring Nitro uptodate with Reap 5.0. Note, I found a minor bug in reap's help system while doding this and rereleased Reap 5.0.0 with the fix. Let me know if their are any problems. T. -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle.gz Type: application/x-gzip Size: 17486 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060505/2024cf15/attachment.gz From surrender_it at yahoo.it Fri May 5 10:45:40 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 05 May 2006 16:45:40 +0200 Subject: [Nitro] Unit Tests for Stores Message-ID: Hi people, I noticed a lot of TODOs in og/store/sql.rb, and I was thinking of writing a patch for this, but I could not find unit tests for the basic stores' behaviour, would it be useful if I write some? PS I don't even understand why there is code like this def escape(str) return nil unless str return str.gsub(/'/, "''") end but I guess there may be a reason related to making nil into a string :) From aglarond at gmail.com Fri May 5 11:33:32 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Fri, 5 May 2006 17:33:32 +0200 Subject: [Nitro] Unit Tests for Stores In-Reply-To: References: Message-ID: <55c107bf0605050833t57f023dbk8982f638c17b1b6@mail.gmail.com> On 5/5/06, gabriele renzi wrote: > > Hi people, Hi, I noticed a lot of TODOs in og/store/sql.rb, and I was thinking of > writing a patch for this, but I could not find unit tests for the basic > stores' behaviour, would it be useful if I write some? > Yes! I would love to see this (both work on the TODOs and tests for the basic store). I know that George mentioned a separation of code in the works, such that non-SQL stores could be supported more easily. I'd like to see this for that reason, and to be able to support a read-only store. - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060505/16db1d42/attachment.html From surrender_it at yahoo.it Fri May 5 11:40:54 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 05 May 2006 17:40:54 +0200 Subject: [Nitro] Unit Tests for Stores In-Reply-To: <55c107bf0605050833t57f023dbk8982f638c17b1b6@mail.gmail.com> References: <55c107bf0605050833t57f023dbk8982f638c17b1b6@mail.gmail.com> Message-ID: Dimitri Aivaliotis ha scritto: > Yes! I would love to see this (both work on the TODOs and tests for the > basic store). I know that George mentioned a separation of code in the > works, such that non-SQL stores could be supported more easily. I'd > like to see this for that reason, and to be able to support a read-only > store. Great, I'll try to come up with something ASAP, sadly I have an exam monday, so I'm not sure that will be very quick :) From transfire at gmail.com Fri May 5 12:01:03 2006 From: transfire at gmail.com (TRANS) Date: Fri, 5 May 2006 12:01:03 -0400 Subject: [Nitro] Gen vision Message-ID: <4b6f054f0605050901v3e9ec5efl581bd3273f1d1d87@mail.gmail.com> What is the vision for Gen? Thanks, T. From george.moschovitis at gmail.com Fri May 5 13:47:34 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 5 May 2006 20:47:34 +0300 Subject: [Nitro] YARV + Nitro In-Reply-To: <4b6f054f0605041401n1c39b9d2hc20a83452624eed8@mail.gmail.com> References: <4457B2DE.1050104@neurogami.com> <4457CE42.3040500@neurogami.com> <445823EE.4040302@neurogami.com> <4b6f054f0605041401n1c39b9d2hc20a83452624eed8@mail.gmail.com> Message-ID: nice :) On 5/5/06, TRANS wrote: > On 5/4/06, George Moschovitis wrote: > > Hmmm perhaps this could be a feature of Reap. All the information you > > describe Bryan is defined in ProjectInfos. > > > > Tom what do you think? > > Yes. One way or another it will. Within the next release or two I will > be replacing the setup.rb system with a new one --I've been > considering using package.rb instead, since it does more of what's > needed, but on further consideration I may just write a system from > scratch. > > With that in hand it shouldn't be too difficult to create > super-packaging task that rolls together all dependencies into a > single unit. > > Once the new packaging system is in place I'll bring this topic up again. > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From bryan.a.soto at gmail.com Fri May 5 14:07:36 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 5 May 2006 11:07:36 -0700 Subject: [Nitro] Logger.error not working in tests? In-Reply-To: References: Message-ID: On 5/5/06, gabriele renzi wrote: > Bryan Soto ha scritto: > > > > > I agree with you that Og.setup should exit on errors. Would you like > > to submit a patch? :) > > > > > You mean I can go around checking for places like this, or just for this > single case? Go around and find things. :) Seriously, if you think you can contribute, don't hesitate to. If you think a change is controversial, bring it up on the list. > In both case I can try to send a patch quickly, but before I do I'd like > to have some darcs-related explanation. > > > If I'm correct I need to do a darcs record && darcs send -o patchfile > to create a patch but It seem to me that the resulting file is just *huge*. > For example I did a patch for the above one-liner change, and it > resulted more than 1000 lines long. > > Am I doing something wrong? > Not in my experience. There is a --compress option to darcs record, though I don't know what it does. I can't speak for George, but I plan to tag the devlab repo when we release. That should decrease the size of patches. Somewhat off-topic, but is there a tagging strategy darcs repos usually use? From bryan.a.soto at gmail.com Fri May 5 14:09:36 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 5 May 2006 11:09:36 -0700 Subject: [Nitro] Number of patches In-Reply-To: <4b6f054f0605050611k1c0e15d4tb33aa679579e1aef@mail.gmail.com> References: <4b6f054f0605050611k1c0e15d4tb33aa679579e1aef@mail.gmail.com> Message-ID: On 5/5/06, TRANS wrote: > 674 patches? Will these be "incorporated" with the 0.30 release so > they don;t show up nay more? How does that work? > I think you can tag a repo, which I plan to do after the release. Then one can just do $ darcs get --partial From bryan.a.soto at gmail.com Fri May 5 14:34:19 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 5 May 2006 11:34:19 -0700 Subject: [Nitro] Devlab problems and patches Message-ID: Just to let everyone know, Devlab is currently having some PAM problems which means I am unable to apply patches. In the mean time, I guess we go back to previous procedure: * Email patches to the list * George will apply to his repo. George, is the copy of your repo on nitroproject.org current? If so, devs, please just $ darcs pull http://repo.nitroproject.org for George's changes. Darcs pull always pulls and records from the last specified repo, so you only need to specify it once. And you _don't_ need to darcs get again. Please reply with any questions/suggestions/etc. Thanks. Bryan From george.moschovitis at gmail.com Fri May 5 14:58:18 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 5 May 2006 21:58:18 +0300 Subject: [Nitro] [ANN] Nitro + Og 0.30.0: VCR mode, Og QBE, Feeds, Fixes Message-ID: Dear devs, The Nitro Development Team is proud to announce new versions of Nitro and Og homepage: http://www.nitroproject.org install: gem install nitro download: http://rubyforge.org/projects/nitro/ trac: http://devlab.oree.ch/trac/nitrohq irc: irc.freenode.net #nitro faq: http://oxyliquit.manveru.net mailing list: http://rubyforge.org/pipermail/nitro-general/ Another pragmatic release. The Nitro development team worked over the submitted tickets and provided many bug fixes. More over, there are many small improvements along the codebase and as always we could not resist adding some cool new features. Special thanks fly to Bryan Sotto for making this release possible! Most notable chages: * Nitro allows fine grained customization of the compiler tranformation pipeline per controller or even per action. Here come some examples: class MyController ann :self, :transformation_pipeline => [MyTransformer, AnotherXForm] ... def my_action ... end ann :my_action, :transformation_pipeline => Compiler.transformation_pipeline.dup.shift(CustomXForm) ... end * Nitro automates integration testing by means of the new session VCR feature that allows for easy proxy based functional testing. A typicall session goes like this: Start your app with: ruby run.rb --record myfile Then use your web browser to 'perform' your testing session. You can used multiple browsers, concurrent users and hit all the pages in your app. At the end, just stop the server. In order to perform regression testing against this recorded session just restart the server in playback mode: ruby run.rb --playback myfile Nitro automatically plays back the recorded session and logs any errors or Exceptions. * Better Global variable implementation works better with distributed stores (Drb, Memcached). Notice the new Global.init and Global[:key].update { |v| } methods. * Improved the Router implementation. One notable addition is support for global router initialization: Router.rules = [ { :match => /~(.*)/, :controller => IdController, :action => :view, :params => [:name] } ] * Cleaned up glue by removing files duplicating functionality allready available in Facets. Moreover, we moved several generally useful files and methods from Glue to Facets. * Replaced the old RSSHelper with the new FeedHelper. The new implementation provides support for RSS, Atom, OPML. The FeedHelper is backwards compatible with the old helper but provides even more features. class MyController helper :feed end * Added Og query by example support. Query the database for an entity that matches the example. The example is a hash populated with the property values to search for. The provided property values are joined with AND to build the actual query. Article.query_by_example :title => 'IBM%', :hits => 2 Article.find_with_properties :title => 'IBM%', :hits => 2 * Added type casting support for Og aggregations and calculations. * Greatly improved the configuration system. One noteable (and extremely useful) new feature is that you can now customize classes before they are even defined: Configuration.User.crypt_salt = 'HELLO' require 'users' in users.rb: class User setting :crypt_salt, :default => 'DF', :doc => 'The crypt salt' end * Calculate rendering level in actions to allow for conditional rendering in top level actions or sub-actions. Some helpers are also provided: def myaction if request.is_top_level? ... end end * Introduced an alternative more sophisticated (yet intuitive) form builder. While this new helper is still under construction, it is already very useful. Here come some examples:
#{form :object => @owner, :action => :save_profile do |f| f.property :name, :editable => false f.property :password f.br f.submit 'Update' end}
#{form :method => :multipart do |f| f.p { f.label 'Select the new icon filename' f.select_file :file, :label => 'Select icon' } f.p { f.submit 'Change' } end}
* More flexible Script generator, the developer can use most of its features without a Client subclass. * Reimplemented session garbage collection. * Added many more RDoc comments to the source code. * Many, many bug fixes. * Updated to latest Facets, Scriptaculous, Prototype. Nitro provides everything you need to develop professional Web applications using Ruby and Javascript. Nitro redefines Rapid Application Development by providing a clean, yet efficient API, a layer of domain specific languages implemented on top of Ruby and the most powerful and elegant object relational mapping solution available everywhere. Please note that the project home page has been moved to: http://www.nitroproject.org have fun, Nitro Development Team -- http://www.nitroproject.org From george.moschovitis at gmail.com Fri May 5 15:03:31 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 5 May 2006 22:03:31 +0300 Subject: [Nitro] Devlab problems and patches In-Reply-To: References: Message-ID: Ok Bryan, I updated repo.nitroproject.org to the latest changes (ie the just released 0.30.0) I hope the devlab problems will be resolved, your work with the 'unofficial' repo is truly valuable! thanks, George. On 5/5/06, Bryan Soto wrote: > Just to let everyone know, Devlab is currently having some PAM > problems which means I am unable to apply patches. In the mean time, I > guess we go back to previous procedure: > > * Email patches to the list > * George will apply to his repo. > > George, is the copy of your repo on nitroproject.org current? If so, > devs, please just > > $ darcs pull http://repo.nitroproject.org > > for George's changes. Darcs pull always pulls and records from the > last specified repo, so you only need to specify it once. And you > _don't_ need to darcs get again. > > Please reply with any questions/suggestions/etc. > > Thanks. > > Bryan > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From bryan.a.soto at gmail.com Fri May 5 20:34:09 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 5 May 2006 17:34:09 -0700 Subject: [Nitro] PATCH: nitro-test-fixes Message-ID: * nitro-test-fixes * Comments out the prints in og/lib/glue/taggable.rb. * Fixes og/test/og/tc_multi_validations.rb so that it correctly loads the multi_validations_model.rb file. * Fixes a problem when running tests for nitro and og via the script/test.rb script. Og was trying to enchant a class Bar declared at the top level in the nitro/test/nitro/tc_elements.rb test as an element. ~~ At least with Mysql/Mysql, this should allow one to run the full test suite. Time to move onto the other stores. $ RUBYOPT=rubygems ruby ./script/test.rb Loading tests for 'nitro'. Loading tests for 'og'. Database "test" dropped Database "test" dropped Loading tests for 'glue'. Loaded suite ./script/test Started ............................................................................................................................. Finished in 122.032061 seconds. 125 tests, 583 assertions, 0 failures, 0 errors -------------- next part -------------- A non-text attachment was scrubbed... Name: nitro-test-fixes.zip Type: application/zip Size: 17217 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060505/792a87e0/attachment.zip From bryan.a.soto at gmail.com Fri May 5 20:39:18 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 5 May 2006 17:39:18 -0700 Subject: [Nitro] Results of RCov against test suite. Message-ID: $ RUBYOPT=rubygems rcov ./script/test.rb Here's the coverage in case anyone is interested. -------------- next part -------------- A non-text attachment was scrubbed... Name: coverage.tar.bz2 Type: application/x-bzip2 Size: 165482 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060505/992aad30/attachment.bz2 From mischa.kroon at gmail.com Sat May 6 15:58:37 2006 From: mischa.kroon at gmail.com (Mischa Kroon) Date: Sat, 6 May 2006 21:58:37 +0200 Subject: [Nitro] [ANN] Nitro + Og 0.30.0: VCR mode, Og QBE, Feeds, Fixes References: Message-ID: <001401c67147$7864b380$0a01a8c0@mischabak> Nice !!! I was actually a bit surprised not to see this up at: comp.lang.ruby ----- Original Message ----- From: "George Moschovitis" To: "General discussion about Nitro" ; Sent: Friday, May 05, 2006 8:58 PM Subject: [Nitro] [ANN] Nitro + Og 0.30.0: VCR mode, Og QBE, Feeds, Fixes > Dear devs, > > The Nitro Development Team is proud to announce new versions of Nitro and > Og > > homepage: http://www.nitroproject.org > install: gem install nitro > download: http://rubyforge.org/projects/nitro/ > trac: http://devlab.oree.ch/trac/nitrohq > irc: irc.freenode.net #nitro > faq: http://oxyliquit.manveru.net > mailing list: http://rubyforge.org/pipermail/nitro-general/ > > > Another pragmatic release. The Nitro development team worked over > the submitted tickets and provided many bug fixes. More over, there > are many small improvements along the codebase and as always > we could not resist adding some cool new features. > > Special thanks fly to Bryan Sotto for making this release > possible! > > Most notable chages: > > * Nitro allows fine grained customization of the compiler > tranformation pipeline per controller or even per action. > Here come some examples: > > class MyController > ann :self, :transformation_pipeline => [MyTransformer, AnotherXForm] > > ... > > def my_action > ... > end > ann :my_action, :transformation_pipeline => > Compiler.transformation_pipeline.dup.shift(CustomXForm) > > ... > end > > * Nitro automates integration testing by means of the new > session VCR feature that allows for easy proxy based > functional testing. A typicall session goes like this: > > Start your app with: > > ruby run.rb --record myfile > > Then use your web browser to 'perform' your testing session. > You can used multiple browsers, concurrent users and hit all > the pages in your app. At the end, just stop the server. > > In order to perform regression testing against this recorded > session just restart the server in playback mode: > > ruby run.rb --playback myfile > > Nitro automatically plays back the recorded session and logs > any errors or Exceptions. > > * Better Global variable implementation works better with > distributed stores (Drb, Memcached). Notice the new > Global.init and Global[:key].update { |v| } methods. > > * Improved the Router implementation. One notable addition > is support for global router initialization: > > Router.rules = [ > { :match => /~(.*)/, :controller => IdController, :action => > :view, :params => [:name] } > ] > > * Cleaned up glue by removing files duplicating functionality > allready available in Facets. Moreover, we moved several > generally useful files and methods from Glue to Facets. > > * Replaced the old RSSHelper with the new FeedHelper. The new > implementation provides support for RSS, Atom, OPML. The > FeedHelper is backwards compatible with the old helper but > provides even more features. > > class MyController > helper :feed > end > > * Added Og query by example support. Query the database for an > entity that matches the example. The example is a hash > populated with the property values to search for. > > The provided property values are joined with AND to build > the actual query. > > Article.query_by_example :title => 'IBM%', :hits => 2 > Article.find_with_properties :title => 'IBM%', :hits => 2 > > * Added type casting support for Og aggregations and > calculations. > > * Greatly improved the configuration system. One noteable > (and extremely useful) new feature is that you can now > customize classes before they are even defined: > > > Configuration.User.crypt_salt = 'HELLO' > require 'users' > > in users.rb: > > class User > setting :crypt_salt, :default => 'DF', :doc => 'The crypt salt' > end > > * Calculate rendering level in actions to allow for conditional > rendering in top level actions or sub-actions. Some helpers > are also provided: > > def myaction > if request.is_top_level? > ... > end > end > > * Introduced an alternative more sophisticated (yet intuitive) > form builder. While this new helper is still under construction, > it is already very useful. Here come some examples: > > > >
> #{form :object => @owner, :action => :save_profile do |f| > f.property :name, :editable => false > f.property :password > f.br > f.submit 'Update' > end} >
> > > >
> #{form :method => :multipart do |f| > f.p { > f.label 'Select the new icon filename' > f.select_file :file, :label => 'Select icon' > } > f.p { > f.submit 'Change' > } > end} >
> > * More flexible Script generator, the developer can use most of > its features without a Client subclass. > > * Reimplemented session garbage collection. > > * Added many more RDoc comments to the source code. > > * Many, many bug fixes. > > * Updated to latest Facets, Scriptaculous, Prototype. > > > > Nitro provides everything you need to develop professional Web > applications using Ruby and Javascript. Nitro redefines Rapid > Application Development by providing a clean, yet efficient API, > a layer of domain specific languages implemented on top of > Ruby and the most powerful and elegant object relational > mapping solution available everywhere. > > Please note that the project home page has been moved to: > http://www.nitroproject.org > > > > have fun, > Nitro Development Team > > > > -- > http://www.nitroproject.org > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From surrender_it at yahoo.it Sat May 6 18:11:41 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 07 May 2006 00:11:41 +0200 Subject: [Nitro] [ANN] Nitro + Og 0.30.0: VCR mode, Og QBE, Feeds, Fixes In-Reply-To: <001401c67147$7864b380$0a01a8c0@mischabak> References: <001401c67147$7864b380$0a01a8c0@mischabak> Message-ID: Mischa Kroon ha scritto: > Nice !!! > > I was actually a bit surprised not to see this up at: > comp.lang.ruby > I think george sent the announce to the mail side of ruby-talk, and since the mirror/gateway is it did not appear on the nntp side. From transfire at gmail.com Sun May 7 11:33:40 2006 From: transfire at gmail.com (TRANS) Date: Sun, 7 May 2006 11:33:40 -0400 Subject: [Nitro] cmdparse and highline Message-ID: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> So I was looking into switching Nitro's use of cmdparse over to Facets' Console::Command class. From the looks of it, cmdparse is only used by the scgi_ctrl script although there is a "todo" note in Gen about using it in the future. In looking at it, I don't see any reason this can't be done farily easily. Console::Command isn't quite as advanced, butthat's part of it's ease of use too, and it's capable enough to do the job. What got me though was the use of Highline --that's yet another depnedency (isn't it?) which is not even listed in ProjectInfo dependencies. And again scgi_ctrl is the only place it is being used. So my guess then is that NO ONE (or perhaps ONE person) is using this script! So my question is this. Is it worth it? We have two extra dependencies here for one essentially unused script. When you think about web server backends, what's generally being used out in the field? It's fcgi and apache. Along with webbrick, I would expect these to be the focus of support --and be rock solid. For the others, maybe they'd be better off as a separate plug-in package --which might also make it easier for those who use them to be their maintainers. It's a thought. In any case, what's the consensus on this one script and it's two dependencies? T. From m.fellinger at gmail.com Sun May 7 19:23:04 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 8 May 2006 08:23:04 +0900 Subject: [Nitro] PATCH: nitro-test-fixes In-Reply-To: References: Message-ID: <9c00d3e00605071623r2c452051y254691216a7adaba@mail.gmail.com> now this is truly good news - time to add more testcases that means :) On 5/6/06, Bryan Soto wrote:> * nitro-test-fixes> * Comments out the prints in og/lib/glue/taggable.rb.>> * Fixes og/test/og/tc_multi_validations.rb so that it correctly loads> the multi_validations_model.rb file.>> * Fixes a problem when running tests for nitro and og via the> script/test.rb script. Og was trying to enchant a class Bar declared> at the top level in the nitro/test/nitro/tc_elements.rb test as an> element.>> ~~>> At least with Mysql/Mysql, this should allow one to run the full test> suite. Time to move onto the other stores.>> $ RUBYOPT=rubygems ruby ./script/test.rb> Loading tests for 'nitro'.> Loading tests for 'og'.> Database "test" dropped> Database "test" dropped> Loading tests for 'glue'.> Loaded suite ./script/test> Started> .............................................................................................................................> Finished in 122.032061 seconds.>> 125 tests, 583 assertions, 0 failures, 0 errors>>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general>>> From m.fellinger at gmail.com Sun May 7 19:40:40 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 8 May 2006 08:40:40 +0900 Subject: [Nitro] cmdparse and highline In-Reply-To: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> References: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> Message-ID: <9c00d3e00605071640x342552a1r6707147d10d62865@mail.gmail.com> IMHO the dependencies don't pose a problem, i mean - it's not likenitro would depend on them, right?i also think that george just took an already existing script andconverted it to fit nitro - have no proof on that but why would he usehighline there and nowhere else? (i like HighLine btw)Another thing - nobody has modified that script for quite a while nowand the focus is on fcgi/[apache|lighttpd] and webrick anyway - imhothe scgi-runner should just get a bit more attention and maybe alittle oxyliquit-tip because it really looks useful to me.regarding the two additional libs - just keep them in, or is theresome deeper reason to remove them apart from cleaning up? ~~~~manveru On 5/8/06, TRANS wrote:> So I was looking into switching Nitro's use of cmdparse over to> Facets' Console::Command class. From the looks of it, cmdparse is only> used by the scgi_ctrl script although there is a "todo" note in Gen> about using it in the future. In looking at it, I don't see any reason> this can't be done farily easily. Console::Command isn't quite as> advanced, butthat's part of it's ease of use too, and it's capable> enough to do the job.>> What got me though was the use of Highline --that's yet another> depnedency (isn't it?) which is not even listed in ProjectInfo> dependencies. And again scgi_ctrl is the only place it is being used.> So my guess then is that NO ONE (or perhaps ONE person) is using this> script!>> So my question is this. Is it worth it? We have two extra dependencies> here for one essentially unused script.>> When you think about web server backends, what's generally being used> out in the field? It's fcgi and apache. Along with webbrick, I would> expect these to be the focus of support --and be rock solid. For the> others, maybe they'd be better off as a separate plug-in package> --which might also make it easier for those who use them to be their> maintainers.>> It's a thought. In any case, what's the consensus on this one script> and it's two dependencies?>> T.>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> From transfire at gmail.com Mon May 8 00:02:16 2006 From: transfire at gmail.com (TRANS) Date: Mon, 8 May 2006 00:02:16 -0400 Subject: [Nitro] Nitro's Success Message-ID: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> Looking at the downloads of Rails compared to Nitro... Rails 1.0.0 was release just a few weeks ago, number of downloads: 9,377 rails-1.0.0.gem 5,877 rails-1.0.0.tgz 12,645 rails-1.0.0.zip The most a single verion Nitro has ever been downloaded was version 0.23 in Aug of 2005. 141 nitro-0.23.0.gem 91 nitro-0.23.0.tgz 87 nitro-0.23.0.zip This is a huge difference. By these figures Rails is used something like 1,000 times more often. And worse, Nitro's download rates have been steady decreasing. The last set of figues for 0.29 are about half as much. Obviously, this isn't very encouraging. And if it wasn't for RubyDoc.org and Oxyliquit.de one would be hard pressed to say the project was being used at all. At the same time, two more web frameworks are making headway on the Ruby scene: Camping and IOWA. I'm sure everyone's aware of _why's work. While not esspecially advanced, Camping is nontheless so easy to use, you can read the page of documentation and have a working app in minutes. IOWA on the other hand is more like Nitro, but has been around quite awhile (even before Rails!) but hadn't gotten the love unitl recently. Now Kirk Haines is working hard on it again and it's downloads are passed Nitro's. The way I see it, most of Nitro's downloads are for expirementation. Very few people are actually using it for anything real. A lot of work has gone into Nitro and it would be a real shame for it never to take-off. There are some very clear reasons why it hasn't and unless these are addressed in reltively short order, I fear, it never will. T. From billk at cts.com Mon May 8 01:28:12 2006 From: billk at cts.com (Bill Kelly) Date: Sun, 7 May 2006 22:28:12 -0700 Subject: [Nitro] Nitro's Success References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> Message-ID: <02ac01c67260$331d8f80$6442a8c0@musicbox> From: "TRANS" > > The way I see it, most of Nitro's downloads are for expirementation. > Very few people are actually using it for anything real. A lot of work > has gone into Nitro and it would be a real shame for it never to > take-off. There are some very clear reasons why it hasn't and unless > these are addressed in reltively short order, I fear, it never will. Sure we don't just need our own PowerPoint slide that says F*** you? [1] Seriously though, oxyliquit looks like it's headed in a nice direction. The number one thing that stopped me dead in my tracks when I wanted to try out Nitro a year or so ago was the sense I got from nitrohq that Nitro was essentially experimental and undocumented. When the PragProg guys published a Rails book, I bought it instantly. However, after toying with Rails (I've done enough CGI-based websites from scratch, so I know the underlying issues) Rails for whatever reason just didn't "do it for me." Somehow I just didn't like the structure it imposed on the project, maybe; I was never sure why but it just didn't fit the way I liked to work. So I came back to nitrohq about five months ago determined to get past the apparent lack of documentation. Fortunately George had posted a few screencasts, which were enough to get me going - although they were already a little out of date with regard to starting up Og, as I recall; some kind soul helped me on IRC. (One of the things I _loved_ about Nitro vs. Rails, is how Hello World in Nitro can be literally one .rb file and maybe five simple lines of code. And how that Hello World can be morphed steadily--as in the screencast--into a more complex project piece by piece incrementally. Contrast this with Rails, which generates a skeleton project of 44 files and 31 directories - just for Hello World. I'm sure the argument is that for a large project one will eventually _need_ all this structure; but I much prefer the way Nitro gives me the opportunity to build incrementally with just the structure I want.) Anyway, besides lots of nice documentation and tutorials, what are the other things you're referring to that need to be addressed? Regards, Bill [1] http://www.flickr.com/photos/planetargon/127984254/ (fword warning) From james_b at neurogami.com Mon May 8 02:19:38 2006 From: james_b at neurogami.com (James Britt) Date: Sun, 07 May 2006 23:19:38 -0700 Subject: [Nitro] Nitro's Success In-Reply-To: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> Message-ID: <445EE2FA.2030908@neurogami.com> TRANS wrote: > Looking at the downloads of Rails compared to Nitro... > > Rails 1.0.0 was release just a few weeks ago, number of downloads: > > 9,377 rails-1.0.0.gem > 5,877 rails-1.0.0.tgz > 12,645 rails-1.0.0.zip > > The most a single verion Nitro has ever been downloaded was version > 0.23 in Aug of 2005. > > 141 nitro-0.23.0.gem > 91 nitro-0.23.0.tgz > 87 nitro-0.23.0.zip > > This is a huge difference. By these figures Rails is used something > like 1,000 times more often. And worse, Nitro's download rates have > been steady decreasing. The last set of figues for 0.29 are about half > as much. > > Obviously, this isn't very encouraging. And if it wasn't for > RubyDoc.org and Oxyliquit.de one would be hard pressed to say the > project was being used at all. There's also the Web 2.0 Validator. :) But the point remains clear. I just started a new project, using Nitro. In fact, I've a few things in orbit that are Nitro apps. Today I took a look at a Nitro tutorial on Oxiliquit. It was quite helpful. Still, there are various things i want to do but cannot find an examples or docs that explain them. For example, I thought I recalled George mentioning that Nitro had support for unit testing. I wanted get my tests in place first, but then could not find anything to explain what I should do. I'm not a super-big fan of Rails' sprawl of directories and files, but one plus for that approach is that you'd have to be blind not to see how to do certain things. And maybe the same ease is just one or two steps away in Nitro, but I don't know what they are. (And here's a related question: Why aren't the examples packaged up with the gems? The default Nitro app "Welcome!" page refers to the examples as if they are around someplace, but indeed they are nowhere to be found. This is quite frustrating; that same welcome page doesn't even tell you where to go to get the examples. Suggestion: Offer a Nitro "Chemistry Set" gem that bundles the libs, examples, tutorials, Kirbybase, and whatever else one might need to do end-to-end development with little or no Nitro experience, and describe how to get it on that welcome page.) I first saw David Hansson talk about Rails at the Virginia RubyConf (what was that, 1.5 years ago?) Here's what I took away: Use videos/screencasts to demo during a talk and to help promote your app; and good packaging around a collection of pre-existing ideas, so as to make them stupid easy to use, can give you a really big win without the need for any comp sci. breakthroughs. That's not a knock on Rails. The first versions were simply far less feature-rich than today. What was there was not new or groundbreaking (DHH said as much himself in his talk). But it was packaged and presented in such a way that it was easy to see the value, easy to see the potential, and easy to start using. This was critical in getting people to rally behind it, and without the push from numerous developers Rails would not be where it is today. Nitro's stumbling blocks for me have been the shifting APIs (and lib dependencies) and the lack of good, practical examples that cover a wide range of the features. It seems that whenever I want to see how something might be done, and I go look at the examples, none of them cover what I want. They appear to be (to my eyes, at least) variations on the same app or basic ideas. The best path for project development and growth is to offer something simple but useful, something reliable enough to avoid frustrating early adopters, and use that to excite people into joining in and helping out with patches, docs, examples, and evangelism as the code base and feature set grows. If you wait until you have a ton of features you end up with something too hard to intuitively grasp, too big to adequately document, and too complex for general examples and demos. The feature set that may have looked so appealing in the abstract becomes the very thing that makes it hard to attract developers and users. -- James Britt "People want simple stories." From james_b at neurogami.com Mon May 8 02:28:53 2006 From: james_b at neurogami.com (James Britt) Date: Sun, 07 May 2006 23:28:53 -0700 Subject: [Nitro] Nitro's Success In-Reply-To: <02ac01c67260$331d8f80$6442a8c0@musicbox> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> Message-ID: <445EE525.1070800@neurogami.com> Bill Kelly wrote: > From: "TRANS" > >>The way I see it, most of Nitro's downloads are for expirementation. >>Very few people are actually using it for anything real. A lot of work >>has gone into Nitro and it would be a real shame for it never to >>take-off. There are some very clear reasons why it hasn't and unless >>these are addressed in reltively short order, I fear, it never will. > > > Sure we don't just need our own PowerPoint slide that says > F*** you? [1] > ... > > When the PragProg guys published a Rails book, I bought it > instantly. However, after toying with Rails (I've done > enough CGI-based websites from scratch, so I know the > underlying issues) Rails for whatever reason just didn't > "do it for me." Somehow I just didn't like the structure > it imposed on the project, maybe; I was never sure why > but it just didn't fit the way I liked to work. It's slightly ironic to encourage people to go write so-called "opinionated" software, while encouraging the use of a tool that discourages coloring outside the lines. At the risk of some snarkiness, I think Nitro's tag line could be, "Nitro: Express your own opinion." > ... > > (One of the things I _loved_ about Nitro vs. Rails, is > how Hello World in Nitro can be literally one .rb file and > maybe five simple lines of code. And how that Hello World > can be morphed steadily--as in the screencast--into a more > complex project piece by piece incrementally. Contrast > this with Rails, which generates a skeleton project of > 44 files and 31 directories - just for Hello World. I'm > sure the argument is that for a large project one will > eventually _need_ all this structure; but I much prefer > the way Nitro gives me the opportunity to build incrementally > with just the structure I want.) Indeed, this is the big appeal of Og/Nitro for me. You begin at the beginning and choose your path. While I hear one acronym, DRY, mentioned quite a bit among Railers, I rarely see anyone talking about another one: YAGNI. -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://yourelevatorpitch.com - Finding Business Focus From jlsysinc at alltel.net Mon May 8 03:09:33 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Mon, 8 May 2006 03:09:33 -0400 Subject: [Nitro] High CPU usage Message-ID: <004501c6726e$5baf6c30$0200000a@agamemnon> What's the deal with the killer CPU usage? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 256 jlambert 8 0 22272 44m 896 S 97.2 8.8 19:19.65 ruby Here's my app: require 'nitro' include Nitro class MyController < Controller def index "hello" end end Server.address = '127.0.0.1' Server.port = 8888 Server.map = { '/' => MyController } Nitro.run $ ruby -v ruby 1.8.4 (2005-12-24) [i386-cygwin] -- J. Lambert From george.moschovitis at gmail.com Mon May 8 03:45:32 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 8 May 2006 10:45:32 +0300 Subject: [Nitro] [ANN] Nitro + Og 0.30.0: VCR mode, Og QBE, Feeds, Fixes In-Reply-To: References: <001401c67147$7864b380$0a01a8c0@mischabak> Message-ID: Hm, can you please email it to the newsgroup? I have some problems with my net connection these days ;-) regards, George. On 5/7/06, gabriele renzi wrote: > Mischa Kroon ha scritto: > > Nice !!! > > > > I was actually a bit surprised not to see this up at: > > comp.lang.ruby > > > > I think george sent the announce to the mail side of ruby-talk, and > since the mirror/gateway is it did not appear on the nntp side. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From dylanb at digitalvalence.com Mon May 8 04:17:58 2006 From: dylanb at digitalvalence.com (Dylan Bruzenak) Date: Mon, 08 May 2006 03:17:58 -0500 Subject: [Nitro] Nitro's Success In-Reply-To: <445EE525.1070800@neurogami.com> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> <445EE525.1070800@neurogami.com> Message-ID: <445EFEB6.2000901@digitalvalence.com> I think the main question is, how do you sell Nitro to a Rails user (and they will be Rails users by default, they won't have heard of Nitro first at this point)? ObjectGraph is pretty compelling (does it reload the model objects when the file is changed yet? Rebooting is a serious hassle...), but beyond that, what are the web framework differences ? Most people are going to see two projects that solve the same problem, one of which is bigger and better documented. Which are they going to use ? Maybe this is doom and gloom though. People are using Nitro and as doc improves and features get illustrated more and more will. As DHH implied in his enterprise posting, does Nitro really need to /compete/ with Rails ? Solving the same problem, can't the two frameworks learn from each other ? Maybe even share some code ? Segmentation is the biggest productivity killer in the OSS industry; while good for innovation it leaves a bad taste in my mouth. > Bill Kelly wrote: > >> From: "TRANS" >> >> >>> The way I see it, most of Nitro's downloads are for expirementation. >>> Very few people are actually using it for anything real. A lot of work >>> has gone into Nitro and it would be a real shame for it never to >>> take-off. There are some very clear reasons why it hasn't and unless >>> these are addressed in reltively short order, I fear, it never will. >>> >> Sure we don't just need our own PowerPoint slide that says >> F*** you? [1] >> >> > ... > > >> When the PragProg guys published a Rails book, I bought it >> instantly. However, after toying with Rails (I've done >> enough CGI-based websites from scratch, so I know the >> underlying issues) Rails for whatever reason just didn't >> "do it for me." Somehow I just didn't like the structure >> it imposed on the project, maybe; I was never sure why >> but it just didn't fit the way I liked to work. >> > > It's slightly ironic to encourage people to go write so-called > "opinionated" software, while encouraging the use of a tool that > discourages coloring outside the lines. > > At the risk of some snarkiness, I think Nitro's tag line could be, > "Nitro: Express your own opinion." > > > >> ... >> >> (One of the things I _loved_ about Nitro vs. Rails, is >> how Hello World in Nitro can be literally one .rb file and >> maybe five simple lines of code. And how that Hello World >> can be morphed steadily--as in the screencast--into a more >> complex project piece by piece incrementally. Contrast >> this with Rails, which generates a skeleton project of >> 44 files and 31 directories - just for Hello World. I'm >> sure the argument is that for a large project one will >> eventually _need_ all this structure; but I much prefer >> the way Nitro gives me the opportunity to build incrementally >> with just the structure I want.) >> > > Indeed, this is the big appeal of Og/Nitro for me. You begin at the > beginning and choose your path. While I hear one acronym, DRY, > mentioned quite a bit among Railers, I rarely see anyone talking about > another one: YAGNI. > > > From george.moschovitis at gmail.com Mon May 8 04:21:04 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 8 May 2006 11:21:04 +0300 Subject: [Nitro] cmdparse and highline In-Reply-To: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> References: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> Message-ID: I have removed the cmd parse dependency and highline. The new nitro launcher uses Facets Console::Command. Moreover I removed more glue stuff that is duplicated in Facets. Checkout the latest repo version from repo.nitroproject.org (dont forget to use --partial) -g. On 5/7/06, TRANS wrote: > So I was looking into switching Nitro's use of cmdparse over to > Facets' Console::Command class. From the looks of it, cmdparse is only > used by the scgi_ctrl script although there is a "todo" note in Gen > about using it in the future. In looking at it, I don't see any reason > this can't be done farily easily. Console::Command isn't quite as > advanced, butthat's part of it's ease of use too, and it's capable > enough to do the job. > > What got me though was the use of Highline --that's yet another > depnedency (isn't it?) which is not even listed in ProjectInfo > dependencies. And again scgi_ctrl is the only place it is being used. > So my guess then is that NO ONE (or perhaps ONE person) is using this > script! > > So my question is this. Is it worth it? We have two extra dependencies > here for one essentially unused script. > > When you think about web server backends, what's generally being used > out in the field? It's fcgi and apache. Along with webbrick, I would > expect these to be the focus of support --and be rock solid. For the > others, maybe they'd be better off as a separate plug-in package > --which might also make it easier for those who use them to be their > maintainers. > > It's a thought. In any case, what's the consensus on this one script > and it's two dependencies? > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon May 8 04:21:55 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 8 May 2006 11:21:55 +0300 Subject: [Nitro] High CPU usage In-Reply-To: <004501c6726e$5baf6c30$0200000a@agamemnon> References: <004501c6726e$5baf6c30$0200000a@agamemnon> Message-ID: This is due to the debug mode autoreloading. Run your production application with --live tto avoid the cpu usage. regards, George. On 5/8/06, Jon A. Lambert wrote: > What's the deal with the killer CPU usage? > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 256 jlambert 8 0 22272 44m 896 S 97.2 8.8 19:19.65 ruby > > Here's my app: > > require 'nitro' > include Nitro > class MyController < Controller > def index > "hello" > end > end > Server.address = '127.0.0.1' > Server.port = 8888 > Server.map = { > '/' => MyController > } > Nitro.run > > > $ ruby -v > ruby 1.8.4 (2005-12-24) [i386-cygwin] > > -- > J. Lambert > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From john at oxyliquit.de Mon May 8 04:25:16 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 08 May 2006 10:25:16 +0200 Subject: [Nitro] High CPU usage In-Reply-To: <004501c6726e$5baf6c30$0200000a@agamemnon> References: <004501c6726e$5baf6c30$0200000a@agamemnon> Message-ID: Hi, > What's the deal with the killer CPU usage? > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 256 jlambert 8 0 22272 44m 896 S 97.2 8.8 19:19.65 ruby Weird, I assume you're using webrick as server. Ever got similar problems with it using other programs? What platform are you using? Windows/Cygwin? You might want to change to a different server. May I suggest using Apache(2)/Fcgi ? This approach isn't without problems either, but running webrick on 100% CPU isn't the way to go... Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Mon May 8 04:31:21 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 8 May 2006 11:31:21 +0300 Subject: [Nitro] Working full time on Nitro Message-ID: Dear devs, a lot of members of the list recognize Nitro's potential. At the same time they are disssapointed that Nitro is not taking off like Rails. >From my point of view, a big problem is that I cannot justify working full time on Nitro especially on Docs. I have to work on features as needed for my own projects. Over the last month I am thinking about ways that I could work full time on Nitro. The problem is that I need some money to keep me going. I am not sure exactly how this could happen. I remember the documentation fund that was build in the initial stages of Rails. Perhaps some peopole that already use Nitro in production sites could make some small donation (totally optional) like Emanuel Piperakis did some time ago. I would like to hear some more ideas on this topic. best regards, George. PS: In the meantime, stay tuned for 0.31.0, this will be a really great release! Check out the change log in the repository mailing list to stay up to date. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon May 8 04:31:58 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 8 May 2006 11:31:58 +0300 Subject: [Nitro] High CPU usage In-Reply-To: References: <004501c6726e$5baf6c30$0200000a@agamemnon> Message-ID: Has nothing to do with Webrick, use --live as I suggested. or set Render.reload = false -g. On 5/8/06, Jonathan Buch wrote: > Hi, > > > What's the deal with the killer CPU usage? > > > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > 256 jlambert 8 0 22272 44m 896 S 97.2 8.8 19:19.65 ruby > > Weird, I assume you're using webrick as server. Ever got similar > problems with it using other programs? > > What platform are you using? Windows/Cygwin? > > You might want to change to a different server. May I suggest using > Apache(2)/Fcgi ? > This approach isn't without problems either, but running webrick on > 100% CPU isn't the way to go... > > Kashia > > -- > 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.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Mon May 8 07:35:18 2006 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 8 May 2006 13:35:18 +0200 Subject: [Nitro] Devlab problems and patches In-Reply-To: References: Message-ID: <3ff63f9b0605080435v16bb289g7b6cf42f7871b5bf@mail.gmail.com> Hi list, the devlab's SSH access problem has been solved. Sorry for the time ittook but I was at LinuxTag all the last week and it was pretty busy;-) Let me know if you encounter any other problems. --Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Mon May 8 07:37:37 2006 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 8 May 2006 13:37:37 +0200 Subject: [Nitro] Devlab problems and patches In-Reply-To: <3ff63f9b0605080435v16bb289g7b6cf42f7871b5bf@mail.gmail.com> References: <3ff63f9b0605080435v16bb289g7b6cf42f7871b5bf@mail.gmail.com> Message-ID: <3ff63f9b0605080437nfc66267q3b863c92ecbc6cac@mail.gmail.com> Ok just to give some feedback : I have added an OpenLDAP server so that we can further play with it(Og-LDAP ? :-p). While recompiling OpenSSH+pam to add OpenLDAPsupport, I had to interrupt it and then coulnd't login again. --Cheers, zimba http://zimba.oree.ch From surrender_it at yahoo.it Mon May 8 07:53:54 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 08 May 2006 13:53:54 +0200 Subject: [Nitro] [ANN] Nitro + Og 0.30.0: VCR mode, Og QBE, Feeds, Fixes In-Reply-To: References: <001401c67147$7864b380$0a01a8c0@mischabak> Message-ID: George Moschovitis ha scritto: > Hm, can you please email it to the newsgroup? I have some problems > with my net connection these days ;-) sure, just done From aglarond at gmail.com Mon May 8 07:54:46 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Mon, 8 May 2006 13:54:46 +0200 Subject: [Nitro] Devlab problems and patches In-Reply-To: <3ff63f9b0605080437nfc66267q3b863c92ecbc6cac@mail.gmail.com> References: <3ff63f9b0605080435v16bb289g7b6cf42f7871b5bf@mail.gmail.com> <3ff63f9b0605080437nfc66267q3b863c92ecbc6cac@mail.gmail.com> Message-ID: <55c107bf0605080454q385fec0du29364a37ff915612@mail.gmail.com> On 5/8/06, zimba-tm wrote: > I have added an OpenLDAP server so that we can further play with > it(Og-LDAP ? :-p). Is anyone working on this already? Making an LDAP adapter for Og is my primary reason for wanting to separate-out the SQL-specific code in Og. - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060508/a977d95e/attachment.html From jlsysinc at alltel.net Mon May 8 08:07:46 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Mon, 8 May 2006 08:07:46 -0400 Subject: [Nitro] High CPU usage References: <004501c6726e$5baf6c30$0200000a@agamemnon> Message-ID: <016c01c67298$05095150$0200000a@agamemnon> George Moschovitis wrote: > This is due to the debug mode autoreloading. Run your production > application with --live tto avoid the cpu usage. > $ ruby run.rb --live I, [2006-05-08T08:02:20.262331 #1308] INFO -- : Og uses the Sqlite store. /usr/lib/ruby/1.8/logger.rb:534:in `initialize': No such file or directory - log/app.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:534:in `create_logfile' from /usr/lib/ruby/1.8/logger.rb:529:in `open_logfile' from /usr/lib/ruby/1.8/logger.rb:496:in `initialize' from /usr/lib/ruby/1.8/logger.rb:272:in `initialize' from /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0-/lib/nitro/server/runner.rb:274:in `setup_live' from /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0-/lib/nitro/server/runner.rb:231:in `setup_mode' from /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0-/lib/nitro/server.rb:118:in `run' from /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0-/lib/nitro.rb:78:in `run' Now I created the 'log' directory and then I was fine. Is there anyway to keep leave this directed to stdout? What is being reloaded, or at attempted to reload, in debug mode? Thanks -- J Lambert From jlsysinc at alltel.net Mon May 8 08:20:52 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Mon, 8 May 2006 08:20:52 -0400 Subject: [Nitro] High CPU usage References: <004501c6726e$5baf6c30$0200000a@agamemnon> Message-ID: <017101c67299$d9a77170$0200000a@agamemnon> Jonathan Buch wrote: > You might want to change to a different server. May I suggest using > Apache(2)/Fcgi ? I have never been able to keep my Rails apps running more than a few days using the FastCGI library for Ruby. That is FastCGI processes die, and eventually it stops spawning new ones. AFAIC it's buggered worthless crap. I have been proxying from Apache to Webbrick servers with great success for over a year. That is zero crashes and acceptable performance. I am assuming I'll get similar results with Nitro. -- J Lambert From Walter at mwsewall.com Mon May 8 08:57:24 2006 From: Walter at mwsewall.com (Walter) Date: Mon, 8 May 2006 08:57:24 -0400 Subject: [Nitro] Nitro's Success Message-ID: <9DB53D616B4D5B47B8353ACBF155C6B737A491@mwsewall.com> > > The way I see it, most of Nitro's downloads are for expirementation. > Very few people are actually using it for anything real. A lot of work > has gone into Nitro and it would be a real shame for it never to > take-off. There are some very clear reasons why it hasn't and unless > these are addressed in reltively short order, I fear, it never will. > > T. > I can say that while I prefer the concept of Nitro, and I think many things are superior to Rails, I find it too difficult to figure out how to do things. For me the documentation is lacking, and it is just too much work to try and decipher everything. We have a fairly large internal app that will be rails based, even with all of its issues, because I feel I can bring in someone who is not that familiar with Rails, and EASILY provide them with documentation and examples to get them going. To try that with Nitro would be a HUGE amount of work. Just my opinion. Walt -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.5.5/333 - Release Date: 5/5/2006 From m.fellinger at gmail.com Mon May 8 09:13:13 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 8 May 2006 22:13:13 +0900 Subject: [Nitro] Devlab problems and patches In-Reply-To: <55c107bf0605080454q385fec0du29364a37ff915612@mail.gmail.com> References: <3ff63f9b0605080435v16bb289g7b6cf42f7871b5bf@mail.gmail.com> <3ff63f9b0605080437nfc66267q3b863c92ecbc6cac@mail.gmail.com> <55c107bf0605080454q385fec0du29364a37ff915612@mail.gmail.com> Message-ID: <9c00d3e00605080613n7f1ffcacq88add526e491ba25@mail.gmail.com> nobody is working on that so far (or at least nobody has made anyeffort to tell us about it - so just go on :)would really rock the Llamas ass... On 5/8/06, Dimitri Aivaliotis wrote:> On 5/8/06, zimba-tm wrote:>> > I have added an OpenLDAP server so that we can further play with> > it(Og-LDAP ? :-p).>>> Is anyone working on this already? Making an LDAP adapter for Og is my> primary reason for wanting to separate-out the SQL-specific code in Og.>> - Dimitri>> From zimba.tm at gmail.com Mon May 8 09:49:48 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Mon, 8 May 2006 15:49:48 +0200 Subject: [Nitro] [donation] 1000eur for doc and stuff Message-ID: Hi George, sorry for being late but as I promised, i've sent a payment of 1000 eur to your bank accout. First I wanted to include a screenshot but I think it may not be wise concerning security reasons :-p The payment schould be done on the 09.05.2006. Then let me know if you recieved the money. For that money, I mainly want you to work on the doc. Other enhancements are also welcome ;-) Btw, did you get my chocolate ? Cheers, zimbatm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060508/7d217b9b/attachment.html From humberaquino at gmail.com Mon May 8 10:18:16 2006 From: humberaquino at gmail.com (Humber Aquino) Date: Mon, 8 May 2006 10:18:16 -0400 Subject: [Nitro] High CPU usage In-Reply-To: <017101c67299$d9a77170$0200000a@agamemnon> References: <004501c6726e$5baf6c30$0200000a@agamemnon> <017101c67299$d9a77170$0200000a@agamemnon> Message-ID: <37fd0c50605080718y76dc3923n4889c4eac9192244@mail.gmail.com> On 5/8/06, Jon A. Lambert wrote: > > Jonathan Buch wrote: > > You might want to change to a different server. May I suggest using > > Apache(2)/Fcgi ? > > I have never been able to keep my Rails apps running more than a few days > using the FastCGI library for Ruby. That is FastCGI processes die, and > eventually it stops spawning new ones. AFAIC it's buggered worthless > crap. > I have been proxying from Apache to Webbrick servers with great success > for > over a year. That is zero crashes and acceptable performance. I hope this article helps in some way. I had some problem with nitro on apache and fastcgi. Some zombie processes where consuming all my memory. Here is a solution for rails with apache and lighttp http://duncandavidson.com/essay/2006/01/railsonapache I didn't tried yet but if it works for me i'll reply here Regards I am assuming I'll get similar results with Nitro. > > -- > J Lambert > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060508/82deba28/attachment.html From epiperak at gmail.com Mon May 8 10:20:07 2006 From: epiperak at gmail.com (Emmanouil Piperakis) Date: Mon, 8 May 2006 23:20:07 +0900 Subject: [Nitro] Working full time on Nitro In-Reply-To: References: Message-ID: Nitro in real life...! G. the problem is that the current users of Nitro are not in a position to donate yet along to fund the project. The solution is to help coorporate people use it, ... then need it... then fund it! I did my first little part on this step. As a part of my interviewing process I advertised Nitro/Og in 2 MAJOR investment banks... some IT and Strategy people showed a lot of interest and will probably start using it for personal reasons and only internally. It is not permitted to use it globaly unless approved by the companies. Anyway... It is wrong to compare Nitro with Rails... People who like Nitro, will still use it even if it has less downloads. Personally I do! Keep the faith people! E.P. On 5/8/06, George Moschovitis wrote: > > Dear devs, > > a lot of members of the list recognize Nitro's potential. At the same > time they are disssapointed that Nitro is not taking off like Rails. > >From my point of view, a big problem is that I cannot justify working > full time on Nitro especially on Docs. I have to work on features as > needed for my own projects. Over the last month I am thinking about > ways that I could work full time on Nitro. The problem is that I need > some money to keep me going. > > I am not sure exactly how this could happen. I remember the > documentation fund that was build in the initial stages of Rails. > Perhaps some peopole that already use Nitro in production sites could > make some small donation (totally optional) like Emanuel Piperakis did > some time ago. > > I would like to hear some more ideas on this topic. > > best regards, > George. > > PS: In the meantime, stay tuned for 0.31.0, this will be a really > great release! Check out the change log in the repository mailing list > to stay up to date. > > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Dr Emmanouil Piperakis Tokyo Institute of Technology Neural Networks & Brain Theory epiperak at gmail.com, epiperak at isl.titech.ac.jp -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060508/8df2b3db/attachment.html From epiperak at gmail.com Mon May 8 10:20:45 2006 From: epiperak at gmail.com (Emmanouil Piperakis) Date: Mon, 8 May 2006 23:20:45 +0900 Subject: [Nitro] Working full time on Nitro In-Reply-To: References: Message-ID: > > > Keep the faith people! > ... and Donate! (it rhymes...) E.P. -- Dr Emmanouil Piperakis Tokyo Institute of Technology Neural Networks & Brain Theory epiperak at gmail.com, epiperak at isl.titech.ac.jp -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060508/addebf59/attachment.html From transfire at gmail.com Mon May 8 11:53:41 2006 From: transfire at gmail.com (TRANS) Date: Mon, 8 May 2006 11:53:41 -0400 Subject: [Nitro] cmdparse and highline In-Reply-To: References: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> Message-ID: <4b6f054f0605080853u32fdfea5l8c7fb5c398437d3d@mail.gmail.com> On 5/8/06, George Moschovitis wrote: > I have removed the cmd parse dependency and highline. The new nitro > launcher uses Facets Console::Command. Moreover I removed more glue > stuff that is duplicated in Facets. Checkout the latest repo version > from repo.nitroproject.org (dont forget to use --partial) Nice! That was fast! George, what happend to the Army ;-) T. From transfire at gmail.com Mon May 8 17:37:04 2006 From: transfire at gmail.com (TRANS) Date: Mon, 8 May 2006 17:37:04 -0400 Subject: [Nitro] Nitro's Success In-Reply-To: <02ac01c67260$331d8f80$6442a8c0@musicbox> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> Message-ID: <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> On 5/8/06, Bill Kelly wrote: > From: "TRANS" > > > > The way I see it, most of Nitro's downloads are for expirementation. > > Very few people are actually using it for anything real. A lot of work > > has gone into Nitro and it would be a real shame for it never to > > take-off. There are some very clear reasons why it hasn't and unless > > these are addressed in reltively short order, I fear, it never will. > > Sure we don't just need our own PowerPoint slide that says > F*** you? [1] > > Seriously though, oxyliquit looks like it's headed in a nice > direction. The number one thing that stopped me dead in my > tracks when I wanted to try out Nitro a year or so ago was > the sense I got from nitrohq that Nitro was essentially > experimental and undocumented. > > When the PragProg guys published a Rails book, I bought it > instantly. However, after toying with Rails (I've done > enough CGI-based websites from scratch, so I know the > underlying issues) Rails for whatever reason just didn't > "do it for me." Somehow I just didn't like the structure > it imposed on the project, maybe; I was never sure why > but it just didn't fit the way I liked to work. > > So I came back to nitrohq about five months ago determined > to get past the apparent lack of documentation. Fortunately > George had posted a few screencasts, which were enough to > get me going - although they were already a little out of > date with regard to starting up Og, as I recall; some kind > soul helped me on IRC. > > (One of the things I _loved_ about Nitro vs. Rails, is > how Hello World in Nitro can be literally one .rb file and > maybe five simple lines of code. And how that Hello World > can be morphed steadily--as in the screencast--into a more > complex project piece by piece incrementally. Contrast > this with Rails, which generates a skeleton project of > 44 files and 31 directories - just for Hello World. I'm > sure the argument is that for a large project one will > eventually _need_ all this structure; but I much prefer > the way Nitro gives me the opportunity to build incrementally > with just the structure I want.) > > Anyway, besides lots of nice documentation and tutorials, > what are the other things you're referring to that need > to be addressed? First and foremost the lack of a website. Thankfully Oxyliquit is takig up some slack here --essentially in the way of what the wiki was doing. But nice website is imperative. Then of course, as everyne mentions, documentation --although understandably that can be difficult b/c Nitro is still a bit away from "1.0". But on the dev side too there are some things to be addressed. I think James put things well. Priority one really needs to be to make it bumb-dumb easy to create an initial working app. That's really where people are lost or sold on a tech. And that's not just a matter of documentation either. T. From james_b at neurogami.com Mon May 8 18:43:14 2006 From: james_b at neurogami.com (James Britt) Date: Mon, 08 May 2006 15:43:14 -0700 Subject: [Nitro] Nitro's Success In-Reply-To: <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> Message-ID: <445FC982.3040000@neurogami.com> TRANS wrote: > ... > Then of course, as everyne mentions, documentation --although > understandably that can be difficult b/c Nitro is still a bit away > from "1.0". [cart, horse].reverse! First, do the docs (as part of making things as easy and inviting as possible), then leverage the attention and influx of developers to get to 1.0. Otherwise, they'll be very few people around who know or care about 1.0. > > But on the dev side too there are some things to be addressed. I think > James put things well. Priority one really needs to be to make it > bumb-dumb easy to create an initial working app. That's really where > people are lost or sold on a tech. And that's not just a matter of > documentation either. Consider 'docs' as a catch-all word for "all that stuff that helps users do what they need to do with a minimum of puzzlement." That includes actual documentation, videos, code generators for common stuff, tutorials, updated FAQ, stable & attractive Web site, and lots of varied examples. -- James Britt "People want simple stories." From bryan.a.soto at gmail.com Mon May 8 19:32:38 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Mon, 8 May 2006 16:32:38 -0700 Subject: [Nitro] [donation] 1000eur for doc and stuff In-Reply-To: References: Message-ID: I'm not sure if this was meant to go to the list or not. Either way, wow! Jonas, thanks for this. George, give him his money's worth. :) On 5/8/06, Jonas Pfenniger wrote: > Hi George, > > sorry for being late but as I promised, i've sent a payment of 1000 eur to > your bank accout. First I wanted to include a screenshot but I think it may > not be wise concerning security reasons :-p The payment schould be done on > the 09.05.2006. Then let me know if you recieved the money. > > For that money, I mainly want you to work on the doc. Other enhancements are > also welcome ;-) > > Btw, did you get my chocolate ? > > Cheers, > zimbatm > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > From transfire at gmail.com Mon May 8 19:45:11 2006 From: transfire at gmail.com (TRANS) Date: Mon, 8 May 2006 19:45:11 -0400 Subject: [Nitro] Nitro's Success In-Reply-To: <445FC982.3040000@neurogami.com> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> <445FC982.3040000@neurogami.com> Message-ID: <4b6f054f0605081645p46270c5es57d6d4037e64069d@mail.gmail.com> On 5/8/06, James Britt wrote: > > [cart, horse].reverse! > > First, do the docs (as part of making things as easy and inviting as > possible), then leverage the attention and influx of developers to get > to 1.0. > > Otherwise, they'll be very few people around who know or care about 1.0. > Consider 'docs' as a catch-all word for "all that stuff that helps users > do what they need to do with a minimum of puzzlement." > > That includes actual documentation, videos, code generators for common > stuff, tutorials, updated FAQ, stable & attractive Web site, and lots of > varied examples. > Once again, well said James. T. From transfire at gmail.com Mon May 8 20:50:26 2006 From: transfire at gmail.com (TRANS) Date: Mon, 8 May 2006 20:50:26 -0400 Subject: [Nitro] Great idea baout Gen Message-ID: <4b6f054f0605081750y78362880mdfb20ec7eb798031@mail.gmail.com> Just had a great idea about Gen. Okay, first I still say it should be moved into Nitro proper since that's what it's all about: creating the scaffolding for Nitro projects. I don't see how it can be useful for anything else (?) But then...here's the great idea... instead of a console app make it a webapp itself (using Nitro with Webrick). That would be pretty sweet. T. From vikingtux at gmail.com Mon May 8 22:07:29 2006 From: vikingtux at gmail.com (Alexandre Gravem) Date: Mon, 8 May 2006 23:07:29 -0300 Subject: [Nitro] Nitro's Success In-Reply-To: <4b6f054f0605081645p46270c5es57d6d4037e64069d@mail.gmail.com> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> <445FC982.3040000@neurogami.com> <4b6f054f0605081645p46270c5es57d6d4037e64069d@mail.gmail.com> Message-ID: <40b05ebe0605081907m5fa2fd4p90d6122fd687f223@mail.gmail.com> One thing I see is a lot of blogging around rails. I don't know any Nitro developer blog. I think that blogs are really efficient ways to community to provide real life examples. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060508/8dfc8056/attachment.html From george.moschovitis at gmail.com Tue May 9 01:16:18 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:16:18 +0200 Subject: [Nitro] Great idea baout Gen In-Reply-To: <4b6f054f0605081750y78362880mdfb20ec7eb798031@mail.gmail.com> References: <4b6f054f0605081750y78362880mdfb20ec7eb798031@mail.gmail.com> Message-ID: I have another idea for Gen. As some of you may know I am also working on a proprietary high level framework on top of nitro called Plasma. I am thinking about making gen a medium level framework on top of nitro and move some stuff from nitro and plasma into gen. still thinking about it though... Can you post more details about your web app idea? regards, George. On 5/9/06, TRANS wrote: > Just had a great idea about Gen. > > Okay, first I still say it should be moved into Nitro proper since > that's what it's all about: creating the scaffolding for Nitro > projects. I don't see how it can be useful for anything else (?) > > But then...here's the great idea... instead of a console app make it > a webapp itself (using Nitro with Webrick). That would be pretty > sweet. > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 01:20:29 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:20:29 +0200 Subject: [Nitro] [donation] 1000eur for doc and stuff In-Reply-To: References: Message-ID: Wow ;-) This is extremeley generous. Please let me know what kind of docs you would like me to work on. Some kind of mini book, or tutorials? Or more screencasts? regards, George. On 5/8/06, Jonas Pfenniger wrote: > Hi George, > > sorry for being late but as I promised, i've sent a payment of 1000 eur to > your bank accout. First I wanted to include a screenshot but I think it may > not be wise concerning security reasons :-p The payment schould be done on > the 09.05.2006. Then let me know if you recieved the money. > > For that money, I mainly want you to work on the doc. Other enhancements are > also welcome ;-) > > Btw, did you get my chocolate ? > > Cheers, > zimbatm > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 01:25:08 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:25:08 +0200 Subject: [Nitro] cmdparse and highline In-Reply-To: <4b6f054f0605080853u32fdfea5l8c7fb5c398437d3d@mail.gmail.com> References: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> <4b6f054f0605080853u32fdfea5l8c7fb5c398437d3d@mail.gmail.com> Message-ID: On 5/8/06, TRANS wrote: > On 5/8/06, George Moschovitis wrote: > > I have removed the cmd parse dependency and highline. The new nitro > > launcher uses Facets Console::Command. Moreover I removed more glue > > stuff that is duplicated in Facets. Checkout the latest repo version > > from repo.nitroproject.org (dont forget to use --partial) > > Nice! That was fast! George, what happend to the Army ;-) I have my trusty thinkpad with me ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 01:29:07 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:29:07 +0200 Subject: [Nitro] Nitro's Success In-Reply-To: <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> Message-ID: > First and foremost the lack of a website. Thankfully Oxyliquit is > takig up some slack here --essentially in the way of what the wiki was > doing. But nice website is imperative. I am *actively* working on this! This will be a community like site, but I still need to fine-tune a few things. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 01:29:52 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:29:52 +0200 Subject: [Nitro] Working full time on Nitro In-Reply-To: References: Message-ID: > > Keep the faith people! > > ... and Donate! (it rhymes...) ;-) -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From transfire at gmail.com Tue May 9 01:31:37 2006 From: transfire at gmail.com (TRANS) Date: Tue, 9 May 2006 01:31:37 -0400 Subject: [Nitro] Great idea baout Gen In-Reply-To: References: <4b6f054f0605081750y78362880mdfb20ec7eb798031@mail.gmail.com> Message-ID: <4b6f054f0605082231u6e156b2fneb5aa65c3a6949@mail.gmail.com> On 5/9/06, George Moschovitis wrote: > I have another idea for Gen. As some of you may know I am also working > on a proprietary high level framework on top of nitro called Plasma. I > am thinking about making gen a medium level framework on top of nitro > and move some stuff from nitro and plasma into gen. Hmm... three frameworks? Are you thinking of refining Nitro to just the Controller aspect of the MVC then? Then Plasma would be Og+NitroTemplates+Nitro --which is essentally what Nitro is right now. Is that the idea? Such a system I think sounds very good. But If so I don;t see how does Gen as framework fits in? --that would seem to over complexify. > still thinking about it though... > > Can you post more details about your web app idea? Well the idea is that via a nice little webapp one could specify the parameters that otherwise are specified on the command line (and of course it would be easier to add many more detailed options via a web app) which would then generate an app "scaffolding". I suppose that could get as detailed as we wanted. To give some ideas. One could specify the overall type of app, the backend, the type of databases(s) (nsql, pgsql, etc), the classes/tables needed and the pages/forms needed and then Gen would wip-up empty "templates" for the whole shebang. T. From george.moschovitis at gmail.com Tue May 9 01:32:54 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:32:54 +0200 Subject: [Nitro] High CPU usage In-Reply-To: <017101c67299$d9a77170$0200000a@agamemnon> References: <004501c6726e$5baf6c30$0200000a@agamemnon> <017101c67299$d9a77170$0200000a@agamemnon> Message-ID: > I am assuming I'll get similar results with Nitro. I am using fcgi + nitro with no problems whatsoever.... -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 01:35:55 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:35:55 +0200 Subject: [Nitro] The plan Message-ID: Dear devs, here is my plan for the next month: 1. work on the nitroproject.org site to get it live ASAP. while doing this I will add some needed features. 2. work on documentation 3. release 0.31.0 4. refactor Og stores. The list items are in priority order. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 01:39:38 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:39:38 +0200 Subject: [Nitro] Great idea baout Gen In-Reply-To: <4b6f054f0605082231u6e156b2fneb5aa65c3a6949@mail.gmail.com> References: <4b6f054f0605081750y78362880mdfb20ec7eb798031@mail.gmail.com> <4b6f054f0605082231u6e156b2fneb5aa65c3a6949@mail.gmail.com> Message-ID: > Hmm... three frameworks? Are you thinking of refining Nitro to just > the Controller aspect of the MVC then? Then Plasma would be > Og+NitroTemplates+Nitro --which is essentally what Nitro is right now. First of all Plasma is not for public release. Plasma is a collection of parts (users, fora, content, wiki, etc), libraries, mixins (rateable, ownable, ownable/simple etc etc). I am thinking about making Gen a mini version of Plasma (I will move the admin part from nitro and perhaps the users part from Plasma, plus some more high level stuff from Nitro). I am still thinking about this though... Ie Gen will be a public, restricted version of Plasma. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 01:43:44 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 07:43:44 +0200 Subject: [Nitro] Og properties. Message-ID: Dear devs, I am thinking of letting Og work like this class Article attr_accessor :title, String attr_accessor :body, String end instead of property. This will make Og managed objects almost 100% standard Ruby objects, plus the problem with the GTK libraries will be solved. Moreover, most of this functionality is implemented in facets. Of corse the property alias will stay for backwards compatibility. Any opinions on this? regards, George PS: attr_accessor :title, String, :unique => true is equivalent to attr_accessor :title ann :title, :class => String, :unique => true this means you can do: class Article attr_accessor :title end and somewhere else class Article ann :title, String, :unique => true end regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From transfire at gmail.com Tue May 9 01:56:51 2006 From: transfire at gmail.com (TRANS) Date: Tue, 9 May 2006 01:56:51 -0400 Subject: [Nitro] The plan In-Reply-To: References: Message-ID: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> On 5/9/06, George Moschovitis wrote: > Dear devs, > > here is my plan for the next month: > > 1. work on the nitroproject.org site to get it live ASAP. while doing > this I will add some needed features. > > 2. work on documentation 2.5 Finish finishing glue. > 3. release 0.31.0 > > 4. refactor Og stores. > > > The list items are in priority order. > > regards, > George. > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > 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 Tue May 9 02:01:07 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 08:01:07 +0200 Subject: [Nitro] The plan In-Reply-To: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> References: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> Message-ID: > > > > 2. work on documentation > > 2.5 Finish finishing glue. Ok ;-) -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 02:03:15 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 08:03:15 +0200 Subject: [Nitro] Bounties Message-ID: Dear devs, here are two bounties for you brae souls: - convert the rails upload_progress plugin to Nitro. - add support for extracting attachments in the IncomingMailer of Glue. If anyone has some free time and feels like it, by all means go for it ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From bryan.a.soto at gmail.com Tue May 9 02:08:26 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Mon, 8 May 2006 23:08:26 -0700 Subject: [Nitro] The plan In-Reply-To: References: Message-ID: On 5/8/06, George Moschovitis wrote: > Dear devs, > > here is my plan for the next month: > > 1. work on the nitroproject.org site to get it live ASAP. while doing > this I will add some needed features. > That would be good. > 2. work on documentation > Per zimba. :) > 3. release 0.31.0 > Did you have any features or goals in mind? > 4. refactor Og stores. > What type of refactoring did you have in mind? > > The list items are in priority order. > From m.fellinger at gmail.com Tue May 9 02:10:57 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 9 May 2006 15:10:57 +0900 Subject: [Nitro] The plan In-Reply-To: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> References: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> Message-ID: <200605091510.57895.m.fellinger@gmail.com> On Tuesday 09 May 2006 14:56, TRANS wrote: > On 5/9/06, George Moschovitis wrote: > > Dear devs, > > > > here is my plan for the next month: > > > > 1. work on the nitroproject.org site to get it live ASAP. while doing > > this I will add some needed features. > > > > 2. work on documentation > > 2.5 Finish finishing glue. > > > 3. release 0.31.0 > > > > 4. refactor Og stores. 5. Merge Nitro::Localization and Babel *prettyplease* > > > > > > The list items are in priority order. > > > > regards, > > George. > > > > > > -- > > http://www.gmosx.com > > http://www.navel.gr > > http://www.nitrohq.com > > > > _______________________________________________ > > 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 -- Rule of the Great: When people you greatly admire appear to be thinking deep thoughts, they probably are thinking about lunch. From vseguip at gmail.com Tue May 9 02:25:38 2006 From: vseguip at gmail.com (vseguip at gmail.com) Date: Tue, 9 May 2006 08:25:38 +0200 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: I say do it ;-)! Just a question: will there be a way to mark attributes as non persistent? I think it's wiser to mark attributes by default as non persistent and make persistence optional, something like: class Article attr_accessor :title, String, persistent=>true attr_accessor :body, String, persistent=>true attr_accessor :calculated, Integer end Here calculated will not be persisted whereas title and body will. Cheers, V.Segu? On 5/9/06, George Moschovitis wrote: > Dear devs, > > I am thinking of letting Og work like this > > class Article > attr_accessor :title, String > attr_accessor :body, String > end > > instead of property. This will make Og managed objects almost 100% > standard Ruby objects, plus the problem with the GTK libraries will be > solved. Moreover, most of this functionality is implemented in facets. > Of corse the property alias will stay for backwards compatibility. > > Any opinions on this? > From zimba.tm at gmail.com Tue May 9 03:09:41 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 9 May 2006 09:09:41 +0200 Subject: [Nitro] Nitro's Success In-Reply-To: References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> Message-ID: Nitro's success could also be the doom of it. The rails ML has a so much high volume that I don't follow it anymore. It's also lost the nice ruby feeling with all those PHP guys coming along. From zimba.tm at gmail.com Tue May 9 03:42:49 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 9 May 2006 09:42:49 +0200 Subject: [Nitro] [donation] 1000eur for doc and stuff In-Reply-To: References: Message-ID: Ok, here is my doc wishlist : * More RDoc everywhere. This is really the most important part. Otherwise coding gets much harder. * More details to you TODO's and FIXME's * A zoom-in like doc in Wiki / HTML format. The doc would start with a general picture (eg. Model, View, Controller). Then each of them is linked to a more in details explanation. (In the view: templates, template_root, compiler pipeline), etc.. * Use cases / HOWTO's : eg. HOWTO code an action, HOWTO code a view, HOWTO organize your project I also have other unsorted wishes : * Cleanup the code * Extract nitro's templating system in a new project. Provide an interface that would allow to use any other templating system in the same way servers have adapters. * Rewrite Glue::Configuration to use annotations * Enhance the Part system : - A part is a module - It has it's own public_root which gets either published automatically (with R using the right paths) or forwarded (with the sendfile package like in Camping) - A part has it's own configuration which gets loaded in standard path resolution : $DATADIR/#{module_name}:/etc/#{module_name}/ config.yaml:$HOME/.#{module_name}.yaml - Part are instantiable. Files gets first looked-up in the instance path, then in the project's folder. eg. instanciate flare / here would just create a run.rb in /here. You could then change a template by copying over and change it The goal is that Spark or Flare or any other app could get integrated in another application This list is not a todo but some directions I would be happy that Nitro to takes. Le 9 mai 06 ? 07:20, George Moschovitis a ?crit : > Wow ;-) This is extremeley generous. Please let me know what kind of > docs you would like me to work on. Some kind of mini book, or > tutorials? Or more screencasts? > > regards, > George. From george.moschovitis at gmail.com Tue May 9 04:32:39 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 10:32:39 +0200 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: no atributes with a class annotation will be peristant by default. You can avoid persistant by setting a virtual/nopersist/volatile) annotation to true (i am not sure about the name). -g. On 5/9/06, vseguip at gmail.com wrote: > I say do it ;-)! Just a question: will there be a way to mark > attributes as non persistent? I think it's wiser to mark attributes by > default as non persistent and make persistence optional, something > like: > > class Article > attr_accessor :title, String, persistent=>true > attr_accessor :body, String, persistent=>true > attr_accessor :calculated, Integer > end > > Here calculated will not be persisted whereas title and body will. > > Cheers, > V.Segu? > > > On 5/9/06, George Moschovitis wrote: > > Dear devs, > > > > I am thinking of letting Og work like this > > > > class Article > > attr_accessor :title, String > > attr_accessor :body, String > > end > > > > instead of property. This will make Og managed objects almost 100% > > standard Ruby objects, plus the problem with the GTK libraries will be > > solved. Moreover, most of this functionality is implemented in facets. > > Of corse the property alias will stay for backwards compatibility. > > > > Any opinions on this? > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 04:35:14 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 10:35:14 +0200 Subject: [Nitro] The plan In-Reply-To: References: Message-ID: > > 4. refactor Og stores. > > > > What type of refactoring did you have in mind? > the following dir structure: store/sql store/sql/join store/sql/evolution store/memory store/file store/xml adapter/mysql adapter/psql adapter/sqlite3 adapter/kirby and clean up the store code a lot ;-) hope that makes sense... regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue May 9 04:41:19 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 10:41:19 +0200 Subject: [Nitro] [donation] 1000eur for doc and stuff In-Reply-To: References: Message-ID: > * More RDoc everywhere. This is really the most important part. > Otherwise coding gets much harder. Ok will start working on this. > * More details to you TODO's and FIXME's Will do. > * A zoom-in like doc in Wiki / HTML format. The doc would start with > a general picture (eg. Model, View, Controller). Then each of them is > linked to a more in details explanation. (In the view: templates, > template_root, compiler pipeline), etc.. This will have to wait until the website is live. > * Cleanup the code Already doing this almost daily ;-) > * Extract nitro's templating system in a new project. Provide an > interface that would allow to use any other templating system in the > same way servers have adapters. This is already possible. Nitro's templating system is just a compiler. You can provide an alternative compiler for other templating systems. Perhaps some more refactoring will help though. > * Rewrite Glue::Configuration to use annotations why is this useful? After the latest Configuration rewrite i am really happy with it. > * Enhance the Part system : > - A part is a module > - It has it's own public_root which gets either published > automatically (with R using the right paths) or forwarded (with the > sendfile package like in Camping) > - A part has it's own configuration which gets loaded in standard > path resolution : $DATADIR/#{module_name}:/etc/#{module_name}/ > config.yaml:$HOME/.#{module_name}.yaml > - Part are instantiable. Files gets first looked-up in the > instance path, then in the project's folder. eg. instanciate flare / > here would just create a run.rb in /here. You could then change a > template by copying over and change it > > The goal is that Spark or Flare or any other app could get integrated > in another application what you describe more or less works ;-) This is how plasma works ;-) I just need to document this a bit more ;-) > This list is not a todo but some directions I would be happy that > Nitro to takes. Ok, will keep this in mind and try for the best. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From aglarond at gmail.com Tue May 9 04:47:25 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Tue, 9 May 2006 10:47:25 +0200 Subject: [Nitro] The plan In-Reply-To: References: Message-ID: <55c107bf0605090147u1833b099hc5936cbb6ee25f3a@mail.gmail.com> Hi George, On 5/9/06, George Moschovitis wrote: > > > > 4. refactor Og stores. > > > > > > > What type of refactoring did you have in mind? > > How would an LDAP store fit in? the following dir structure: store/ldap ? or adapter/ldap ? I'm leaning more towards the first, because LDAP is a beast of its own... - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060509/f1eae51b/attachment.html From george.moschovitis at gmail.com Tue May 9 04:51:22 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 9 May 2006 10:51:22 +0200 Subject: [Nitro] The plan In-Reply-To: <55c107bf0605090147u1833b099hc5936cbb6ee25f3a@mail.gmail.com> References: <55c107bf0605090147u1833b099hc5936cbb6ee25f3a@mail.gmail.com> Message-ID: > store/ldap ? > adapter/ldap ? both... -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From aglarond at gmail.com Tue May 9 04:53:02 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Tue, 9 May 2006 10:53:02 +0200 Subject: [Nitro] The plan In-Reply-To: References: <55c107bf0605090147u1833b099hc5936cbb6ee25f3a@mail.gmail.com> Message-ID: <55c107bf0605090153l2a60064cgb40625a144b8e2f4@mail.gmail.com> On 5/9/06, George Moschovitis wrote: > > > store/ldap ? > > adapter/ldap ? > > both... > ok... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060509/b6f8a7bb/attachment.html From zimba.tm at gmail.com Tue May 9 06:09:02 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 9 May 2006 12:09:02 +0200 Subject: [Nitro] [donation] 1000eur for doc and stuff In-Reply-To: References: Message-ID: <91415ECD-297D-4549-97AE-7FE34FC97195@gmail.com> Le 9 mai 06 ? 10:41, George Moschovitis a ?crit : > >> * Rewrite Glue::Configuration to use annotations > > why is this useful? After the latest Configuration rewrite i am really > happy with it. Ok forge this > >> * Enhance the Part system : >> - A part is a module >> - It has it's own public_root which gets either published >> automatically (with R using the right paths) or forwarded (with the >> sendfile package like in Camping) >> - A part has it's own configuration which gets loaded in standard >> path resolution : $DATADIR/#{module_name}:/etc/#{module_name}/ >> config.yaml:$HOME/.#{module_name}.yaml >> - Part are instantiable. Files gets first looked-up in the >> instance path, then in the project's folder. eg. instanciate flare / >> here would just create a run.rb in /here. You could then change a >> template by copying over and change it >> >> The goal is that Spark or Flare or any other app could get integrated >> in another application > > what you describe more or less works ;-) This is how plasma works ;-) > I just need to document this a bit more ;-) Can you describe a little bit on the list how you use the part ? How is your projects layout and how do you integrate them, ... I'm pretty interested in this Thanks in advance, Jonas Pfenniger From surrender_it at yahoo.it Tue May 9 08:37:05 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Tue, 09 May 2006 14:37:05 +0200 Subject: [Nitro] The plan In-Reply-To: References: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> Message-ID: George Moschovitis ha scritto: >>>2. work on documentation >> >>2.5 Finish finishing glue. wasn't this supposed to be "removing glue" ? From transfire at gmail.com Tue May 9 08:57:13 2006 From: transfire at gmail.com (TRANS) Date: Tue, 9 May 2006 08:57:13 -0400 Subject: [Nitro] Nitro's Success In-Reply-To: References: <4b6f054f0605072102t7cd35e23iaf4dbe96089e6917@mail.gmail.com> <02ac01c67260$331d8f80$6442a8c0@musicbox> <4b6f054f0605081437s144f51d7jc62153301c915ac9@mail.gmail.com> Message-ID: <4b6f054f0605090557m728871e0m29a9b8814ea35301@mail.gmail.com> On 5/9/06, Jonas Pfenniger wrote: > Nitro's success could also be the doom of it. The rails ML has a so > much high volume that I don't follow it anymore. It's also lost the > nice ruby feeling with all those PHP guys coming along. Good point. But Nitro's success might bring balance to the force ;-) From transfire at gmail.com Tue May 9 09:00:03 2006 From: transfire at gmail.com (TRANS) Date: Tue, 9 May 2006 09:00:03 -0400 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: <4b6f054f0605090600p4d1cc7adic6713f825412ebba@mail.gmail.com> On 5/9/06, George Moschovitis wrote: > no atributes with a class annotation will be peristant by default. You > can avoid persistant by setting a virtual/nopersist/volatile) > annotation to true (i am not sure about the name). Hmm... What about w/o a class attr_accessor :x Will x be persisted then? T. From transfire at gmail.com Tue May 9 09:13:30 2006 From: transfire at gmail.com (TRANS) Date: Tue, 9 May 2006 09:13:30 -0400 Subject: [Nitro] The plan In-Reply-To: References: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> Message-ID: <4b6f054f0605090613v4b5af90n314e61db63377830@mail.gmail.com> On 5/9/06, gabriele renzi wrote: > George Moschovitis ha scritto: > >>>2. work on documentation > >> > >>2.5 Finish finishing glue. > > wasn't this supposed to be "removing glue" ? yes, I was just being "funny tonge" :p T. From vagabond at cataclysm-software.net Tue May 9 09:59:28 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Tue, 09 May 2006 09:59:28 -0400 Subject: [Nitro] Subelements - are they actually useful as-is? Message-ID: <4460A040.1050105@cataclysm-software.net> Hey all, I've been playing with sub elements this morning, and I'm coming to the conclusion that they're not terribly useful in their current state. Going by the tip on Oxyliquit: http://oxyliquit.de/question/10 which is the interpreted wisdom of George himself. I was under the impression that you could use sub elements to insert xhtml into other places in the Element, like for example a sidebar or anything outside the #{content} area of your template. After some fiddling I've come up with the following observations: If your sub element defines a render method, or is created from a XHTML file, it will render itself at the site of the sub element tag and render the contents of the tag at the position of the #{content :whatever} in the parent element. So for ecample, if you had this in your template hello world it would render the Sidebar sub element at that position in the template and the 'hello world' at the position of the #{content :sidebar} in the parent element. Does this make sense to anyone? If the sub element *doesn't* have a render method (I guess its gotta inherit one..?) but there's contents in the tag it will render the tag contents at BOTH locations, so hello world will stick 'hello world' at the tag location AND at the #{content :sidebar} location. Does this behavior make sense? Has anyone else ever managed to use sub elements in a useful fashion? Can we make this feature a bit more predictable and useful? I can fake it using a sub element that does a blank render so it will place the contents in the correct place, but its kinda stupid to need to do it like that. Andrew From james_b at neurogami.com Tue May 9 10:53:02 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 09 May 2006 07:53:02 -0700 Subject: [Nitro] The plan In-Reply-To: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> References: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> Message-ID: <4460ACCE.8060603@neurogami.com> TRANS wrote: > On 5/9/06, George Moschovitis wrote: > >>Dear devs, >> >>here is my plan for the next month: >> >>1. work on the nitroproject.org site to get it live ASAP. while doing >>this I will add some needed features. >> >>2. work on documentation > > > 2.5 Finish finishing glue. 2.6 Finish documentation and examples to draw a larger user/contributer base > > >>3. release 0.31.0 >> >>4. refactor Og stores. >> -- James Britt "Judge a man by his questions, rather than his answers." - Voltaire From transfire at gmail.com Tue May 9 12:21:01 2006 From: transfire at gmail.com (TRANS) Date: Tue, 9 May 2006 12:21:01 -0400 Subject: [Nitro] cmdparse and highline In-Reply-To: References: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> <4b6f054f0605080853u32fdfea5l8c7fb5c398437d3d@mail.gmail.com> Message-ID: <4b6f054f0605090921m3a54638clc798ef4ba3cb246b@mail.gmail.com> hmmm... whcih repo should I be pulling down? I did darcs get --partial http://devlab.oree.ch/darcs/nitrohq But I don't see the changes you're talking about. Thanks, T. From surrender_it at yahoo.it Tue May 9 12:43:51 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Tue, 09 May 2006 18:43:51 +0200 Subject: [Nitro] The plan In-Reply-To: <4b6f054f0605090613v4b5af90n314e61db63377830@mail.gmail.com> References: <4b6f054f0605082256u4a74d3edhab36febc6c2d62da@mail.gmail.com> <4b6f054f0605090613v4b5af90n314e61db63377830@mail.gmail.com> Message-ID: TRANS ha scritto: > yes, I was just being "funny tonge" :p ouch, two missed jokes in a week in only one mailing list.. From james_b at neurogami.com Tue May 9 20:45:14 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 09 May 2006 17:45:14 -0700 Subject: [Nitro] Test-drive development in Nitro Message-ID: <4461379A.7010108@neurogami.com> I want to build an app using TDD, and I'm having a hard time getting started. I downloaded the Nitro 0.30.0 examples; one app out of the lot , the blog example, has some test code. I though I could work off that code to get my own stuff going, but right off the bat I have a problem. The test code has this line: require 'nitro/testing' But there seems to be no such Nitro lib. Is this supposed to be 'nitro/test' ? Any advice on writing unit tests for Nitro apps? Thanks, -- James Britt "I often work by avoidance." - Brian Eno From riku.raisanen at walkingwoods.com Wed May 10 01:29:54 2006 From: riku.raisanen at walkingwoods.com (Riku =?iso-8859-1?q?R=E4is=E4nen?=) Date: Wed, 10 May 2006 08:29:54 +0300 Subject: [Nitro] Og refactoring In-Reply-To: References: Message-ID: <200605100829.54601.riku.raisanen@walkingwoods.com> #note, read 'stuff that matters' at the bottom, this message grew a bit too #long. :) ok George, now that you're refactoring Og, how about giving some thought about Og and it's usage in general. First of all, I don't think Og objects should force persistance for relations to work. I'm pretty sure that the structure can be archieved with ruby magic forgetting all the oid stuff. Currently, if I'm to use relations, I need to: 1. Class.create or Class.new.save in order to have an oid generated, allowing relations. at this point, the row is inserted to the store already. 2. define the relations both ways AND save the objects for it to take effect. (3. ..and what if I wanted to cancel the object creation at this point?) examples fiffie = Dog.new jack = Human.new fiffie.owner = jack p fiffie.owner # => nil #Ah! We need to save the doggies and humans and make them persistant in order #to use relations! fiffie.save jack.save fiffie.owner = jack p fiffie.owner #=> #Better already, but.. p jack.pet #=> nil #the other side of the relation is nil #Shother way with .create dog = Dog.create why = Human.create #.. but create saves the objects to the store, which shouldn't be #necessary/forced dog.owner = why p why.pet # => nil #relation is still set only to one direction why.pet = dog p dog == why.pet && why == dog.owner #=> true #stuff only works if you set the relation both ways.. Now, forced persistence sucks. IMHO Og objects should work with relations(which is the most inportant aspect of Og) without forcing persistant data. Has anyone of you seen OpenStruct? ( http://ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html ) I'd like if Og could be used this way, especially because of has so much inbuilt methods and goodness in it. from irc [07:20] IMHO Og objects should be related WITHIN ruby, not only in the DB side and with oids. [07:20] they should work as non-persisting objects just as if they're .saved [07:21] only only on .save, should the oids take place and put to the store .. [07:26] * manveru just has a vision [07:27] if the database could evolve alive... [07:27] Og -> OgStruct [07:27] you could just use the entities out of nothing... assigning attributes to them [07:27] Rip of the store side and give it as an option. [07:28] off* [07:28] and when you tell it .save - it evolves the database to fit the new object [07:28] if evolve flag is set. [07:28] :) [07:28] that's how it should be. [07:28] we have to elaborate that a bit more [07:29] and automatic type-matching [07:29] so it detects if you give it a hash/array/integer/string/float [07:31] it would make the whole procedure for store-adapters a lot more dynamic I liked the line Of -> OgStruct. Like I mentioned, Og has many built-in goodnes that I would *love* to use - without it forcing me to save the data first. There might be a way around this using the memory store adapter, but it's in /alpha and I haven't tried it out. One could also easily write a OpenStruct.to_og(klass) method, but would have to work without the power of og methods. Now before this entry grows into a such magnitude of BS that no-one will ever read, let's cut it out here. I just wanted to mention this since George said he'll be refactoring Og stuff that matters: 1. Allow to use the power of Og scripting without persistence -- give the stores as an option? 2. set the relations both ways (I think there's reason for belongs_to and refers_to) 3. Maybe we could take the Og OOB-experience to a whole new level with automatic, live evolving(OpenStruct way)? of course there'd need to be settings/flags for fine grained control. Input would be welcome. -Riku R?is?nen From george.moschovitis at gmail.com Wed May 10 02:44:26 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 08:44:26 +0200 Subject: [Nitro] cmdparse and highline In-Reply-To: <4b6f054f0605090921m3a54638clc798ef4ba3cb246b@mail.gmail.com> References: <4b6f054f0605070833w54aa5ff2g15a6493162ebf7b5@mail.gmail.com> <4b6f054f0605080853u32fdfea5l8c7fb5c398437d3d@mail.gmail.com> <4b6f054f0605090921m3a54638clc798ef4ba3cb246b@mail.gmail.com> Message-ID: try: darcs get --partial repo.nitroproject.org devlab used to have a problem. If it is ok now, I am sure Bryan will port my changes there. George. On 5/9/06, TRANS wrote: > hmmm... whcih repo should I be pulling down? I did > > darcs get --partial http://devlab.oree.ch/darcs/nitrohq > > But I don't see the changes you're talking about. > > Thanks, > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Wed May 10 02:46:47 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 08:46:47 +0200 Subject: [Nitro] [donation] 1000eur for doc and stuff In-Reply-To: <91415ECD-297D-4549-97AE-7FE34FC97195@gmail.com> References: <91415ECD-297D-4549-97AE-7FE34FC97195@gmail.com> Message-ID: Ok, will do, gimme 1-2 days time... -g. On 5/9/06, Jonas Pfenniger wrote: > > Le 9 mai 06 ? 10:41, George Moschovitis a ?crit : > > > >> * Rewrite Glue::Configuration to use annotations > > > > why is this useful? After the latest Configuration rewrite i am really > > happy with it. > > Ok forge this > > > > >> * Enhance the Part system : > >> - A part is a module > >> - It has it's own public_root which gets either published > >> automatically (with R using the right paths) or forwarded (with the > >> sendfile package like in Camping) > >> - A part has it's own configuration which gets loaded in standard > >> path resolution : $DATADIR/#{module_name}:/etc/#{module_name}/ > >> config.yaml:$HOME/.#{module_name}.yaml > >> - Part are instantiable. Files gets first looked-up in the > >> instance path, then in the project's folder. eg. instanciate flare / > >> here would just create a run.rb in /here. You could then change a > >> template by copying over and change it > >> > >> The goal is that Spark or Flare or any other app could get integrated > >> in another application > > > > what you describe more or less works ;-) This is how plasma works ;-) > > I just need to document this a bit more ;-) > > Can you describe a little bit on the list how you use the part ? How > is your projects layout and how do you integrate them, ... I'm pretty > interested in this > > Thanks in advance, > Jonas Pfenniger > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Wed May 10 02:52:17 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 08:52:17 +0200 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <4461379A.7010108@neurogami.com> References: <4461379A.7010108@neurogami.com> Message-ID: Check out the Spak source code. there is a test directory. Btw, the TDD support of Nitro is almost the same as Rails so I dont think you will have many problems to get up to speed. If you need more help let me know. regards, George. On 5/10/06, James Britt wrote: > I want to build an app using TDD, and I'm having a hard time getting > started. I downloaded the Nitro 0.30.0 examples; one app out of the lot > , the blog example, has some test code. > > I though I could work off that code to get my own stuff going, but right > off the bat I have a problem. The test code has this line: > > require 'nitro/testing' > > But there seems to be no such Nitro lib. Is this supposed to be > 'nitro/test' ? > > Any advice on writing unit tests for Nitro apps? > > > > Thanks, > > > -- > James Britt > > "I often work by avoidance." > - Brian Eno > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Wed May 10 03:07:33 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 09:07:33 +0200 Subject: [Nitro] Subelements - are they actually useful as-is? In-Reply-To: <4460A040.1050105@cataclysm-software.net> References: <4460A040.1050105@cataclysm-software.net> Message-ID: At the moment I am using a blank render method. I was thinking about making render blank by default. But anyway, now that you are mentioning it I will try to improve how this works. Thanks for reminding. But I *strongly* believe that elements/subelements are extremely useful even as they are now. regards, George. On 5/9/06, Andrew Thompson wrote: > Hey all, > > I've been playing with sub elements this morning, and I'm coming to the > conclusion that they're not terribly useful in their current state. > Going by the tip on Oxyliquit: http://oxyliquit.de/question/10 which is > the interpreted wisdom of George himself. I was under the impression > that you could use sub elements to insert xhtml into other places in the > Element, like for example a sidebar or anything outside the #{content} > area of your template. After some fiddling I've come up with the > following observations: > > If your sub element defines a render method, or is created from a XHTML > file, it will render itself at the site of the sub element tag and > render the contents of the tag at the position of the #{content > :whatever} in the parent element. So for ecample, if you had this in > your template hello world it would render the Sidebar > sub element at that position in the template and the 'hello world' at > the position of the #{content :sidebar} in the parent element. Does this > make sense to anyone? > > If the sub element *doesn't* have a render method (I guess its gotta > inherit one..?) but there's contents in the tag it will render the tag > contents at BOTH locations, so hello world will stick > 'hello world' at the tag location AND at the #{content :sidebar} location. > > Does this behavior make sense? Has anyone else ever managed to use sub > elements in a useful fashion? Can we make this feature a bit more > predictable and useful? I can fake it using a sub element that does a > blank render so it will place the contents in the correct place, but its > kinda stupid to need to do it like that. > > Andrew > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Wed May 10 03:17:21 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 09:17:21 +0200 Subject: [Nitro] Og properties. In-Reply-To: <4b6f054f0605090600p4d1cc7adic6713f825412ebba@mail.gmail.com> References: <4b6f054f0605090600p4d1cc7adic6713f825412ebba@mail.gmail.com> Message-ID: > attr_accessor :x > > Will x be persisted then? no! you could do something like this: attr_accessor :x, :persistant => true attr_accessor :x, String, :persistant => false to override default behaviour. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From surrender_it at yahoo.it Wed May 10 05:15:58 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 10 May 2006 11:15:58 +0200 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: George Moschovitis ha scritto: > instead of property. This will make Og managed objects almost 100% > standard Ruby objects, plus the problem with the GTK libraries will be > solved. Moreover, most of this functionality is implemented in facets. > Of corse the property alias will stay for backwards compatibility. > > Any opinions on this? I have the feeling the proposed change from V. Segu? was better (use #og_property and avoid aliasing it to #property if a global flag is set). This is still perfectly backwards compatible, avoids name clashes and /does not/ mix ruby objects and Og objects, which I think is a good thing since they have some funamental differences that I think should be made clear and not hidden. Oh, and I just prefer #property as a name, even if imvho the best name for it would be #has or #field: class Foo is Timestamped has :name end From george.moschovitis at gmail.com Wed May 10 05:17:31 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 11:17:31 +0200 Subject: [Nitro] Og refactoring In-Reply-To: <200605100829.54601.riku.raisanen@walkingwoods.com> References: <200605100829.54601.riku.raisanen@walkingwoods.com> Message-ID: Thanks for the ideas, will keep them in mind! -g. On 5/10/06, Riku R?is?nen wrote: > #note, read 'stuff that matters' at the bottom, this message grew a bit too > #long. :) > > ok George, now that you're refactoring Og, how about giving some thought about > Og and it's usage in general. > > First of all, I don't think Og objects should force persistance for relations > to work. I'm pretty sure that the structure can be archieved with ruby magic > forgetting all the oid stuff. > > Currently, if I'm to use relations, I need to: > > 1. Class.create or Class.new.save in order to have an oid generated, allowing > relations. at this point, the row is inserted to the store already. > 2. define the relations both ways AND save the objects for it to take effect. > (3. ..and what if I wanted to cancel the object creation at this point?) > > examples > > fiffie = Dog.new > jack = Human.new > > fiffie.owner = jack > p fiffie.owner # => nil > #Ah! We need to save the doggies and humans and make them persistant in order > #to use relations! > fiffie.save > jack.save > > fiffie.owner = jack > p fiffie.owner #=> > #Better already, but.. > p jack.pet #=> nil > #the other side of the relation is nil > > #Shother way with .create > dog = Dog.create > why = Human.create > #.. but create saves the objects to the store, which shouldn't be > #necessary/forced > dog.owner = why > p why.pet # => nil > #relation is still set only to one direction > why.pet = dog > p dog == why.pet && why == dog.owner #=> true > #stuff only works if you set the relation both ways.. > > Now, forced persistence sucks. IMHO Og objects should work with > relations(which is the most inportant aspect of Og) without forcing > persistant data. Has anyone of you seen OpenStruct? ( > http://ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html ) I'd > like if Og could be used this way, especially because of has so much inbuilt > methods and goodness in it. > > from irc > > [07:20] IMHO Og objects should be related WITHIN ruby, not only in > the DB side and with oids. > [07:20] they should work as non-persisting objects just as if > they're .saved > [07:21] only only on .save, should the oids take place and put to the > store > > .. > > [07:26] * manveru just has a vision > [07:27] if the database could evolve alive... > [07:27] Og -> OgStruct > [07:27] you could just use the entities out of nothing... assigning > attributes to them > [07:27] Rip of the store side and give it as an option. > [07:28] off* > [07:28] and when you tell it .save - it evolves the database to fit > the new object > [07:28] if evolve flag is set. > [07:28] :) > [07:28] that's how it should be. > [07:28] we have to elaborate that a bit more > [07:29] and automatic type-matching > [07:29] so it detects if you give it a > hash/array/integer/string/float > [07:31] it would make the whole procedure for store-adapters a lot > more dynamic > > I liked the line Of -> OgStruct. Like I mentioned, Og has many built-in > goodnes that I would *love* to use - without it forcing me to save the data > first. There might be a way around this using the memory store adapter, but > it's in /alpha and I haven't tried it out. One could also easily write a > OpenStruct.to_og(klass) method, but would have to work without the power of > og methods. > > Now before this entry grows into a such magnitude of BS that no-one will ever > read, let's cut it out here. I just wanted to mention this since George said > he'll be refactoring Og > > stuff that matters: > > 1. Allow to use the power of Og scripting without persistence -- give the > stores as an option? > 2. set the relations both ways (I think there's reason for belongs_to and > refers_to) > 3. Maybe we could take the Og OOB-experience to a whole new level with > automatic, live evolving(OpenStruct way)? of course there'd need to be > settings/flags for fine grained control. > > Input would be welcome. > > -Riku R?is?nen > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Wed May 10 05:20:15 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 11:20:15 +0200 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: > for it would be #has or #field: > class Foo > is Timestamped > has :name > end will add has, field as aliases. i dont like og_property at all. propertied are not exclusive to Og. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From john at oxyliquit.de Wed May 10 05:31:31 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 10 May 2006 11:31:31 +0200 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: Hi, > class Article > attr_accessor :title, String > attr_accessor :body > end Where :body is not persistant. I like this idea, it'd be very easy to change a class to be persistant. It would be cool though, if attr_accessor :foo, String, :persistant => false, :field => 'manga_oid', :foreign_key => 'oid', :relation => true would be useable without DB, but with the relations... not sure if thats clear, that idea isn't really finished in my head. Anyway, George: my vote is _for_ this new system :) Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Wed May 10 05:36:54 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 10 May 2006 11:36:54 +0200 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: > attr_accessor :foo, String, :persistant => false, :field => 'manga_oid', > :foreign_key => 'oid', :relation => true this was suggested in another post to this list. It sounds nice, and eventually will be integrated, but I am not sure how easy it is to make the transition. Be patient, this will get included ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From vagabond at cataclysm-software.net Wed May 10 08:32:33 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Wed, 10 May 2006 08:32:33 -0400 Subject: [Nitro] Subelements - are they actually useful as-is? In-Reply-To: References: <4460A040.1050105@cataclysm-software.net> Message-ID: <4461DD61.10205@cataclysm-software.net> George Moschovitis wrote: > At the moment I am using a blank render method. I was thinking about > making render blank by default. But anyway, now that you are > mentioning it I will try to improve how this works. Thanks for > reminding. > > But I *strongly* believe that elements/subelements are extremely > useful even as they are now. > > regards, > George. > > George, From asking around in the IRC channel it seems that most people don't use sub elements much at all. The consensus seems to be they're poorly understood and best avoided. Could you give some more details on the usage and maybe good situations where they can be used? I certainly see that they have potential, its just frustrating to use them at this stage... Elements are another kettle of fish, those work well and are very helpful. Again though they're a bit tricky to get started with, although I and other have put some tips on oxywtf in an effort to make things easier. Andrew From rainhead at gmail.com Wed May 10 11:42:23 2006 From: rainhead at gmail.com (Peter Abrahamsen) Date: Wed, 10 May 2006 09:42:23 -0600 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <4461379A.7010108@neurogami.com> References: <4461379A.7010108@neurogami.com> Message-ID: All, FWIW, if you haven't seen it already, check out ZenTest: http://zentest.rubyforge.org/ P On May 9, 2006, at 6:45 PM, James Britt wrote: > I want to build an app using TDD, and I'm having a hard time getting > started. I downloaded the Nitro 0.30.0 examples; one app out of > the lot > , the blog example, has some test code. > > I though I could work off that code to get my own stuff going, but > right > off the bat I have a problem. The test code has this line: > > require 'nitro/testing' > > But there seems to be no such Nitro lib. Is this supposed to be > 'nitro/test' ? > > Any advice on writing unit tests for Nitro apps? > > > > Thanks, > > > -- > James Britt > > "I often work by avoidance." > - Brian Eno > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From surrender_it at yahoo.it Wed May 10 15:12:13 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 10 May 2006 21:12:13 +0200 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: References: <4461379A.7010108@neurogami.com> Message-ID: Peter Abrahamsen ha scritto: > All, > > FWIW, if you haven't seen it already, check out ZenTest: > > http://zentest.rubyforge.org/ does it work prefectly fine with nitro? I recall that it become a little confused last time I tried it, but maybe I did something wrong or it was an old version. From james_b at neurogami.com Wed May 10 16:37:30 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 10 May 2006 13:37:30 -0700 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: References: <4461379A.7010108@neurogami.com> Message-ID: <44624F0A.20305@neurogami.com> Peter Abrahamsen wrote: > All, > > FWIW, if you haven't seen it already, check out ZenTest: > > http://zentest.rubyforge.org/ I'm unclear how this helps me with test-driven development. ZenTest will stub out unit tests for existing code. I have no existing code; I want to write the tests first. -- James Britt "I often work by avoidance." - Brian Eno From dylanb at digitalvalence.com Wed May 10 17:10:23 2006 From: dylanb at digitalvalence.com (Dylan Bruzenak) Date: Wed, 10 May 2006 16:10:23 -0500 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <44624F0A.20305@neurogami.com> References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> Message-ID: <446256BF.6020808@digitalvalence.com> Unit-Diff and Autotest might still be useful. This probably wasn't a specific reference for Nitro, but general information for development. Continuous testing is an interesting concept; I found the java continuous testing support distracting and it slowed down my already slow machine. I bet the zen spider's stuff works better, by virtue of rubyness. James Britt wrote: > Peter Abrahamsen wrote: > >> All, >> >> FWIW, if you haven't seen it already, check out ZenTest: >> >> http://zentest.rubyforge.org/ >> > > I'm unclear how this helps me with test-driven development. ZenTest > will stub out unit tests for existing code. I have no existing code; I > want to write the tests first. > > > > From transfire at gmail.com Wed May 10 17:41:04 2006 From: transfire at gmail.com (TRANS) Date: Wed, 10 May 2006 17:41:04 -0400 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <446256BF.6020808@digitalvalence.com> References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> <446256BF.6020808@digitalvalence.com> Message-ID: <4b6f054f0605101441y4b8c04cfq714266c1a3ba98e1@mail.gmail.com> Well test first dev -- which btw I don't do becuase I usually have to flesh out code before I'm even sure how I want something to end up working. How are you going to test first that? ;p Well, test first is pretty simple right? Especially if you use Reap's extest and rubytest features. You can drop the tests right into the code comments. But of course it gets tricky when in comes to user interfaces --that' why you got things like Waitr and George's new web recorder thingy. But if you practice good code seperation, you should have most of your lib code in their own files and that will allow you to test those well enough on their own at least. I'm sure I must be telling you stuff you already know. But I'm not sure what you're asking exactly either. Do you mean perhaps how to do test first on things like Og? I.e. How does one Mock Og? And like wise for other specific parts of the Nitro system.... I'm not exaclty sure. T. From mischa.kroon at gmail.com Wed May 10 17:43:46 2006 From: mischa.kroon at gmail.com (Mischa Kroon) Date: Wed, 10 May 2006 23:43:46 +0200 Subject: [Nitro] Trying Nitro for the first time... (on windows) References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> Message-ID: <002c01c6747a$d1d77bb0$0a01a8c0@mischabak> It was a bit dissapointing :( First I installed the latest version of the ruby one click installer. Then I installed Nitro: with: gem install nitro --include-dependencies ( which probably should be an item in the list of things on the homepage how to install ) After installing i tried something silly, I typed in nitro in the command prompt. which gave me a nice: No application found, starting default application. ... I figured this would get me a nice Nitro welcome page with some instructions :) The ... isn't very nice though :P I have included it in a text file attached onto this email. With about 60 or so lines with warnings in it Last one being: c:/ruby/lib/ruby/gems/1.8/gems/glue-0.30.0/lib/glue/logger.rb:106: warning: alre ady initialized constant SIMPLE_FORMAT Warnings are just warnings offcourse so I tried it in my webbrowser: after firing up localhost on the correct port: Internal Server Error stack level too deep -------------------------------------------------------------------------------- WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) at localhost:9999 And it spit out some more in the console. I hope this helps out a bit in figuring out a first time user experience. Regards, Mischa -------------- next part -------------- A non-text attachment was scrubbed... Name: nitro_output.txt Type: application/octet-stream Size: 15049 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060510/a701a3fa/attachment.obj From riku.raisanen at walkingwoods.com Wed May 10 17:58:53 2006 From: riku.raisanen at walkingwoods.com (Riku =?iso-8859-1?q?R=E4is=E4nen?=) Date: Thu, 11 May 2006 00:58:53 +0300 Subject: [Nitro] Trying Nitro for the first time... (on windows) In-Reply-To: References: Message-ID: <200605110058.53803.riku.raisanen@walkingwoods.com> >After installing i tried something silly, I typed in nitro in the command >prompt. gen app myapp cd myapp ruby -rubygems run.rb browse to http://127.0.0.1:9999 this was from my memory, might not work. Just decided to try and help before going to bed. Good night. From mischa.kroon at gmail.com Wed May 10 18:14:30 2006 From: mischa.kroon at gmail.com (Mischa Kroon) Date: Thu, 11 May 2006 00:14:30 +0200 Subject: [Nitro] Trying Nitro for the first time... (on windows) References: <200605110058.53803.riku.raisanen@walkingwoods.com> Message-ID: <003701c6747f$1c98ea90$0a01a8c0@mischabak> Ok take 2 :) The file attached is the error I get when another instance of Webrick is already running at port 9999 Funny thing after I have run the gen app xxx command I do get the nitro starting page. Which is very nice :) Though I do have a few suggestions about it. Seems I'm up and running though. ----- Original Message ----- From: "Riku R?is?nen" To: Sent: Wednesday, May 10, 2006 11:58 PM Subject: Re: [Nitro] Trying Nitro for the first time... (on windows) > >After installing i tried something silly, I typed in nitro in the command >>prompt. > > gen app myapp > cd myapp > ruby -rubygems run.rb > > browse to http://127.0.0.1:9999 > > this was from my memory, might not work. Just decided to try and help > before > going to bed. Good night. > _______________________________________________ > 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: nitro_output.txt Type: application/octet-stream Size: 1390 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060510/67ff5d84/attachment.obj From bryan.a.soto at gmail.com Wed May 10 20:00:37 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 10 May 2006 17:00:37 -0700 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <4461379A.7010108@neurogami.com> References: <4461379A.7010108@neurogami.com> Message-ID: On 5/9/06, James Britt wrote: > I want to build an app using TDD, and I'm having a hard time getting > started. I downloaded the Nitro 0.30.0 examples; one app out of the lot > , the blog example, has some test code. > > I though I could work off that code to get my own stuff going, but right > off the bat I have a problem. The test code has this line: > > require 'nitro/testing' > > But there seems to be no such Nitro lib. Is this supposed to be > 'nitro/test' ? > It is supposed to be 'nitro/test'. > Any advice on writing unit tests for Nitro apps? > I've figured out some of it and have been trying to use it in test cases for the test suite. I'm linking to the source on devlab as they aren't RDoc'd. I think alot of the Nitro testing was written by Rob so even George might not be familiar with it. Nitro specific assertions are here: http://devlab.oree.ch/trac/nitrohq/browser/nitro/lib/nitro/test/assertions.rb A sample of setting up nitro for testing is: class TC_ArgTest < Test::Unit::TestCase class TestController < Nitro::Controller def test(arg1, arg2) "arg1=#{arg1}&arg2=#{arg2}" end end Params = 'arg1=1&arg2=2' def setup Server.map['/'] = TestController reset_context() end def test_get assert_match(/#{Params}/, get(:uri => '/test', :params => { 'params' => '1', 'arg2'=>'2' })) end end Note the setup method where controllers are mapped. You then have get, post, put, delete and head methods available in your testcases. There are some examples of fixtures (database tables) available here: http://devlab.oree.ch/trac/nitrohq/browser/glue/test/glue/tc_fixture.rb with their corresponding fixture files available here: http://devlab.oree.ch/trac/nitrohq/browser/glue/test/fixture The gist of it seems to be that if you have a directory layout like: /project /project/fixture /project/test They'll be looked for in the /project/fixture directory automatically. You can change this setting in Glue::Fixtures.root_dir. Or you can specify it as an option when you create the fixture if you want to store each fixture in a different directory. I tried to show how to do that in the test cases in file tc_fixture referenced above. You store your fixtures as csv or yaml in that directory and then you can reference them like users = Glue::Fixture.new(User) # this looks for user.csv or user.yml That's about everything I've figured out about test support in Nitro and Og. I hope some of it was helpful. Bryan From james_b at neurogami.com Wed May 10 20:09:43 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 10 May 2006 17:09:43 -0700 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <446256BF.6020808@digitalvalence.com> References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> <446256BF.6020808@digitalvalence.com> Message-ID: <446280C7.2080108@neurogami.com> Dylan Bruzenak wrote: > Unit-Diff and Autotest might still be useful. This probably wasn't a > specific reference for Nitro, but general information for development. Ah, I see. Yes. Looks like good stuff. -- James Britt "A principle or axiom is of no value without the rules for applying it." - Len Bullard From james_b at neurogami.com Wed May 10 20:18:22 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 10 May 2006 17:18:22 -0700 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <4b6f054f0605101441y4b8c04cfq714266c1a3ba98e1@mail.gmail.com> References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> <446256BF.6020808@digitalvalence.com> <4b6f054f0605101441y4b8c04cfq714266c1a3ba98e1@mail.gmail.com> Message-ID: <446282CE.90704@neurogami.com> TRANS wrote: > Well test first dev -- which btw I don't do becuase I usually have to > flesh out code before I'm even sure how I want something to end up > working. How are you going to test first that? ;p Well, I believe the Agile Response id to do your code sketches to get an idea of what you want to do, then through that code away and re-do it using TDD. That's more or less how I work; try stuff out, and when it looks like I'm going in the right direction and will keep the code, I either redo it to make it cleaner, or add in tests and refactor. > > Well, test first is pretty simple right? Especially if you use Reap's > extest and rubytest features. You can drop the tests right into the > code comments. Perhaps, but what you just wrote is going right over my head. Are there docs and examples for this? (Putting tests in the code comments sounds very appealing.) > But of course it gets tricky when in comes to user interfaces --that' > why you got things like Waitr and George's new web recorder thingy. And Selenium, which is a life-saver. > But if you practice good code seperation, you should have most of your > lib code in their own files and that will allow you to test those well > enough on their own at least. I'm sure I must be telling you stuff you > already know. But I'm not sure what you're asking exactly either. Do > you mean perhaps how to do test first on things like Og? I.e. How does > one Mock Og? And like wise for other specific parts of the Nitro > system.... I'm not exaclty sure. I want to use tests to drive the API for my models and business logic. My controllers should be doing little more than delegating to models or application libraries, and those libs should not be tied to a specific UI. I don't want to *have* to hit a Web page to test that I can add a new user or save some content. So I need guidance on setting up enough application context (lib paths and Og details) so I can unit test code. -- James Britt "A principle or axiom is of no value without the rules for applying it." - Len Bullard From transfire at gmail.com Wed May 10 20:17:19 2006 From: transfire at gmail.com (TRANS) Date: Wed, 10 May 2006 20:17:19 -0400 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: References: <4461379A.7010108@neurogami.com> Message-ID: <4b6f054f0605101717l18d5e732ya0fdd1d0afb2117c@mail.gmail.com> On 5/10/06, Bryan Soto wrote: > On 5/9/06, James Britt wrote: > > I want to build an app using TDD, and I'm having a hard time getting > > started. I downloaded the Nitro 0.30.0 examples; one app out of the lot > > , the blog example, has some test code. > > > > I though I could work off that code to get my own stuff going, but right > > off the bat I have a problem. The test code has this line: > > > > require 'nitro/testing' > > > > But there seems to be no such Nitro lib. Is this supposed to be > > 'nitro/test' ? > > > > It is supposed to be 'nitro/test'. > > > Any advice on writing unit tests for Nitro apps? > > > > I've figured out some of it and have been trying to use it in test > cases for the test suite. > > I'm linking to the source on devlab as they aren't RDoc'd. I think > alot of the Nitro testing was written by Rob so even George might not > be familiar with it. > > Nitro specific assertions are here: > http://devlab.oree.ch/trac/nitrohq/browser/nitro/lib/nitro/test/assertions.rb > > A sample of setting up nitro for testing is: > > class TC_ArgTest < Test::Unit::TestCase > class TestController < Nitro::Controller > def test(arg1, arg2) > "arg1=#{arg1}&arg2=#{arg2}" > end > end > > Params = 'arg1=1&arg2=2' > > def setup > Server.map['/'] = TestController > reset_context() > end > > def test_get > assert_match(/#{Params}/, > get(:uri => '/test', :params => { > 'params' => '1', 'arg2'=>'2' })) > end > end > > Note the setup method where controllers are mapped. You then have get, > post, put, delete and head methods available in your testcases. > > There are some examples of fixtures (database tables) available here: > http://devlab.oree.ch/trac/nitrohq/browser/glue/test/glue/tc_fixture.rb > > with their corresponding fixture files available here: > http://devlab.oree.ch/trac/nitrohq/browser/glue/test/fixture > > The gist of it seems to be that if you have a directory layout like: > /project > /project/fixture > /project/test > > They'll be looked for in the /project/fixture directory automatically. > You can change this setting in Glue::Fixtures.root_dir. Or you can > specify it as an option when you create the fixture if you want to > store each fixture in a different directory. I tried to show how to do > that in the test cases in file tc_fixture referenced above. > > You store your fixtures as csv or yaml in that directory and then you > can reference them like > > users = Glue::Fixture.new(User) # this looks for user.csv or user.yml > > That's about everything I've figured out about test support in Nitro > and Og. I hope some of it was helpful. Ah. Okay so that's how Nitro specifics are tested. (Though I think I'd put fixture/ in the test/ dir itself --they don't have any use outside of testing right?) Though it seems rather limited --you aren't actually testing real code, just a lot of mockups of it --or am I missing somrthing? T. From james_b at neurogami.com Wed May 10 20:20:41 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 10 May 2006 17:20:41 -0700 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: References: <4461379A.7010108@neurogami.com> Message-ID: <44628359.3020004@neurogami.com> Bryan Soto wrote: > ... > I've figured out some of it and have been trying to use it in test > cases for the test suite. > ... > That's about everything I've figured out about test support in Nitro > and Og. I hope some of it was helpful. > > Bryan > Wow. Thanks! -- James Britt "A principle or axiom is of no value without the rules for applying it." - Len Bullard From humberaquino at gmail.com Wed May 10 23:46:29 2006 From: humberaquino at gmail.com (Humber Aquino) Date: Thu, 11 May 2006 00:46:29 -0300 Subject: [Nitro] Trying Nitro for the first time... (on windows) In-Reply-To: <003701c6747f$1c98ea90$0a01a8c0@mischabak> References: <200605110058.53803.riku.raisanen@walkingwoods.com> <003701c6747f$1c98ea90$0a01a8c0@mischabak> Message-ID: <37fd0c50605102046w5401a900gef867f527b778e61@mail.gmail.com> You should look at this tutorial first..http://oxyliquit.de/tutorial/3 Then go and see the examples:- examples-0.30.0- spark-1.2.0- flare-1.0.0 Download url:http://rubyforge.org/frs/?group_id=418&release_id=5279 On 5/10/06, Mischa Kroon wrote:> Ok take 2 :)>> The file attached is the error I get when another instance of Webrick is> already running at port 9999>> Funny thing after I have run the gen app xxx command I do get the nitro> starting page.>> Which is very nice :)>> Though I do have a few suggestions about it.>> Seems I'm up and running though.>>> ----- Original Message -----> From: "Riku R?is?nen" > To: > Sent: Wednesday, May 10, 2006 11:58 PM> Subject: Re: [Nitro] Trying Nitro for the first time... (on windows)>>> > >After installing i tried something silly, I typed in nitro in the command> >>prompt.> >> > gen app myapp> > cd myapp> > ruby -rubygems run.rb> >> > browse to http://127.0.0.1:9999> >> > this was from my memory, might not work. Just decided to try and help> > before> > going to bed. Good night.> > _______________________________________________> > 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>>> From james_b at neurogami.com Thu May 11 00:31:49 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 10 May 2006 21:31:49 -0700 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: References: <4461379A.7010108@neurogami.com> Message-ID: <4462BE35.2020109@neurogami.com> Bryan Soto wrote: > > A sample of setting up nitro for testing is: > > class TC_ArgTest < Test::Unit::TestCase > class TestController < Nitro::Controller > def test(arg1, arg2) > "arg1=#{arg1}&arg2=#{arg2}" > end > end > > Params = 'arg1=1&arg2=2' > > def setup > Server.map['/'] = TestController > reset_context() > end > > def test_get > assert_match(/#{Params}/, > get(:uri => '/test', :params => { > 'params' => '1', 'arg2'=>'2' })) > end > end > Question: I tried this example, and it seems that the method being tested is passed four values, not two. The method gets the hash values in the :params hash that is defined in the test-case method, but they appear twice. Any ideas why? Thanks! -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.30secondrule.com - Building Better Tools From james_b at neurogami.com Thu May 11 01:04:07 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 10 May 2006 22:04:07 -0700 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: References: <4461379A.7010108@neurogami.com> Message-ID: <4462C5C7.9080507@neurogami.com> George Moschovitis wrote: > Check out the Spak source code. there is a test directory. I grabbed the latest version of Spark from RubyForge, and run the controller tests form the app root directory. Here's what I got: 1) Error: test_feed(TestWikiController): NoMethodError: undefined method `controller' for # D:/downloads/Ruby/nitro/spark-1.2.0/test/tc_controller.rb:7:in `setup' 2) Error: test_index(TestWikiController): NoMethodError: undefined method `controller' for # D:/downloads/Ruby/nitro/spark-1.2.0/test/tc_controller.rb:7:in `setup' 3) Error: test_login(TestWikiController): NoMethodError: undefined method `controller' for # D:/downloads/Ruby/nitro/spark-1.2.0/test/tc_controller.rb:7:in `setup' 4) Error: test_search(TestWikiController): NoMethodError: undefined method `controller' for # D:/downloads/Ruby/nitro/spark-1.2.0/test/tc_controller.rb:7:in `setup' 4 tests, 0 assertions, 0 failures, 4 errors > Btw, the > TDD support of Nitro is almost the same as Rails so I dont think you > will have many problems to get up to speed. If you need more help let > me know. Except that in Rails you are given initial testing files that have already taken care of the assorted little details for seting up the base environment. I don't want to have to deal with such files until and unless I want them, though. Perhaps the creation of such stub test code could be handled by Gen. -- James Britt "Judge a man by his questions, rather than his answers." - Voltaire From george.moschovitis at gmail.com Thu May 11 01:10:26 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 11 May 2006 07:10:26 +0200 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <4b6f054f0605101441y4b8c04cfq714266c1a3ba98e1@mail.gmail.com> References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> <446256BF.6020808@digitalvalence.com> <4b6f054f0605101441y4b8c04cfq714266c1a3ba98e1@mail.gmail.com> Message-ID: > you mean perhaps how to do test first on things like Og? I.e. How does > one Mock Og? And like wise for other specific parts of the Nitro > system.... I'm not exaclty sure. lib/og/test lib/nitro/test for all the details ;-) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu May 11 01:12:57 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 11 May 2006 07:12:57 +0200 Subject: [Nitro] Test-drive development in Nitro In-Reply-To: <4462C5C7.9080507@neurogami.com> References: <4461379A.7010108@neurogami.com> <4462C5C7.9080507@neurogami.com> Message-ID: > environment. I don't want to have to deal with such files until and > unless I want them, though. Perhaps the creation of such stub test code > could be handled by Gen. If I remember correctly, Bryan wanted to work on new Gen 'generators', perhaps this would be a nice contribution? regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu May 11 01:17:40 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 11 May 2006 07:17:40 +0200 Subject: [Nitro] Trying Nitro for the first time... (on windows) In-Reply-To: <002c01c6747a$d1d77bb0$0a01a8c0@mischabak> References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> <002c01c6747a$d1d77bb0$0a01a8c0@mischabak> Message-ID: The nitro command was just a placeholder until now. In the next version (0.31.0) a new nitro command will be available. But the standard way to run a nitro application is: cd /app/dir ruby run.rb for example, download the spark zip file, unzip, go to the dir and run ruby run.rb regards, George. On 5/10/06, Mischa Kroon wrote: > It was a bit dissapointing :( > > First I installed the latest version of the ruby one click installer. > Then I installed Nitro: > > with: gem install nitro --include-dependencies > > ( which probably should be an item in the list of things on the homepage how > to install ) > > After installing i tried something silly, I typed in nitro in the command > prompt. > which gave me a nice: > > No application found, starting default application. > ... > > I figured this would get me a nice Nitro welcome page with some instructions > :) > > The ... isn't very nice though :P > I have included it in a text file attached onto this email. > > With about 60 or so lines with warnings in it > > Last one being: > c:/ruby/lib/ruby/gems/1.8/gems/glue-0.30.0/lib/glue/logger.rb:106: warning: > alre > ady initialized constant SIMPLE_FORMAT > > Warnings are just warnings offcourse so I tried it in my webbrowser: > > after firing up localhost on the correct port: > > Internal Server Error > stack level too deep > -------------------------------------------------------------------------------- > > WEBrick/1.3.1 (Ruby/1.8.4/2005-12-24) at localhost:9999 > > And it spit out some more in the console. > > I hope this helps out a bit in figuring out a first time user experience. > > Regards, > > Mischa > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu May 11 01:18:52 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 11 May 2006 07:18:52 +0200 Subject: [Nitro] Trying Nitro for the first time... (on windows) In-Reply-To: <003701c6747f$1c98ea90$0a01a8c0@mischabak> References: <200605110058.53803.riku.raisanen@walkingwoods.com> <003701c6747f$1c98ea90$0a01a8c0@mischabak> Message-ID: > Though I do have a few suggestions about it. > Seems I'm up and running though. Nice to hear, keep sending your problem reports and of course suggestions ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Thu May 11 05:12:31 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Thu, 11 May 2006 11:12:31 +0200 Subject: [Nitro] Og properties. In-Reply-To: References: Message-ID: <3ff63f9b0605110212j365a3967qd921752c2803c121@mail.gmail.com> My take is to use facet/annotation for the database types.Annotation also has the attr_accessor extension. It works like this : class A attr_accessor :x, :additional => :notationend Using annotation makes the whole thing Og-indepenent. However, the notation property :field, Stringwould have to be changed to attr_accessor :field, :type => String -- Cheers, zimba http://zimba.oree.ch From fabian at oggu.de Thu May 11 05:12:17 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 11 May 2006 11:12:17 +0200 Subject: [Nitro] Trying Nitro for the first time... (on windows) In-Reply-To: References: <4461379A.7010108@neurogami.com> <44624F0A.20305@neurogami.com> <002c01c6747a$d1d77bb0$0a01a8c0@mischabak> Message-ID: <0d1ebfe47d5f9719b6594accbde5be14@oggu.de> Am 11.05.2006 um 07:17 schrieb George Moschovitis: > The nitro command was just a placeholder until now. In the next > version (0.31.0) a new nitro command will be available. But the > standard way to run a nitro application is: I don't know what the command "nitro" is supposed to do, but one idea would be to let it tell the user where to get started, so maybe some "gen" usage, a link to www.nitroproject.org and anotherone to www.oxyliquit.de, or one of the getting started tutorials (like manveru's http://oxyliquit.de/tutorial/3) Fabian From riku.raisanen at walkingwoods.com Thu May 11 06:22:26 2006 From: riku.raisanen at walkingwoods.com (Riku =?iso-8859-1?q?R=E4is=E4nen?=) Date: Thu, 11 May 2006 13:22:26 +0300 Subject: [Nitro] nitro.rubyforge.org In-Reply-To: References: Message-ID: <200605111322.26639.riku.raisanen@walkingwoods.com> [13:15] http://nitro.rubyforge.org/ << bad ;/ [13:18] * manveru nods [13:18] XD [13:18] feel the magic of nitro XDD [13:18] indeed *g* so it still redirects to nitrohq.org From aglarond at gmail.com Thu May 11 09:35:05 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Thu, 11 May 2006 15:35:05 +0200 Subject: [Nitro] REST helper Message-ID: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> Hi All, REST is a topic that comes up in IRC every now and then. I decided to go ahead and create a RESTHelper to try to explain my understanding of what REST is, and how it can be best integrated with Nitro. Attached is a very broad view of how it might work. Please note that the code will not do anything useful yet, it is there as a vehicle for discussion. At the same time, I decided to try the newest version of RSpec: 0.5.3. I like what it does for BDD. It's got a built-in documentation system that reads like a specification should. So, I gave a first shot at trying to come up with a MockController to use for building the RESTHelper using BDD. Before I complete the spec, take a look and let me know if you have any ideas for improving it. As it stands, the spec tests the basic REQUEST_METHODs and tries to go a bit farther for OPTIONS. I didn't want to spend too much time going down the wrong path, though, so I didn't go further than that. If you're interested, and have some free time, please take a look at both the helper and the spec, and send your feedback to the mailing list. I'm interested in any criticism/comments - this is just a rough draft, I know it's horribly incomplete. I just wanted to get some preliminary feedback before I spent more time on it. - Dimitri References: Fielding Dissertation: CHAPTER 5: Representational State Transfer (REST) RFC 2616 (rfc2616) - Hypertext Transfer Protocol -- HTTP/1.1 On HTTP Abuse rest/rails - Microformats -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060511/f190e84b/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: rest-helper.tar.gz Type: application/x-gzip Size: 3111 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060511/f190e84b/attachment.gz From transfire at gmail.com Thu May 11 10:38:11 2006 From: transfire at gmail.com (TRANS) Date: Thu, 11 May 2006 10:38:11 -0400 Subject: [Nitro] Og properties. In-Reply-To: <3ff63f9b0605110212j365a3967qd921752c2803c121@mail.gmail.com> References: <3ff63f9b0605110212j365a3967qd921752c2803c121@mail.gmail.com> Message-ID: <4b6f054f0605110738r60454aa5m4b6756267237e86c@mail.gmail.com> On 5/11/06, Jonas Pfenniger wrote: > My take is to use facet/annotation for the database types.Annotation also has the attr_accessor extension. > It works like this : > class A attr_accessor :x, :additional => :notationend > Using annotation makes the whole thing Og-indepenent. > However, the notation property :field, Stringwould have to be changed to attr_accessor :field, :type => String I think the assummption of :type => aClass is okay when just a class is given.. That can be part of facet/annotation. Although maybe it should be :class => aClass. T. From george.moschovitis at gmail.com Thu May 11 12:49:16 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 11 May 2006 19:49:16 +0300 Subject: [Nitro] REST helper In-Reply-To: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> Message-ID: What is BDD? And RSpec? George. PS: thanks for the helper! On 5/11/06, Dimitri Aivaliotis wrote: > Hi All, > > REST is a topic that comes up in IRC every now and then. I decided to go > ahead and create a RESTHelper to try to explain my understanding of what > REST is, and how it can be best integrated with Nitro. Attached is a very > broad view of how it might work. Please note that the code will not do > anything useful yet, it is there as a vehicle for discussion. > > At the same time, I decided to try the newest version of RSpec: 0.5.3. I > like what it does for BDD. It's got a built-in documentation system that > reads like a specification should. So, I gave a first shot at trying to > come up with a MockController to use for building the RESTHelper using BDD. > Before I complete the spec, take a look and let me know if you have any > ideas for improving it. As it stands, the spec tests the basic > REQUEST_METHODs and tries to go a bit farther for OPTIONS. I didn't want to > spend too much time going down the wrong path, though, so I didn't go > further than that. > > If you're interested, and have some free time, please take a look at both > the helper and the spec, and send your feedback to the mailing list. I'm > interested in any criticism/comments - this is just a rough draft, I know > it's horribly incomplete. I just wanted to get some preliminary feedback > before I spent more time on it. > > - Dimitri > > > References: > > Fielding Dissertation: CHAPTER 5: Representational State Transfer (REST) > RFC 2616 (rfc2616) - Hypertext Transfer Protocol -- HTTP/1.1 > On HTTP Abuse > rest/rails - Microformats > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From vagabond at cataclysm-software.net Thu May 11 13:03:00 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Thu, 11 May 2006 13:03:00 -0400 Subject: [Nitro] REST helper In-Reply-To: References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> Message-ID: <20060511170300.GB28045@hijacked.us> On Thu, May 11, 2006 at 07:49:16PM +0300, George Moschovitis wrote: > What is BDD? And RSpec? > BDD stands for Behaviour driven development and RSpec is the ruby framework used to do BDD: http://rspec.rubyforge.org Andrew From james_b at neurogami.com Thu May 11 16:42:37 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 11 May 2006 13:42:37 -0700 Subject: [Nitro] Question about template paths with unit testsb Message-ID: <4463A1BD.1030305@neurogami.com> Building off the examples I've seen on this list and in the Spark source, I wrote some test code. I almost does what it should, but the action template is not rendered. I have a controller, PresenterController, in src/controllers/presenter_controller.rb It has a 'new' method. The method should do nothing more than render its template, which is under templates/ (All paths are relative to the application root) My run.rb file sets up the load paths, requires the needed files, and calls Template.root = 'templates' When I run the test, a STDERR.puts call in the 'new' method does execute, so I know the test case is hitting the controller, but the test code gets an empty string as the response. The new.xhtml template exists, and renders fine if I hit the site through a browser. # Test code, in directory test/ # require 'nitro/test' $:.push( File.expand_path( File.dirname( __FILE__ ) + '/..') ) require 'run' class TestPresenterController < Test::Unit::TestCase def setup reset_context() end def test_new # path is mapped in run.rb get '/presenter/new' # This works: assert_response :success # This part fails: assert_output :match => /Welcome/ end end # end of code Any thoughts? Thanks, James Britt From bryan.a.soto at gmail.com Thu May 11 18:01:28 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 11 May 2006 15:01:28 -0700 Subject: [Nitro] Question about template paths with unit testsb In-Reply-To: <4463A1BD.1030305@neurogami.com> References: <4463A1BD.1030305@neurogami.com> Message-ID: On 5/11/06, James Britt wrote: > Any thoughts? > Are you, by chance, running your tests from the test directory rather than the application root? Or, perhaps more meaningfully, app-root/test $ ruby test_file.rb rather than app-root $ ruby test/test_file.rb The file test.rb sets a global to prevent the process from performing a chdir, which makes Nitro look for templates in test/templates. That was the first way I stumbled on to duplicate your problem. Bryan From james_b at neurogami.com Thu May 11 18:24:44 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 11 May 2006 15:24:44 -0700 Subject: [Nitro] og_fixtures and fixture dir Message-ID: <4463B9AC.9020407@neurogami.com> I'm calling og_fixture in my unit test setup method, and getting this error: RuntimeError: The fixture root directory 'test/fixture' doesn't exits That directory does exist off of the application root. My test code is in the test/ dir; fixture/ is subdirectory. I run my test code straight from the editor, so I'm in the test dir, not the root dir. I gather og_fixture isn't smart enough to figure this out and look for a local fixture/ dir. How can I tell og_fixture where to look? I took a look at the Fixtures class in glue, but it is less than obvious to me. -- James Britt "The greatest obstacle to discovery is not ignorance, but the illusion of knowledge." - D. Boorstin From james_b at neurogami.com Thu May 11 18:39:43 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 11 May 2006 15:39:43 -0700 Subject: [Nitro] og_fixtures and fixture dir In-Reply-To: <4463B9AC.9020407@neurogami.com> References: <4463B9AC.9020407@neurogami.com> Message-ID: <4463BD2F.1040002@neurogami.com> James Britt wrote: > I'm calling og_fixture in my unit test setup method, and getting this error: > > RuntimeError: The fixture root directory 'test/fixture' doesn't exits > > That directory does exist off of the application root. My test code is > in the test/ dir; fixture/ is subdirectory. > > > I run my test code straight from the editor, so I'm in the test dir, not > the root dir. I gather og_fixture isn't smart enough to figure this out > and look for a local fixture/ dir. > > How can I tell og_fixture where to look? I took a look at the > Fixtures class in glue, but it is less than obvious to me. > Ah, discovery. I've now added this to my test code: def config if Dir.pwd.basename =~ /test$/ Fixtures.root_dir = 'fixture' end end -- James Britt "In physics the truth is rarely perfectly clear, and that is certainly universally the case in human affairs. Hence, what is not surrounded by uncertainty cannot be the truth." - R. Feynman From james_b at neurogami.com Thu May 11 18:52:37 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 11 May 2006 15:52:37 -0700 Subject: [Nitro] Question about template paths with unit testsb In-Reply-To: References: <4463A1BD.1030305@neurogami.com> Message-ID: <4463C035.40609@neurogami.com> Bryan Soto wrote: > On 5/11/06, James Britt wrote: > >> Any thoughts? >> > > Are you, by chance, running your tests from the test directory rather > than the application root? Or, perhaps more meaningfully, > > app-root/test $ ruby test_file.rb > Yes. I Run the test code straight from the editor (vim) > ... > The file test.rb sets a global to prevent the process from performing > a chdir, which makes Nitro look for templates in test/templates. That > was the first way I stumbled on to duplicate your problem. > :( I need to change that. Thanks, James Britt From bryan.a.soto at gmail.com Thu May 11 19:10:03 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 11 May 2006 16:10:03 -0700 Subject: [Nitro] Question about template paths with unit testsb In-Reply-To: <4463C035.40609@neurogami.com> References: <4463A1BD.1030305@neurogami.com> <4463C035.40609@neurogami.com> Message-ID: On 5/11/06, James Britt wrote: > > The file test.rb sets a global to prevent the process from performing > > a chdir, which makes Nitro look for templates in test/templates. That > > was the first way I stumbled on to duplicate your problem. > > > > :( > > I need to change that. > Crap. That won't work because $0 will be your test file. Okay, to keep you going, setting Template.root like this in your run.rb Template.root = File.expand_path(File.join(File.dirname(__FILE__), 'templates')) should work. More hackishly, in your test file, Template.root = '../templates' Hmm... now how to set relative paths when testing... From bryan.a.soto at gmail.com Thu May 11 19:53:55 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 11 May 2006 16:53:55 -0700 Subject: [Nitro] REST helper In-Reply-To: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> Message-ID: Hi Dimitri, On 5/11/06, Dimitri Aivaliotis wrote: > If you're interested, and have some free time, please take a look at both > the helper and the spec, and send your feedback to the mailing list. I'm > interested in any criticism/comments - this is just a rough draft, I know > it's horribly incomplete. I just wanted to get some preliminary feedback > before I spent more time on it. > I'm interested in both RSpec and REST so thanks for the opportunity to kill two birds with one stone. :) First, with the latest glycerin, a quick run yields: 1) nil should equal "HTTP/1.1" (Spec::Api::ExpectationNotMetError) ./rest_spec.rb:60:in `responding appropriately to an asterisk ('*') Request-URI' 2) Set # should be subset # (Spec::Api::ExpectationNotMetError) ./rest_spec.rb:71:in `responds to a Request-URI of '/mock' with the list of all features' Will read the code with interest. Bryan From aglarond at gmail.com Fri May 12 02:45:31 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Fri, 12 May 2006 08:45:31 +0200 Subject: [Nitro] REST helper In-Reply-To: References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> Message-ID: <55c107bf0605112345j2727e212w5f913c82b0ab7662@mail.gmail.com> Hi Bryan, On 5/12/06, Bryan Soto wrote: > > > I'm interested in both RSpec and REST so thanks for the opportunity to > kill two birds with one stone. : Glad to hear it. :) First, with the latest glycerin, a quick run yields: > > 1) > nil should equal "HTTP/1.1" (Spec::Api::ExpectationNotMetError) > ./rest_spec.rb:60:in `responding appropriately to an asterisk ('*') > Request-URI' > > 2) > Set # should be subset > # (Spec::Api::ExpectationNotMetError) > ./rest_spec.rb:71:in `responds to a Request-URI of '/mock' with the > list of all features' That's right. These are things that need to be implemented. The point of writing the spec file is to formulate the expectations, then get the code to work. At least, that's how I read it. The spec file is woefully incomplete atm, not to mention the helper itself. I wanted to get some comments/advice before completing them, so I wouldn't save time going down a wrong path... Will read the code with interest. > It's meant as a vehicle for discussion, not to actually work yet. ;) - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060512/0f29887a/attachment.html From aglarond at gmail.com Fri May 12 02:49:01 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Fri, 12 May 2006 08:49:01 +0200 Subject: [Nitro] REST helper In-Reply-To: References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> Message-ID: <55c107bf0605112349m71092903xb84c0896c28907b3@mail.gmail.com> On 5/11/06, George Moschovitis wrote: > > > > PS: thanks for the helper! > You're welcome. Any hints on how to best write helpers? Or to integrate this one specifically? Thanks, - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060512/5efbe069/attachment.html From aglarond at gmail.com Fri May 12 04:04:35 2006 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Fri, 12 May 2006 10:04:35 +0200 Subject: [Nitro] REST helper In-Reply-To: References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> Message-ID: <55c107bf0605120104t73c5d525j5b639b5d49c5d3bf@mail.gmail.com> To be specific about these errors: On 5/12/06, Bryan Soto wrote: > > > 1) > nil should equal "HTTP/1.1" (Spec::Api::ExpectationNotMetError) > ./rest_spec.rb:60:in `responding appropriately to an asterisk ('*') > Request-URI' I'm not sure if this should even be part of the spec because SERVER_PROTOCOL isn't part of RFC2616. We need some way, though, of verifying that the server speaks HTTP/1.1. Ideas? 2) > Set # should be subset > # (Spec::Api::ExpectationNotMetError) > ./rest_spec.rb:71:in `responds to a Request-URI of '/mock' with the > list of all features' > This one's actually supposed to pass... Not quite sure why it doesn't. :/ - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060512/64c6f034/attachment.html From guillaume.pierronnet at gmail.com Fri May 12 05:59:47 2006 From: guillaume.pierronnet at gmail.com (guillaume pierronnet) Date: Fri, 12 May 2006 11:59:47 +0200 Subject: [Nitro] [PATCH] bundle Message-ID: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> hi, here is a bundle against repo.nitroproject.org Fri May 12 11:31:40 CEST 2006 Guillaume Pierronnet * fixed a bug when including a relation into a request Shall I send this patch? (1/3) [ynWvpxqadjk], or ? for help: y Fri May 12 11:34:40 CEST 2006 Guillaume Pierronnet * fixed a bug when computing parameters to actions Shall I send this patch? (2/3) [ynWvpxqadjk], or ? for help: y Fri May 12 11:48:22 CEST 2006 Guillaume Pierronnet * og/lib/glue/taggable.rb refactor + support for passing :condition parameter SqlStore#prepare_statement moved to public scope test case on taggable runs fine thanks -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle.gz Type: application/x-gzip Size: 1766 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060512/eeb6ae95/attachment.gz From mischa.kroon at gmail.com Fri May 12 16:14:49 2006 From: mischa.kroon at gmail.com (Mischa Kroon) Date: Fri, 12 May 2006 22:14:49 +0200 Subject: [Nitro] Trying Nitro for the first time... (on windows) References: <4461379A.7010108@neurogami.com><44624F0A.20305@neurogami.com><002c01c6747a$d1d77bb0$0a01a8c0@mischabak> Message-ID: <001d01c67600$ba99ff90$0a01a8c0@mischabak> > The nitro command was just a placeholder until now. In the next > version (0.31.0) a new nitro command will be available. But the > standard way to run a nitro application is: This is actually one of the things I really like :) I would actually build on this. It would be great if the nitro command would just start the latest application your working on. Or to use it in a way like: Nitro appname To start that app, this would save a load of typing to start things up. Saving going to the directory etc etc. From mischa.kroon at gmail.com Fri May 12 17:25:49 2006 From: mischa.kroon at gmail.com (Mischa Kroon) Date: Fri, 12 May 2006 23:25:49 +0200 Subject: [Nitro] Nitro first impressions - Start page + suggestions References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> <55c107bf0605120104t73c5d525j5b639b5d49c5d3bf@mail.gmail.com> Message-ID: <002f01c6760a$a4b03640$0a01a8c0@mischabak> First off it's very good to have a start page. But it doesn't seem very polished. It's one of the most important things for people starting out with NITRO. What would I do differently: Dissecting the page: Start: LOGO + You have successfully installed Nitro! This is great :) Don't change a thing here :) ( except the link --> nitroproject.org ) Getting people to feel good about doing it, and telling them how to continue is what this page is about. --- The before you move on part. I'm on windows, these things don't apply to me :P Examples part. Good to have a starting point but this isn't a very good way to help people out. First off it's HTML, when your talking about trying things out... you might as well make em links :) If you do such a thing a preferred format would be something like: http://www.learnasp.com/freebook/learn/vb_firstlib.aspx Where you have 1 or more files with source code and a link to try things out. Alternatively change it around: http://www.telerik.com/r.a.d.controls/Input/Examples/Functionality/OrderForm/DefaultCS.aspx Does what it does first in a sort of frame and all the parts that make it up are below. Also the examples can't offcourse be linked because they have to be downloaded first from rubyforge then you can use them. Say I don't get this and try: http://localhost:9999/examples/blog Then there is no 404 warning <--- something I expect from other platforms. There is a mention of an error in dispatcher. A link to the examples would be more user friendly. Then the last part: Here is what do next: 1. Add your xhtml files in the 'public' directory. Those files are automagically converted to controller actions by Nitro 2. Place additional media files, css, or xsl files in the public directory. 3. Create your models and controllers. 4. Develop your application utilizing Nitro's powerful features. Now just reading this from a laymans perspective: 1 "Those files are automagically converted to controller actions by Nitro" What are these ? ( Yes I get what they probably are, but how... why etc. ) "3. Create your models and controllers. " How do i do this, would be my first reaction :) "4. Develop your application utilizing Nitro's powerful features. " Groovy :) But what are they, and how :) -------------------------------------------------------------- Ok enough analysis of the current start page. Lets take a look at the competition. The Rails 1.1 start page gives us: Also a welcome message <-- good stuff :) A check for the environment <-- nice to have but not a must have ( also gives an error on my system on some mysql dll. ) What would i copy from this: Show the version number of Nitro on the start page, let people instantly know which version they are running. then 3 points: 1. Point on how to set up database. <-- Great stuff, a link to an Og tutorial would be great :) 2. A how to create models and controlers <-- Tells you where to start using one of the most important features. 3. How to get the start page you want <-- copy this. --- So what they are doing: 1. The greatest strenght of Rails is probably it's easy DB setup. Flaunting your strength's generates more feel good. The other 2 are getting started 101 :P --- Right side full of usefull links. Go them :) Copy: Link to Main site, Link to Wiki, Link to Mailinglist, Link to FAQ site, ------------- So my general advice would be: Keep the welcome message. Maybe even expand it with the first texts from "Nitro 0.30.0 README Nitro provides everything you need to develop professional Web applications using Ruby and Javascript. Nitro redefines Rapid Application Development by providing a clean, yet efficient API, a layer of domain specific languages implemented on top of Ruby and the most powerful and elegant object relational mapping solution available everywhere. Nitro is Web 2.0 ready, featuring excellent support for AJAX, XML, Syndication while staying standards compliant. Nitro gives choice to the developer: Multiple paradigms are implemented, incorporating ideas from Rails, CherryPy, Catalyst, Wee, PHP, JSP and Microsoft.NET and more. The developer is free to choose the pattern that better fits his application. This kind of freedom makes Nitro applicable to a wide range of applications, spanning from big, scalable web sites with thousands of concurrent users to simple solutions for deployment on intranet desktops. > Read more < " Make links instead of static text. Remove the warnings, and make a link to them. ( Or go for a hide / show layer technique) Place some working out of the box real getting started links. Hello world Hello world 2 ( Templates or whatever ) Hello world from DB Hello world with Ajax Link to screencasts. Link to 1 or 2 other Tuts I think the screencasts will get people through everything in the simple examples and would get people well underway. Also include the links currently on the Nitroproject main page in a different pane like Left 70% or so right 30% with links. Ok this turned out quite a bit longer then expected, hope you don't get offended by my tone. Regards, Mischa -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060512/19264410/attachment.html From bryan.a.soto at gmail.com Fri May 12 18:58:44 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 12 May 2006 15:58:44 -0700 Subject: [Nitro] [PATCH] bundle In-Reply-To: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> References: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> Message-ID: Hi, On 5/12/06, guillaume pierronnet wrote: > hi, > here is a bundle against repo.nitroproject.org > > Fri May 12 11:31:40 CEST 2006 Guillaume Pierronnet > * fixed a bug when including a relation into a request > Shall I send this patch? (1/3) [ynWvpxqadjk], or ? for help: y > Can you show something to duplicate the bug? I'd like to add a test case to keep it from showing up again. :) > Fri May 12 11:34:40 CEST 2006 Guillaume Pierronnet > * fixed a bug when computing parameters to actions > Shall I send this patch? (2/3) [ynWvpxqadjk], or ? for help: y > Is that what George was doing? An else? > Fri May 12 11:48:22 CEST 2006 Guillaume Pierronnet > * og/lib/glue/taggable.rb refactor + support for passing :condition parameter > SqlStore#prepare_statement moved to public scope > test case on taggable runs fine > Wow, you got rid of that embedded sql. Cool :) Kashia, could you try the tag patch out on oxyliquit as well? Thanks, Bryan From bryan.a.soto at gmail.com Fri May 12 19:21:40 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 12 May 2006 16:21:40 -0700 Subject: [Nitro] Nitro first impressions - Start page + suggestions In-Reply-To: <002f01c6760a$a4b03640$0a01a8c0@mischabak> References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> <55c107bf0605120104t73c5d525j5b639b5d49c5d3bf@mail.gmail.com> <002f01c6760a$a4b03640$0a01a8c0@mischabak> Message-ID: On 5/12/06, Mischa Kroon wrote: > Ok this turned out quite a bit longer then expected, hope you don't get > offended by my tone. > Not at all. Suggestions from newcomers are invaluable. :) I've modified the start page, after the release unfortunately, with links to the rubyforge downloads page mentioning Spark, Flare and the examples archive. A link to nitroproject.org is a good idea, as well as linking to oxyliquit.de for tutorials and questions. All in all, some good suggestions we should work on incorporating. Thanks, Bryan From james_b at neurogami.com Fri May 12 21:14:26 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 12 May 2006 18:14:26 -0700 Subject: [Nitro] Question about template paths with unit testsb In-Reply-To: References: <4463A1BD.1030305@neurogami.com> <4463C035.40609@neurogami.com> Message-ID: <446532F2.6080809@neurogami.com> Bryan Soto wrote: > On 5/11/06, James Britt wrote: > >>>The file test.rb sets a global to prevent the process from performing >>>a chdir, which makes Nitro look for templates in test/templates. That >>>was the first way I stumbled on to duplicate your problem. >>> >> >>:( >> >>I need to change that. >> > > > Crap. That won't work because $0 will be your test file. > > Okay, to keep you going, setting Template.root like this in your run.rb > > Template.root = File.expand_path(File.join(File.dirname(__FILE__), > 'templates')) > > should work. and indeed it does. > > More hackishly, in your test file, > > Template.root = '../templates' When testing the controllers and templates I think I will likely be including 'run.rb' to ensure that I've set up the paths and loaded the assorted libraries. So long as the template path is defined in run.rb, the rest should Just Work. No? -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From james_b at neurogami.com Fri May 12 21:35:15 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 12 May 2006 18:35:15 -0700 Subject: [Nitro] Og/Nitro Unit tests: Success! Message-ID: <446537D3.5030502@neurogami.com> Thanks to the help I've received here, I am now successfully running unit tests for my Og/Nitro app's models and controllers. It's pretty straightforward, once a few bumps are sorted out. Thanks again! -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From james_b at neurogami.com Fri May 12 21:38:06 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 12 May 2006 18:38:06 -0700 Subject: [Nitro] Reap error Message-ID: <4465387E.8020403@neurogami.com> I thought I take Reap for a spin with my newest Nitro project, and followed the instructions on the Reap project page: To get started, you'll need a pre-existing ProjectInfo file and then modify it to fit your project. Beside copying another project's ProjectInfo file you can ask Reap for an empty one. ~/myproj$ reap template But it doesn't seem to like me: d:\development\30SR\ng.slvgr.com>reap template c:/ruby/lib/ruby/gems/1.8/gems/reap-2005.10.17/bin/reap:5: uninitialized constant ReapCommand (NameError) from c:/ruby/bin/reap:18 Suggestions? ruby 1.8.4 (2005-12-24) [i386-mswin32] reap (2005.10.17, 5.0.0) WinXP. -- James Britt From bryan.a.soto at gmail.com Sat May 13 01:42:14 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 12 May 2006 22:42:14 -0700 Subject: [Nitro] Reap error In-Reply-To: <4465387E.8020403@neurogami.com> References: <4465387E.8020403@neurogami.com> Message-ID: On 5/12/06, James Britt wrote: > ruby 1.8.4 (2005-12-24) [i386-mswin32] > reap (2005.10.17, 5.0.0) > > WinXP. I was playing with Reap last night on the same setup. :) If you actually have reap 5.0.0 installed: C:\> gem uninstall reap --version=2005.10.17 Or to be sure, C:\> gem uninstall reap --all C:\> gem install reap You're caught in Reap versioning problems. You might also want to double-check your versions of Facets as well. You shouldn't see any at version 2005.*.*. Also, I've alerted Trans to this already, you'll need to have a HOME environment variable set because Ruby tries to use it when running File.expand_path('~/some_file'). If you don't want to actually change that environment setting permanently, running: C:\> set HOME=%HOMEDRIVE%%HOMEPATH% # <-- No spaces. in your shell before using reap will suffice. After that, I don't recall running into any other issues. Hope that helps, Bryan From bryan.a.soto at gmail.com Sat May 13 01:43:56 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 12 May 2006 22:43:56 -0700 Subject: [Nitro] Og/Nitro Unit tests: Success! In-Reply-To: <446537D3.5030502@neurogami.com> References: <446537D3.5030502@neurogami.com> Message-ID: On 5/12/06, James Britt wrote: > Thanks to the help I've received here, I am now successfully running > unit tests for my Og/Nitro app's models and controllers. > > It's pretty straightforward, once a few bumps are sorted out. > > Thanks again! > It's actually quite nice to see 'Success!' in a subject line... From bryan.a.soto at gmail.com Sat May 13 01:57:34 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 12 May 2006 22:57:34 -0700 Subject: [Nitro] Question about template paths with unit testsb In-Reply-To: <446532F2.6080809@neurogami.com> References: <4463A1BD.1030305@neurogami.com> <4463C035.40609@neurogami.com> <446532F2.6080809@neurogami.com> Message-ID: On 5/12/06, James Britt wrote: > > More hackishly, in your test file, > > > > Template.root = '../templates' > > When testing the controllers and templates I think I will likely be > including 'run.rb' to ensure that I've set up the paths and loaded the > assorted libraries. So long as the template path is defined in run.rb, > the rest should Just Work. No? > Oh, I definitely preferred the first option. The above was a bad hack if you didn't want to specify the full path in your run.rb file. Bryan From james_b at neurogami.com Sat May 13 02:01:42 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 12 May 2006 23:01:42 -0700 Subject: [Nitro] Reap error In-Reply-To: References: <4465387E.8020403@neurogami.com> Message-ID: <44657646.4040805@neurogami.com> Bryan Soto wrote: ... > If you actually have reap 5.0.0 installed: > > C:\> gem uninstall reap --version=2005.10.17 > > Or to be sure, > > C:\> gem uninstall reap --all > C:\> gem install reap > > You're caught in Reap versioning problems. You might also want to > double-check your versions of Facets as well. You shouldn't see any at > version 2005.*.*. > > Also, I've alerted Trans to this already, you'll need to have a HOME > environment variable set because Ruby tries to use it when running > File.expand_path('~/some_file'). > > If you don't want to actually change that environment setting > permanently, running: > > C:\> set HOME=%HOMEDRIVE%%HOMEPATH% # <-- No spaces. > > in your shell before using reap will suffice. > > After that, I don't recall running into any other issues. > > Hope that helps, Yes, it does. It's convinced me to not use Reap until the distribution and dependencies are more mature. -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://web2.0validator.com - We're the Dot in Web 2.0 From james_b at neurogami.com Sat May 13 02:04:23 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 12 May 2006 23:04:23 -0700 Subject: [Nitro] Question about template paths with unit testsb In-Reply-To: References: <4463A1BD.1030305@neurogami.com> <4463C035.40609@neurogami.com> <446532F2.6080809@neurogami.com> Message-ID: <446576E7.7010104@neurogami.com> Bryan Soto wrote: > ... > Oh, I definitely preferred the first option. The above was a bad hack > if you didn't want to specify the full path in your run.rb file. > Well, I often have my app code figuring out where it lives and where other things are relative to itself, so defining an APP_ROOT constant right up front is handy. And once I've done that, using it when setting paths is no bother, and saves trouble later on. -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://web2.0validator.com - We're the Dot in Web 2.0 From bryan.a.soto at gmail.com Sat May 13 02:33:51 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 12 May 2006 23:33:51 -0700 Subject: [Nitro] REST helper In-Reply-To: <55c107bf0605112345j2727e212w5f913c82b0ab7662@mail.gmail.com> References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> <55c107bf0605112345j2727e212w5f913c82b0ab7662@mail.gmail.com> Message-ID: On 5/11/06, Dimitri Aivaliotis wrote: > It's meant as a vehicle for discussion, not to actually work yet. ;) > I quickly figured that out. ;) Okay, let's discuss. I'm intrigued that it seems possible to do this as a helper. I'd always assumed it'd be necessary to modify Nitro to make it restful. Do you think it can or is this just a start? And do you have any ideas on how to handle the differing method of output? It seems with George's recent compiler work, the pieces might be in place for this. I don't mean you directly, Dimitri, in the above, though if you have thoughts I'd be interested to hear them. What other topics did you want to talk about? :) Bryan From george.moschovitis at gmail.com Sat May 13 05:12:53 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 13 May 2006 12:12:53 +0300 Subject: [Nitro] First attempt at a parts mini howto. Message-ID: Dear devs. As I promised to Jonas, I just added the following RDOc to the repo.nitroproject.org version of lib/nitro/part.rb: # A part is a module of reusable functionality encapsulated as # a mini site/app. You can require (include) multiple parts in # your application. A part is in essence a high level component. # # The directory structure of a part mirrors the structure # of a typicall web application. By conventions we put the # main directories of parts in a root directory called 'part'. # # Let's demonstrate the above with an example. Two parts are # defined here. A user management part (users) and a CMS # (content). A typical dir structure goes like this ($ is a # directory in the load path, this means you can put parts in # multiple places as long as the are in the load path): # # $/part # parts will be stored here. # # $/part/users.rb # helper file used to 'require' the part. # $/part/users/public/ # $/part/users/controller.rb # $/part/users/controller/xml.rb # $/part/users/model/user.rb # $/part/users/model/acl.rb # $/part/users/template/login.xhtml # $/part/users/template/form.xinc # $/part/users/run.rb # starts an 'example' application for this part. # # $/part/content.rb # $/part/content/controller.rb # $/part/content/model.rb # ... # # Given this direcotry structure you can 'require' a part # like this: # # require 'part/users' # require 'part/content' # # The helper files (for example the file part/users.rb) typically # require the part files needed by default. # # The 'example' application start files (for example part/users/run.rb) # are optional. If present, they start a small application that # demonstrates the usage of the part. In the example app, the main # part controller is mounted at the root ('/'). Typically, in # your own applications, you will mount the controller as needed, # (for example: 'users' => UsersController, # 'blog' => 'ContentController') # # The files that reside in the public directory are typically # copied by a code generator to your application public dir. # # Part controllers setup the template root stack to lookup # templates in their local template dir (for example part/users/template) # if a template is not found in the applications normal template # root. In essence, by requiring a part a target application, # 'inherits' its templates. If you want to customize (override) # one template, just place a template with the same name in the # respective directory in the application template root. I hope the above text makes some sense to you. If you have any questions, found any typos or can suggest improvements, please let me know! regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Sat May 13 05:41:45 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 13 May 2006 12:41:45 +0300 Subject: [Nitro] Og/Nitro Unit tests: Success! In-Reply-To: References: <446537D3.5030502@neurogami.com> Message-ID: => > It's pretty straightforward, once a few bumps are sorted out. > > > > Thanks again! > > > > It's actually quite nice to see 'Success!' in a subject line... nice indeed ;-) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From john at oxyliquit.de Sat May 13 05:41:55 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 13 May 2006 11:41:55 +0200 Subject: [Nitro] [PATCH] bundle In-Reply-To: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> References: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> Message-ID: On Fri, 12 May 2006 11:59:47 +0200, guillaume pierronnet wrote: > hi, > here is a bundle against repo.nitroproject.org Hi, please use devlab as reference, thank you :) > Fri May 12 11:34:40 CEST 2006 Guillaume Pierronnet > * fixed a bug when computing parameters to actions I had problems with this bug, care to elaborate what the bug actually was and why the "else" fixes it? #params.concat(context.params.values) << that line. Maybe you or someone else here can tell me what it actually does? > Fri May 12 11:48:22 CEST 2006 Guillaume Pierronnet > * og/lib/glue/taggable.rb refactor + support for passing :condition > parameter > SqlStore#prepare_statement moved to public scope > test case on taggable runs fine Nice change, that removes a bit of redundancy :) One thing though, are you using tabs for indenting? The patches where a little messy at some parts. Anyway, keep the patches coming! :D Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sat May 13 05:45:03 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 13 May 2006 12:45:03 +0300 Subject: [Nitro] Nitro first impressions - Start page + suggestions In-Reply-To: References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> <55c107bf0605120104t73c5d525j5b639b5d49c5d3bf@mail.gmail.com> <002f01c6760a$a4b03640$0a01a8c0@mischabak> Message-ID: > I've modified the start page, after the release unfortunately, with If you can improve the start page even further it would be great Bryan ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From m.fellinger at gmail.com Sat May 13 07:11:23 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 13 May 2006 20:11:23 +0900 Subject: [Nitro] [PATCH] error-page, ez TrueClass Message-ID: <9c00d3e00605130411w7d94b562x7498a6a7bc159768@mail.gmail.com> hey nitroists :) i've attached the fix for the error-page so it displays the source sourrounding errors in the backtrace again, there was a parameter in wrong order and the new compiler-pipeline was not respected - it never failed because it was sourrounded by a rescue... the other patch in there is the ez-trueclass-fix again, it seems that it has been ignored last time ~~~~manveru -------------- next part -------------- A non-text attachment was scrubbed... Name: ez_and_error_page_fixes.tar.gz Type: application/x-gzip Size: 1566 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060513/d4b0a22b/attachment.gz From surrender_it at yahoo.it Sat May 13 07:51:59 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sat, 13 May 2006 13:51:59 +0200 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: Message-ID: George Moschovitis ha scritto: > I hope the above text makes some sense to you. If you have any > questions, found any typos or can suggest improvements, please let me > know! Thanks for this george, sounds nice. Notes: there is a typo "directory" misspelled as "direcotry". I think you may expand a little the text about the files in public/. They are "tipically copied by a code generator" but how does this work? Is it only for the "builtin" parts such as part/admin? What is the road I should go to have reusable parts with stuff in public/ ? Also, a general question: why the part directory structure does not respect the tipical convention of putting sources in src/ ? From itsme213 at hotmail.com Sat May 13 09:18:57 2006 From: itsme213 at hotmail.com (itsme213) Date: Sat, 13 May 2006 08:18:57 -0500 Subject: [Nitro] REST helper References: <55c107bf0605110635j5869f2b5je61d792c1f5620f7@mail.gmail.com> <20060511170300.GB28045@hijacked.us> Message-ID: "Andrew Thompson" wrote in message news:20060511170300.GB28045 at hijacked.us... > On Thu, May 11, 2006 at 07:49:16PM +0300, George Moschovitis wrote: >> What is BDD? And RSpec? >> > BDD stands for Behaviour driven development and RSpec is the ruby > framework used > to do BDD: http://rspec.rubyforge.org It is a _fantastic_ alternative to test/unit. Tests using test/unit often seem to lose sight the forest (specification fragments with corresponding tests) for the trees (details of saying things in test/unit). From zimba.tm at gmail.com Sat May 13 10:13:17 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Sat, 13 May 2006 16:13:17 +0200 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: Message-ID: <3ff63f9b0605130713p7604d1a6k77da6fe626bd3fbb@mail.gmail.com> Hi George, thanks for this little doc. This is about how I thought you managedthe thing. I was wondering how you'd manage the different publicfiles. So basically, parts are nitro applications. The only differenceis that they are in a part/ folder right ? Finally, do you plan to make mountable parts like camping's modules ? Part.require(:users)Users.mount('/users') All controllers in the Users module would be the mounted relative to that -- Cheers, zimba http://zimba.oree.ch From guillaume.pierronnet at gmail.com Sat May 13 12:27:54 2006 From: guillaume.pierronnet at gmail.com (guillaume pierronnet) Date: Sat, 13 May 2006 18:27:54 +0200 Subject: [Nitro] [PATCH] bundle In-Reply-To: References: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> Message-ID: <6a7d49ca0605130927gd57c991wfe652743cfbed47d@mail.gmail.com> 2006/5/13, Jonathan Buch : > On Fri, 12 May 2006 11:59:47 +0200, guillaume pierronnet > wrote: > > > hi, > > here is a bundle against repo.nitroproject.org > > Hi, please use devlab as reference, thank you :) > ok ! > > Fri May 12 11:34:40 CEST 2006 Guillaume Pierronnet > > * fixed a bug when computing parameters to actions > > I had problems with this bug, care to elaborate what the bug actually > was and why the "else" fixes it? > yes, imagine you have an url like this: "http://mysite.com/action/dothat?option=1" and you have defined your function like that def action(what_to_do) ... end without the patch, the dispatcher try to call your function with 2 parameters: action("dothat", "1") which is wrong with the patch, "option" stay in request[ ] and action is called with only one parameter. that's it! > #params.concat(context.params.values) << that line. > > Maybe you or someone else here can tell me what it actually does? > > > Fri May 12 11:48:22 CEST 2006 Guillaume Pierronnet > > * og/lib/glue/taggable.rb refactor + support for passing :condition > > parameter > > SqlStore#prepare_statement moved to public scope > > test case on taggable runs fine > > Nice change, that removes a bit of redundancy :) > > One thing though, are you using tabs for indenting? The patches where > a little messy at some parts. yes, that was into the original source code i think, and i don't fixed them in order to keep the patch clear > > Anyway, keep the patches coming! :D > > Kashia > thanks! > -- > 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 > From vikingtux at gmail.com Sat May 13 13:58:37 2006 From: vikingtux at gmail.com (Alexandre Gravem) Date: Sat, 13 May 2006 14:58:37 -0300 Subject: [Nitro] Og/Nitro Unit tests: Success! In-Reply-To: References: <446537D3.5030502@neurogami.com> Message-ID: <40b05ebe0605131058n4772d8bagd94e045f99ae334@mail.gmail.com> Could you post a tutorial or a tip in Oxyliquit about it? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060513/e51c1653/attachment.html From george.moschovitis at gmail.com Sun May 14 05:18:56 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 14 May 2006 12:18:56 +0300 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: Message-ID: > Also, a general question: why the part directory structure does not > respect the tipical convention of putting sources in src/ ? The typicall convention is to NOT put sources in src. In the main app I put files in src as a means of protective namespace. Let me demonstrate with an example: require 'part/users/model/role' # no need for 'namespace protection require 'part/users/skin' # ditto require 'skin' # better protecte this agains the standard ruby classes so use this instead: require 'src/skin' Is this clear enough? regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Sun May 14 05:19:55 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 14 May 2006 12:19:55 +0300 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: <3ff63f9b0605130713p7604d1a6k77da6fe626bd3fbb@mail.gmail.com> References: <3ff63f9b0605130713p7604d1a6k77da6fe626bd3fbb@mail.gmail.com> Message-ID: Extremely easy to do. By the way using annotations a part can define default mountin points for controllers. So there is no need for setup. regards, George. On 5/13/06, Jonas Pfenniger wrote: > Hi George, > thanks for this little doc. This is about how I thought you managedthe thing. I was wondering how you'd manage the different publicfiles. So basically, parts are nitro applications. The only differenceis that they are in a part/ folder right ? > Finally, do you plan to make mountable parts like camping's modules ? > Part.require(:users)Users.mount('/users') > All controllers in the Users module would be the mounted relative to that > > -- Cheers, zimba > http://zimba.oree.ch > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Sun May 14 05:21:17 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 14 May 2006 12:21:17 +0300 Subject: [Nitro] [PATCH] error-page, ez TrueClass In-Reply-To: <9c00d3e00605130411w7d94b562x7498a6a7bc159768@mail.gmail.com> References: <9c00d3e00605130411w7d94b562x7498a6a7bc159768@mail.gmail.com> Message-ID: Thanks, will apply! -g. On 5/13/06, Michael Fellinger wrote: > hey nitroists :) > > i've attached the fix for the error-page so it displays the source > sourrounding errors in the backtrace again, there was a parameter in > wrong order and the new compiler-pipeline was not respected - it never > failed because it was sourrounded by a rescue... > the other patch in there is the ez-trueclass-fix again, it seems that > it has been ignored last time > > ~~~~manveru > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From surrender_it at yahoo.it Sun May 14 05:48:21 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 14 May 2006 11:48:21 +0200 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: Message-ID: George Moschovitis ha scritto: >>Also, a general question: why the part directory structure does not >>respect the tipical convention of putting sources in src/ ? > > > The typicall convention is to NOT put sources in src. In the main app > I put files in src as a means of protective namespace. Let me > demonstrate with an example: > > require 'part/users/model/role' # no need for 'namespace protection > require 'part/users/skin' # ditto > > require 'skin' # better protecte this agains the standard ruby classes > > so use this instead: > > require 'src/skin' > > Is this clear enough? yes, thank you, I had the feeling it would be common to start with a basic application and convert it into a part so I somehow expected it to have the same structure. Now I understand why this is not needed. From george.moschovitis at gmail.com Sun May 14 05:53:14 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 14 May 2006 12:53:14 +0300 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: Message-ID: > yes, thank you, I had the feeling it would be common to start with a > basic application and convert it into a part so I somehow expected it to > have the same structure. Now I understand why this is not needed. however if you (or anyone else) as any idea how we could get rid of src in general, let us know ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Sun May 14 08:37:35 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Sun, 14 May 2006 14:37:35 +0200 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: Message-ID: <3ff63f9b0605140537l768386d1h6d398559394152c8@mail.gmail.com> In general, I consider the lib/ folder as an include folder like anyother include folder. In that way, I should be able to move thisfolder's content in /usr/lib/ruby/1.8 without causing any concerns. So here is my_project's structure : run.rbbin/my_project # launcher like run.rb but that can be public, likelinked in /usr/binlib/my_project.rb # contains a MyProject module with LibPath andother informations. Also global requires for the projectlib/my_project/* # controllers, elements, ...templates/* # my project's templatespublic/* # public data The whole can then easily be put in part/my_project or in any otherplace. The only concern I have is with private datas like thetemplates and public data. If I consider both like the lib folder, Ishould also create a my_project folder inside them. But I don't liketo browse an additionnal folder to access the templates or publicdata. Maybe there's a better way On 14/05/06, George Moschovitis wrote:> > yes, thank you, I had the feeling it would be common to start with a> > basic application and convert it into a part so I somehow expected it to> > have the same structure. Now I understand why this is not needed.>> however if you (or anyone else) as any idea how we could get rid of> src in general,> let us know ;-)>> regards,> George.>> --> http://www.gmosx.com> http://www.navel.gr> http://www.nitrohq.com>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> -- Cheers, zimba http://zimba.oree.ch From james_b at neurogami.com Sun May 14 22:37:03 2006 From: james_b at neurogami.com (James Britt) Date: Sun, 14 May 2006 19:37:03 -0700 Subject: [Nitro] Essential features of a good Nitro demo app Message-ID: <4467E94F.2010207@neurogami.com> I am assembling a demo "Nitro in a Nutshell" app. I have some ideas, but I'm not so sure my current understanding of Nitro allows me to make a proper feature selection. Basically, I want to have something that shows off the most salient features of Nitro, something that would make people take notice and eager to go learn more. For various reasons, the example can't rely too much on Og. But one aspect of Og/Nitro I hope to convey is how one can evolve an application from simple static pages, to dynamic content (using templates and elements and skins and whatever) and controllers, and then to the use of (transient) model classes to represent business objects. And then, if need be, those models can become persistent objects with a few simple modifications. I'd also like to convey the sense that MVC is not an absolute, and that the choice of architecture should depend on the current size and scope of the application. (And, ideally, also show that evolving the architecture as the application changes is not a problem, but there are space constraints on what I can do.) Thanks for any and all suggestions. -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From james_b at neurogami.com Mon May 15 01:19:57 2006 From: james_b at neurogami.com (James Britt) Date: Sun, 14 May 2006 22:19:57 -0700 Subject: [Nitro] Selecting action template at runtime Message-ID: <44680F7D.10800@neurogami.com> I have a controller action that checks posted form data to see if a user is creating a new account or signing in to an existing account. I want to render the new page using different templates based on the situation. How do I do this? I've tried using render_template, but Nitro does not treat the secondary template the same way as it does the default template. (And it raises an error, telling me that my controller does not implement 'template_root'; I was able to hack around that. For testing, I made the default template and the runtime-selected template have the exact same content (both made using ...), but Nitro renders the latter by inserting duplicate content at the top of the final results. It's as if it first renders the selected template ... as raw content, then renders it again as part of the full XHTML rendering. Ideas? What I'm really looking for is to do something like this: def signin if new_account?( request.params ) render welcome elsif valid_account?(request.params ) render profile else render some_error_thing end end -- James Britt "Design depends largely on constraints." ? Charles Eames From m.fellinger at gmail.com Mon May 15 02:02:53 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 15 May 2006 15:02:53 +0900 Subject: [Nitro] Selecting action template at runtime In-Reply-To: <44680F7D.10800@neurogami.com> References: <44680F7D.10800@neurogami.com> Message-ID: <200605151502.53376.m.fellinger@gmail.com> Hey James, The usual way to do that is 'redirect' there are two things you can do redirect '/welcome' # redirects to that url redirect_to_referer # well, you can guess what it does :) i've no idea yet how to get that render correct - i actually even rebuilt a rendering eval(Compiler.new(Nitro::Controller).render_template(text)) with the same result - i.e. double output... in the meanwhile i'm using redirect - like all the time before, but it would be good to know why that fails... it's almost as if the return-value of the action-method is rendered again - but i checked by returning nil and it just doubles again... On Monday 15 May 2006 14:19, James Britt wrote: > I have a controller action that checks posted form data to see if a user > is creating a new account or signing in to an existing account. > > I want to render the new page using different templates based on the > situation. > > How do I do this? > > I've tried using render_template, but Nitro does not treat the secondary > template the same way as it does the default template. (And it raises > an error, telling me that my controller does not implement > 'template_root'; I was able to hack around that. > > For testing, I made the default template and the runtime-selected > template have the exact same content (both made using ...), > but Nitro renders the latter by inserting duplicate content at the top > of the final results. It's as if it first renders the selected template > ... as raw content, then renders it again as part of the > full XHTML rendering. > > > Ideas? > > What I'm really looking for is to do something like this: > > def signin > if new_account?( request.params ) > render welcome > elsif valid_account?(request.params ) > render profile > else > render some_error_thing > end > end -- This TOPS OFF my partygoing experience! Someone I DON'T LIKE is talking to me about a HEART-WARMING European film ... From surrender_it at yahoo.it Mon May 15 11:31:21 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 15 May 2006 17:31:21 +0200 Subject: [Nitro] Small change for FeedHelper Message-ID: Hi people, I think that it would be nice if FeedHelper could take an optional Proc argument to handle href-ization of an object. The current implementation requires that an object implements to_href which is fine, but puts view details in the domain, and makes it impossible to use encode_url for the creation of the href. The change should be backwards compatible and I can submit a patch, what do others think? From james_b at neurogami.com Mon May 15 11:54:16 2006 From: james_b at neurogami.com (James Britt) Date: Mon, 15 May 2006 08:54:16 -0700 Subject: [Nitro] Selecting action template at runtime In-Reply-To: <200605151502.53376.m.fellinger@gmail.com> References: <44680F7D.10800@neurogami.com> <200605151502.53376.m.fellinger@gmail.com> Message-ID: <4468A428.1020609@neurogami.com> Michael Fellinger wrote: > Hey James, > > The usual way to do that is 'redirect' Well, that's what I've ended up doing, but it's a poor hack, since I don't want to do a redirect; I want to handle the single request with a template (i.e. code) selected at runtime. That's not a redirect. One shouldn't be compelled to tell the browser to make a second request just so Nitro can use a different template. Is there no Nitro method along the lines of template_for_this_action = 'foo' ? -- James Britt "In physics the truth is rarely perfectly clear, and that is certainly universally the case in human affairs. Hence, what is not surrounded by uncertainty cannot be the truth." - R. Feynman From john at oxyliquit.de Mon May 15 13:34:25 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 15 May 2006 19:34:25 +0200 Subject: [Nitro] Small change for FeedHelper In-Reply-To: References: Message-ID: Hi, > I think that it would be nice if FeedHelper could take an optional Proc > argument to handle href-ization of an object. This is a good idea, the Feed helper just mimicked the behaviour of the original RssHelper, so it did it like that as well. > The current implementation requires that an object implements to_href > which is fine, but puts view details in the domain, and makes it > impossible to use encode_url for the creation of the href. > The change should be backwards compatible and I can submit a patch, what > do others think? Sure, go ahaid I second that, if it's backwards compatible there is no problem at all, and that change makes things a little more dynamic, so it's good. Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From surrender_it at yahoo.it Mon May 15 16:35:07 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 15 May 2006 22:35:07 +0200 Subject: [Nitro] [PATCH] Re: Small change for FeedHelper In-Reply-To: References: Message-ID: Jonathan Buch ha scritto: > Sure, go ahaid > > I second that, if it's backwards compatible there is no problem at all, > and that change makes things a little more dynamic, so it's good. > ok, I tried to come up with the most simple immediate solution, comments on it will be appreciated, but it is quite simple, basically just adding one method that returns a proper url or false[1]. I wrote the patch against devlab but darcs send failed with it, I packaged it with darcs send http://repo.nitroproject.org -o patchname wich I think should be ok. Some tests for above added, all the other tests still pass. Last thing: it seem that the RDoc comments use @foo where they are actually talking about methods, maybe a documentation-patch would be ok too? [1] well, I think that having two methods has_href? and make_href would be conceptually better, but in the end useless and more messy. From surrender_it at yahoo.it Mon May 15 16:40:24 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 15 May 2006 22:40:24 +0200 Subject: [Nitro] [PATCH] Re: Small change for FeedHelper In-Reply-To: References: Message-ID: gabriele renzi ha scritto: ahem.. forgot the attachment -------------- next part -------------- A non-text attachment was scrubbed... Name: feed_helper_optional_proc.patch.gz Type: application/octet-stream Size: 1665 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060515/2b788ee9/attachment.obj From james_b at neurogami.com Mon May 15 18:15:28 2006 From: james_b at neurogami.com (James Britt) Date: Mon, 15 May 2006 15:15:28 -0700 Subject: [Nitro] Tempalte syntax + scope in Elements Message-ID: <4468FD80.5030809@neurogami.com> I have an element template that is supposed to render user details. I call it from another template File profile_details.xhtml :
  • Name: #{@presenter.name}
  • E-mail:
  • Verified?:
And in the main template, profile.xhtml, I have: This does not work: undefined method `name' for nil:NilClass I tried using #[@presenter.name] but get undefined method `profile_template' for # (MainController has the 'profile' action method.) If I try \#{@presenter.name} then I get undefined method `[]=' for nil:NilClass In file 'c:/ruby/lib/ruby/gems/1.8/gems/og-0.30.0/lib/og/entity.rb' Basically, I want to pass a value to the template, and use that to instantiate a object when the template is rendered. I *thought* that the syntax allowed for chunks of Ruby code, but it isn't at all clear to me when different embedded Ruby is evaluated, nor the scope for their results. Thanks, James Britt --- "In physics the truth is rarely perfectly clear, and that is certainly universally the case in human affairs. Hence, what is not surrounded by uncertainty cannot be the truth." - R. Feynman From george.moschovitis at gmail.com Tue May 16 10:14:20 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 16 May 2006 17:14:20 +0300 Subject: [Nitro] Essential features of a good Nitro demo app In-Reply-To: <4467E94F.2010207@neurogami.com> References: <4467E94F.2010207@neurogami.com> Message-ID: I am not exactly sure what kind of suggestions you are looking for? g. On 5/15/06, James Britt wrote: > I am assembling a demo "Nitro in a Nutshell" app. > > I have some ideas, but I'm not so sure my current understanding of Nitro > allows me to make a proper feature selection. > > Basically, I want to have something that shows off the most salient > features of Nitro, something that would make people take notice and > eager to go learn more. > > For various reasons, the example can't rely too much on Og. But one > aspect of Og/Nitro I hope to convey is how one can evolve an application > from simple static pages, to dynamic content (using templates and > elements and skins and whatever) and controllers, and then to the use of > (transient) model classes to represent business objects. And then, if > need be, those models can become persistent objects with a few simple > modifications. > > I'd also like to convey the sense that MVC is not an absolute, and that > the choice of architecture should depend on the current size and scope > of the application. (And, ideally, also show that evolving the > architecture as the application changes is not a problem, but there are > space constraints on what I can do.) > > > Thanks for any and all suggestions. > > -- > James Britt > > http://www.ruby-doc.org - Ruby Help & Documentation > http://www.artima.com/rubycs/ - The Journal By & For Rubyists > http://www.rubystuff.com - The Ruby Store for Ruby Stuff > http://www.jamesbritt.com - Playing with Better Toys > http://www.30secondrule.com - Building Better Tools > _______________________________________________ > 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 james_b at neurogami.com Tue May 16 10:41:23 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 16 May 2006 07:41:23 -0700 Subject: [Nitro] Essential features of a good Nitro demo app In-Reply-To: References: <4467E94F.2010207@neurogami.com> Message-ID: <4469E493.1050408@neurogami.com> George Moschovitis wrote: > I am not exactly sure what kind of suggestions you are looking for? I'm going to write about Nitro for a publication. There may or may not be a sample application. The goal is to educate the reader on what is Nitro, and what can it do. My material will part of a larger section on Ruby Web development. So, I figure I need to explain how to get a basic Nitro up and running, and then explain the primary development options. I'm assuming that readers will likely want to know how to do templating; how to hook Web requests to code invocation; how to cache pages; how to do conditional output formatting (e.g., HTML or Atom, based on the request ). But I believe there are various Nitro features that make doing common Web dev tasks easier or cleaner or faster than coding everything by hand. I want to know what they are. Basically, given 10 pages or so, what would you want readers to understand about Nitro? -- James Britt "Design depends largely on constraints." - Charles Eames From george.moschovitis at gmail.com Tue May 16 11:02:11 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 16 May 2006 18:02:11 +0300 Subject: [Nitro] Selecting action template at runtime In-Reply-To: <4468A428.1020609@neurogami.com> References: <44680F7D.10800@neurogami.com> <200605151502.53376.m.fellinger@gmail.com> <4468A428.1020609@neurogami.com> Message-ID: At the moment there is no easy way to do this, because Nitro precompiles the template in the generated action method. In retrospect this seems like a design flaw! The good news is that this can be easily fixed, so thans for mentioning it. Just be a little bit patient, this will be improved shortly. regards, George. > Is there no Nitro method along the lines of > > template_for_this_action = 'foo' > > ? > > > -- > James Britt > > "In physics the truth is rarely perfectly clear, and that is certainly > universally the case in human affairs. Hence, what is not surrounded by > uncertainty cannot be the truth." > - R. Feynman > _______________________________________________ > 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 May 16 11:09:53 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 16 May 2006 18:09:53 +0300 Subject: [Nitro] Changes Message-ID: Dear devs, Two changes in repo.nitrohq.com: - Due to popular demand I made a first split in the repo: I removed examples, spark and flare from the main repo (Will add them to a second, demo repo shortly). - while cleaning up Nitro, I removed Wee support. I dont think anyone is using it. And If anyone wants to use Wee components, using just Wee and Og is a better solution. If anyone has any problems/objections with the above, please let me know. regards, George. -- http://www.gmosx.com http://www.nitroproject.org From zimba.tm at gmail.com Tue May 16 11:28:12 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 17:28:12 +0200 Subject: [Nitro] [devlab] darcs, trac, email Message-ID: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> Hi list, you might wonder what happened to the trac. Here are the various things I've investigated lately (with the help ofBryan). I'm now at an edge where I don't know what to do. = Trac+Darcs As you might know, darcs is not the default SCM for Trac. It thus needsome adjustments to make them work together. Previously, I used the Trac+Darcs. It is a customized version of Tracv0.8 with Darcs support. This version is quite old (current release :0.9.5, next : 0.10). As I wanted to add the WebAdmin plugin, I gotstuck to version incompabilites. WebAdmin would allow other users tomanage the Trac without needing to use the command-line and have anSSH account. The author of Trac+Darcs, also has written a DarcsPlugin for Trac 0.10(unstable) that works with the newest Trac SCM generalisationinterface. Unfortunately, this has proven quite unstable. Here is theticket : http://progetti.arstecnica.it/trac+darcs/ticket/6 So I have the choice of : * no WebAdmin * no Browse, no Timeline What should I do ? = Darcs push Another subject is darcs push. As you might know, darcs doesn't havethe push over http that is quite usefull (like subversion). This makesthings more tedious for glycerin commiters to push their changesets tothe repo. The have to : * make a bundle * scp it to devlab * ssh to devlab * apply the bundle These are many steps that makes things quite unconfortable. Or this iswhat I thought until I discovered darcs-client. While investigating, Ifound other push methods that are quite nice. == Darcs client Darcs client is a small tool that hooks into darcs when pushing. Itallows you to send bundles over HTTP or SSH. There are no binaries andit's not in any distro's packages I know of but compiling work okay.The installation process involves GPG keys which makes things a littlebit complicated. You also need to setup an environment variable butthen you're done. I've made some tests with bryan but we're not quitedone yet. For me it seems to work. == Darcs mail Another option to push, would be to setup a mailing list. Thesubmitters would then only have to send a mail with their buldle tothat list. Darcs includes such a functionnality. Glycerin would thenautomatically apply those bundles to it's repo in a 5min periodicallybasis. GPG keys can also be used to only allow authorized people. Iwouldn't care about that very much as people are exposed and we canalways unpull patches by hand. This would allow other people to enterthe game. Also, this would make George happy because he wants pathchesin the mailing-list. So what do you think ? Should I : * Leave the longs SSH pull * Use the unknown darcs-client * Setup devlab to pull patches from a certain mailinglist I hope this e-mail wasn't too long, but I also like to tell what'sgoing on here :-) -- Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Tue May 16 11:33:38 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 17:33:38 +0200 Subject: [Nitro] Changes In-Reply-To: References: Message-ID: <3ff63f9b0605160833m371c878bjfe1392b02c87577d@mail.gmail.com> Hi George, now we have: examples flare gen glue nitro og script spark why not move : examples in nitro and every other in it's own repo ?(where glue should ideally disappear) On 16/05/06, George Moschovitis wrote:> Dear devs,>> Two changes in repo.nitrohq.com:>> - Due to popular demand I made a first split in the repo: I removed> examples, spark and flare from the main repo (Will add them to a> second, demo repo shortly).>> - while cleaning up Nitro, I removed Wee support. I dont think anyone> is using it. And If anyone wants to use Wee components, using just Wee> and Og is a better solution.>> If anyone has any problems/objections with the above, please let me know.>> 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> -- Cheers, zimba http://zimba.oree.ch From george.moschovitis at gmail.com Tue May 16 11:34:08 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 16 May 2006 18:34:08 +0300 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: <3ff63f9b0605140537l768386d1h6d398559394152c8@mail.gmail.com> References: <3ff63f9b0605140537l768386d1h6d398559394152c8@mail.gmail.com> Message-ID: Hmm is there a problem with your mailer? Your mail gets corrupted in Gmail. -g. On 5/14/06, Jonas Pfenniger wrote: > In general, I consider the lib/ folder as an include folder like anyother include folder. In that way, I should be able to move thisfolder's content in /usr/lib/ruby/1.8 without causing any concerns. > So here is my_project's structure : > run.rbbin/my_project # launcher like run.rb but that can be public, likelinked in /usr/binlib/my_project.rb # contains a MyProject module with LibPath andother informations. Also global requires for the projectlib/my_project/* # controllers, elements, ...templates/* # my project's templatespublic/* # public data > The whole can then easily be put in part/my_project or in any otherplace. The only concern I have is with private datas like thetemplates and public data. If I consider both like the lib folder, Ishould also create a my_project folder inside them. But I don't liketo browse an additionnal folder to access the templates or publicdata. Maybe there's a better way > On 14/05/06, George Moschovitis wrote:> > yes, thank you, I had the feeling it would be common to start with a> > basic application and convert it into a part so I somehow expected it to> > have the same structure. Now I understand why this is not needed.>> however if you (or anyone else) as any idea how we could get rid of> src in general,> let us know ;-)>> regards,> George.>> --> http://www.gmosx.com> http://www.navel.gr> http://www.nitrohq.com>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> > > -- Cheers, zimba > http://zimba.oree.ch > _______________________________________________ > 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 May 16 11:45:29 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 16 May 2006 18:45:29 +0300 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> Message-ID: I think patches shouldnt be automatically applied. The current method where Bryan investigates the patches and applies them works quite well. So unless Bryan has problems with it (;-)) I say lets stick to the current way to do things (ie mail the patch to the mailing list, and bryan or me will handle it) regards, George. On 5/16/06, Jonas Pfenniger wrote: > Hi list, > you might wonder what happened to the trac. > Here are the various things I've investigated lately (with the help ofBryan). I'm now at an edge where I don't know what to do. > = Trac+Darcs > As you might know, darcs is not the default SCM for Trac. It thus needsome adjustments to make them work together. > Previously, I used the Trac+Darcs. It is a customized version of Tracv0.8 with Darcs support. This version is quite old (current release :0.9.5, next : 0.10). As I wanted to add the WebAdmin plugin, I gotstuck to version incompabilites. WebAdmin would allow other users tomanage the Trac without needing to use the command-line and have anSSH account. > The author of Trac+Darcs, also has written a DarcsPlugin for Trac 0.10(unstable) that works with the newest Trac SCM generalisationinterface. Unfortunately, this has proven quite unstable. Here is theticket : http://progetti.arstecnica.it/trac+darcs/ticket/6 > So I have the choice of : * no WebAdmin * no Browse, no Timeline > What should I do ? > = Darcs push > Another subject is darcs push. As you might know, darcs doesn't havethe push over http that is quite usefull (like subversion). This makesthings more tedious for glycerin commiters to push their changesets tothe repo. The have to : * make a bundle * scp it to devlab * ssh to devlab * apply the bundle > These are many steps that makes things quite unconfortable. Or this iswhat I thought until I discovered darcs-client. While investigating, Ifound other push methods that are quite nice. > == Darcs client > Darcs client is a small tool that hooks into darcs when pushing. Itallows you to send bundles over HTTP or SSH. There are no binaries andit's not in any distro's packages I know of but compiling work okay.The installation process involves GPG keys which makes things a littlebit complicated. You also need to setup an environment variable butthen you're done. I've made some tests with bryan but we're not quitedone yet. For me it seems to work. > == Darcs mail > Another option to push, would be to setup a mailing list. Thesubmitters would then only have to send a mail with their buldle tothat list. Darcs includes such a functionnality. Glycerin would thenautomatically apply those bundles to it's repo in a 5min periodicallybasis. GPG keys can also be used to only allow authorized people. Iwouldn't care about that very much as people are exposed and we canalways unpull patches by hand. This would allow other people to enterthe game. Also, this would make George happy because he wants pathchesin the mailing-list. > So what do you think ? Should I : * Leave the longs SSH pull * Use the unknown darcs-client * Setup devlab to pull patches from a certain mailinglist > I hope this e-mail wasn't too long, but I also like to tell what'sgoing on here :-) > -- Cheers, zimba > http://zimba.oree.ch > _______________________________________________ > 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 zimba.tm at gmail.com Tue May 16 12:19:43 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 18:19:43 +0200 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> Message-ID: <3ff63f9b0605160919i7af48bb9g7a29116c7689bda6@mail.gmail.com> On 16/05/06, George Moschovitis wrote:> I think patches shouldnt be automatically applied. The current method> where Bryan investigates the patches and applies them works quite> well. So unless Bryan has problems with it (;-)) I say lets stick to> the current way to do things (ie mail the patch to the mailing list,> and bryan or me will handle it) Another option would be to setup darcs to pull patches from themailing-list. That way it is still done by hand but it would avoidhaving to submit the patches at two locations. -- Cheers, zimba http://zimba.oree.ch From transfire at gmail.com Tue May 16 12:25:28 2006 From: transfire at gmail.com (TRANS) Date: Tue, 16 May 2006 12:25:28 -0400 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> Message-ID: <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> Doesn't Darcs have a cgi script for code browsing? Also Rubyforge has a bug tracker, while I understand that Trac presents a nice unified interface does it provide substantially more than this? It would seem to me best to either help fix Trac to support Darcs presently, or use the wokring tools we have now and maybe switch to Trac later when it is ready, or, of course, build a new one with Nitro ;-) T. From transfire at gmail.com Tue May 16 12:33:18 2006 From: transfire at gmail.com (TRANS) Date: Tue, 16 May 2006 12:33:18 -0400 Subject: [Nitro] Hi and Facets News Message-ID: <4b6f054f0605160933p3b620d68u5711ca87514b5f4b@mail.gmail.com> Been out of town for a few days. But now I'm back and catching up on emails. I've just finished improving documentation in Facets (there was some minor issues causing some documentation not to show up in RDocs). I'll be releasing new version in the next couple of days which adds a couple of new features. Please let me know if there's anything you want/need to add/change before than. After that I'll (finally) use Darcs and pass the official repository over from my system to devlab. T. From zimba.tm at gmail.com Tue May 16 12:50:50 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 18:50:50 +0200 Subject: [Nitro] Hi and Facets News In-Reply-To: <4b6f054f0605160933p3b620d68u5711ca87514b5f4b@mail.gmail.com> References: <4b6f054f0605160933p3b620d68u5711ca87514b5f4b@mail.gmail.com> Message-ID: <3ff63f9b0605160950k6ee28ba0p97705c8168be0dfd@mail.gmail.com> Great news ! Would you also move reap to devlab ? -- Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Tue May 16 12:55:33 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 18:55:33 +0200 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> Message-ID: <3ff63f9b0605160955k22d7f2b0g780653fe79db2355@mail.gmail.com> On 16/05/06, TRANS wrote:> Doesn't Darcs have a cgi script for code browsing? Yes it's also an option > Also Rubyforge has> a bug tracker, while I understand that Trac presents a nice unified> interface does it provide substantially more than this? What's so great about Trac is the integration of the various features : * In the wiki or in any commit, you can put #ticket_number. It willautomatically be linked * Same to reffer to a changeset (don't remeber) or a [wiki:page] * Timeline exports an RSS that lets me use my regular RSS client tomonitor activity * Tickets are customisable > It would seem to me best to either help fix Trac to support Darcs> presently, or use the wokring tools we have now and maybe switch to> Trac later when it is ready, or, of course, build a new one with Nitro> ;-) There has been a RoR attempt to reproduce trac but it's not quitethere / stalled. Trac is unfortunately written in Python, where myskills kind of lack Thanks for you input -- Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Tue May 16 12:56:33 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 18:56:33 +0200 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: <3ff63f9b0605140537l768386d1h6d398559394152c8@mail.gmail.com> Message-ID: <3ff63f9b0605160956w1df97d1ai2e6c68b96fda79bc@mail.gmail.com> damn, it's the regular Gmail interface On 16/05/06, George Moschovitis wrote:> Hmm is there a problem with your mailer? Your mail gets corrupted in Gmail.>> -g.>> On 5/14/06, Jonas Pfenniger wrote:> > In general, I consider the lib/ folder as an include folder like anyother include folder. In that way, I should be able to move thisfolder's content in /usr/lib/ruby/1.8 without causing any concerns.> > So here is my_project's structure :> > run.rbbin/my_project # launcher like run.rb but that can be public, likelinked in /usr/binlib/my_project.rb # contains a MyProject module with LibPath andother informations. Also global requires for the projectlib/my_project/* # controllers, elements, ...templates/* # my project's templatespublic/* # public data> > The whole can then easily be put in part/my_project or in any otherplace. The only concern I have is with private datas like thetemplates and public data. If I consider both like the lib folder, Ishould also create a my_project folder inside them. But I don't liketo browse an additionnal folder to access the templates or publicdata. Maybe there's a better way> > On 14/05/06, George Moschovitis wrote:> > yes, thank you, I had the feeling it would be common to start with a> > basic application and convert it into a part so I somehow expected it to> > have the same structure. Now I understand why this is not needed.>> however if you (or anyone else) as any idea how we could get rid of> src in general,> let us know ;-)>> regards,> George.>> --> http://www.gmosx.com> http://www.navel.gr> http://www.nitrohq.com>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general>> >> > -- Cheers, zimba> > http://zimba.oree.ch> > _______________________________________________> > 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> -- Cheers, zimba http://zimba.oree.ch From transfire at gmail.com Tue May 16 12:58:05 2006 From: transfire at gmail.com (TRANS) Date: Tue, 16 May 2006 12:58:05 -0400 Subject: [Nitro] Hi and Facets News In-Reply-To: <3ff63f9b0605160950k6ee28ba0p97705c8168be0dfd@mail.gmail.com> References: <4b6f054f0605160933p3b620d68u5711ca87514b5f4b@mail.gmail.com> <3ff63f9b0605160950k6ee28ba0p97705c8168be0dfd@mail.gmail.com> Message-ID: <4b6f054f0605160958v627dcd59ub96b81c033c0e2aa@mail.gmail.com> On 5/16/06, Jonas Pfenniger wrote: > Great news ! Would you also move reap to devlab ? Yep. But I want to do some more work on Reap first. -- technically speaking Reap should have a version of 0.5 rather than 5.0, but I got ahead of myself at one point and now I'm stuck with the higher numbers ;) So in about a month I'll do that I'll have that ready to upload too. T. From zimba.tm at gmail.com Tue May 16 13:06:38 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 19:06:38 +0200 Subject: [Nitro] Hi and Facets News In-Reply-To: <4b6f054f0605160958v627dcd59ub96b81c033c0e2aa@mail.gmail.com> References: <4b6f054f0605160933p3b620d68u5711ca87514b5f4b@mail.gmail.com> <3ff63f9b0605160950k6ee28ba0p97705c8168be0dfd@mail.gmail.com> <4b6f054f0605160958v627dcd59ub96b81c033c0e2aa@mail.gmail.com> Message-ID: <3ff63f9b0605161006q2234ea51wf06cd2f2728f7881@mail.gmail.com> Okay. Here is some things I found out for your next version : * The templates are not right for the version - they don't use !!task postfix - sub-variables are capitalized * If you make an empty task like "RDOC: !!rdoc" without specifyingarguments, YAML doesn't build a hash. This makes reap fail ;-) -- Cheers, zimba http://zimba.oree.ch From transfire at gmail.com Tue May 16 13:39:22 2006 From: transfire at gmail.com (TRANS) Date: Tue, 16 May 2006 13:39:22 -0400 Subject: [Nitro] Hi and Facets News In-Reply-To: <3ff63f9b0605161006q2234ea51wf06cd2f2728f7881@mail.gmail.com> References: <4b6f054f0605160933p3b620d68u5711ca87514b5f4b@mail.gmail.com> <3ff63f9b0605160950k6ee28ba0p97705c8168be0dfd@mail.gmail.com> <4b6f054f0605160958v627dcd59ub96b81c033c0e2aa@mail.gmail.com> <3ff63f9b0605161006q2234ea51wf06cd2f2728f7881@mail.gmail.com> Message-ID: <4b6f054f0605161039w640f3b40seb536b6f7497e1c5@mail.gmail.com> On 5/16/06, Jonas Pfenniger wrote: > Okay. > Here is some things I found out for your next version : > * The templates are not right for the version - they don't use !!task postfix - sub-variables are capitalized * If you make an empty task like "RDOC: !!rdoc" without specifyingarguments, YAML doesn't build a hash. This makes reap fail > ;-) Thanks. I'll fix those ASAP. T. From zimba.tm at gmail.com Tue May 16 13:58:24 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 16 May 2006 19:58:24 +0200 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: <3ff63f9b0605160955k22d7f2b0g780653fe79db2355@mail.gmail.com> References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> <3ff63f9b0605160955k22d7f2b0g780653fe79db2355@mail.gmail.com> Message-ID: <3ff63f9b0605161058w439930fo398be4045c960cb1@mail.gmail.com> Here is a last idea about Trac : tailor Tailor is the gumstick between various SCM. I could build an automatetaks that imports the darcs repo into SVN. That way : - I have a stable Trac, maintained by my disto - I can use Trac plugins - People can get nitro's source with svn (?) - Darcs can still be used in a distributed mode without problem I'm currently trying to merge glycerin into svn and it seems to work quite well. -- Cheers, zimba http://zimba.oree.ch From james_b at neurogami.com Tue May 16 18:06:18 2006 From: james_b at neurogami.com (James Britt) Date: Tue, 16 May 2006 15:06:18 -0700 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: References: <3ff63f9b0605140537l768386d1h6d398559394152c8@mail.gmail.com> Message-ID: <446A4CDA.4010405@neurogami.com> George Moschovitis wrote: > Hmm is there a problem with your mailer? Your mail gets corrupted in Gmail. > Not just GMail. It shows up in Thunderbird as one, *long* line. James > -g. > > On 5/14/06, Jonas Pfenniger wrote: > >>In general, I consider the lib/ folder as an include folder like anyother include folder. In that way, I should be able to move thisfolder's content in /usr/lib/ruby/1.8 without causing any concerns. >>So here is my_project's structure : >>run.rbbin/my_project # launcher like run.rb but that can be public, likelinked in /usr/binlib/my_project.rb # contains a MyProject module with LibPath andother informations. Also global requires for the projectlib/my_project/* # controllers, elements, ...templates/* # my project's templatespublic/* # public data >>The whole can then easily be put in part/my_project or in any otherplace. The only concern I have is with private datas like thetemplates and public data. If I consider both like the lib folder, Ishould also create a my_project folder inside them. But I don't liketo browse an additionnal folder to access the templates or publicdata. Maybe there's a better way >>On 14/05/06, George Moschovitis wrote:> > yes, thank you, I had the feeling it would be common to start with a> > basic application and convert it into a part so I somehow expected it to> > have the same structure. Now I understand why this is not needed.>> however if you (or anyone else) as any idea how we could get rid of> src in general,> let us know ;-)>> regards,> George.>> --> http://www.gmosx.com> http://www.navel.gr> http://www.nitrohq.com>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> >> >>-- Cheers, zimba >>http://zimba.oree.ch >>_______________________________________________ >>Nitro-general mailing list >>Nitro-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/nitro-general >> > > > From transfire at gmail.com Tue May 16 19:09:58 2006 From: transfire at gmail.com (TRANS) Date: Tue, 16 May 2006 19:09:58 -0400 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: <3ff63f9b0605161058w439930fo398be4045c960cb1@mail.gmail.com> References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> <3ff63f9b0605160955k22d7f2b0g780653fe79db2355@mail.gmail.com> <3ff63f9b0605161058w439930fo398be4045c960cb1@mail.gmail.com> Message-ID: <4b6f054f0605161609j3a741a04j23cf6773440a4dc@mail.gmail.com> On 5/16/06, Jonas Pfenniger wrote: > Here is a last idea about Trac : tailor > Tailor is the gumstick between various SCM. I could build an automatetaks that imports the darcs repo into SVN. > That way : - I have a stable Trac, maintained by my disto - I can use Trac plugins - People can get nitro's source with svn (?) - Darcs can still be used in a distributed mode without problem > I'm currently trying to merge glycerin into svn and it seems to work quite well. Is it a two way street? What if people push to the SVN repo? T. From transfire at gmail.com Tue May 16 19:11:02 2006 From: transfire at gmail.com (TRANS) Date: Tue, 16 May 2006 19:11:02 -0400 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: <4b6f054f0605161609j3a741a04j23cf6773440a4dc@mail.gmail.com> References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> <3ff63f9b0605160955k22d7f2b0g780653fe79db2355@mail.gmail.com> <3ff63f9b0605161058w439930fo398be4045c960cb1@mail.gmail.com> <4b6f054f0605161609j3a741a04j23cf6773440a4dc@mail.gmail.com> Message-ID: <4b6f054f0605161611u3da88e76jdb651d4b4f5e25b9@mail.gmail.com> On 5/16/06, TRANS wrote: > On 5/16/06, Jonas Pfenniger wrote: > > Here is a last idea about Trac : tailor > > Tailor is the gumstick between various SCM. I could build an automatetaks that imports the darcs repo into SVN. > > That way : - I have a stable Trac, maintained by my disto - I can use Trac plugins - People can get nitro's source with svn (?) - Darcs can still be used in a distributed mode without problem > > I'm currently trying to merge glycerin into svn and it seems to work quite well. > > Is it a two way street? What if people push to the SVN repo? Oh, but nonetheless I think this is a good idea. Then Rubyforge's SVN repo can be used too (yes?) T. From m.fellinger at gmail.com Wed May 17 01:03:54 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 17 May 2006 14:03:54 +0900 Subject: [Nitro] First attempt at a parts mini howto. In-Reply-To: <446A4CDA.4010405@neurogami.com> References: <446A4CDA.4010405@neurogami.com> Message-ID: <200605171403.54882.m.fellinger@gmail.com> that's really some gmail-problem when sending mails to mailinglists... i suspect that it converts newlines or does something similarily evil in between, that only happens with mails to rubyforge-MLs as far as i could see... :| viewing the mails from the gmail-interface doesn't show it correct either, so i don't think it's something that they do to get users using gmail to view their mails *paranoid-theory-end* On Wednesday 17 May 2006 07:06, James Britt wrote: > George Moschovitis wrote: > > Hmm is there a problem with your mailer? Your mail gets corrupted in > > Gmail. > > Not just GMail. It shows up in Thunderbird as one, *long* line. > > James > > > -g. > > > > On 5/14/06, Jonas Pfenniger wrote: > >>In general, I consider the lib/ folder as an include folder like anyother > >> include folder. In that way, I should be able to move thisfolder's > >> content in /usr/lib/ruby/1.8 without causing any concerns. So here is > >> my_project's structure : > >>run.rbbin/my_project # launcher like run.rb but that can be public, > >> likelinked in /usr/binlib/my_project.rb # contains a MyProject module > >> with LibPath andother informations. Also global requires for the > >> projectlib/my_project/* # controllers, elements, ...templates/* # my > >> project's templatespublic/* # public data The whole can then easily be > >> put in part/my_project or in any otherplace. The only concern I have is > >> with private datas like thetemplates and public data. If I consider both > >> like the lib folder, Ishould also create a my_project folder inside > >> them. But I don't liketo browse an additionnal folder to access the > >> templates or publicdata. Maybe there's a better way On 14/05/06, George > >> Moschovitis wrote:> > yes, thank you, I > >> had the feeling it would be common to start with a> > basic application > >> and convert it into a part so I somehow expected it to> > have the same > >> structure. Now I understand why this is not needed.>> however if you (or > >> anyone else) as any idea how we could get rid of> src in general,> let > >> us know ;-)>> regards,> George.>> --> http://www.gmosx.com> > >> http://www.navel.gr> http://www.nitrohq.com>> > >> _______________________________________________> Nitro-general mailing > >> list> Nitro-general at rubyforge.org> > >> http://rubyforge.org/mailman/listinfo/nitro-general> > >> > >>-- Cheers, zimba > >>http://zimba.oree.ch > >>_______________________________________________ > >>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 -- One man's "magic" is another man's engineering. "Supernatural" is a null word. -- Robert Heinlein From zimba.tm at gmail.com Wed May 17 02:38:27 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Wed, 17 May 2006 08:38:27 +0200 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: <4b6f054f0605161609j3a741a04j23cf6773440a4dc@mail.gmail.com> References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> <3ff63f9b0605160955k22d7f2b0g780653fe79db2355@mail.gmail.com> <3ff63f9b0605161058w439930fo398be4045c960cb1@mail.gmail.com> <4b6f054f0605161609j3a741a04j23cf6773440a4dc@mail.gmail.com> Message-ID: <1147847907.24182.3.camel@localhost.localdomain> Le mardi 16 mai 2006 ? 19:09 -0400, TRANS a ?crit : > > Is it a two way street? What if people push to the SVN repo? It is possible to go on both ways since SVN and Darcs are supportes as source and destination. It wouldn't be the case for every SCM tailor supports -- Jonas Pfenniger -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060517/dcbc90f2/attachment.bin From zimba.tm at gmail.com Wed May 17 02:40:26 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Wed, 17 May 2006 08:40:26 +0200 Subject: [Nitro] [devlab] darcs, trac, email In-Reply-To: <4b6f054f0605161611u3da88e76jdb651d4b4f5e25b9@mail.gmail.com> References: <3ff63f9b0605160828m15c88d3ckf6536efbcbc9efd7@mail.gmail.com> <4b6f054f0605160925l4fc54eaeg52e10d1b1bae6c14@mail.gmail.com> <3ff63f9b0605160955k22d7f2b0g780653fe79db2355@mail.gmail.com> <3ff63f9b0605161058w439930fo398be4045c960cb1@mail.gmail.com> <4b6f054f0605161609j3a741a04j23cf6773440a4dc@mail.gmail.com> <4b6f054f0605161611u3da88e76jdb651d4b4f5e25b9@mail.gmail.com> Message-ID: <1147848026.24182.6.camel@localhost.localdomain> Le mardi 16 mai 2006 ? 19:11 -0400, TRANS a ?crit : > Oh, but nonetheless I think this is a good idea. Then Rubyforge's SVN > repo can be used too (yes?) I also think it is a good idea but I couldn't manage to make it work correctly for now. It stays stuck on revision 25 or so on ~700 revisions -- Jonas Pfenniger -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060517/8791425d/attachment.bin From surrender_it at yahoo.it Wed May 17 05:17:09 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 17 May 2006 11:17:09 +0200 Subject: [Nitro] [PATCH] Og.setup crash-early Message-ID: Hi people, I submitted this to Trac on devlab, but I think it was not applied and may now be somewhat lost, so I'm resending this here. This patch makes Og.setup fail ASAP when it is started to allow quick diagnostic, avoiding the need to interpret /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/scaffolding.rb:334:in `compile_scaffolding_code': undefined method `manageable_classes' for nil:NilClass (NoMethodError) as "cannot load sqlite3". -------------- next part -------------- A non-text attachment was scrubbed... Name: og.setup-crash-early.patch.gz Type: application/octet-stream Size: 17609 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060517/caf9e761/attachment.obj From fabian at oggu.de Wed May 17 11:04:42 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 17 May 2006 17:04:42 +0200 Subject: [Nitro] [PATCH] Og object to REXML object Message-ID: <262a673e961b689dc64a4296f1f61b58@oggu.de> Rayman requested a to_xml method a while back. Today I got to implement a basic to_xml. Have a look at the attached patch, it's against devlab's repo. Usage: User[1].to_xml which returns a REXML object, so use to_s to get it as String containing XML. It's for a single object only, not for a Collection, since User.all doesn't always return a Collection, but usually an Array, so Array would have to be extended with a to_xml method as well as Collection, so for now, only for single objects (implemented in entity.rb) Fabian -------------- next part -------------- A non-text attachment was scrubbed... Name: to_xml.patch.gz Type: application/x-gzip Size: 1870 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060517/98de0f57/attachment.gz From james_b at neurogami.com Wed May 17 12:33:53 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 17 May 2006 09:33:53 -0700 Subject: [Nitro] [PATCH] Og object to REXML object In-Reply-To: <262a673e961b689dc64a4296f1f61b58@oggu.de> References: <262a673e961b689dc64a4296f1f61b58@oggu.de> Message-ID: <446B5071.5050806@neurogami.com> Fabian Buch wrote: > Rayman requested a to_xml method a while back. Today I got to implement > a basic to_xml. Have a look at the attached patch, it's against devlab's > repo. > > Usage: > > User[1].to_xml > > which returns a REXML object, so use to_s to get it as String containing > XML. > Shouldn't the name then be to_rexml? I think to people would expect to_xml to return a string. (Certainly that's what I would expect, and would be annoyed in getting a DOM object instead.) > It's for a single object only, not for a Collection, since User.all > doesn't always return a Collection, but usually an Array, so Array would > have to be extended with a to_xml method as well as Collection, so for > now, only for single objects (implemented in entity.rb) > What is the format of the XML? Does it follow any current standards or recommendations (e.g., object serialization as defined in XML-RPC or SOAP)? -- James Britt "A principle or axiom is of no value without the rules for applying it." - Len Bullard From surrender_it at yahoo.it Wed May 17 12:42:06 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed, 17 May 2006 18:42:06 +0200 Subject: [Nitro] [PATCH] Og object to REXML object In-Reply-To: <446B5071.5050806@neurogami.com> References: <262a673e961b689dc64a4296f1f61b58@oggu.de> <446B5071.5050806@neurogami.com> Message-ID: James Britt ha scritto: > Fabian Buch wrote: > >>Rayman requested a to_xml method a while back. Today I got to implement >>a basic to_xml. Have a look at the attached patch, it's against devlab's >>repo. >> >>Usage: >> >>User[1].to_xml >> >>which returns a REXML object, so use to_s to get it as String containing >>XML. >> > > > Shouldn't the name then be to_rexml? > > I think to people would expect to_xml to return a string. (Certainly > that's what I would expect, and would be annoyed in getting a DOM object > instead.) +1, maybe to_xml_dom ? From bryan.a.soto at gmail.com Wed May 17 15:24:09 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 17 May 2006 12:24:09 -0700 Subject: [Nitro] [PATCH] Og.setup crash-early In-Reply-To: References: Message-ID: Thanks for re-sending. As I'm sure you've noticed, we've been having some devlab issues of late. :/ On 5/17/06, gabriele renzi wrote: > Hi people, > > I submitted this to Trac on devlab, but I think it was not applied and > may now be somewhat lost, so I'm resending this here. > > This patch makes Og.setup fail ASAP when it is started to allow quick > diagnostic, avoiding the need to interpret > > /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/scaffolding.rb:334:in > `compile_scaffolding_code': undefined method `manageable_classes' for > nil:NilClass (NoMethodError) > > as "cannot load sqlite3". > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > From lists at davidlangston.com Wed May 17 15:52:04 2006 From: lists at davidlangston.com (Dave Langston) Date: Wed, 17 May 2006 12:52:04 -0700 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP Message-ID: <446B7EE4.5050109@davidlangston.com> I have just put a tip up at oxyliquit (http://www.oxyliquit.de/tip/23) re: the subject of this post... as a relative newbie to Nitro (have done some rails developement and deployment however) thought I would try to add to community from the perspective of someone climbing onboard developing primarily in the stepchild OS of WinXP (although production target of projects will be LAMR hosts). Hope this first tip is useful to someone... Dave From james_b at neurogami.com Wed May 17 16:10:45 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 17 May 2006 13:10:45 -0700 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP In-Reply-To: <446B7EE4.5050109@davidlangston.com> References: <446B7EE4.5050109@davidlangston.com> Message-ID: <446B8345.5010605@neurogami.com> Dave Langston wrote: > I have just put a tip up at oxyliquit (http://www.oxyliquit.de/tip/23) > re: the subject of this post... as a relative newbie to Nitro (have done > some rails developement and deployment however) thought I would try to > add to community from the perspective of someone climbing onboard > developing primarily in the stepchild OS of WinXP (although production > target of projects will be LAMR hosts). Hope this first tip is useful > to someone... Thanks, that's quite nice. I also develop on WinXP, but I run Nitro with SCGI and Apache2. It's extremely easy to set up; I should (when time permits) write up a tip for that as well. -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From fabian at oggu.de Wed May 17 16:22:21 2006 From: fabian at oggu.de (Fabian Buch) Date: Wed, 17 May 2006 22:22:21 +0200 Subject: [Nitro] [PATCH] Og object to REXML object In-Reply-To: References: <262a673e961b689dc64a4296f1f61b58@oggu.de> <446B5071.5050806@neurogami.com> Message-ID: <92ad69bfc07bc0c234a7ddf1f4b6d2c2@oggu.de> Am 17.05.2006 um 18:42 schrieb gabriele renzi: > James Britt ha scritto: >> >> Shouldn't the name then be to_rexml? >> >> I think to people would expect to_xml to return a string. (Certainly >> that's what I would expect, and would be annoyed in getting a DOM >> object >> instead.) > > +1, maybe to_xml_dom ? Ok, I guess you're right. For having both, to_rexml now returns a REXML::Element object (so you can incorporate it into other REXML stuff, like REXML::Document) and to_xml returns a String now. Also created a to_xml_dom alias to to_rexml. Am 17.05.2006 um 18:33 schrieb James Britt: > What is the format of the XML? Does it follow any current standards or > recommendations (e.g., object serialization as defined in XML-RPC or > SOAP)? Neither of them. Maybe I should have a look at both, before this patch is included into glycerin. But rayman (the one initially requesting this feature) didn't care about the actual format when I asked about what it should look like. Suggestions welcome. At the moment it looks like the following: My TestModel: class Comment property :body, String property :author, String def initialize(body = nil, author = nil) @body = body @author = author end end c1 = Comment.new('Some body text.', 'Fabian') c1.save Comment[1].to_xml produces: Some body text.Fabian Fabian -------------- next part -------------- A non-text attachment was scrubbed... Name: to_xml.patch2.gz Type: application/x-gzip Size: 1998 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060517/ccc15947/attachment.gz From surrender_it at yahoo.it Wed May 17 18:28:20 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Thu, 18 May 2006 00:28:20 +0200 Subject: [Nitro] [PATCH] Og.setup crash-early In-Reply-To: References: Message-ID: Bryan Soto ha scritto: > Thanks for re-sending. As I'm sure you've noticed, we've been having > some devlab issues of late. :/ > yes, no problem :) From surrender_it at yahoo.it Wed May 17 18:32:05 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Thu, 18 May 2006 00:32:05 +0200 Subject: [Nitro] [PATCH] Og object to REXML object In-Reply-To: <92ad69bfc07bc0c234a7ddf1f4b6d2c2@oggu.de> References: <262a673e961b689dc64a4296f1f61b58@oggu.de> <446B5071.5050806@neurogami.com> <92ad69bfc07bc0c234a7ddf1f4b6d2c2@oggu.de> Message-ID: Fabian Buch ha scritto: >> What is the format of the XML? Does it follow any current standards or >> recommendations (e.g., object serialization as defined in XML-RPC or >> SOAP)? > > > Neither of them. Maybe I should have a look at both, before this patch > is included into glycerin. But rayman (the one initially requesting this > feature) didn't care about the actual format when I asked about what it > should look like. Suggestions welcome. I think that this things could be done easily with builtin libraries (i.e. SOAP4R's XSD::Mapping.obj2xml) so if someone needs this functionality maybe it could be possible to just point out them in the docs. From bryan.a.soto at gmail.com Wed May 17 18:56:35 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 17 May 2006 15:56:35 -0700 Subject: [Nitro] [PATCH] Og object to REXML object In-Reply-To: References: <262a673e961b689dc64a4296f1f61b58@oggu.de> <446B5071.5050806@neurogami.com> <92ad69bfc07bc0c234a7ddf1f4b6d2c2@oggu.de> Message-ID: On 5/17/06, gabriele renzi wrote: > Fabian Buch ha scritto: > > >> What is the format of the XML? Does it follow any current standards or > >> recommendations (e.g., object serialization as defined in XML-RPC or > >> SOAP)? > > > > > > Neither of them. Maybe I should have a look at both, before this patch > > is included into glycerin. But rayman (the one initially requesting this > > feature) didn't care about the actual format when I asked about what it > > should look like. Suggestions welcome. > > I think that this things could be done easily with builtin libraries > (i.e. SOAP4R's XSD::Mapping.obj2xml) so if someone needs this > functionality maybe it could be possible to just point out them in the > docs. > Probably those should be implemented as helpers/mixins since they're so specific. Thanks for the patch. The idea seems general enough to fit in entity.rb. Anyone out there have time to whip up a few tests to go with this? Bryan From james_b at neurogami.com Wed May 17 18:59:28 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 17 May 2006 15:59:28 -0700 Subject: [Nitro] [PATCH] Og object to REXML object In-Reply-To: References: <262a673e961b689dc64a4296f1f61b58@oggu.de> <446B5071.5050806@neurogami.com> <92ad69bfc07bc0c234a7ddf1f4b6d2c2@oggu.de> Message-ID: <446BAAD0.9070809@neurogami.com> gabriele renzi wrote: > Fabian Buch ha scritto: > > >>>What is the format of the XML? Does it follow any current standards or >>>recommendations (e.g., object serialization as defined in XML-RPC or >>>SOAP)? >> >> >>Neither of them. Maybe I should have a look at both, before this patch >>is included into glycerin. But rayman (the one initially requesting this >>feature) didn't care about the actual format when I asked about what it >>should look like. Suggestions welcome. > > > I think that this things could be done easily with builtin libraries > (i.e. SOAP4R's XSD::Mapping.obj2xml) so if someone needs this > functionality maybe it could be possible to just point out them in the > docs. What, XML serialization, or serialization to a existing, known format? I'm arguing that if a Og/Nitro includes, out of the box, a way to serialize objects to XML, then the XML should be a known, defined format, unless there are compelling reasons against it. It's a lot simpler, for example, if you can say, "The results are the same as what you get from an XML-RPC method call", than to document the how's and why's of encoding scheme, names of elements and attributes, and so on. (Speaking of which, doesn't the Ruby xml-rpc lib already have code for object serialization?) -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From bryan.a.soto at gmail.com Wed May 17 20:39:53 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 17 May 2006 17:39:53 -0700 Subject: [Nitro] [PATCH] bundle In-Reply-To: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> References: <6a7d49ca0605120259s3f475163u18dd41f8ab7e39d4@mail.gmail.com> Message-ID: Hi Guill, On 5/12/06, guillaume pierronnet wrote: > hi, > here is a bundle against repo.nitroproject.org > > Fri May 12 11:31:40 CEST 2006 Guillaume Pierronnet > * fixed a bug when including a relation into a request > Shall I send this patch? (1/3) [ynWvpxqadjk], or ? for help: y > This one actually breaks things. Do you have a test or something showing this bug? > Fri May 12 11:34:40 CEST 2006 Guillaume Pierronnet > * fixed a bug when computing parameters to actions > Shall I send this patch? (2/3) [ynWvpxqadjk], or ? for help: y > I'm still curious, how did you figure out that it needed an else there? Lucky guess? :) From fabian at oggu.de Thu May 18 08:43:12 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 18 May 2006 14:43:12 +0200 Subject: [Nitro] [PATCH] Og object to REXML object In-Reply-To: <446BAAD0.9070809@neurogami.com> References: <262a673e961b689dc64a4296f1f61b58@oggu.de> <446B5071.5050806@neurogami.com> <92ad69bfc07bc0c234a7ddf1f4b6d2c2@oggu.de> <446BAAD0.9070809@neurogami.com> Message-ID: Am 18.05.2006 um 00:59 schrieb James Britt: > It's a lot simpler, for example, if you can say, "The results are the > same as what you get from an XML-RPC method call", than to document > the > how's and why's of encoding scheme, names of elements and attributes, > and so on. I could say it's not like SOAP nor XML-RPC, but it's like what the xmlforrest() method of Oracle 10g produces. But I admit I don't know about this stuff and won't continue on this unless I know more about XML-RPC, SOAP and similar. Fabian From george.moschovitis at gmail.com Thu May 18 11:31:35 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 18 May 2006 18:31:35 +0300 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP In-Reply-To: <446B7EE4.5050109@davidlangston.com> References: <446B7EE4.5050109@davidlangston.com> Message-ID: Thanks! -g. On 5/17/06, Dave Langston wrote: > I have just put a tip up at oxyliquit (http://www.oxyliquit.de/tip/23) > re: the subject of this post... as a relative newbie to Nitro (have done > some rails developement and deployment however) thought I would try to > add to community from the perspective of someone climbing onboard > developing primarily in the stepchild OS of WinXP (although production > target of projects will be LAMR hosts). Hope this first tip is useful > to someone... > > Dave > _______________________________________________ > 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 May 18 11:36:05 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 18 May 2006 18:36:05 +0300 Subject: [Nitro] Small change of plan Message-ID: Dear devs, while working on converting from: property :name, String, ... to attr_accessor :name, String as detailed in the Plan I have reviewed a bit the Og source code. It seems to me, due to a lot of contribution from different people some form of refactoring is more needed than I thought. So I decided to refactor/cleanup the store code in this version. If allready done a lot of work, but due to the magnitude of change this will take several days. Moreover, I will need some volunteers to help with porting all the stores to the new system. At the moment i am working with the mysql adapter. Anyway, I will upload the code and get back to this again when I have something more stable. regards, George. -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Thu May 18 11:54:54 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 18 May 2006 17:54:54 +0200 Subject: [Nitro] Small change of plan In-Reply-To: References: Message-ID: Hi George, this may or may not sound a little icky. Please mind what you said earlier: > here is my plan for the next month: >1. work on the nitroproject.org site to get it live ASAP. while doing > this I will add some needed features. This _IS_ important, it is _WAY_ more important than a restructurizing of Og ATM. > 2. work on documentation Yes, needs still work > 3. release 0.31.0 So please move the Og refactoring behind your 4th point againg :) > 4. refactor Og stores. > [...] So I decided to > refactor/cleanup the store code in this version. If allready done a > lot of work, but due to the magnitude of change this will take several > days. and I agree to Zimba, quote: * More RDoc everywhere. This is really the most important part. Otherwise coding gets much harder. * More details to you TODO's and FIXME's Sorry for the rant, enjoy your evening :) Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Thu May 18 12:14:52 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 18 May 2006 19:14:52 +0300 Subject: [Nitro] Small change of plan In-Reply-To: References: Message-ID: > * More RDoc everywhere. This is really the most important part. > Otherwise coding gets much harder. > > * More details to you TODO's and FIXME's I am adding more RDoc every day. And the refactoring strongly cleans up the code and will allow more contribution from nitro hackers. Moreover I am actively working on nitroproject.org (but it still needs a bit more time). By the way, do not worry, It will not break anything or be a total rewrite, just cleaning up the code making more readable and adding valuable RDocs everywhere. -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Thu May 18 12:15:59 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 18 May 2006 19:15:59 +0300 Subject: [Nitro] Selecting action template at runtime In-Reply-To: References: <44680F7D.10800@neurogami.com> <200605151502.53376.m.fellinger@gmail.com> <4468A428.1020609@neurogami.com> Message-ID: Btw, as a quick workaround: render :other_template exit # stops rendering hope this helps. regards, George. On 5/16/06, George Moschovitis wrote: > At the moment there is no easy way to do this, because Nitro > precompiles the template > in the generated action method. In retrospect this seems like a design > flaw! The good > news is that this can be easily fixed, so thans for mentioning it. > Just be a little bit patient, this will be improved shortly. > > regards, > George. > > > > Is there no Nitro method along the lines of > > > > template_for_this_action = 'foo' > > > > ? > > > > > > -- > > James Britt > > > > "In physics the truth is rarely perfectly clear, and that is certainly > > universally the case in human affairs. Hence, what is not surrounded by > > uncertainty cannot be the truth." > > - R. Feynman > > _______________________________________________ > > 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 john at oxyliquit.de Thu May 18 12:46:13 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 18 May 2006 18:46:13 +0200 Subject: [Nitro] Small change of plan In-Reply-To: References: Message-ID: Hi, > I am adding more RDoc every day. And the refactoring strongly cleans > up the code and will allow more contribution from nitro hackers. This is good, I guess I just was a little worried that this keeps you from updating the page. :) > Moreover I am actively working on nitroproject.org (but it still needs > a bit more time). Very good, give it some lovin' :) > By the way, do not worry, It will not break anything > or be a total rewrite, just cleaning up the code making more readable > and adding valuable RDocs everywhere. Very good, Manveru was a little worried about backwards compatibility. And Fabian is working on a Oracle adapter, so if that cleanup doesn't change too many things, everything is fine :) Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From lasso at lassoweb.nu Thu May 18 12:55:15 2006 From: lasso at lassoweb.nu (Lars Olsson) Date: Thu, 18 May 2006 18:55:15 +0200 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP In-Reply-To: <446B7EE4.5050109@davidlangston.com> References: <446B7EE4.5050109@davidlangston.com> Message-ID: <446CA6F3.7030201@lassoweb.nu> Hi! A nice step-by-step tutorial, but unfortunatly it doesn't work (completely) on my WinXP Pro machine. After following all the steps, Apache throws the following at me when trying to access http://nitrotest.local/ --- Forbidden You don't have permission to access / on this server. Apache/2.0.55 (Win32) Server at nitrotest.local Port 80 --- The server access log shows: 127.0.0.1 - - [18/May/2006:18:41:02 +0200] "GET / HTTP/1.1" 403 282 and the server error log shows: [Thu May 18 18:44:03 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: F:/Lassos/ruby/nitro/nitrotest/public/ Any suggestions on what's going wrong? Kindly /Lasso ________________________________________ Lars Olsson lasso at lassoweb.nu http://www.lassoweb.nu/ Dave Langston skrev: > I have just put a tip up at oxyliquit (http://www.oxyliquit.de/tip/23) > re: the subject of this post... as a relative newbie to Nitro (have done > some rails developement and deployment however) thought I would try to > add to community from the perspective of someone climbing onboard > developing primarily in the stepchild OS of WinXP (although production > target of projects will be LAMR hosts). Hope this first tip is useful > to someone... > > Dave > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From zimba.tm at gmail.com Thu May 18 13:17:55 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Thu, 18 May 2006 19:17:55 +0200 Subject: [Nitro] Small change of plan In-Reply-To: References: Message-ID: <1147972676.13863.17.camel@localhost.localdomain> Le jeudi 18 mai 2006 ? 17:54 +0200, Jonathan Buch a ?crit : > and I agree to Zimba, quote: > > * More RDoc everywhere. This is really the most important part. > Otherwise coding gets much harder. Well. Less and cleanier code == More readable == Less need of RDoc :-p -- Jonas Pfenniger -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060518/68a6b859/attachment.bin From james_b at neurogami.com Thu May 18 15:26:55 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 12:26:55 -0700 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP In-Reply-To: <446CA6F3.7030201@lassoweb.nu> References: <446B7EE4.5050109@davidlangston.com> <446CA6F3.7030201@lassoweb.nu> Message-ID: <446CCA7F.10607@neurogami.com> Lars Olsson wrote: > Hi! > > A nice step-by-step tutorial, but unfortunatly it doesn't work > (completely) on my WinXP Pro machine. After following all the steps, > Apache throws the following at me when trying to access > http://nitrotest.local/ > > --- > Forbidden > > You don't have permission to access / on this server. > Apache/2.0.55 (Win32) Server at nitrotest.local Port 80 > --- I've seen this a few times on WinXP pro. Typically it is because I did not specify, and provide, the default index page. You need to tell Apache what page to serve when no page is given on the URL. This is usually index.html, but the choice is yours. An alternative is to tell Apache to render a directory listing when no particular page is requested. Not the usual choice (since it tends to expose *everything * in the directory), but handy for special directories where the default page would just be some sort of file listing anyway (for example, a file download directory). > > The server access log shows: > > 127.0.0.1 - - [18/May/2006:18:41:02 +0200] "GET / HTTP/1.1" 403 282 > > and the server error log shows: > > [Thu May 18 18:44:03 2006] [error] [client 127.0.0.1] Directory index > forbidden by rule: F:/Lassos/ruby/nitro/nitrotest/public/ > Apache is likely configured to not show a directory index by default, hence that "by rule" message. > Any suggestions on what's going wrong? > Configurations. :) In either your httpd.include or httpd.conf or .htacess file (depends on how you are configuring this particular site) you need something like: DirectoryIndex index.html index.rb dispatch.cgi # ^-- directive ^---- list of possible default pages And then make sure you have one of those files in that directory. For example: ServerName nitrotest.local DocumentRoot /nitrotest/public /nitrotest/public> DirectoryIndex cgi.rb index.html index.rb dispatch.cgi Options +FollowSymLinks +ExecCGI Order allow,deny allow from all -- James Britt "A language that doesn't affect the way you think about programming is not worth knowing." - A. Perlis From lists at davidlangston.com Thu May 18 16:42:56 2006 From: lists at davidlangston.com (Dave Langston) Date: Thu, 18 May 2006 13:42:56 -0700 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP In-Reply-To: <446CA6F3.7030201@lassoweb.nu> References: <446B7EE4.5050109@davidlangston.com> <446CA6F3.7030201@lassoweb.nu> Message-ID: <446CDC50.2030001@davidlangston.com> Lars, are you sure you placed the .htaccess file into the public directory?? also, are you sure there is a leading . on that file name. since apache is trying to give you a directory listing (of btw the correct directory) it seems that it is not picking up the .htaccess file. Lastly, (and I don't have an apache reference handy or can go track one down right now) you may have some setting that is preventing .htaccess files from being loaded. Go to the apache site and check on what configs are needed in the httpd.conf file to enable that. Notice that I used apache 1.3.33 and it is possible that the default case has changed. good luck, Dave Lars Olsson wrote: > Hi! > > A nice step-by-step tutorial, but unfortunatly it doesn't work > (completely) on my WinXP Pro machine. After following all the steps, > Apache throws the following at me when trying to access > http://nitrotest.local/ > > --- > Forbidden > > You don't have permission to access / on this server. > Apache/2.0.55 (Win32) Server at nitrotest.local Port 80 > --- > > The server access log shows: > > 127.0.0.1 - - [18/May/2006:18:41:02 +0200] "GET / HTTP/1.1" 403 282 > > and the server error log shows: > > [Thu May 18 18:44:03 2006] [error] [client 127.0.0.1] Directory index > forbidden by rule: F:/Lassos/ruby/nitro/nitrotest/public/ > > Any suggestions on what's going wrong? > > > Kindly > > /Lasso > > ________________________________________ > Lars Olsson > lasso at lassoweb.nu > http://www.lassoweb.nu/ > > Dave Langston skrev: > >>I have just put a tip up at oxyliquit (http://www.oxyliquit.de/tip/23) >>re: the subject of this post... as a relative newbie to Nitro (have done >>some rails developement and deployment however) thought I would try to >>add to community from the perspective of someone climbing onboard >>developing primarily in the stepchild OS of WinXP (although production >>target of projects will be LAMR hosts). Hope this first tip is useful >>to someone... >> >>Dave >>_______________________________________________ >>Nitro-general mailing list >>Nitro-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/nitro-general >> From fabian at oggu.de Thu May 18 16:43:19 2006 From: fabian at oggu.de (Fabian Buch) Date: Thu, 18 May 2006 22:43:19 +0200 Subject: [Nitro] nitro.rubyforge.org Message-ID: <755cf6c23abc7e3a2cfc3b44c2579232@oggu.de> http://nitro.rubyforge.org/ still points to nitrohq.com. I think it should be changed to the domain as soon as possible (even if it isn't finished yet) Fabian From bryan.a.soto at gmail.com Thu May 18 16:59:04 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 18 May 2006 13:59:04 -0700 Subject: [Nitro] nitro.rubyforge.org In-Reply-To: <755cf6c23abc7e3a2cfc3b44c2579232@oggu.de> References: <755cf6c23abc7e3a2cfc3b44c2579232@oggu.de> Message-ID: I think we should take it as a sign and start pushing Nitro's ability to give you cheap airfare. Let Rails compete with that. :P On 5/18/06, Fabian Buch wrote: > http://nitro.rubyforge.org/ still points to nitrohq.com. I think it > should be changed to the domain as soon as possible (even if it isn't > finished yet) > > Fabian > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From james_b at neurogami.com Thu May 18 17:20:21 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 14:20:21 -0700 Subject: [Nitro] Selecting action template at runtime In-Reply-To: References: <44680F7D.10800@neurogami.com> <200605151502.53376.m.fellinger@gmail.com> <4468A428.1020609@neurogami.com> Message-ID: <446CE515.6040504@neurogami.com> George Moschovitis wrote: > At the moment there is no easy way to do this, because Nitro > precompiles the template > in the generated action method. In retrospect this seems like a design > flaw! The good > news is that this can be easily fixed, so thans for mentioning it. > Just be a little bit patient, this will be improved shortly. Please tell me if I understand Elements and templates` correctly: Elements are Ruby classes. You can write them as normal Ruby code, or as .xhtml files. If you do the latter, Nitro "compile" them into Ruby class code. Sort of like how JSPs are turned into servlets in Java. This is why variable interpolation in Element XHTML files is not immediately intuitive; there are values that are interpolated at compile time (i.e., when the XHTML is being turned into Ruby code), and values that are interpolated at run time (i.e., when that Ruby code is actually executed). And so you see different ways of indicating interpolation: #{@foo} #[@foo] \#{@foo} The last two are evaluated at runtime; the first is handled at compile time. With controller templates, each action and/or template becomes the code for the corresponding method. If you have just a template, then it is compiled into the action code that is invoked at runtime. A "normal" action method is, of course, called as Ruby code at runtime. And if you have both an action method and an action template, the template is turned into Ruby code and becomes part of that method. So, given a controller Foo, /foo/bar the action 'bar' can be handled as * An XHTML template file, bar.xhtml, in the Foo template path * A method 'bar', in class Foo * A combination of the the two However, action methods then don't have a notion of "load this text file and interpolate variables and return the results." It's more like, "use the corresponding rendering code for this method to generate the results." I've found that one can select a different action, with (as far as I can see) no template residue, if the base method does not have a template of its own: def foo if rand( 10 ) > 4 render blog else render tour end end My code has actions + templates for blog and tour, but no template for foo, and it will randomly render one page or another quite nicely. It's not the same as simply saying, 'Use this text file as the template, instead of the default template', but achieves, I think, the same effect. (It actually makes sense for me, as I am more likely to want 'router' methods that do not directly render on their own, then to have action handlers that may or may not render themselves.) -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From transfire at gmail.com Thu May 18 17:26:09 2006 From: transfire at gmail.com (TRANS) Date: Thu, 18 May 2006 17:26:09 -0400 Subject: [Nitro] nitro.rubyforge.org In-Reply-To: References: <755cf6c23abc7e3a2cfc3b44c2579232@oggu.de> Message-ID: <4b6f054f0605181426t7e9f1963gf5aa96176f352e06@mail.gmail.com> On 5/18/06, Bryan Soto wrote: > I think we should take it as a sign and start pushing Nitro's ability > to give you cheap airfare. Let Rails compete with that. :P :D LOL! From lasso at lassoweb.nu Thu May 18 18:39:27 2006 From: lasso at lassoweb.nu (Lars Olsson) Date: Fri, 19 May 2006 00:39:27 +0200 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP In-Reply-To: <446CCA7F.10607@neurogami.com> References: <446B7EE4.5050109@davidlangston.com> <446CA6F3.7030201@lassoweb.nu> <446CCA7F.10607@neurogami.com> Message-ID: <446CF79F.4070003@lassoweb.nu> James Britt skrev: > I've seen this a few times on WinXP pro. Typically it is because I did > not specify, and provide, the default index page. > > You need to tell Apache what page to serve when no page is given on the > URL. This is usually index.html, but the choice is yours. > > An alternative is to tell Apache to render a directory listing when no > particular page is requested. Not the usual choice (since it tends to > expose *everything * in the directory), but handy for special > directories where the default page would just be some sort of file > listing anyway (for example, a file download directory). Oops. I'm quite used setting all kinds of Apache directives but I guess all this redirecting stuff is making me dizzy. After collecting the missing parts of my brain I ended up with the following (additional) steps to make Nitro show its magic. 1. Added a DirectoryIndex directive to allow a default page (as per your suggestion) 2. Set AllowOverride to all for the virtual host (defaults to none it seems) to allow .rb files to really run as CGI scripts. 3. Added -rubygems to shebang line to find Nitro 4. Magic! :) >> Any suggestions on what's going wrong? >> > > Configurations. :) > I thought Nitro was supposed to end this kind of "complex" configuration... ;) Anyway, thanks for helping out (both James and Dave)! /Lasso ________________________________________ Lars Olsson lasso at lassoweb.nu http://www.lassoweb.nu/ From lists at davidlangston.com Thu May 18 19:02:53 2006 From: lists at davidlangston.com (Dave Langston) Date: Thu, 18 May 2006 16:02:53 -0700 Subject: [Nitro] 10 Steps to Nitro running in Apache CGI on Windows XP In-Reply-To: <446CF79F.4070003@lassoweb.nu> References: <446B7EE4.5050109@davidlangston.com> <446CA6F3.7030201@lassoweb.nu> <446CCA7F.10607@neurogami.com> <446CF79F.4070003@lassoweb.nu> Message-ID: <446CFD1D.6020302@davidlangston.com> Lars, thanx for finding this issue... I don't believe the indexing issue prevents nitro from running and the instructions ask for the -rubygems switch on the shebang line of cgi.rb (step 8). Therefore it makes deductive and logical sense that the AllowOverride directive is what is missing (I checked my config and it was already set elsewhere outside of the VirtualHost). Therefore I have added it to the VH step (#7) of the tip to ensure others avoid the problem (which I believe is that the .htaccess file is being ignored). thx again, Dave Lars Olsson wrote: > James Britt skrev: > >>I've seen this a few times on WinXP pro. Typically it is because I did >>not specify, and provide, the default index page. >> >>You need to tell Apache what page to serve when no page is given on the >>URL. This is usually index.html, but the choice is yours. >> >>An alternative is to tell Apache to render a directory listing when no >>particular page is requested. Not the usual choice (since it tends to >>expose *everything * in the directory), but handy for special >>directories where the default page would just be some sort of file >>listing anyway (for example, a file download directory). > > > Oops. I'm quite used setting all kinds of Apache directives but I guess > all this redirecting stuff is making me dizzy. After collecting the > missing parts of my brain I ended up with the following (additional) > steps to make Nitro show its magic. > > 1. Added a DirectoryIndex directive to allow a default page (as per your > suggestion) > > 2. Set AllowOverride to all for the virtual host (defaults to none it > seems) to allow .rb files to really run as CGI scripts. > > 3. Added -rubygems to shebang line to find Nitro > > 4. Magic! :) > > >>>Any suggestions on what's going wrong? >>> >> >>Configurations. :) >> > > > I thought Nitro was supposed to end this kind of "complex" > configuration... ;) > > > Anyway, thanks for helping out (both James and Dave)! > > > /Lasso > > ________________________________________ > Lars Olsson > lasso at lassoweb.nu > http://www.lassoweb.nu/ From james_b at neurogami.com Thu May 18 19:45:55 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 16:45:55 -0700 Subject: [Nitro] When does a class become Oggified? Message-ID: <446D0733.6070804@neurogami.com> I'm writing unit tests, chugging along, and have encountered a odd problem. I have a class Account, that is set up to be saved through Og. In my tests I want to verify that the error count is 0 prior to some operation, and 1 after a do Bad Thing. But my Account instances do not have any 'errors' property; I get NoMethodError: undefined method `size' for nil:NilClass when I d this: params = { 'name' => 'Foo', 'admin_oid' => 1 } acct = Account.new( params ) assert_kind_of Account, acct assert acct.errors.size > 0 However, if I save the object, it acquires an errors property. I'm testing that an account instance will raise an exception if you try to save or update the object in an invalid state, so I cannot save it prior to testing. Is this buggy behavior from Og, or have I misconfigured my test setup, or something else? Thanks! -- James Britt "A principle or axiom is of no value without the rules for applying it." - Len Bullard From james_b at neurogami.com Thu May 18 19:50:21 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 16:50:21 -0700 Subject: [Nitro] Essential features of a good Nitro demo app In-Reply-To: <4467E94F.2010207@neurogami.com> References: <4467E94F.2010207@neurogami.com> Message-ID: <446D083D.8050301@neurogami.com> James Britt wrote: > I am assembling a demo "Nitro in a Nutshell" app. > > I have some ideas, but I'm not so sure my current understanding of Nitro > allows me to make a proper feature selection. > > Basically, I want to have something that shows off the most salient > features of Nitro, something that would make people take notice and > eager to go learn more. > I was hoping to get more of a response on this question. There's an opportunity to give a Nitro overview in a mass-market publication, so it's a prime chance to get the word out on what makes Nitro special. As it stands, there may not be any sample app, just a series of descriptions on how to perform various Web dev tasks in Nitro. I have some ideas on what I should write about, but still feel that I'm missing a broader understanding of the cooler, but more obscure/undocumented, features. -- James Britt "Take eloquence and wring its neck." - Paul Verlaine From mischa.kroon at gmail.com Thu May 18 20:05:30 2006 From: mischa.kroon at gmail.com (Mischa Kroon) Date: Fri, 19 May 2006 02:05:30 +0200 Subject: [Nitro] Essential features of a good Nitro demo app References: <4467E94F.2010207@neurogami.com> <446D083D.8050301@neurogami.com> Message-ID: <001401c67ad7$f402f670$0a01a8c0@mischabak> Ok cool demo app: Blog with comments + Login + CAPTCHA + Ajaxified + stats. Ajax / effects could be on login panel, Comments and even on postings itself. Stats could be barcharts... ---- and / or Image gallery with some cool effects in transitioning photos and browsing thumbnail galleries also with comments on photos. ----- Original Message ----- From: "James Britt" To: "General discussion about Nitro" Sent: Friday, May 19, 2006 1:50 AM Subject: Re: [Nitro] Essential features of a good Nitro demo app > James Britt wrote: >> I am assembling a demo "Nitro in a Nutshell" app. >> >> I have some ideas, but I'm not so sure my current understanding of Nitro >> allows me to make a proper feature selection. >> >> Basically, I want to have something that shows off the most salient >> features of Nitro, something that would make people take notice and >> eager to go learn more. >> > > I was hoping to get more of a response on this question. There's an > opportunity to give a Nitro overview in a mass-market publication, so > it's a prime chance to get the word out on what makes Nitro special. > > > As it stands, there may not be any sample app, just a series of > descriptions on how to perform various Web dev tasks in Nitro. > > I have some ideas on what I should write about, but still feel that I'm > missing a broader understanding of the cooler, but more > obscure/undocumented, features. > > -- > James Britt > > "Take eloquence and wring its neck." > - Paul Verlaine > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From james_b at neurogami.com Thu May 18 20:17:09 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 17:17:09 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure Message-ID: <446D0E85.4060705@neurogami.com> For at least a year, maybe tow, I've had assorted schemes for improving the ruby-doc.org Web site. Like many such plans, other obligations, such as paying the bill, consumed my time. With the help of Dan Ritz, and the nudging of a few members of the Ruby community, I did get the site redesigned and running on Nitro. But the core f the site, the API docs, is largely unchanged. A number of people have commented on how nicely php.net handles documentation. The layout is different from the default Rdoc output, and users can leave notes and annotations with alongside the docs. http://www.php.net/manual/en/ For example, here http://www.php.net/manual/en/language.control-structures.php You can see some basic docs, with user comments directly below. I've thought such a thing may be good to have on ruby-doc. I've simply not had the time to create it. I'd like to do it with Og/Nitro. Since ruby-doc is essentially a labor of love I try to use it as an opportunity to explore and learn more Ruby. I use Rails for much of my paying work, and would like both to get more personal experience with Og/Nitro, and give it more visibility to help it grow. So when I re-did ruby-doc, I picked Nitro. And would like any additions to be Og/Nitro as well. Recently I was told off a Rails app, Rannotate, that runs over the Ruby source much like rdoc (which I think is used underneath), but rather than generate the standard HTML files, it populates a database and generates a framed docs+index+comments layout similar to what's on php.net. http://ruby.outertrack.com/ I had looked at an earlier version some months ago; I had some problems running it, and there were some design decisions that put me off. (Plus, in poking around, there are still issues. For example, when I search for REXML, all I get is REXML::Node. There is no top-level display of all REXML classes and their methods. But I've only done the cursory browsing there.) The closest thing I've seen in Nitro was RDog, but I think that project has whithered. Perhaps the code for oxyliquit.de could be used as a base for such a thing; I don't know. In any event, I'm hopeful that there are people working with Og/Nitro who can either get such a tool up and running, or help get me started. It would make for a good promotional piece for Og/Nitro, and hopefully attract more developers. Thoughts? -- James Britt "Take eloquence and wring its neck." - Paul Verlaine From bryan.a.soto at gmail.com Thu May 18 20:34:45 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 18 May 2006 17:34:45 -0700 Subject: [Nitro] When does a class become Oggified? In-Reply-To: <446D0733.6070804@neurogami.com> References: <446D0733.6070804@neurogami.com> Message-ID: On 5/18/06, James Britt wrote: > However, if I save the object, it acquires an errors property. > The @errors attribute is created in the validations module when validate is called. Save calls validate creating @errors. > I'm testing that an account instance will raise an exception if you try > to save or update the object in an invalid state, so I cannot save it > prior to testing. > > Is this buggy behavior from Og, or have I misconfigured my test setup, > or something else? > Good question. All the validation code is in module Glue::Validation which is included in the class when it's enchanted. As far as I can tell, there's no way to inject an instance variable at that point into future instances of the class. So, it might be buggy behavior or something else, but it's not a misconfigured test setup. From transfire at gmail.com Thu May 18 21:03:46 2006 From: transfire at gmail.com (TRANS) Date: Thu, 18 May 2006 21:03:46 -0400 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <446D0E85.4060705@neurogami.com> References: <446D0E85.4060705@neurogami.com> Message-ID: <4b6f054f0605181803r5634f36ela103cf4d1b976eb3@mail.gmail.com> On 5/18/06, James Britt wrote: > Recently I was told off a Rails app, Rannotate, that runs over the Ruby > source much like rdoc (which I think is used underneath), but rather > than generate the standard HTML files, it populates a database and > generates a framed docs+index+comments layout similar to what's on php.net. > > http://ruby.outertrack.com/ I find ruby-doc easier to navigate personally, despite begin less uniform. > The closest thing I've seen in Nitro was RDog, but I think that project > has whithered. Perhaps the code for oxyliquit.de could be used as a > base for such a thing; I don't know. That sounds like a brilliant idea! Though I have no idea how difficult it would be. I should point out as well, you could hoodwink.d the site ;) T. From james_b at neurogami.com Thu May 18 21:39:06 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 18:39:06 -0700 Subject: [Nitro] When does a class become Oggified? In-Reply-To: References: <446D0733.6070804@neurogami.com> Message-ID: <446D21BA.5000605@neurogami.com> Bryan Soto wrote: > On 5/18/06, James Britt wrote: > >>However, if I save the object, it acquires an errors property. >> > > > The @errors attribute is created in the validations module when > validate is called. Save calls validate creating @errors. Ah, OK, see. I could, then, either trap the failed call to 'errors' and mock it out if there is yet no @errors created, or call validate inside initialize. Thanks! -- James Britt "People want simple stories." From james_b at neurogami.com Thu May 18 21:52:52 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 18:52:52 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <4b6f054f0605181803r5634f36ela103cf4d1b976eb3@mail.gmail.com> References: <446D0E85.4060705@neurogami.com> <4b6f054f0605181803r5634f36ela103cf4d1b976eb3@mail.gmail.com> Message-ID: <446D24F4.6070600@neurogami.com> TRANS wrote: > On 5/18/06, James Britt wrote: > >>Recently I was told off a Rails app, Rannotate, that runs over the Ruby >>source much like rdoc (which I think is used underneath), but rather >>than generate the standard HTML files, it populates a database and >>generates a framed docs+index+comments layout similar to what's on php.net. >> >>http://ruby.outertrack.com/ > > > I find ruby-doc easier to navigate personally, despite begin less uniform. > I'm not thrilled with the current framed HTML RDoc pages, but there re better than the Rannotate instances I've seen. > >>The closest thing I've seen in Nitro was RDog, but I think that project >>has whithered. Perhaps the code for oxyliquit.de could be used as a >>base for such a thing; I don't know. > > > That sounds like a brilliant idea! Though I have no idea how difficult > it would be. > > I should point out as well, you could hoodwink.d the site ;) Oh, but that's already in place. The hoodwinking happens once per page, though, not on every method description. But I thought that restricting commenting to people who managed to get hoodwink going might be interesting. > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- James Britt "People want simple stories." From james_b at neurogami.com Thu May 18 22:19:50 2006 From: james_b at neurogami.com (James Britt) Date: Thu, 18 May 2006 19:19:50 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <4b6f054f0605181803r5634f36ela103cf4d1b976eb3@mail.gmail.com> References: <446D0E85.4060705@neurogami.com> <4b6f054f0605181803r5634f36ela103cf4d1b976eb3@mail.gmail.com> Message-ID: <446D2B46.6060609@neurogami.com> TRANS wrote: > ... > > That sounds like a brilliant idea! Though I have no idea how difficult > it would be. > Something that just popped into my head: Write an RDoc template, much like the current default HTML template, but have it include Nitro processing instructions (), and write out the files as .xhml, no .html Then run the pages through Nitro. The embedded Nitro commands would somehow or another manage the capture and rendering of user comments. Does is seem plausible that each page (i.e., Class, File, Method, and so on, as they are broken up across (X)HTML pages) could then be an Og-managed class, responsible for saving itself and managing its own comments? Basically, loading a page means calling that object and having it retrieve documentation text and comments. Ideally, when the rdocs are regenerated, if the documention is not saved in the database (it's part of the template display text), then the comments and such are presevred even when documention is updated. (There would need to be some manual pruning to ensure that the comments are still relevant.) Just a thought. -- James Britt "The greatest obstacle to discovery is not ignorance, but the illusion of knowledge." - D. Boorstin From john at oxyliquit.de Fri May 19 05:39:53 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 19 May 2006 11:39:53 +0200 Subject: [Nitro] Essential features of a good Nitro demo app In-Reply-To: <446D083D.8050301@neurogami.com> References: <4467E94F.2010207@neurogami.com> <446D083D.8050301@neurogami.com> Message-ID: Hi, > I was hoping to get more of a response on this question. There's an > opportunity to give a Nitro overview in a mass-market publication, so > it's a prime chance to get the word out on what makes Nitro special. More response.. yeah, really deserves it, I hope I don't get this wrong now. > As it stands, there may not be any sample app, just a series of > descriptions on how to perform various Web dev tasks in Nitro. Well, right now the two "examples" are flare and spark. Both with very interesting code/features. For example the Xmlrpc controller in Flare. > I have some ideas on what I should write about, but still feel thatI'm > missing a broader understanding of the cooler, but more > obscure/undocumented, features. Hmm.. I'll just put a list of a few personal highlights of Nitro here. * Session.current (way cool to be able to call that everywhere) * Caching (if I would be able to use it) * The form-helper (or better, it's hackability..) * The pager (standard, but very cool) * The table helper (well.. partly I wrote it, so I have to :P) * flash('') (yay for error messages :D) These are all standard, but for me, I love Ruby more than any framework so I rely on standard Nitro, and not on obscure features, which might be quite attractive for other people: * The recording/playback feature * Gen * Scaffold I agree that those do attract people, so I think you should write about those, together with a simple example how plugins AKA "Parts" work. I hope that answer helps you chosing some cool Nitro stuff. Kashia PS: James, not sure if you had seen this, so: if you ask something on Oxywtf and someone answers, there are numbers down there to rate the answer, all green numbers set the Question to "Answered". You can rate your own answers to anything, you just won't get any points. I'm telling you this, because I think that manverus answer to http://www.oxyliquit.de/question/43 is worth a few points :) -- Feel the love http://pinkjuice.com/pics/ruby.png From zimba.tm at gmail.com Fri May 19 07:11:44 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Fri, 19 May 2006 13:11:44 +0200 Subject: [Nitro] [PATCH] Small R and scaffolding fixes Message-ID: <1148037104.13863.45.camel@localhost.localdomain> Fri May 19 12:53:11 CEST 2006 Jonas Pfenniger * Small fix in scaffolding that allows you to use a symbol as a name Shall I apply this patch? (1/3) [ynWvpxqadjk], or ? for help: y Fri May 19 13:06:07 CEST 2006 Jonas Pfenniger * Support for actions with double underscores in R Shall I apply this patch? (2/3) [ynWvpxqadjk], or ? for help: y Fri May 19 13:06:35 CEST 2006 Jonas Pfenniger * Removes unnecessary double slashes that breaks webrick in R Shall I apply this patch? (3/3) [ynWvpxqadjk], or ? for help: y -- Jonas Pfenniger -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle.tgz Type: application/x-compressed-tar Size: 3011 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060519/9bef5ac0/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060519/9bef5ac0/attachment-0001.bin From george.moschovitis at gmail.com Fri May 19 12:24:37 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 19 May 2006 19:24:37 +0300 Subject: [Nitro] Small change of plan In-Reply-To: <1147972676.13863.17.camel@localhost.localdomain> References: <1147972676.13863.17.camel@localhost.localdomain> Message-ID: > Well. Less and cleanier code == More readable == Less need of RDoc :-p yeap ;-) the new driver model is much cleaner and logically seperated in more files. I will upload some work in progress to repo.nitroporject.org later. The final code will arrive on monday. -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Fri May 19 12:29:18 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 19 May 2006 19:29:18 +0300 Subject: [Nitro] When does a class become Oggified? In-Reply-To: <446D21BA.5000605@neurogami.com> References: <446D0733.6070804@neurogami.com> <446D21BA.5000605@neurogami.com> Message-ID: Let answer this question on Monday. I plan to cleanup Og a lot during the weekend, so a few low level things will change (for the better). -g. On 5/19/06, James Britt wrote: > Bryan Soto wrote: > > On 5/18/06, James Britt wrote: > > > >>However, if I save the object, it acquires an errors property. > >> > > > > > > The @errors attribute is created in the validations module when > > validate is called. Save calls validate creating @errors. > > Ah, OK, see. I could, then, either trap the failed call to 'errors' > and mock it out if there is yet no @errors created, or call validate > inside initialize. > > > Thanks! > > > -- > James Britt > > "People want simple stories." > _______________________________________________ > 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.td.barabas at gmail.com Fri May 19 14:11:41 2006 From: john.td.barabas at gmail.com (John Barabas) Date: Fri, 19 May 2006 14:11:41 -0400 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <446D0E85.4060705@neurogami.com> References: <446D0E85.4060705@neurogami.com> Message-ID: > http://ruby.outertrack.com/ I like that, searchable and annotatable docs, very cool! I like this much better than the RHTML framed docs. > I had looked at an earlier version some months ago; I had some problems > running it, and there were some design decisions that put me off. > (Plus, in poking around, there are still issues. For example, when I > search for REXML, all I get is REXML::Node. There is no top-level > display of all REXML classes and their methods. But I've only done the > cursory browsing there.) I did a search for REXML and it showed me all the REXML classes and modules? What are the design issues that you have problems with, it looks like it works well to me? > In any event, I'm hopeful that there are people working with Og/Nitro > who can either get such a tool up and running, or help get me started. > It would make for a good promotional piece for Og/Nitro, and hopefully > attract more developers. It seems to me that someone has done all the hard work. It might not be in Og/Nitro, which is a pity, but obviously something like this is a *lot* of work. I like the site and I'd hate to re-do existing work for something that already works, why not use this? -John From lists at davidlangston.com Fri May 19 15:13:54 2006 From: lists at davidlangston.com (Dave Langston) Date: Fri, 19 May 2006 12:13:54 -0700 Subject: [Nitro] NOOB Question - Maybe About Templates Message-ID: <446E18F2.5060401@davidlangston.com> OK, So I took the 'sample' app created by 'gen app' and run it thru both webrick and apache (see my 10 steps for apache cgi on windows @ oxyliquit) and all is fine. To attempt to better understand a more complex structure for nitro, I then created a src/controller.rb file, moved the 'Proto' class there (now calling it ProtoController and inheriting from Nitro::Controller and adding a require 'nitro/controller' ), add a "require 'src/controller'" and an "include Nitro" to run.rb and also a "Server.map = { '/' => ProtoController}" and try again in both apache and webrick and voila it works. So then I simply create a template directory (peer to src, etc) and put an index.xhtml file in that and move the html string from ProtoController::index to that xhtml file (removing the %{ and } of course). I now have an empty index method in the controller and an index.xhtml file inside directory 'template'. I run it in webrick and lo and behold, it still works (can change content in index.xhtml and see it in browser). However, if I run the same thing now in apache, it 'thinks for a while' (i.e. loads up nitro, compiles, it and runs, etc) but the browser returns with a blank page as if index.xhtml did not render. I check the apache error log and get the typical "Rendering '/'", "Compiling action 'ProtoController#index' BUT unlike in webrick I get NO "Compiling template 'ProtoController: template/index.xhtml'". It's as if in the apache environment it cannot find the template (but remember this is Windows so file permissions should NOT be an issue). I have looked thru the Nitro code a bit, but not being that familiar, can't seem to get a good handle on the template processing to find likely candidates for the failure. Any ideas what I may be doing wrong???? rgds, Dave From james_b at neurogami.com Fri May 19 15:26:15 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 19 May 2006 12:26:15 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: References: <446D0E85.4060705@neurogami.com> Message-ID: <446E1BD7.20206@neurogami.com> John Barabas wrote: >>http://ruby.outertrack.com/ > > > I like that, searchable and annotatable docs, very cool! I like this > much better than the RHTML framed docs. > > >>I had looked at an earlier version some months ago; I had some problems >>running it, and there were some design decisions that put me off. >>(Plus, in poking around, there are still issues. For example, when I >>search for REXML, all I get is REXML::Node. There is no top-level >>display of all REXML classes and their methods. But I've only done the >>cursory browsing there.) > > > I did a search for REXML and it showed me all the REXML classes and > modules? What are the design issues that you have problems with, it > looks like it works well to me? Yeah, I tried that again this morning, and it worked fine, so I don;t know what it was that I got the odd results the other day. > > > In any event, I'm hopeful that there are people working with Og/Nitro > >>who can either get such a tool up and running, or help get me started. >>It would make for a good promotional piece for Og/Nitro, and hopefully >>attract more developers. > > > It seems to me that someone has done all the hard work. It might not be > in Og/Nitro, which is a pity, but obviously something like this is a > *lot* of work. I like the site and I'd hate to re-do existing work for > something that already works, why not use this? > Anything that goes on ruby-doc becomes my responsibility. I have to be sure that it is not buggy, will not devour system resources, has no obvious security holes. (I'm not suggesting any of this applies to Rannotate, just general considerations.) It needs to play well with other software, and that includes not just what is there now, but what is reasonably planned for the future. I want to be sure that all code is easy to understand, easy to modify, and will not introduce some new administrative burden. If, after some thought, having such annotated docs is still a good idea, and Rannotate provides the look and behavior desired, then it may be worth using. But, all things being equal, I prefer to run code I've written. A goal of running ruby-doc is to use it as an opportunity to explore interesting Ruby ideas. I do enough Rails work at my Real Job. I've gotten used to its various quirks, though lately it seems harder to keep up with current features and development. Nitro has its share of quirks, too; hard to say which is more annoying in that regard. Whether I pick Rails or Nitro or something else depends on the requirements. When it's me driving the requirements I like to experiment and see what I can learn, so I am more likely to try something new. There are very few Og/Nitro apps in the public eye. I re-did ruby-doc as Nitro to learn more and (hopefully) raise some awareness. I believe that offering annotated RDocs using Og/Nitro would push that further. But it's quite frustrating. I find it very hard to locate docs or examples for many things, and there seems to be far more interest in adding features or refactoring or reshaping the API than in trying to settling down, bulking up the docs and tutorials, and building a larger developer community. (Which, I believe, would make overall project development easier in the long run.) I don't fault anyone for the choices they make; people write software or join projects to suit *their* needs, and perhaps popularity and widespread use are not compelling issues. But here's an opportunity to promote Og/Nitro. I believe greater awareness would be in the best interest both of Og/Nitro itself and the Ruby community in general. And it would help me, too, if it drives better docs and more examples to help me learn. I really like using Nitro for many things. But, after all is said and done, I don't really have a horse in the race. I try to pick the best tools for a given job, and get moving. But in selecting a tool, the "how do I do it?" frustration level is a big factor. As things stand, learning about Og/Nitro is just much harder than I think it needs to be. Anyway, sorry if this comes off as ranty. -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://refreshingcities.org - Design, technology, usability From jlsysinc at alltel.net Fri May 19 17:44:39 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Fri, 19 May 2006 17:44:39 -0400 Subject: [Nitro] Example app - Flare Message-ID: <047d01c67b8d$6e83bb90$0200000a@agamemnon> I started Flare with Nitro 0.30. Went to delete a catgories using the admin scaffolding and received the following error. ----------- Error Path: /admin/categories/delete/14 near " ": syntax error Reload this page. Go to the referer or the home page. In file '/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb' : 89: 90: module Error 91: def check( result, db=nil, msg=nil ) 92: unless result == Constants::ErrorCode::OK 93: msg = ( msg ? msg + ": " : "" ) + db.errmsg if db 94: raise ( EXCEPTIONS[result] || SQLite3::Exception ), msg 95: end 96: end 97: module_function :check 98: end 99: Stack Trace /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in `check' /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/statement.rb:70:in `initialize' /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:183:in `prepare' /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:274:in `query' /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store/sqlite.rb:92:in `exec' /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store/sqlite.rb:117:in `sql_update' /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store/sql.rb:448:in `update_by_sql' /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/entity.rb:158:in `update' /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/glue/orderable.rb:229:in `decrement_position_of_lower_items' (eval):3:in `og_delete' /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store.rb:145:in `delete' /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/entity.rb:320:in `delete' (eval):6:in `categories__delete' (eval):23:in `categories__delete_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_GET' /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 `run' run.rb:44 From bryan.a.soto at gmail.com Fri May 19 20:46:03 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 19 May 2006 17:46:03 -0700 Subject: [Nitro] Win32 users currently in Daylight Savings Time. Message-ID: There is a bug in Ruby 1.8.4 released 12/24/2005 with File.stat not accounting for Daylight Savings Time. If you use Nitro on an NTFS file system, this affects you as File.stat is how Nitro determines whether or not to reload a file. Basically, when running a Nitro app, you might see output similar to this: D, [2006-05-10T23:06:03.000000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 /gems/nitro-0.30.0/lib/nitro/helper/pager.rb' reloaded D, [2006-05-10T23:06:03.015000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 /gems/facets-1.3.3/lib/facets/more/expirable.rb' reloaded D, [2006-05-10T23:06:03.031000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 /gems/facets-1.3.3/lib/facet/symbol/downcase.rb' reloaded D, [2006-05-10T23:06:03.031000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 /gems/facets-1.3.3/lib/facets/core/kernel/is.rb' reloaded D, [2006-05-10T23:06:03.031000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 /gems/nitro-0.30.0/lib/nitro/cgi/http.rb' reloaded repeated continously which will eventually crash with a stack overflow error. This has been fixed in the latest stable release for win32 as of 4/14/06 available here: http://www.garbagecollect.jp/ruby/mswin32/en/download/stable.html Direct download here: ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ruby-1.8.4-20060414-i386-mswin32.zip I've posted a bug report at the one-click installer rubyforge page letting them know of the problem and the updated release. From itsme213 at hotmail.com Fri May 19 21:12:47 2006 From: itsme213 at hotmail.com (itsme213) Date: Fri, 19 May 2006 20:12:47 -0500 Subject: [Nitro] Giving Og/Nitro greater exposure Message-ID: "James Britt" wrote in message > As things stand, learning about Og/Nitro is just much harder than I > think it needs to be. I tried twice and then essentially put it on a shelf to re-visit if/when it is easier to learn. For a bit it seemed this mailing list had an excitement and energy about stabilizing Nitro and making it more accessible ... now my sense is it may be edging back into feature growth. Apologies if I'm off base and wish I could be more constructive ... From jlsysinc at alltel.net Fri May 19 23:34:11 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Fri, 19 May 2006 23:34:11 -0400 Subject: [Nitro] How do I access multipart data? Message-ID: <095901c67bbe$42ff7b40$0200000a@agamemnon> Also asked on Oxyliquit... How do I access multipart data? I want to the user to be able to be able to upload zip/tar/jpg files. How do I access multipart data in Nitro's request? Are there any handy tags/tools in Nitro's library for generating multipart input forms? Is there anything in the Ajax interface that is useful for this? Thanks -- J. Lambert From james_b at neurogami.com Sat May 20 01:12:32 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 19 May 2006 22:12:32 -0700 Subject: [Nitro] Any RSpec users? Looking for help with og_managed objects Message-ID: <446EA540.7070803@neurogami.com> I've decided to look into RSpec, but I'm having trouble getting my spec file set up to test an Oggulate model class. Has anyone here used RSpec with Og-managed classes? Thanks, James Britt -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.30secondrule.com - Building Better Tools From m.fellinger at gmail.com Sat May 20 01:44:38 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 20 May 2006 14:44:38 +0900 Subject: [Nitro] NOOB Question - Maybe About Templates In-Reply-To: <446E18F2.5060401@davidlangston.com> References: <446E18F2.5060401@davidlangston.com> Message-ID: <9c00d3e00605192244s2df14342m4f3fe833046cecbd@mail.gmail.com> try to set the template-directory Template.root = 'templates' # or wherever you put it From m.fellinger at gmail.com Sat May 20 01:46:51 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 20 May 2006 14:46:51 +0900 Subject: [Nitro] Example app - Flare In-Reply-To: <047d01c67b8d$6e83bb90$0200000a@agamemnon> References: <047d01c67b8d$6e83bb90$0200000a@agamemnon> Message-ID: <9c00d3e00605192246g78bfc5e8t362c96589a5e0693@mail.gmail.com> 93: msg = ( msg ? msg + ": " : "" ) + db.errmsg if db this line is clearly broken, try changing it to 93: msg = ( msg ? msg + ": " : " ) + db.errmsg if db without the extra paranthesis On 5/20/06, Jon A. Lambert wrote:> I started Flare with Nitro 0.30.> Went to delete a catgories using the admin scaffolding and received the> following error.>> -----------> Error> Path: /admin/categories/delete/14> near " ": syntax error> Reload this page. Go to the referer or the home page.> In file> '/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb' :>> 89:> 90: module Error> 91: def check( result, db=nil, msg=nil )> 92: unless result == Constants::ErrorCode::OK> 93: msg = ( msg ? msg + ": " : "" ) + db.errmsg if db> 94: raise ( EXCEPTIONS[result] || SQLite3::Exception ), msg> 95: end> 96: end> 97: module_function :check> 98: end> 99:> Stack Trace> /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in> `check'> /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/statement.rb:70:in> `initialize'> /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:183:in> `prepare'> /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:274:in> `query'> /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store/sqlite.rb:92:in `exec'> /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store/sqlite.rb:117:in> `sql_update'> /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store/sql.rb:448:in> `update_by_sql'> /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/entity.rb:158:in `update'> /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/glue/orderable.rb:229:in> `decrement_position_of_lower_items'> (eval):3:in `og_delete'> /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/store.rb:145:in `delete'> /usr/lib/ruby/gems/1.8/gems/og-0.30.0-/lib/og/entity.rb:320:in `delete'> (eval):6:in `categories__delete'> (eval):23:in `categories__delete_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_GET'> /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 `run'> run.rb:44>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> From m.fellinger at gmail.com Sat May 20 02:06:08 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 20 May 2006 15:06:08 +0900 Subject: [Nitro] How do I access multipart data? In-Reply-To: <095901c67bbe$42ff7b40$0200000a@agamemnon> References: <095901c67bbe$42ff7b40$0200000a@agamemnon> Message-ID: <9c00d3e00605192306x5ac11f23sc29943956f0ac954@mail.gmail.com> first of all, there's some support in that direction there is however no helper to generate multipart-forms i know of,though you might be able to use the new form-helper for that, but i'mnot familar with it, so i just give you some advice on oxyliquit wherei just discovered your question :)thanks for posting it there... http://oxyliquit.de/question/44 On 5/20/06, Jon A. Lambert wrote:> Also asked on Oxyliquit...>> How do I access multipart data?>> I want to the user to be able to be able to upload zip/tar/jpg files. How do> I access multipart data in Nitro's request? Are there any handy tags/tools> in Nitro's library for generating multipart input forms? Is there anything> in the Ajax interface that is useful for this?>> Thanks>> --> J. Lambert>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> From james_b at neurogami.com Sat May 20 02:17:36 2006 From: james_b at neurogami.com (James Britt) Date: Fri, 19 May 2006 23:17:36 -0700 Subject: [Nitro] [Bug]? Only one test per test case? In-Reply-To: <37fd0c50604280553k3a89c9baw5fcb94dd7b819ea6@mail.gmail.com> References: <37fd0c50604271307w40a5c930s402ffc00e4891ff6@mail.gmail.com> <4b6f054f0604271856o44ed695fo237aabc18d2fe171@mail.gmail.com> <37fd0c50604280553k3a89c9baw5fcb94dd7b819ea6@mail.gmail.com> Message-ID: <446EB480.3090401@neurogami.com> Humber Aquino wrote: > Hi T! The result is the same :( > > I don't know why og knows that the db doesn't exists and did not create the > db as in the first time. I will try to look into the og code to look 4 > answers. > > Regards :D Is there a fix for this? I'm running into the same, or a similar, problem unit testing a model class. I have two tests in my test file. Each works fine if it is the only one, but if setup is called more than once, it drops the MySQL database, then fails to recreate it, and everything bombs. -- James Britt From jlsysinc at alltel.net Sat May 20 02:58:01 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sat, 20 May 2006 02:58:01 -0400 Subject: [Nitro] Example app - Flare References: <047d01c67b8d$6e83bb90$0200000a@agamemnon> <9c00d3e00605192246g78bfc5e8t362c96589a5e0693@mail.gmail.com> Message-ID: <099b01c67bda$bc320700$0200000a@agamemnon> Michael Fellinger wrote: > 93: msg = ( msg ? msg + ": " : "" ) + db.errmsg if db > this line is clearly broken, try changing it to > 93: msg = ( msg ? msg + ": " : " ) + db.errmsg if db > without the extra paranthesis Sorry I should included the Nitro log as well: D, [2006-05-20T02:29:53.561378 #5972] DEBUG -- : Rendering '/admin/stylesheet/system'. D, [2006-05-20T02:30:02.864418 #5972] DEBUG -- : Rendering '/admin/categories/delete/14'. D, [2006-05-20T02:30:02.924418 #5972] DEBUG -- : Compiling action 'AdminController#categories__delete' D, [2006-05-20T02:30:03.034418 #5972] DEBUG -- : UPDATE ogcategory SET position=(position - 1) WHERE position > E, [2006-05-20T02:30:03.064418 #5972] ERROR -- : Error while handling '/admin/categories/delete/14'. E, [2006-05-20T02:30:03.074418 #5972] ERROR -- : near " ": syntax error It's generating invalid SQL and SQLite3 cannot prepare it. -- J. Lambert From jlsysinc at alltel.net Sat May 20 03:16:03 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sat, 20 May 2006 03:16:03 -0400 Subject: [Nitro] Example app - Flare References: <047d01c67b8d$6e83bb90$0200000a@agamemnon><9c00d3e00605192246g78bfc5e8t362c96589a5e0693@mail.gmail.com> <099b01c67bda$bc320700$0200000a@agamemnon> Message-ID: <09ae01c67bdd$4171e550$0200000a@agamemnon> Jon A. Lambert wrote: > D, [2006-05-20T02:30:03.034418 #5972] DEBUG -- : UPDATE ogcategory SET > position=(position - 1) WHERE position > > > It's generating invalid SQL and SQLite3 cannot prepare it. > Something to do with aspect advices generated by "is Orderable"? -- J Lambert From transfire at gmail.com Sat May 20 12:56:00 2006 From: transfire at gmail.com (TRANS) Date: Sat, 20 May 2006 12:56:00 -0400 Subject: [Nitro] Reap Up Message-ID: <4b6f054f0605200956r39a7e3f2vac7899485462618f@mail.gmail.com> Hey all, The last few days I've spent on a rewrite of Reap --much simpler system now, more like Rake, ties into Rake more cleanly and there's a good bit less code --which is always a good thing. I'm almost done, but I need some advice, I'm debating between two forms of task definers. The first takes after test/unit using a prefix on method names, eg. def task_rdoc( name, &doc ) desc "Generate RDoc API documentation" task name do Task::RDoc.new( doc.to_openobject ).run end end The second form takes after some of _why's inspiration, namely using a special module: module Task def rdoc( name, &doc ) desc "Generate RDoc API documentation" task name do Task::RDoc.new( doc.to_openobject ).run end end end In either case, for pure Rake enthusiasts I'm pretty sure I'll offer the first form to be used in a Rakefile --calling 'task_rdoc' just seems to fit in better than calling 'Task.rdoc'. But I can still use either form under the hood. Any preferences here? Anyone see any good reasons to pick one over the other. Thanks. T. From m.fellinger at gmail.com Sat May 20 13:31:49 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 21 May 2006 02:31:49 +0900 Subject: [Nitro] Reap Up In-Reply-To: <4b6f054f0605200956r39a7e3f2vac7899485462618f@mail.gmail.com> References: <4b6f054f0605200956r39a7e3f2vac7899485462618f@mail.gmail.com> Message-ID: <9c00d3e00605201031o45c9bc20vf54155c13b842bbe@mail.gmail.com> prefering the last one, it looks somewhat nicer :) On 5/21/06, TRANS wrote:> Hey all,>> The last few days I've spent on a rewrite of Reap --much simpler> system now, more like Rake, ties into Rake more cleanly and there's a> good bit less code --which is always a good thing. I'm almost done,> but I need some advice, I'm debating between two forms of task> definers.>> The first takes after test/unit using a prefix on method names, eg.>> def task_rdoc( name, &doc )>> desc "Generate RDoc API documentation">> task name do> Task::RDoc.new( doc.to_openobject ).run> end>> end>> The second form takes after some of _why's inspiration, namely using a> special module:>> module Task>> def rdoc( name, &doc )>> desc "Generate RDoc API documentation">> task name do> Task::RDoc.new( doc.to_openobject ).run> end>> end>> end>> In either case, for pure Rake enthusiasts I'm pretty sure I'll offer> the first form to be used in a Rakefile --calling 'task_rdoc' just> seems to fit in better than calling 'Task.rdoc'. But I can still use> either form under the hood.>> Any preferences here? Anyone see any good reasons to pick one over the> other. Thanks.>> T.>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> From lists at davidlangston.com Sat May 20 14:27:35 2006 From: lists at davidlangston.com (Dave Langston) Date: Sat, 20 May 2006 11:27:35 -0700 Subject: [Nitro] Win32 users currently in Daylight Savings Time. In-Reply-To: References: Message-ID: <446F5F97.7060701@davidlangston.com> Bryan, Thx for finding this.... I also ran into it a couple weeks back and just rolled back to an earlier release rather than jumping in... thx again for all of us windows prisoners... Dave Bryan Soto wrote: > There is a bug in Ruby 1.8.4 released 12/24/2005 with File.stat not > accounting for Daylight Savings Time. If you use Nitro on an NTFS file > system, this affects you as File.stat is how Nitro determines whether > or not to reload a file. > > Basically, when running a Nitro app, you might see output similar to this: > D, [2006-05-10T23:06:03.000000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 > /gems/nitro-0.30.0/lib/nitro/helper/pager.rb' reloaded > D, [2006-05-10T23:06:03.015000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 > /gems/facets-1.3.3/lib/facets/more/expirable.rb' reloaded > D, [2006-05-10T23:06:03.031000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 > /gems/facets-1.3.3/lib/facet/symbol/downcase.rb' reloaded > D, [2006-05-10T23:06:03.031000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 > /gems/facets-1.3.3/lib/facets/core/kernel/is.rb' reloaded > D, [2006-05-10T23:06:03.031000 #3768] DEBUG -- : File 'c:/ruby/lib/ruby/gems/1.8 > /gems/nitro-0.30.0/lib/nitro/cgi/http.rb' reloaded > > repeated continously which will eventually crash with a stack overflow error. > > This has been fixed in the latest stable release for win32 as of > 4/14/06 available here: > http://www.garbagecollect.jp/ruby/mswin32/en/download/stable.html > > Direct download here: > ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ruby-1.8.4-20060414-i386-mswin32.zip > > I've posted a bug report at the one-click installer rubyforge page > letting them know of the problem and the updated release. From jlsysinc at alltel.net Sat May 20 14:39:15 2006 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sat, 20 May 2006 14:39:15 -0400 Subject: [Nitro] Example app - Flare References: <047d01c67b8d$6e83bb90$0200000a@agamemnon><9c00d3e00605192246g78bfc5e8t362c96589a5e0693@mail.gmail.com><099b01c67bda$bc320700$0200000a@agamemnon> <09ae01c67bdd$4171e550$0200000a@agamemnon> Message-ID: <09d501c67c3c$b29355c0$0200000a@agamemnon> Jon A. Lambert wrote: > Jon A. Lambert wrote: >> D, [2006-05-20T02:30:03.034418 #5972] DEBUG -- : UPDATE ogcategory >> SET position=(position - 1) WHERE position > >> >> It's generating invalid SQL and SQLite3 cannot prepare it. >> > > Something to do with aspect advices generated by "is Orderable"? > The following In OG lib/glue/orderable.rb is called when deleting a row from an Orderable object: def decrement_position_of_lower_items pos = orderable_position con = orderable_condition + [ "#{pos} > #{@position}" ] self.class.update "#{pos}=(#{pos} - 1)", :condition => con.join(' AND ') end #{@position} is not initialized. Does that narrow things down? -- J. Lambert From vagabond at cataclysm-software.net Sat May 20 15:25:31 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Sat, 20 May 2006 15:25:31 -0400 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <446D0E85.4060705@neurogami.com> References: <446D0E85.4060705@neurogami.com> Message-ID: <20060520192531.GA20879@hijacked.us> I write a big long reply to this but I forgot to fix the from address and the ML ate it... Manveru and I did a similar project in Nitro a long time back. I wrote a new generator for rdoc that outputted to YAML (and eventually Og when soime blocking bugs got fixed). It also did stuff like keep track of where a new method was defined on a class, so unlike ruby-doc.org we could tell if a method came from outside the core (I think Date is guilty of stuff like this). I also did some other enhancements to the rdoc output (breaking compatability with the other genrators in the process). Manveru was working on the Nitro frontend, he merged the nitro wiki into the page so any comments could be added on a per method/class/whatever basis. Her also added the ability to add tutorials and stuff. Jus as we got Og output working however, manveru no longer had time to work on the project. My Nitro/Og knowledge back then was very poor so I decided to folow his lead and give up. You can see the code of what we managed to produce here: rdog.rubyforge.org I still feel that ruby documentation could be done FAR better than current solutions and that manver and I had some promising improvements. If you're serious about this project I might be able to contribute some assistance. We had planned to add some more features to the rdoc generator (like support for gems) and make it a complete documentation solution. As it is, it got left ina very nasty state but maybe some stuff can be salvaged... Andrew From lists at davidlangston.com Sat May 20 15:22:58 2006 From: lists at davidlangston.com (Dave Langston) Date: Sat, 20 May 2006 12:22:58 -0700 Subject: [Nitro] NOOB Question - Maybe About Templates In-Reply-To: <9c00d3e00605192244s2df14342m4f3fe833046cecbd@mail.gmail.com> References: <446E18F2.5060401@davidlangston.com> <9c00d3e00605192244s2df14342m4f3fe833046cecbd@mail.gmail.com> Message-ID: <446F6C92.5010200@davidlangston.com> thx for the hint... I do find it strange that in Webrick, it did not require defining Template.root for the app to work... but, onward and forward!! thx again, Dave Michael Fellinger wrote: > try to set the template-directory > Template.root = 'templates' # or wherever you put it From james_b at neurogami.com Sat May 20 16:30:00 2006 From: james_b at neurogami.com (James Britt) Date: Sat, 20 May 2006 13:30:00 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <20060520192531.GA20879@hijacked.us> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> Message-ID: <446F7C48.6010305@neurogami.com> Andrew Thompson wrote: > I write a big long reply to this but I forgot to fix the from address and the ML > ate it... > > Manveru and I did a similar project in Nitro a long time back. I wrote a new > generator for rdoc that outputted to YAML (and eventually Og when soime blocking > bugs got fixed). It also did stuff like keep track of where a new method was > defined on a class, so unlike ruby-doc.org we could tell if a method came from > outside the core (I think Date is guilty of stuff like this). I also did some > other enhancements to the rdoc output (breaking compatability with the other > genrators in the process). The distinctions between core and std-lib (and then any additional libs one might have) are distracting. The current handling by rdoc, and the separation on ruby-doc, means you have to know in advance where to look. Merging API docs, though, can be tricky. Rannotate, for example, lists Array has having a to_yaml method. But that only exists when you use the YAML library; the docs don't say that, and the Rannotate method list offers to indication of when a method is part of the class, and when it is available only by a mixin. Having all docs in one place, while making clear when a method is part of the class or added through a mixin, would be a real win. > > Manveru was working on the Nitro frontend, he merged the nitro wiki into the > page so any comments could be added on a per method/class/whatever basis. Her > also added the ability to add tutorials and stuff. Sweet. > > Jus as we got Og output working however, manveru no longer had time to work on > the project. My Nitro/Og knowledge back then was very poor so I decided to folow > his lead and give up. You can see the code of what we managed to produce here: > rdog.rubyforge.org > Ah, yes, RDog. > I still feel that ruby documentation could be done FAR better than current > solutions and that manver and I had some promising improvements. If you're > serious about this project I might be able to contribute some assistance. We had > planned to add some more features to the rdoc generator (like support for gems) > and make it a complete documentation solution. As it is, it got left ina very > nasty state but maybe some stuff can be salvaged... Well, my last recollection was that I had a few issues running rdog. I think, for example, that it called on a 'coderay' lib that was not part of distro. But I just tried it now; it comes up, does pretty well. Shows (error) were I think the actual docs should be. But still, quite nice. Perhaps I'll take a look and see what I can do get it playing nicer, showing docs and all. And I like this bit from the README: "Prepare for some trouble and make sure you're in #nitro (irc.freenode.net)" -- James Britt "A principle or axiom is of no value without the rules for applying it." - Len Bullard From vagabond at cataclysm-software.net Sat May 20 18:28:36 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Sat, 20 May 2006 18:28:36 -0400 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <446F7C48.6010305@neurogami.com> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> Message-ID: <20060520222836.GA3899@hijacked.us> On Sat, May 20, 2006 at 01:30:00PM -0700, James Britt wrote: > The distinctions between core and std-lib (and then any additional libs > one might have) are distracting. The current handling by rdoc, and the > separation on ruby-doc, means you have to know in advance where to look. > > Merging API docs, though, can be tricky. Rannotate, for example, lists > Array has having a to_yaml method. But that only exists when you use > the YAML library; the docs don't say that, and the Rannotate method list > offers to indication of when a method is part of the class, and when it > is available only by a mixin. > > Having all docs in one place, while making clear when a method is part > of the class or added through a mixin, would be a real win. > This was pretty much what we did, we listed the method in the class, bu we marked them as not original to the class and when you looked at the method in detail it told you where the method originated. RDoc just doesn't track this information by default so there's no way to know this. > Well, my last recollection was that I had a few issues running rdog. I > think, for example, that it called on a 'coderay' lib that was not part > of distro. > It probably still does need coderay, its needed for the syntax highlighting. I'm sure a drop-in replacement would be possible. > > But I just tried it now; it comes up, does pretty well. Shows (error) > were I think the actual docs should be. But still, quite nice. > Probably because you don't have the docs, or we never fixed things before we gave up. I think it's still looking for the YAML based docs and I'm not sure if they're in SVN or not... > Perhaps I'll take a look and see what I can do get it playing nicer, > showing docs and all. > To be honest, I'd say just steal ideas from it, I have little to no idea hw the frontend works, but I can fix the rdoc generator to work right with Og and such if you'd like to go that route. > And I like this bit from the README: > > "Prepare for some trouble and make sure you're in #nitro (irc.freenode.net)" > Probably not a bad idea, stick around for more than 10 minutes next time too :P Andrew From james_b at neurogami.com Sat May 20 19:03:05 2006 From: james_b at neurogami.com (James Britt) Date: Sat, 20 May 2006 16:03:05 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <20060520222836.GA3899@hijacked.us> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> Message-ID: <446FA029.2030007@neurogami.com> Andrew Thompson wrote: > On Sat, May 20, 2006 at 01:30:00PM -0700, James Britt wrote: ... > >>Perhaps I'll take a look and see what I can do get it playing nicer, >>showing docs and all. >> > > To be honest, I'd say just steal ideas from it, I have little to no idea hw the > frontend works, but I can fix the rdoc generator to work right with Og and such > if you'd like to go that route. > I installed the coderay gem, so that's fine. I have a slew of Yaml files, so I don't really know why I get those error markers. I need to play around with the rdoc generator and see how it works. >>And I like this bit from the README: >> >>"Prepare for some trouble and make sure you're in #nitro (irc.freenode.net)" >> > > Probably not a bad idea, stick around for more than 10 minutes next time too :P I'm clumsy. I thought I was just minimizing he message window or something. Or maybe it disconnects after inactivity. -- James Britt "Blanket statements are over-rated" From surrender_it at yahoo.it Sat May 20 20:38:09 2006 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun, 21 May 2006 02:38:09 +0200 Subject: [Nitro] Win32 users currently in Daylight Savings Time. In-Reply-To: References: Message-ID: Bryan Soto ha scritto: > There is a bug in Ruby 1.8.4 released 12/24/2005 with File.stat not > accounting for Daylight Savings Time. If you use Nitro on an NTFS file > system, this affects you as File.stat is how Nitro determines whether > or not to reload a file. I guess this is also the reason for the failing test[1] related to file-based sessions, am I correct ? [1] ruby script\test.rb nitro .. 1) Failure: test_gc(TC_Session) [./test/nitro/tc_session.rb:60:in `test_gc' ./test/nitro/tc_session.rb:60:in `test_gc' ./test/nitro/tc_session.rb:33:in `test_gc']: expected but was <{}>. From bryan.a.soto at gmail.com Sun May 21 01:21:39 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Sat, 20 May 2006 22:21:39 -0700 Subject: [Nitro] Win32 users currently in Daylight Savings Time. In-Reply-To: References: Message-ID: On 5/20/06, gabriele renzi wrote: > Bryan Soto ha scritto: > > There is a bug in Ruby 1.8.4 released 12/24/2005 with File.stat not > > accounting for Daylight Savings Time. If you use Nitro on an NTFS file > > system, this affects you as File.stat is how Nitro determines whether > > or not to reload a file. > > I guess this is also the reason for the failing test[1] related to > file-based sessions, am I correct ? > Uses atime. Good catch. :) It fixes that too. From m.fellinger at gmail.com Sun May 21 01:53:53 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 21 May 2006 14:53:53 +0900 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <446FA029.2030007@neurogami.com> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> Message-ID: <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> puh, i missed a lot of stuff again...anyway - rdog was working the last time i used it... at least more or lessthere are some real problems with the current nitro however, becauselots of things we had to do to make things work are not neededanymore, and also this was my first nitro-project, so there are reallyloads of stuff that could be done better.As one feature i tried to make it (almost) completely pluggable intoSpark, though some modifications to the skin were neccesary i thinki've seperated the code good enough to see whats actually going on. also i just tried to get it running again, which works surprisinglywell, however you really need to read the README (as you already did)for what gems are needed, i was (and am still) very fond of coderayand bluecloth, which is why i use both as preference, but somehowpeople have the combination of syntax/redcloth much more commonly ontheir machines.anyway - two things to fix are the requires of'nano/time/stamp' (run.rb)'nano/time/to_date' (src/controller.rb)just use 'facet/time/stamp' and 'facet/time/to_date' insteadwhen this is done you are (hopefully) able to start the server and thenavigate tohttp://localhost:9999/rdognot sure what happened to sparks intropage, but we probably need anewer version in place.also, you are only able to browse the docs for an old version of nitro(somewhere around 0.26/0.27 i think) - the yamls from rubyforge workfine, however they are not included in the SVN-repo as they are inconstant flux.regarding the rdoc-part for yaml/og-generation, i really would like tohelp getting the og-thing working, i have a bit more time now andmight be able to help you at least in understanding the code.it's pretty bad code, but i think it's straight-forward enough so youcan figure out how it works.the important stuff is in the src/rdog_* files - and some templates:'src/templates/(rdog|list_*|get_*)', but nothing too deep. hope i could help a bit - and kudos to vagabond again, who justappears when i don't expect him :) On 5/21/06, James Britt wrote:> Andrew Thompson wrote:> > On Sat, May 20, 2006 at 01:30:00PM -0700, James Britt wrote:> ...> >> >>Perhaps I'll take a look and see what I can do get it playing nicer,> >>showing docs and all.> >>> >> > To be honest, I'd say just steal ideas from it, I have little to no idea hw the> > frontend works, but I can fix the rdoc generator to work right with Og and such> > if you'd like to go that route.> >>>> I installed the coderay gem, so that's fine. I have a slew of Yaml> files, so I don't really know why I get those error markers. I need to> play around with the rdoc generator and see how it works.>> >>And I like this bit from the README:> >>> >>"Prepare for some trouble and make sure you're in #nitro (irc.freenode.net)"> >>> >> > Probably not a bad idea, stick around for more than 10 minutes next time too :P>> I'm clumsy. I thought I was just minimizing he message window or> something. Or maybe it disconnects after inactivity.>>> --> James Britt>> "Blanket statements are over-rated"> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> From bryan.a.soto at gmail.com Sun May 21 01:59:05 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Sat, 20 May 2006 22:59:05 -0700 Subject: [Nitro] [Bug]? Only one test per test case? In-Reply-To: <446EB480.3090401@neurogami.com> References: <37fd0c50604271307w40a5c930s402ffc00e4891ff6@mail.gmail.com> <4b6f054f0604271856o44ed695fo237aabc18d2fe171@mail.gmail.com> <37fd0c50604280553k3a89c9baw5fcb94dd7b819ea6@mail.gmail.com> <446EB480.3090401@neurogami.com> Message-ID: On 5/19/06, James Britt wrote: > Humber Aquino wrote: > > Hi T! The result is the same :( > > > > I don't know why og knows that the db doesn't exists and did not create the > > db as in the first time. I will try to look into the og code to look 4 > > answers. > > > > Regards :D > > > Is there a fix for this? I'm running into the same, or a similar, > problem unit testing a model class. > > I have two tests in my test file. Each works fine if it is the only one, > but if setup is called more than once, it drops the MySQL database, then > fails to recreate it, and everything bombs. > I think the problem is the class is enchanted once and has a connection to the database. After the second call, the first connection has a stale handle because the database was dropped while it was connected. I'm not sure if that's a driver issue or not though. A solution would be to move the Og.setup definition where it would be executed once, i.e. not in a method definition. At least, modifying the OP's original code as below allows multiple tests to be run. After that, they seem to work alot like Rails fixtures. class TestCaseUser < Test::Unit::TestCase Og.setup() def setup og_fixture User end def test_something assert_kind_of User, User[1] end def test_something_else assert_equal User[1].name, 'John Doe' end end From james_b at neurogami.com Sun May 21 02:59:30 2006 From: james_b at neurogami.com (James Britt) Date: Sat, 20 May 2006 23:59:30 -0700 Subject: [Nitro] [Bug]? Only one test per test case? In-Reply-To: References: <37fd0c50604271307w40a5c930s402ffc00e4891ff6@mail.gmail.com> <4b6f054f0604271856o44ed695fo237aabc18d2fe171@mail.gmail.com> <37fd0c50604280553k3a89c9baw5fcb94dd7b819ea6@mail.gmail.com> <446EB480.3090401@neurogami.com> Message-ID: <44700FD2.7030602@neurogami.com> Bryan Soto wrote: > ... > > > I think the problem is the class is enchanted once and has a > connection to the database. After the second call, the first > connection has a stale handle because the database was dropped while > it was connected. I'm not sure if that's a driver issue or not though. > > A solution would be to move the Og.setup definition where it would be > executed once, i.e. not in a method definition. At least, modifying > the OP's original code as below allows multiple tests to be run. After > that, they seem to work alot like Rails fixtures. > That's basically what I've discovered; however, I have teardown emptying the database to remove any test residue. The downside is that, at least with what I'm seeing from MySQL, I cannot have tests that refer to specific oid values; seems that on each reinsertion of the fixtures they get new, incremented values. On the other hand, code that relies such detail is likely fragile anyway; I don't mind that when setting up test conditions, but there are simple ways around the reliance on fixed oids so it currently isn't an issue. -- James Britt "Programs must be written for people to read, and only incidentally for machines to execute." - H. Abelson and G. Sussman (in "The Structure and Interpretation of Computer Programs) From fabian at oggu.de Sun May 21 05:46:26 2006 From: fabian at oggu.de (Fabian Buch) Date: Sun, 21 May 2006 11:46:26 +0200 Subject: [Nitro] Og's :sql_index Message-ID: <3791cde0cc105b8ffc7fe37af9813379@oggu.de> Question 45 on Oxyliquit (http://oxyliquit.de/question/45): How do I define an index? I told him how to define a UNIQUE index and as I was at it I found the option :sql_index in og.rb, but it doesn't seem to be fully implemented yet and I tried it with PostgreSQL which didn't create an index as expected. Did I do something wrong, or is my assumption correct, that this isn't fully implemented yet? Fabian From john at oxyliquit.de Sun May 21 10:18:38 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 21 May 2006 16:18:38 +0200 Subject: [Nitro] [PATCH] og_default_notnull_string_fix Message-ID: Hi, Og throws errors when using Postgresql (not checked with other DBs) when doing this: class Foo property :name, String, :default => 'bar' end this is due to incorrect usage of inspect: field << " DEFAULT #{p.default.inspect} NOT NULL" if p.default this produces "bar" for the default value (note the quotation marks instead of apostrophes. Quotation marks in Postgres tell that this is "field" instead of a 'string'. field << " DEFAULT #{p.default.inspect.gsub(/^"(.*)"$/, '\'\1\'')} NOT NULL" if p.default This line fixes it (yes, I know, evil regex), what it does: when there are qotation marks at the beginning and the end (and only there) it will replace those and put apostrophes there instead. If you have a better solution, please use that instead, I'm not really fond of my regex solution. A big if/else to handle strings seperately might be better... but I dunno. Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: og_default_notnull_string_fix.tar.bz2 Type: application/bzip2 Size: 15260 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060521/b1af1bf7/attachment.bin From vagabond at cataclysm-software.net Sun May 21 13:59:03 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Sun, 21 May 2006 13:59:03 -0400 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> Message-ID: <20060521175903.GA29473@hijacked.us> On Sun, May 21, 2006 at 02:53:53PM +0900, Michael Fellinger wrote: Assuming I read Michael's email right (my eyes, it burns!) I guess he's willing to help knock rdog back into shape too. I'm guessing we both have a lot of work to do to get things properly Og-driven and clean up some of the hacks we need to get things semi-working. I can look at the generator code today and see if I can make things a bit less hideous (remove the YAML stuff for good). All in all James, if you would host this I think between the 3 of us we can put together a nice little replacment for the current rdoc generated template files. Andrew From john at oxyliquit.de Sun May 21 13:58:17 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 21 May 2006 19:58:17 +0200 Subject: [Nitro] [PATCH] (hack-fix) og_enforce_default_values Message-ID: Hi, while using :default, I got to the point where it tried to enter strings correctly, though there is an additional problem. class Foo property :markuptype, String, :default => 'markdown' end Foo.create ERROR: null value in column "markuptype" violates not-null constraint this happens because of the not null constraint. Column | Type | Modifiers markuptype | text | not null default 'markdown'::text This might be an Postgresql only issue, and the patch looks _damn_ ugly ;/ Someone please write a new patch -_- To quote someone from ruby-talk: "please turn down the lights, the code is damn ugly" Well, what my patch does, is: while precompiling the og_insert functions for each class, the write_prop(p) function gets called. This is where the alternate values kick in. Instead of there using 'NULL' all the time, I just insert the default values. This enforces the Og side of the :default constraint. Well, while maybe being a non issue with other stores, this adds another layer of complexity, thankfully that function is only run at compile time.... I only had the chance to try it with String values, so please regard this patch as a hack-fix until someone else a) makes a better patch b) tests this thoroughly Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: og_enfoce_default_values.tar.bz2 Type: application/bzip2 Size: 15651 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060521/11108ca5/attachment.bin From james_b at neurogami.com Sun May 21 14:59:04 2006 From: james_b at neurogami.com (James Britt) Date: Sun, 21 May 2006 11:59:04 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <20060521175903.GA29473@hijacked.us> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> <20060521175903.GA29473@hijacked.us> Message-ID: <4470B878.1000704@neurogami.com> Andrew Thompson wrote: > On Sun, May 21, 2006 at 02:53:53PM +0900, Michael Fellinger wrote: > Yeah, what's the deal with that? Newline adverse? :) > > Assuming I read Michael's email right (my eyes, it burns!) I guess he's willing > to help knock rdog back into shape too. I'm guessing we both have a lot of work > to do to get things properly Og-driven and clean up some of the hacks we need to > get things semi-working. I can look at the generator code today and see if I > can make things a bit less hideous (remove the YAML stuff for good). Here's what I've done so far: * Installed coderay (no brainer) * Tried running rdoc-devel over the core Ruby files. It fails after running along for fair bit. Haven't had the time to see why the actual problem is. * Figured out why I was getting (error) in various pages. The code was looking to load "Foo::Bar", but the the disk file is "Foo__Bar". I added some name-cleaning code and, at first pass, seems fine now. * I've done some simple poking, and I can add new wiki entries, so that part seems OK. However, searching doesn't work, or doesn't work as I think it should. For example, a search on Nitro turns up nothing, though there are Nitro docs in the directory. > > All in all James, if you would host this I think between the 3 of us we can put > together a nice little replacment for the current rdoc generated template files. > Sounds good! -- James Britt "A language that doesn't affect the way you think about programming is not worth knowing." - A. Perlis From vagabond at cataclysm-software.net Sun May 21 15:18:06 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Sun, 21 May 2006 15:18:06 -0400 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <4470B878.1000704@neurogami.com> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> <20060521175903.GA29473@hijacked.us> <4470B878.1000704@neurogami.com> Message-ID: <20060521191806.GA5112@hijacked.us> On Sun, May 21, 2006 at 11:59:04AM -0700, James Britt wrote: > Yeah, what's the deal with that? Newline adverse? :) > He's using Gmail despite the fact that it breaks horribly on this list. > Here's what I've done so far: > > * Installed coderay (no brainer) > > * Tried running rdoc-devel over the core Ruby files. It fails after > running along for fair bit. Haven't had the time to see why the actual > problem is. > Yeah, its a bit of a kludge right now, I stopped working on it when it was in transition so there's probably lots of problems. I'll try to fix the generator up a little bit and see if i can get it working. > * Figured out why I was getting (error) in various pages. The code was > looking to load "Foo::Bar", but the the disk file is "Foo__Bar". > > I added some name-cleaning code and, at first pass, seems fine now. > > * I've done some simple poking, and I can add new wiki entries, so that > part seems OK. > > However, searching doesn't work, or doesn't work as I think it should. > For example, a search on Nitro turns up nothing, though there are > Nitro docs in the directory. > I didn't even know there was a search, even so I bet it doesn't search the yAML files so it'd be pretty useless anyway. Just another reason we need to move to Og. If this buildworld ever finishes I'll checkout the code and see about cleaning up the generator and ditching the legacy YAML stuff (it just makes things more complicated). I don't really know too much about the frontend, but manveru is probably right that it needs some serious work too (convert it to read the docs from Og for one). Andrew From james_b at neurogami.com Sun May 21 15:35:38 2006 From: james_b at neurogami.com (James Britt) Date: Sun, 21 May 2006 12:35:38 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <20060521191806.GA5112@hijacked.us> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> <20060521175903.GA29473@hijacked.us> <4470B878.1000704@neurogami.com> <20060521191806.GA5112@hijacked.us> Message-ID: <4470C10A.2040400@neurogami.com> Andrew Thompson wrote: > On Sun, May 21, 2006 at 11:59:04AM -0700, James Britt wrote: > >>Yeah, what's the deal with that? Newline adverse? :) >> > > He's using Gmail despite the fact that it breaks horribly on this list. Odd. First I've seen an issue on a list using GMail. Oh well. > > >>Here's what I've done so far: >> >> ... >>However, searching doesn't work, or doesn't work as I think it should. >> For example, a search on Nitro turns up nothing, though there are >>Nitro docs in the directory. >> > > I didn't even know there was a search, even so I bet it doesn't search the yAML > files so it'd be pretty useless anyway. Just another reason we need to move to > Og. I'm thinking now that this is just the Spark search, not a complete comments + docs search. > > If this buildworld ever finishes I'll checkout the code and see about cleaning > up the generator and ditching the legacy YAML stuff (it just makes things more > complicated). I don't really know too much about the frontend, but manveru is > probably right that it needs some serious work too (convert it to read the docs > from Og for one). Rannotate follows a similar path as RDog; it runs a modded formatter from rdoc to generate DB inserts for the docs, then builds on that. I've thought about just swiping that code and wrapping Og/Nitro around it. -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://refreshingcities.org - Design, technology, usability From vagabond at cataclysm-software.net Sun May 21 16:10:00 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Sun, 21 May 2006 16:10:00 -0400 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <4470C10A.2040400@neurogami.com> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> <20060521175903.GA29473@hijacked.us> <4470B878.1000704@neurogami.com> <20060521191806.GA5112@hijacked.us> <4470C10A.2040400@neurogami.com> Message-ID: <20060521201000.GA20188@hijacked.us> On Sun, May 21, 2006 at 12:35:38PM -0700, James Britt wrote: > Rannotate follows a similar path as RDog; it runs a modded formatter > from rdoc to generate DB inserts for the docs, then builds on that. > > I've thought about just swiping that code and wrapping Og/Nitro around it. > I'd say do it except that I think rdog probably has a better generator in potentia. The implementation is a bit broken right now but it did some nice stuff that I haven't seen anyone else do. The tracking of method origins/overrides, grabbing the linenumbers from C files for the inline code viewing and the attempt to determine is code is from the core, the stdlib or external is nice (even if we don't split things up like that we can at least tell the user they need to require a file or install a gem). I also wrote some code that tried to search the docs for symbols (classes and methods) and crosslink things automagically. Andrew From bryan.a.soto at gmail.com Mon May 22 01:14:05 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Sun, 21 May 2006 22:14:05 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <20060521191806.GA5112@hijacked.us> References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> <20060521175903.GA29473@hijacked.us> <4470B878.1000704@neurogami.com> <20060521191806.GA5112@hijacked.us> Message-ID: On 5/21/06, Andrew Thompson wrote: > On Sun, May 21, 2006 at 11:59:04AM -0700, James Britt wrote: > > Yeah, what's the deal with that? Newline adverse? :) > > > He's using Gmail despite the fact that it breaks horribly on this list. > If one were paranoid, one would notice that both the people using GMail and having problems with horrible formatting use it via pop mail clients, not the web interface where advertising is displayed. As a funny coincidence, I use a GMail account only via the web interface (with advertising) and haven't had this problem. Surely just a coincidence though... ;) From james_b at neurogami.com Mon May 22 01:50:29 2006 From: james_b at neurogami.com (James Britt) Date: Sun, 21 May 2006 22:50:29 -0700 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: References: <446D0E85.4060705@neurogami.com> <20060520192531.GA20879@hijacked.us> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> <20060521175903.GA29473@hijacked.us> <4470B878.1000704@neurogami.com> <20060521191806.GA5112@hijacked.us> Message-ID: <44715125.8070909@neurogami.com> Bryan Soto wrote: > > If one were paranoid, one would notice that both the people using > GMail and having problems with horrible formatting use it via pop mail > clients, not the web interface where advertising is displayed. As a > funny coincidence, I use a GMail account only via the web interface > (with advertising) and haven't had this problem. > > Surely just a coincidence though... ;) :) I use a few Gmail accounts almost exclusively through the POP interface from Thunderbird. I've yet to hear of any problems, which is why I was surprised that the culprit seems to be GMail. -- James Britt "Programs must be written for people to read, and only incidentally for machines to execute." - H. Abelson and G. Sussman (in "The Structure and Interpretation of Computer Programs) From bryan.a.soto at gmail.com Mon May 22 03:06:11 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Mon, 22 May 2006 00:06:11 -0700 Subject: [Nitro] [PATCH] (hack-fix) og_enforce_default_values In-Reply-To: References: Message-ID: On 5/21/06, Jonathan Buch wrote: > This might be an Postgresql only issue, and the patch looks _damn_ > ugly ;/ Sqlite3 and Mysql as well. > Someone please write a new patch -_- Mysql doesn't support default values for text columns which happens to be what is used for strings. At first glance, this appears to be the only portable way to support default values. > To quote someone from ruby-talk: "please turn down the lights, the > code is damn ugly" > It wasn't that bad. :) > I only had the chance to try it with String values, so please > regard this patch as a hack-fix until someone else > a) makes a better patch > b) tests this thoroughly > c) see if it still applies cleanly after we get George's changes. From john at oxyliquit.de Mon May 22 05:59:49 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 22 May 2006 11:59:49 +0200 Subject: [Nitro] [PATCH] (hack-fix) og_enforce_default_values In-Reply-To: References: Message-ID: Hi, On Mon, 22 May 2006 09:06:11 +0200, Bryan Soto wrote: > On 5/21/06, Jonathan Buch wrote: >> This might be an Postgresql only issue > Sqlite3 and Mysql as well. Well.. I don't know if I should be happy or sad... > Mysql doesn't support default values for text columns which happens to > be what is used for strings. At first glance, this appears to be the > only portable way to support default values. .... really, I'm gonna cry now ;/ >> To quote someone from ruby-talk: "please turn down the lights, the >> code is damn ugly" > It wasn't that bad. :) Made it much nicer... but.. but.. T_T >> I only had the chance to try it with String values, so please >> regard this patch as a hack-fix until someone else >> a) makes a better patch >> b) tests this thoroughly > c) see if it still applies cleanly after we get George's changes. Ok, here's the deal: This looks like the attached patch here works (_much_ nicer than before) but is not good for anything else than: * Strings * Floats * Integers It will horribly fail with all other values due to the simple handling in "fields_for_class()". ======================================= stop reading here, if you have no time. error description and idea to handle the case follows. ======================================= Even if I make a nice DEFAULT contraint myself class Foo property :time, Time, :extra_sql => "DEFAULT current_timestamp NOT NULL" end it will fail when creating an object. This has the additional fault, that Og won't know about this default value. So I would have to make a handler for for things like: class Foo property :time, Time, :default => 'current_timestamp' # PgSQL only end Would have to create a SQL query like the one above in :extra_sql, parsing involved... This is only one side though. This will still fail when doing an INSERT. When you handle the default values like I did in the attached patch, the values get computed at compile-time (when you start the application) so when you have code like this: class Foo property :time, Time, :default => Time.now end This sounds intuitive, right? It is not, since the Time.now is written statically at compile-time (despite failing horribly in fields_for_class) Manveru and I played with procs, ( lambda { Time.now } ), but they are .call'ed at compile-time as well, no use. To get around these issues, in Postgresql you have the option to leave out the values you have DEFAULT values for. To handle this, Og would have to leave out the fields with DEFAULT values (if the property is 'nil', and only then). To do this, more logic in "def og_insert()" is needed, which is eval'ed in "def eval_og_insert()". General idea: ## write_prop(p) def write_prop(p) has_default = p[:default] ? true : false case p when Integer: return "\#{@#{p} || (#{has_defaul} ? nil : 'NULL')}" when Float: # ... ## eval_og_insert(klass) * put both 'props' and 'values' as static arrays into the eval'ed function. * delete all props where 'values' is nil (which comes from evaled write_prop) * remove the nil values in 'values' * build the SQL query I can't wrap my head around this eval stuff... too much escaping going on there for me.. Maybe someone who understands what I'm saying can code that :P Until then.. my patch for letting Og handle the default values works, at least for certain types. Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png -------------- next part -------------- A non-text attachment was scrubbed... Name: og_enfoce_default_values_revisited.tar.bz2 Type: application/bzip2 Size: 16061 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060522/14c397a5/attachment.bin From jonas at stvs.ch Mon May 22 08:09:23 2006 From: jonas at stvs.ch (Jonas Pfenniger) Date: Mon, 22 May 2006 14:09:23 +0200 Subject: [Nitro] [rfd] (request for doc) Glue::Configuration Message-ID: <1148299764.24327.8.camel@localhost.localdomain> Hi list, hi George, how do you use the Glue::Configuration generally ? There are interesting methods like "parse" to get it from a YAML file. What are the mechanism you put around to use this generally ? Cheers, zimbatm From m.fellinger at gmail.com Mon May 22 08:58:16 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 22 May 2006 21:58:16 +0900 Subject: [Nitro] Giving Og/Nitro greater exposure In-Reply-To: <44715125.8070909@neurogami.com> References: <446D0E85.4060705@neurogami.com> <446F7C48.6010305@neurogami.com> <20060520222836.GA3899@hijacked.us> <446FA029.2030007@neurogami.com> <9c00d3e00605202253m45ae3dcdq9c6fe17393a60e66@mail.gmail.com> <20060521175903.GA29473@hijacked.us> <4470B878.1000704@neurogami.com> <20060521191806.GA5112@hijacked.us> <44715125.8070909@neurogami.com> Message-ID: <9c00d3e00605220558w362a5035lf396f7b5d35898e0@mail.gmail.com> to make this mail less painful - - -i use gmail-webinterface, almost exclusive with konqueror|firefox wheni am at home - - -the other time i use kmail, which manages to, now hold breath, read myown emails correctly and send them correctly (to others too) - - -no idea why there's no advertisment in my mails... is there none? From humberaquino at gmail.com Mon May 22 09:28:03 2006 From: humberaquino at gmail.com (Humber Aquino) Date: Mon, 22 May 2006 09:28:03 -0400 Subject: [Nitro] examples-0.30.0/gallery problem Message-ID: <37fd0c50605220628w7c1f69fev95ac41a2481546fe@mail.gmail.com> I have a problem running Nitro's gallery example. When i upload defile it looks like the path to the image(beauty_eq07.jpg) is notcorrectly generated. So the read method on line 24 listed bellow can'tlocate the file.I look into the ./public/upload directory and the image is there, butthe path doesn't have the first 'u' character when the read method iscalled.. Is this a bug? Does anyone has the same problem? In file '/usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/glue/magick.rb' : 19:20: def self.generate_thumbnail(src, tname, geostring)21: ext = File.extname(src)22: dst = "#{File.join(File.dirname(src), File.basename(src,ext))}_#{tname}#{ext}"23:24: thumb = Magick::Image.read(File.join(Nitro::Server.public_root, src)).first25: thumb.change_geometry!(geostring) do |cols, rows, thumb|26: thumb.resize!(cols, rows)27: end28: thumb.write(File.join(Nitro::Server.public_root, dst))29: $ ruby -rubygems run.rbI, [2006-05-22T09:19:07.936970 #8940] INFO -- : Og uses the Sqlite store.I, [2006-05-22T09:19:08.664399 #8940] INFO -- : Created table 'ogphoto'.I, [2006-05-22T09:19:08.724751 #8940] INFO -- : Created table 'ogtag'.I, [2006-05-22T09:19:08.746989 #8940] INFO -- : Using Memory sessions. ==> Setup for debug mode==> Listening at 0.0.0.0:9999. [WEBRICK]==> Press Ctrl-C to shutdown; Run with --help for options. [2006-05-22 09:19:08] INFO WEBrick 1.3.1[2006-05-22 09:19:08] INFO ruby 1.8.3 (2005-06-23) [i486-linux][2006-05-22 09:19:08] INFO WEBrick::HTTPServer#start: pid=8940 port=9999D, [2006-05-22T09:19:15.932281 #8940] DEBUG -- : Rendering '/'.D, [2006-05-22T09:19:15.933627 #8940] DEBUG -- : Compiling action'GalleryController#index'D, [2006-05-22T09:19:15.937012 #8940] DEBUG -- : Compiling template'GalleryController: template/index.xhtml'D, [2006-05-22T09:19:15.962038 #8940] DEBUG -- : SELECT * FROM ogphotoORDER BY oid DESCD, [2006-05-22T09:19:24.518522 #8940] DEBUG -- : Rendering '/save'.D, [2006-05-22T09:19:24.519362 #8940] DEBUG -- : Compiling action'GalleryController#save'E, [2006-05-22T09:19:24.565545 #8940] ERROR -- : Error while handling '/save'.E, [2006-05-22T09:19:24.565822 #8940] ERROR -- : unable to open image`pload/beauty_eq07.jpg': No such file or directory: /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/glue/magick.rb:24:in `read' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/glue/magick.rb:24:in`generate_thumbnail' (eval):25:in `file_from_request' (eval):36:in `module_eval' (eval):35:in `call' /usr/lib/ruby/gems/1.8/gems/glue-0.30.0/lib/glue/property.rb:147:in`populate_object' /usr/lib/ruby/gems/1.8/gems/glue-0.30.0/lib/glue/property.rb:146:in`populate_object' /usr/lib/ruby/gems/1.8/gems/og-0.30.0/lib/og/entity.rb:141:in `assign' ./controller.rb:6:in `save' (eval):6:in `save_action' /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/controller.rb:93:in`method_missing' /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' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:96:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82: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' run.rb:14 LOGGED FROM: /usr/lib/ruby/gems/1.8/gems/nitro-0.30.0/lib/nitro/render.rb:249:in`log_error' Thanks in advance! From riku.raisanen at walkingwoods.com Mon May 22 10:15:42 2006 From: riku.raisanen at walkingwoods.com (Riku =?iso-8859-1?q?R=E4is=E4nen?=) Date: Mon, 22 May 2006 17:15:42 +0300 Subject: [Nitro] Am I the only one In-Reply-To: References: Message-ID: <200605221715.42517.riku.raisanen@walkingwoods.com> who is rapidly hitting f5 on nitro-general, waiting for the refactored Og code? :ff -Riku From george.moschovitis at gmail.com Mon May 22 10:45:56 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 22 May 2006 17:45:56 +0300 Subject: [Nitro] Am I the only one In-Reply-To: <200605221715.42517.riku.raisanen@walkingwoods.com> References: <200605221715.42517.riku.raisanen@walkingwoods.com> Message-ID: Hello, I just pushed some new code to repo.nitroproject.org Including the current version of the Og refactoring. Please check out the changes and provide comments. Note that the code in the repository is not final and not for production, just for remarks at the moment. However, I like the way it turns out. I would probably suggest some changes to facets that will simplify things some more though... btw, prefer to use: attr_accessor :title, String instead of property :title, String of course attr_accessor :title ... ann :title, String works for SOC regards, George. On 5/22/06, Riku R?is?nen wrote: > who is rapidly hitting f5 on nitro-general, waiting for the refactored Og > code? > > > :ff > > -Riku > _______________________________________________ > 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 May 22 10:47:59 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 22 May 2006 17:47:59 +0300 Subject: [Nitro] Og's :sql_index In-Reply-To: <3791cde0cc105b8ffc7fe37af9813379@oggu.de> References: <3791cde0cc105b8ffc7fe37af9813379@oggu.de> Message-ID: One of the things i 'rationalized' during the current rewrite, in the current code: class MyClass attr_accessor :age, Fixnum, :sql_index => true end you can also parse additional parameters to customize the index, I ll nicely document this with RDocs ;-) regards, George. On 5/21/06, Fabian Buch wrote: > Question 45 on Oxyliquit (http://oxyliquit.de/question/45): How do I > define an index? > > I told him how to define a UNIQUE index and as I was at it I found the > option :sql_index in og.rb, but it doesn't seem to be fully implemented > yet and I tried it with PostgreSQL which didn't create an index as > expected. > > Did I do something wrong, or is my assumption correct, that this isn't > fully implemented yet? > > Fabian > > _______________________________________________ > 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 May 22 10:51:01 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 22 May 2006 17:51:01 +0300 Subject: [Nitro] Am I the only one In-Reply-To: References: <200605221715.42517.riku.raisanen@walkingwoods.com> Message-ID: As described earlier the new code is separated like this: store.rb store/sgl.rb store/sql/utils.rb store/sql/join.rb store/sql/evolution.rb adapter.rb adapter/mysql.rb adapter/mysql/utils.rb adapter/mysql/script.rb to keep things more organized and readable. regards, George. -- http://www.gmosx.com http://www.nitroproject.org From john at oxyliquit.de Mon May 22 12:42:52 2006 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 22 May 2006 18:42:52 +0200 Subject: [Nitro] examples-0.30.0/gallery problem In-Reply-To: <37fd0c50605220628w7c1f69fev95ac41a2481546fe@mail.gmail.com> References: <37fd0c50605220628w7c1f69fev95ac41a2481546fe@mail.gmail.com> Message-ID: Hi, I'm sorry, I tried 3 times to read your post, I'm not getting anywhere, it really hurts my eyes. Could you please repost this, not using gmail? On Mon, 22 May 2006 15:28:03 +0200, Humber Aquino wrote: > I have a problem running Nitro's gallery example. When i upload defile > it looks like the path to the image(beauty_eq07.jpg) is not correctly > generated. So the read method on line 24 listed bellow can't locate the > file. I look into the ./public/upload directory and the image is there, > but the path doesn't have the first 'u' character when the read method > is called.. > Is this a bug? Does anyone has the same problem? [totally incomprehensible garbage removed] Maybe this helps though: # a class in model.rb class Image property :file, WebFile def file_real_path path = WebFile.upload_root File.join(Nitro::Server.public_root, path, @file) end end I use this method (which overwrites a method from WebFile), to specify the real path of the uploaded file, maybe you can play with it a bit? Kashia -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Mon May 22 13:06:59 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 22 May 2006 20:06:59 +0300 Subject: [Nitro] [rfd] (request for doc) Glue::Configuration In-Reply-To: <1148299764.24327.8.camel@localhost.localdomain> References: <1148299764.24327.8.camel@localhost.localdomain> Message-ID: Lets say you have the following: class MyClass setting :my_setting, :default => 1, :doc => '...' setting :hello, :default => 'unknown', :doc => '...' end you can change the setting like this: MyClass.my_setting = 3 MyClass.hello = 'tml' alternatively you can use the yaml configuration feature. Just put debug.yaml or live.yaml in conf: /path/to/app/conf/debug.yaml then if you run in debug mode nitro automatically parses the file. Put something like this in the file: MyClass: my_setting: 2 hello: tml couldnt be easier. if you prefer ruby, put a ruby file in conf: conf/debug.rb MyClass.my_setting = 3 MyClass.hello = 'tml' there are some more options to setup, have a look at the source. I will add better rdocs. hope this helped, if not let me know! -g. On 5/22/06, Jonas Pfenniger wrote: > Hi list, hi George, > > how do you use the Glue::Configuration generally ? There are interesting > methods like "parse" to get it from a YAML file. What are the mechanism > you put around to use this generally ? > > Cheers, > zimbatm > > _______________________________________________ > 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 May 22 13:08:45 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 22 May 2006 20:08:45 +0300 Subject: [Nitro] How do I access multipart data? In-Reply-To: <9c00d3e00605192306x5ac11f23sc29943956f0ac954@mail.gmail.com> References: <095901c67bbe$42ff7b40$0200000a@agamemnon> <9c00d3e00605192306x5ac11f23sc29943956f0ac954@mail.gmail.com> Message-ID: here is support from the latest version:
#{form :method => :multipart do |f| f.p { f.label 'Select the new icon filename' f.select_file :file, :label => 'Select icon' } f.p { f.submit 'Change' } end}
On 5/20/06, Michael Fellinger wrote: > first of all, there's some support in that direction > there is however no helper to generate multipart-forms i know of,though you might be able to use the new form-helper for that, but i'mnot familar with it, so i just give you some advice on oxyliquit wherei just discovered your question :)thanks for posting it there... > http://oxyliquit.de/question/44 > On 5/20/06, Jon A. Lambert wrote:> Also asked on Oxyliquit...>> How do I access multipart data?>> I want to the user to be able to be able to upload zip/tar/jpg files. How do> I access multipart data in Nitro's request? Are there any handy tags/tools> in Nitro's library for generating multipart input forms? Is there anything> in the Ajax interface that is useful for this?>> Thanks>> --> J. Lambert>> _______________________________________________> 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 james_b at neurogami.com Mon May 22 14:04:54 2006 From: james_b at neurogami.com (James Britt) Date: Mon, 22 May 2006 11:04:54 -0700 Subject: [Nitro] [rfd] (request for doc) Glue::Configuration In-Reply-To: References: <1148299764.24327.8.camel@localhost.localdomain> Message-ID: <4471FD46.8070900@neurogami.com> Neat. Thanks! -- James Britt "You harmonize; then you customize." - Wilson Pickett From zimba.tm at gmail.com Tue May 23 08:04:34 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 23 May 2006 14:04:34 +0200 Subject: [Nitro] [patchset] Some small Nitro and Glue fixes Message-ID: <1148385874.20254.1.camel@localhost.localdomain> Fri May 19 12:53:11 CEST 2006 Jonas Pfenniger * Small fix in scaffolding that allows you to use a symbol as a name Shall I send this patch? (1/5) [ynWvpxqadjk], or ? for help: y Fri May 19 13:06:35 CEST 2006 Jonas Pfenniger * Removes unnecessary double slashes that breaks webrick in R Shall I send this patch? (2/5) [ynWvpxqadjk], or ? for help: y Mon May 22 09:09:11 CEST 2006 Jonas Pfenniger * Support for actions with double underscores in R Shall I send this patch? (3/5) [ynWvpxqadjk], or ? for help: y Tue May 23 13:56:55 CEST 2006 Jonas Pfenniger * Reap bug: ProjectInfo fixed Reap doesn't allow empty tasks, this is why I had to add the hello: world line, so that the task is recognized as a Hash. Shall I send this patch? (4/5) [ynWvpxqadjk], or ? for help: y -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle.tgz Type: application/x-compressed-tar Size: 3428 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060523/5881ca9c/attachment.bin From zimba.tm at gmail.com Tue May 23 09:01:52 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 23 May 2006 15:01:52 +0200 Subject: [Nitro] [rfd] (request for doc) Glue::Configuration In-Reply-To: References: <1148299764.24327.8.camel@localhost.localdomain> Message-ID: <3ff63f9b0605230601v5c2b484cy78b173beb2735158@mail.gmail.com> Thanks a lot George From jonas at stvs.ch Tue May 23 11:17:22 2006 From: jonas at stvs.ch (Jonas Pfenniger) Date: Tue, 23 May 2006 17:17:22 +0200 Subject: [Nitro] [rdf] New commands for my application Message-ID: <1148397443.5667.7.camel@localhost.localdomain> Hi list, I have built a medium sized application (ProVision) which is also a lot console based. Now I'm implementing a lot of unix commands. How would you do so that my command-line tools share the same configuration as og/nitro ? Since they don't know about conf/#{state}.yaml, they generally tend to build a new database in their directory. Also, nitro is not very nice when I want to run it trough an executable wrapper because the path is different and all the default paths (public, conf, ...) are lost. Do I have to chdir to the project's root or is there a nice method around there ? Cheers, zimbatm From lasso at lassoweb.nu Tue May 23 17:41:27 2006 From: lasso at lassoweb.nu (Lars Olsson) Date: Tue, 23 May 2006 23:41:27 +0200 Subject: [Nitro] Running Nitro in subdirectory on Apache2 Message-ID: <44738187.8000702@lassoweb.nu> Hi list, After finally getting Nitro to run on my home WinXP machine i decided to try using Nitro at my ISP's (OCS Solutions). Nitro wasn't installed, but it only took a support ticket to get that one fixed...One more ISP to choose from :) (They use Apache2 on Gentoo...support for fastcgi and lighthttpd is also available.) However, I'm not interested in running Nitro on all of my site but only in a specific subdir. Following http://www.oxyliquit.de/question/36 it was easy to setup Apache, but since Nitro isn't running in the web root directory I get an error whenever trying to load a page Path: /nitrotest/index No action for path '/nitrotest/index' on 'Nitrotest' I've seen some discussion on the ML about this before, but I can't seem to find an easy answer on what to do to map the urls correctly on the nitro side. Any suggestions? /Lasso -- ________________________________________ Lars Olsson lasso at lassoweb.nu http://www.lassoweb.nu/ From bryan.a.soto at gmail.com Tue May 23 18:48:27 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 23 May 2006 15:48:27 -0700 Subject: [Nitro] Running Nitro in subdirectory on Apache2 In-Reply-To: <44738187.8000702@lassoweb.nu> References: <44738187.8000702@lassoweb.nu> Message-ID: On 5/23/06, Lars Olsson wrote: > Hi list, > Hi! > I've seen some discussion on the ML about this before, but I can't seem > to find an easy answer on what to do to map the urls correctly on the > nitro side. > > Any suggestions? > There is an outstanding patch of Andrew's that just needs support for redirects. He said that was the hard part and he's right. :( I'll give it a try again and, if I still can't figure anything out, I'll post something to the list and maybe others can lend a hand with it. From george.moschovitis at gmail.com Wed May 24 03:16:58 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 24 May 2006 10:16:58 +0300 Subject: [Nitro] [rfd] (request for doc) Glue::Configuration In-Reply-To: <3ff63f9b0605230601v5c2b484cy78b173beb2735158@mail.gmail.com> References: <1148299764.24327.8.camel@localhost.localdomain> <3ff63f9b0605230601v5c2b484cy78b173beb2735158@mail.gmail.com> Message-ID: > Thanks a lot George no prob, if ou need more help let me know... -g. -- http://www.gmosx.com http://www.nitroproject.org From george.moschovitis at gmail.com Wed May 24 03:29:39 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 24 May 2006 10:29:39 +0300 Subject: [Nitro] [rdf] New commands for my application In-Reply-To: <1148397443.5667.7.camel@localhost.localdomain> References: <1148397443.5667.7.camel@localhost.localdomain> Message-ID: Can you describe the problems a bit better? I would like to fix them or offer solutions. Btw, check out the newly introduced: nitro/lib/nitro/adapter/script.rb or nitro/lib/nitro/adapter/console.rb and the new nitro/bin/nitro this may be useful to you... Both are not finalized though, but will be ready for 0.31.0 regards, George. On 5/23/06, Jonas Pfenniger wrote: > Hi list, > > I have built a medium sized application (ProVision) which is also a lot > console based. Now I'm implementing a lot of unix commands. > > How would you do so that my command-line tools share the same > configuration as og/nitro ? Since they don't know about > conf/#{state}.yaml, they generally tend to build a new database in their > directory. > > Also, nitro is not very nice when I want to run it trough an executable > wrapper because the path is different and all the default paths (public, > conf, ...) are lost. Do I have to chdir to the project's root or is > there a nice method around there ? > > > Cheers, > zimbatm > > > _______________________________________________ > 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 zimba.tm at gmail.com Wed May 24 09:40:20 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Wed, 24 May 2006 15:40:20 +0200 Subject: [Nitro] [rdf] New commands for my application In-Reply-To: References: <1148397443.5667.7.camel@localhost.localdomain> Message-ID: <3ff63f9b0605240640w59693f9dmb8c14e54281a83d0@mail.gmail.com> As an example : I have a list of users with expire times. Once in a while, I want to remove all the expired users using a crontab. So I build a new command with the nice Console::Command that does that. But that command needs the same parameters to get connected to the right database. My project is currently structured like that : * pro_vision/run.rb # runner * pro_vision/bin/* # scripts * pro_vision/lib/pro_vision.rb # main lib with a ProVision module * pro_vision/lib/pro_vision/* # rest of the ProVision classes * pro_vision/public/* # public classes * pro_vision/templates/* # templates for the ProVision controller I have also three other projects that only provide parts and are more library oriented. All tree can be used separately and are in their own namespace : * Reactor # event handling system, ... * Rstreamer # video recorder and provider, ... * Runix # unix components : auth, crontab manager, ... ProVision loads all the parts and provide a template for the element but each part is runnable by itself. I'm pretty happy with this architecture but I would like a better way to manage the configuration. Maybe we could tell : Runix is an application or Rstreamer is an application. That is would load for each application the configuration in various places : PROJECT_ROOT/conf, /etc/project_name.yaml, ~/.project_name.yaml I don't know really. Also, I would prefer that nitro detects where the PROJECT_ROOT is, so that I could run "nitro MyProject" in any folder. On 24/05/06, George Moschovitis wrote: > Can you describe the problems a bit better? I would like to fix them > or offer solutions. > Btw, check out the newly introduced: > > nitro/lib/nitro/adapter/script.rb > or > nitro/lib/nitro/adapter/console.rb > > and the new > > nitro/bin/nitro > > this may be useful to you... Both are not finalized though, but will > be ready for 0.31.0 > > > regards, > George. > > > > On 5/23/06, Jonas Pfenniger wrote: > > Hi list, > > > > I have built a medium sized application (ProVision) which is also a lot > > console based. Now I'm implementing a lot of unix commands. > > > > How would you do so that my command-line tools share the same > > configuration as og/nitro ? Since they don't know about > > conf/#{state}.yaml, they generally tend to build a new database in their > > directory. > > > > Also, nitro is not very nice when I want to run it trough an executable > > wrapper because the path is different and all the default paths (public, > > conf, ...) are lost. Do I have to chdir to the project's root or is > > there a nice method around there ? > > > > > > Cheers, > > zimbatm > > > > > > _______________________________________________ > > 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 > -- Cheers, zimba http://zimbatm.oree.ch From m.fellinger at gmail.com Wed May 24 10:42:38 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 24 May 2006 23:42:38 +0900 Subject: [Nitro] [IGNORE] gmail issue test Message-ID: <9c00d3e00605240742m359916fex4f77dd3f54110cd8@mail.gmail.com> [konqeror,pretending to be mozilla + gmail] This is a simple mail with some text that has a newline right here.This is a simple mail with some text that has a newline right here.This is a simple mail with some text that has a newline right here.This is a simple mail with some text that has a newline right here.This is a simple mail with some text that has a newline right here. This is after two newlines. This is after two newlines. And here comes some lorem ipsum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras justolibero, volutpat vel, mattis eu, interdum at, ligula. Nullam sit ametquam. Fusce aliquet viverra lectus. Nam vitae libero. Nullam elementumconsectetuer nisl. Pellentesque ipsum erat, elementum vel, laoreetcondimentum, hendrerit vel, arcu. Nulla euismod tortor id arcu.Aliquam luctus, mi varius lacinia laoreet, quam felis rutrum diam, uteleifend turpis ante id ipsum. Nullam nec metus id nulla fringillaporta. Maecenas vitae pede luctus tortor semper iaculis. Duis lobortisest at arcu. In tellus lacus, fermentum nec, volutpat vel, laciniaeget, risus. Maecenas leo. Vestibulum ante ipsum primis in faucibusorci luctus et ultrices posuere cubilia Curae; Class aptent tacitisociosqu ad litora torquent per conubia nostra, per inceptoshymenaeos. Suspendisse lacinia leo sed diam. Donec arcu odio, pretium vel,faucibus et, mattis non, augue. Etiam luctus est at nunc. Proin utfelis a justo dictum placerat. Cras diam. Sed ipsum arcu, tincidunteu, lobortis in, adipiscing ut, metus. Sed gravida auctor orci. Donecjusto orci, egestas a, rutrum non, interdum luctus, nibh. Proin eunulla a arcu volutpat ornare. Duis in turpis. Nunc eu nulla. Fuscehendrerit. Pellentesque sollicitudin sapien eu nibh commodo vulputate.Duis id dolor. Nam non risus sed diam volutpat suscipit. Crassollicitudin ipsum sed augue. Cras ipsum nisi, lobortis nec, tincidunt eget, venenatis varius, urna.Vestibulum quis neque. Donec scelerisque. Ut dolor nibh, pharetra sed,cursus quis, volutpat in, magna. Sed consequat metus eget velit.Quisque a augue. Quisque sodales neque sed diam consequatsollicitudin. Donec non velit. Class aptent taciti sociosqu ad litoratorquent per conubia nostra, per inceptos hymenaeos. Pellentesqueporta. Suspendisse ullamcorper arcu in nulla. Ut velit erat, vulputate eget, laoreet id, pharetra a, mi. Donectempus varius nunc. Duis in tellus. Nulla facilisi. Quisque tinciduntdui non lacus. Fusce nec neque. Donec molestie posuere augue. Duispellentesque rutrum lorem. Aliquam fringilla. Nam iaculis, nibh velinterdum porta, arcu magna tristique risus, sagittis adipiscing turpisligula ut lorem. Ut ultricies nibh in ligula. Aliquam volutpat urnanon purus. Sed quis nisi quis nunc facilisis tempus. Aliquam lectus. Nunc interdum ipsum quis ipsum. Vestibulum mollis facilisis lacus. Utaugue libero, facilisis non, rutrum id, posuere a, enim. Pellentesqueipsum. Mauris malesuada pellentesque turpis. Nam mattis nisi eutellus. Aliquam id turpis sed tortor aliquam pulvinar. Lorem ipsumdolor sit amet, consectetuer adipiscing elit. Pellentesque nisi. Fusceneque dui, porta id, pharetra in, condimentum at, est. Nullamhendrerit rhoncus neque. Sed aliquam fermentum lorem. Nullam metusodio, ultrices id, luctus sed, vehicula vel, ligula. Aliquam aliquetligula nec augue. Fusce velit velit, tempus id, placerat sit amet,suscipit sed, sem. Aliquam in ante. From vagabond at cataclysm-software.net Wed May 24 12:48:14 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Wed, 24 May 2006 12:48:14 -0400 Subject: [Nitro] Running Nitro in subdirectory on Apache2 In-Reply-To: References: <44738187.8000702@lassoweb.nu> Message-ID: <20060524164814.GA12836@hijacked.us> On Tue, May 23, 2006 at 03:48:27PM -0700, Bryan Soto wrote: > There is an outstanding patch of Andrew's that just needs support for > redirects. He said that was the hard part and he's right. :( > > I'll give it a try again and, if I still can't figure anything out, > I'll post something to the list and maybe others can lend a hand with > it. > Yeah, I'm still interested to get this into Nitro, I've been too busy lately to resubmit a patch but I'm willing to be another set of eyes on any patches that may turn up... I believe the patch you and I hashed out worked okay with redirects.. do you still have a copy? Andrew From bryan.a.soto at gmail.com Wed May 24 13:18:20 2006 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 24 May 2006 10:18:20 -0700 Subject: [Nitro] Running Nitro in subdirectory on Apache2 In-Reply-To: <20060524164814.GA12836@hijacked.us> References: <44738187.8000702@lassoweb.nu> <20060524164814.GA12836@hijacked.us> Message-ID: On 5/24/06, Andrew Thompson wrote: > On Tue, May 23, 2006 at 03:48:27PM -0700, Bryan Soto wrote: > > There is an outstanding patch of Andrew's that just needs support for > > redirects. He said that was the hard part and he's right. :( > > > > I'll give it a try again and, if I still can't figure anything out, > > I'll post something to the list and maybe others can lend a hand with > > it. > > > Yeah, I'm still interested to get this into Nitro, I've been too busy lately to > resubmit a patch but I'm willing to be another set of eyes on any patches that > may turn up... > Me too. :) > I believe the patch you and I hashed out worked okay with redirects.. do you > still have a copy? > Of course. ;) I believe you had to modify the base url of the page to make it work. Now that I think about it, that probably would have been acceptable as a temporary solution until the rest got straightened out. :/ From vagabond at cataclysm-software.net Wed May 24 14:34:11 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Wed, 24 May 2006 14:34:11 -0400 Subject: [Nitro] Running Nitro in subdirectory on Apache2 In-Reply-To: References: <44738187.8000702@lassoweb.nu> <20060524164814.GA12836@hijacked.us> Message-ID: <20060524183411.GA26463@hijacked.us> On Wed, May 24, 2006 at 10:18:20AM -0700, Bryan Soto wrote: > > Me too. :) > > Of course. ;) > > I believe you had to modify the base url of the page to make it work. > Now that I think about it, that probably would have been acceptable as > a temporary solution until the rest got straightened out. :/ > Actually, I had an incorrect baseURL which was breaking stuff, when I removed it stuff worked great... Andrew From james_b at neurogami.com Wed May 24 20:00:05 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 24 May 2006 17:00:05 -0700 Subject: [Nitro] [bump] Understanding elements and templates Message-ID: <4474F385.9080205@neurogami.com> (My apologies if this was already addressed, but I don't recall seeing a response to this the first time I posted these questions.) Please tell me if I understand Elements and templates` correctly: Elements are Ruby classes. You can write them as normal Ruby code, or as .xhtml files. If you do the latter, Nitro "compile" them into Ruby class code. Sort of like how JSPs are turned into servlets in Java. This is why variable interpolation in Element XHTML files is not immediately intuitive; there are values that are interpolated at compile time (i.e., when the XHTML is being turned into Ruby code), and values that are interpolated at run time (i.e., when that Ruby code is actually executed). And so you see different ways of indicating interpolation: #{@foo} #[@foo] \#{@foo} The last two are evaluated at runtime; the first is handled at compile time. With controller templates, each action and/or template becomes the code for the corresponding method. If you have just a template, then it is compiled into the action code that is invoked at runtime. A "normal" action method is, of course, called as Ruby code at runtime. And if you have both an action method and an action template, the template is turned into Ruby code and becomes part of that method. So, given a controller Foo, /foo/bar the action 'bar' can be handled as * An XHTML template file, bar.xhtml, in the Foo template path * A method 'bar', in class Foo * A combination of the the two However, action methods then don't have a notion of "load this text file and interpolate variables and return the results." It's more like, "use the corresponding rendering code for this method to generate the results." I've found that one can select a different action, with (as far as I can see) no template residue, if the base method does not have a template of its own: def foo if rand( 10 ) > 4 render blog else render tour end end My code has actions + templates for blog and tour, but no template for foo, and it will randomly render one page or another quite nicely. It's not the same as simply saying, 'Use this text file as the template, instead of the default template', but achieves, I think, the same effect. (It actually makes sense for me, as I am more likely to want 'router' methods that do not directly render on their own, then to have action handlers that may or may not render themselves.) -- James Britt http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From vagabond at cataclysm-software.net Wed May 24 23:36:17 2006 From: vagabond at cataclysm-software.net (Andrew Thompson) Date: Wed, 24 May 2006 23:36:17 -0400 Subject: [Nitro] [bump] Understanding elements and templates In-Reply-To: <4474F385.9080205@neurogami.com> References: <4474F385.9080205@neurogami.com> Message-ID: <20060525033617.GA11741@hijacked.us> I don't see any problems there, I had some trouble following your description but I think its due to overwork on my end (converting 280 coldfusion files to php really zombifies you). I think some reorganization and put that thing up on oxywtf. Even if it duplicates some information its still good stuff.. Andrew From james_b at neurogami.com Thu May 25 00:04:54 2006 From: james_b at neurogami.com (James Britt) Date: Wed, 24 May 2006 21:04:54 -0700 Subject: [Nitro] [bump] Understanding elements and templates In-Reply-To: <20060525033617.GA11741@hijacked.us> References: <4474F385.9080205@neurogami.com> <20060525033617.GA11741@hijacked.us> Message-ID: <44752CE6.20700@neurogami.com> Andrew Thompson wrote: > I don't see any problems there, I had some trouble following your description > but I think its due to overwork on my end (converting 280 coldfusion files to > php really zombifies you). I think some reorganization and put that thing up on > oxywtf. Even if it duplicates some information its still good stuff.. Well, the plan is to get it into a book. So I want to be sure it's accurate. On a related note, I was porting a Nitro app to Rails (for various reasons, largely business related) and had no need for a controller per se, or action methods; I just wanted to render a templated page that slurped in a few partials (in Nitro they were a combo of elements and straight xhtml stuff). And it seems that in order to process, say, index.rhtml, I need a controller class that has an index method (even if that method is empty). (And if I'm wrong, please correct me, though this of course isn't the right list for such questions.) But in Nitro I can just knock out my static HTML, turn them into xhtml and add in inline Ruby. And then later make use of controllers if I need them. Or at least that's my current understanding. (I do not plan on describing Nitro in comparison to other tools or frameworks, but will try to emphasize this style of Web page development, and the idea of not having to deal with placeholder or stub code.) -- James Britt "Simplicity of the language is not what matters, but simplicity of use." - Richard A. O'Keefe in squeak-dev mailing list From m.fellinger at gmail.com Thu May 25 02:07:04 2006 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 25 May 2006 15:07:04 +0900 Subject: [Nitro] [bump] Understanding elements and templates In-Reply-To: <44752CE6.20700@neurogami.com> References: <4474F385.9080205@neurogami.com> <20060525033617.GA11741@hijacked.us> <44752CE6.20700@neurogami.com> Message-ID: <200605251507.04231.m.fellinger@gmail.com> Well, to correct the terminology - an action consists of two things: a template and a method, either one may be absent, then the action is only composed of one. the point with nitro is a fast prototyping cycle - so you can just as you said first create some static html - add some dynamic stuff and when it gets more serious, outsource most ruby to one/more method/s in the controller. On Thursday 25 May 2006 13:04, James Britt wrote: > Andrew Thompson wrote: > > I don't see any problems there, I had some trouble following your > > description but I think its due to overwork on my end (converting 280 > > coldfusion files to php really zombifies you). I think some > > reorganization and put that thing up on oxywtf. Even if it duplicates > > some information its still good stuff.. > > Well, the plan is to get it into a book. So I want to be sure it's > accurate. > > On a related note, I was porting a Nitro app to Rails (for various > reasons, largely business related) and had no need for a controller per > se, or action methods; I just wanted to render a templated page that > slurped in a few partials (in Nitro they were a combo of elements and > straight xhtml stuff). > > And it seems that in order to process, say, index.rhtml, I need a > controller class that has an index method (even if that method is > empty). (And if I'm wrong, please correct me, though this of course > isn't the right list for such questions.) > > But in Nitro I can just knock out my static HTML, turn them into xhtml > and add in inline Ruby. And then later make use of controllers if I > need them. Or at least that's my current understanding. > > (I do not plan on describing Nitro in comparison to other tools or > frameworks, but will try to emphasize this style of Web page > development, and the idea of not having to deal with placeholder or stub > code.) -- BOFH excuse #177: sticktion From george.moschovitis at gmail.com Thu May 25 03:50:38 2006 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 25 May 2006 10:50:38 +0300 Subject: [Nitro] Facets annotation suggestions Message-ID: Tom, I would like to suggest the following changes to annotations: - move the annotated attribute code to a separate file (ie remove from annotations.rb). So someone can more easily just override that part. Or even use annotations w/o annotated attributes. - Keep the symbol of the attribute in the annotation. In the current version I have to pass both the symbol and the annotation to many methods. - Provide an annotation.fetch method that works like the equivalent hash method. All the above changes would be extremely useful for the next version of Nitro. Moreover, I think they are generally useful. thanks for your work, George. -- http://www.gmosx.com http://www.nitroproject.org From zimba.tm at gmail.com Thu May 25 09:00:25 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Thu, 25 May 2006 15:00:25 +0200 Subject: [Nitro] [bump] Understanding elements and templates In-Reply-To: <4474F385.9080205@neurogami.com> References: <4474F385.9080205@neurogami.com> Message-ID: <3ff63f9b0605250600g1374ea5do71c5cd0dd78f1f73@mail.gmail.com> On 25/05/06, James Britt wrote: > Please tell me if I understand Elements and templates` correctly: > > Elements are Ruby classes. You can write them as normal Ruby code, or > as .xhtml files. If you do the latter, Nitro "compile" them into Ruby > class code. Sort of like how JSPs are turned into servlets in Java. right, altrough I never tested the latter > This is why variable interpolation in Element XHTML files is not > immediately intuitive; there are values that are interpolated at compile > time (i.e., when the XHTML is being turned into Ruby code), and values > that are interpolated at run time (i.e., when that Ruby code is actually > executed). And so you see different ways of indicating interpolation: > > #{@foo} > #[@foo] > \#{@foo} Here, you should maybe make a note that #[@foo] is interpreted by Glue::Template (i think). #\@foo\ is also usable i think. I also often change the compiler pipeline so that Morpher gets executes after the Element compiler, so that I can use
...
or
#\@user\
... > The last two are evaluated at runtime; the first is handled at compile time. True > With controller templates, each action and/or template becomes the code > for the corresponding method. If you have just a template, then it is > compiled into the action code that is invoked at runtime. A "normal" > action method is, of course, called as Ruby code at runtime. And if you > have both an action method and an action template, the template is > turned into Ruby code and becomes part of that method. > > So, given a controller Foo, > > /foo/bar > > the action 'bar' can be handled as > > * An XHTML template file, bar.xhtml, in the Foo template path > * A method 'bar', in class Foo > * A combination of the the two If you want a more detailed way : * User calls /foo/bar with it's browser * Server catches the request * Adapter transforms this in nitro variables (request header parsed, ...) * The dispatcher will determine what action should be called * It will then look if a corresponding method "#{action}_template" exists * If not, it will call the Compiler (cf. compiler pipeline) * Calls action * Calls action_template * Gets the result from TheController's instance.out * Returns all the stuff to the server, which returns to the browser It means that you can write the template yourself by defining the action_template method. The compiler takes care of looking-up the template file. It will then transform it (if found), calling each element of the pipeline one by one. The result will give something like that : out << "#{@title}; if x == y; out << "Hello"; end; ... The out method (inherited by Nitro::Controller) can also be used in the action. Note that since the template is executed in the controller, defining a helper means just adding a method (prefferably private or protected) to the controller. > However, action methods then don't have a notion of "load this text file > and interpolate variables and return the results." It's more like, "use > the corresponding rendering code for this method to generate the results." > > I've found that one can select a different action, with (as far as I can > see) no template residue, if the base method does not have a template of > its own: > > > def foo > if rand( 10 ) > 4 > render blog > else > render tour > end > end > > > My code has actions + templates for blog and tour, but no template for > foo, and it will randomly render one page or another quite nicely. right, this has admittely been admitted by George as a "limitation" of Nitro. > It's not the same as simply saying, 'Use this text file as the > template, instead of the default template', but achieves, I think, the > same effect. > > (It actually makes sense for me, as I am more likely to want 'router' > methods that do not directly render on their own, then to have action > handlers that may or may not render themselves.) You missed some points about the elements but it's not your fault. Actually, there are two ways of using the elements (both are statically built). At the time I checked them, the second way was broken. Take the following xhtml code :