From ramaze at tmm1.net Tue Oct 2 21:24:16 2007 From: ramaze at tmm1.net (Aman Gupta) Date: Tue, 2 Oct 2007 21:24:16 -0400 Subject: [Rg 106] darcs patch: Ignore /favicon.ico by default (and 2 more) In-Reply-To: <20071003011158.249EAD279A7@julie.tmm1.net> References: <20071003011158.249EAD279A7@julie.tmm1.net> Message-ID: Tue Oct 2 19:43:55 EDT 2007 Aman Gupta * Ignore /favicon.ico by default Tue Oct 2 19:47:47 EDT 2007 Aman Gupta * AuthHelper cleanups and an example using Sequel Tue Oct 2 21:05:30 EDT 2007 Aman Gupta * Add benchmark suite -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 15170 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20071002/0f023dc6/attachment-0001.bin From ramaze at tmm1.net Wed Oct 3 00:42:14 2007 From: ramaze at tmm1.net (Aman Gupta) Date: Wed, 3 Oct 2007 00:42:14 -0400 (EDT) Subject: [Rg 107] darcs patch: Move auth example into its own dir and separate out te... Message-ID: <20071003044214.81980D29229@julie.tmm1.net> Wed Oct 3 00:38:40 EDT 2007 Aman Gupta * Move auth example into its own dir and separate out templates so action stubs aren't required. Make AuthHelper#login_required private -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 9836 bytes Desc: A darcs patch for your repository! Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20071003/f3e51ebd/attachment.bin From jesuswasramazing.10.pistos at geoshell.com Fri Oct 5 01:59:01 2007 From: jesuswasramazing.10.pistos at geoshell.com (jesuswasramazing.10.pistos at geoshell.com) Date: Fri, 5 Oct 2007 01:59:01 -0400 Subject: [Rg 108] Re: darcs patch: Move auth example into its own dir and In-Reply-To: <20071003044214.81980D29229@julie.tmm1.net> References: <20071003044214.81980D29229@julie.tmm1.net> Message-ID: <6c9d9ef0710042259u63362339y89790c962e02e51a@mail.gmail.com> Here's the gzip filter, added to the contrib dir. Usage instructions are in the header comments. Pistos -------------- next part -------------- A non-text attachment was scrubbed... Name: ramaze_bundle-2007-10-05.gz Type: application/x-gzip Size: 3323 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20071005/b132d333/attachment.gz From vk at dsl.pipex.com Fri Oct 19 08:05:05 2007 From: vk at dsl.pipex.com (vladimir konrad) Date: Fri, 19 Oct 2007 13:05:05 +0100 Subject: [Rg 109] how to render text before long running process? Message-ID: <20071019130505.6dfa427c@svr0.h.dearm.co.uk> Hello! I am trying to do a simple backup procedure (user clicks a backup link) and need to display "backup in progress..." text while the backup happens. The problem is that the text does not get rendered only after the system() command finishes... I tried redirects and helper :aspect to no avail. the controller currently looks like this: helper :aspect def backup system("sudo /root/bin/backup") " finished" end before(:backup) {"backup in progress..."} is this doable (without running the backup in the background)? Vlad From m.fellinger at gmail.com Fri Oct 19 09:48:15 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 19 Oct 2007 22:48:15 +0900 Subject: [Rg 110] Re: how to render text before long running process? In-Reply-To: <20071019130505.6dfa427c@svr0.h.dearm.co.uk> References: <20071019130505.6dfa427c@svr0.h.dearm.co.uk> Message-ID: <9c00d3e00710190648m1eb9439m894463a1f14b8766@mail.gmail.com> On 10/19/07, vladimir konrad wrote: > > Hello! > > I am trying to do a simple backup procedure (user clicks a backup link) > and need to display "backup in progress..." text while the backup > happens. > > The problem is that the text does not get rendered only after the > system() command finishes... > > I tried redirects and helper :aspect to no avail. > > the controller currently looks like this: > > helper :aspect > > def backup > system("sudo /root/bin/backup") > " finished" > end > > before(:backup) {"backup in progress..."} > > is this doable (without running the backup in the background)? Basically, yes, but not in the way you intend to. Kernel#system is a blocking method, so the current thread (and therefor the current request) is stopped until this method returns. What you can do is putting it into a thread, reporting that the backup is in progress and later collect the returned status from the thread again. An example of that: http://pastie.caboo.se/108856 Hope that helps, if you got further questions, feel free to ask. ^ manveru From vk at dsl.pipex.com Fri Oct 19 11:55:07 2007 From: vk at dsl.pipex.com (vladimir konrad) Date: Fri, 19 Oct 2007 16:55:07 +0100 Subject: [Rg 111] Re: how to render text before long running process? In-Reply-To: <9c00d3e00710190648m1eb9439m894463a1f14b8766@mail.gmail.com> References: <20071019130505.6dfa427c@svr0.h.dearm.co.uk> <9c00d3e00710190648m1eb9439m894463a1f14b8766@mail.gmail.com> Message-ID: <20071019165507.5e8ef886@svr0.h.dearm.co.uk> Thanks for the explanation and the code. I have made it work. Could not work out how to use trait so I have put the status in global variable. > An example of that: http://pastie.caboo.se/108856 The trait line gave me an error and the system() should be system(cmd) but once more thanks, it works :-). Vlad