From lasso at lassoweb.se Sun Jul 8 05:49:59 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Sun, 08 Jul 2007 11:49:59 +0200 Subject: [Rg 47] Slightly irritating template bug Message-ID: <4690B347.1050601@lassoweb.se> Hi! I'm nothing a slightly irritating "bug" when using multiple Controllers and templates in Ramaze. Lets say I have the following Controller map: / => MainController /foo => FooController I also have the following file structure in my "public" dir (mirroring the controller map): public css images foo css images Now, lets say I have he following HTML snippets in my foo/index.xhtml template: Let's fire up the web browser and try the following two urls: http://mysite/foo http://mysite/foo/ (notice trailing slash) In both cases the right Controller (FooController) gets called, but in the first case "relative" links (like in the html snippets above) doesn't work as intended. If I look at the console I can see: [2007-07-08 11:18:49] ERROR # So, even though the FooController renders the template, it looks like the MainController gets called on all the "relative" stuff in the template. Since it's hard to force anyone to use a trailing slash when browsing the web, I think the current behavior is a bug. There are of course ways around the problem....I could stop using relative links. Another way is to redirect the index action to another action, but neither of those solutions seems "the right thing to do". What do you think? Is it a bug or intended behavior? Is it fixable? Kindly /lasso From m.fellinger at gmail.com Sun Jul 8 07:03:21 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 8 Jul 2007 20:03:21 +0900 Subject: [Rg 48] Re: Slightly irritating template bug In-Reply-To: <4690B347.1050601@lassoweb.se> References: <4690B347.1050601@lassoweb.se> Message-ID: <9c00d3e00707080403u7e1d1a3t5b72bb59478cd066@mail.gmail.com> On 7/8/07, Lars Olsson wrote: > Hi! > > I'm nothing a slightly irritating "bug" when using multiple Controllers > and templates in Ramaze. Lets say I have the following Controller map: > > / => MainController > /foo => FooController > > I also have the following file structure in my "public" dir (mirroring > the controller map): > > public > css > images > foo > css > images > > Now, lets say I have he following HTML snippets in my foo/index.xhtml > template: > > > > > Let's fire up the web browser and try the following two urls: > > http://mysite/foo > http://mysite/foo/ (notice trailing slash) > > In both cases the right Controller (FooController) gets called, but in > the first case "relative" links (like in the html snippets above) > doesn't work as intended. If I look at the console I can see: > > [2007-07-08 11:18:49] ERROR # for `/css/foo.css' on MainController> > > So, even though the FooController renders the template, it looks like > the MainController gets called on all the "relative" stuff in the template. > > Since it's hard to force anyone to use a trailing slash when browsing > the web, I think the current behavior is a bug. There are of course ways > around the problem....I could stop using relative links. Another way is > to redirect the index action to another action, but neither of those > solutions seems "the right thing to do". > > What do you think? Is it a bug or intended behavior? Is it fixable? If we speak about the internal handling, "/" is replaced by "/index", that is why you can have a def index in your controller. Talking about browsers, there just is no way they always append the trailing slash, so putting out links to /index might be the easiest solution. The other, much more common is to use absolute hrefs, i know this may somehow clash with your application and i'm really sorry about that, but URIs are tricky and the request that we get is for the absolute path figured out by the browser, we could start wild guessing when searching for a possible match but that would again decrease performance on serving files... It's a tricky problem and no matter how i look at it currently it just doesn't seem to be possible to solve. Either you have to put in absolute URIs to your files (like, as you may see, do just about all pages that use the so-called 'pretty urls') or you explicitly point people to a /index page, just saving them the '.html' - which doesn't look quite as good but is a lot more robust to a lot of copy&pasting out in the web. However, i would be very glad about anybody who finds the silver-bullet to kill that werewolf :) ^ manveru From john at oxyliquit.de Sun Jul 8 07:15:23 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 08 Jul 2007 14:15:23 +0300 Subject: [Rg 49] Re: Slightly irritating template bug In-Reply-To: <9c00d3e00707080403u7e1d1a3t5b72bb59478cd066@mail.gmail.com> References: <4690B347.1050601@lassoweb.se> <9c00d3e00707080403u7e1d1a3t5b72bb59478cd066@mail.gmail.com> Message-ID: Hi, > However, i would be very glad about anybody who finds the > silver-bullet to kill that werewolf :) no silver bullets here, but `Rs()` is very helpful. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From lasso at lassoweb.se Sun Jul 8 07:47:34 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Sun, 08 Jul 2007 13:47:34 +0200 Subject: [Rg 50] Re: Slightly irritating template bug In-Reply-To: References: <4690B347.1050601@lassoweb.se> <9c00d3e00707080403u7e1d1a3t5b72bb59478cd066@mail.gmail.com> Message-ID: <4690CED6.2010402@lassoweb.se> Hi! Thanks for your quick answers! Looking a bit closer I managed to reproduce my troubles in plain static HTML..In other words, it's not really an Ramaze issue but rather an browser issue. I use R() a lot for "normal" links in my code. I'll just adapt the rest of the "linked" content as well. Kindly /lasso Jonathan Buch skrev: > Hi, > >> However, i would be very glad about anybody who finds the >> silver-bullet to kill that werewolf :) > > no silver bullets here, but `Rs()` is very helpful. > > Jo From jesuswasramazing.10.pistos at geoshell.com Mon Jul 9 11:39:44 2007 From: jesuswasramazing.10.pistos at geoshell.com (jesuswasramazing.10.pistos at geoshell.com) Date: Mon, 9 Jul 2007 11:39:44 -0400 Subject: [Rg 51] A tiny patch to the Ramaze website Message-ID: <6c9d9ef0707090839x467812cct2341238da9da8477@mail.gmail.com> manveru: As per our IRC discussion, see attached. Pistos http://blog.purepistos.net -------------- next part -------------- A non-text attachment was scrubbed... Name: ramazing-patch-2007-07-09-1135.tar.bz2 Type: application/x-bzip2 Size: 1031 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070709/e0604a49/attachment.bz2 From m.fellinger at gmail.com Mon Jul 9 22:09:47 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 10 Jul 2007 11:09:47 +0900 Subject: [Rg 52] Re: A tiny patch to the Ramaze website In-Reply-To: <6c9d9ef0707090839x467812cct2341238da9da8477@mail.gmail.com> References: <6c9d9ef0707090839x467812cct2341238da9da8477@mail.gmail.com> Message-ID: <9c00d3e00707091909x7557a131o5ae96e09ed8eda39@mail.gmail.com> On 7/10/07, jesuswasramazing.10.pistos at geoshell.com wrote: > manveru: As per our IRC discussion, see attached. downloaded, applied, uploaded, page is updated now, thanks a lot for fixing my b0rken spelling :) ^ manveru From john at oxyliquit.de Mon Jul 16 05:21:20 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 16 Jul 2007 12:21:20 +0300 Subject: [Rg 53] action - url mapping Message-ID: Hi, I've talked with manveru on irc today about the mappings. ATM there are 2 ways to access the action `def foo__bar`: 1) /foo/bar 2) /foo__bar As far as I know, noone uses the second format, so I thought about changing that to only accept '/foo/bar'; this would simplyfy Ramaze internals even more. So, now the question: did anyone ever use the 2nd form or absolutely wants it to stay for a reason? Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From lasso at lassoweb.se Mon Jul 16 13:04:19 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Mon, 16 Jul 2007 19:04:19 +0200 Subject: [Rg 54] Dispatching errors to current controller Message-ID: <469BA513.40509@lassoweb.se> Hi! The current (0.1.2) behavior for handling errors seems to be to simply call /error, but that makes it hard (impossible?) to define different error handlers for different controllers. This seems to be hardcoded in ramaze/dispatcher/error.rb (lines 7-11): HANDLE_ERROR = { Exception => [ 500, '/error' ], Ramaze::Error::NoAction => [ 404, '/error' ], Ramaze::Error::NoController => [ 404, '/error' ], } I'm not sure how hard it would be to change, but I think it would be better if it worked along the following lines: 1. First, check if the current controller has an error action/template pair. If that is the case, call the current controller's error action. 2. If the current controller does not have an error action/template pair, call the root controller's error action (/error). What do you think? (And about the different url mappings Jo mentioned earlier today...I've never used to second form...I didn't even knew it existed...so I guess I don't mind if the second form was dropped... :) ) Kindly /lasso -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From john at oxyliquit.de Mon Jul 16 13:23:24 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 16 Jul 2007 20:23:24 +0300 Subject: [Rg 55] Re: Dispatching errors to current controller In-Reply-To: <469BA513.40509@lassoweb.se> References: <469BA513.40509@lassoweb.se> Message-ID: Hi, > The current (0.1.2) behavior for handling errors seems to be to simply > call /error, but that makes it hard (impossible?) to define different > error handlers for different controllers. This seems to be hardcoded in > ramaze/dispatcher/error.rb (lines 7-11): Good point, I haven't had the need yet to seperate my error pages for different controllers. I use the current handling to nicely catch Og errors: Dispatcher::Error::HANDLE_ERROR[Og::Exception] = [STATUS_CODE['Conflict'], '/ogerror'] > I'm not sure how hard it would be to change, but I think it would be > better if it worked along the following lines: > > 1. First, check if the current controller has an error action/template > pair. If that is the case, call the current controller's error action. > > 2. If the current controller does not have an error action/template > pair, call the root controller's error action (/error). Yes, maybe we can build a two-level lookup there, first using `Controller.current` and then Controller.get('/') to try and render the error page. This makes errors even slower than they are right now, but ah well. :) HANDLE_ERROR[Og::Exception] = [STATUS_CODE['Conflict'], 'ogerror'] I guess it'd look like that then (without leading slash). Not sure if I'd be using that feature, but it sounds useful enough for me to go in. > (And about the different url mappings Jo mentioned earlier today...I've > never used to second form...I didn't even knew it existed...so I guess I > don't mind if the second form was dropped... :) ) Great. :P Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From lasso at lassoweb.se Wed Jul 18 15:06:01 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Wed, 18 Jul 2007 21:06:01 +0200 Subject: [Rg 56] Re: Dispatching errors to current controller In-Reply-To: References: <469BA513.40509@lassoweb.se> Message-ID: <469E6499.5080807@lassoweb.se> Jonathan Buch skrev: >> I'm not sure how hard it would be to change, but I think it would be >> better if it worked along the following lines: >> >> 1. First, check if the current controller has an error action/template >> pair. If that is the case, call the current controller's error action. >> >> 2. If the current controller does not have an error action/template >> pair, call the root controller's error action (/error). > > Yes, maybe we can build a two-level lookup there, first using > `Controller.current` and then Controller.get('/') to try and render the > error page. This makes errors even slower than they are right now, but > ah well. :) I played around a bit (with depressing results): module Ramaze module Dispatcher class Error ERROR_CODES = {Exception => 500, Ramaze::Error::NoAction => 404, Ramaze::Error::NoController => 404} class << self trait :last_error => nil def process error log_error(error) Thread.current[:exception] = error key = error.class.ancestors.find{ |a| ERROR_CODES[a] } status = ERROR_CODES[key || Exception] # This does not work since Controller.current seems to be nil at the time of the call... path = Controller.current.respond_to?(:error) ? R(Controller.current, :error) : '/error' unless error.message =~ %r(`#{path.split('/').last}') Response.current.status = status return Dispatcher.dispatch_to(path) if path and Global.error_page end Dispatcher.build_response(error.message, status) rescue Object => ex Inform.error(ex) Dispatcher.build_response(ex.message, status || 500) end def log_error error error_message = error.message if trait[:last_error] == error_message Inform.error(error_message) else trait[:last_error] = error_message Inform.error(error) end end def current Thread.current[:exception] end end end end end I don't understande the Dispatcher code too well, but has the controller thread really "died" at the time an exception is raised? Is it not possible to find out which controller instance that raised the exception? /lasso -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From m.fellinger at gmail.com Thu Jul 19 10:37:53 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 19 Jul 2007 23:37:53 +0900 Subject: [Rg 57] Re: Dispatching errors to current controller In-Reply-To: <469E6499.5080807@lassoweb.se> References: <469BA513.40509@lassoweb.se> <469E6499.5080807@lassoweb.se> Message-ID: <9c00d3e00707190737x182f4164u4794b39735f416c@mail.gmail.com> > I don't understande the Dispatcher code too well, but has the controller > thread really "died" at the time an exception is raised? Is it not > possible to find out which controller instance that raised the exception? The controller was never turned into a real action and rendered, where assignment of Action.current.controller happens which Controller.current points to. However, i took your idea and turned it into code, it has some more features but maintains the old functionality as well. Just pull darcs to get it :) Thanks for the idea though, this is a much nicer way to handle errors per controller. ^ manveru From lasso at lassoweb.se Thu Jul 19 16:38:50 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Thu, 19 Jul 2007 22:38:50 +0200 Subject: [Rg 58] Re: Dispatching errors to current controller In-Reply-To: <9c00d3e00707190737x182f4164u4794b39735f416c@mail.gmail.com> References: <469BA513.40509@lassoweb.se> <469E6499.5080807@lassoweb.se> <9c00d3e00707190737x182f4164u4794b39735f416c@mail.gmail.com> Message-ID: <469FCBDA.8060802@lassoweb.se> Michael Fellinger skrev: > The controller was never turned into a real action and rendered, where > assignment of Action.current.controller happens which > Controller.current points to. > However, i took your idea and turned it into code, it has some more > features but maintains the old functionality as well. Just pull darcs > to get it :) > Thanks for the idea though, this is a much nicer way to handle errors > per controller. > > ^ manveru Works great. Thanks for adding this! Another improvement might be to cut down on the number of errors emitted to Informer in the case of a missing action/controller. For a simple Ramaze::Error::NoAction I get quite much info emitted to the console: [2007-07-19 22:23:37] ERROR # [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/controller/resolve.rb:150:in `raise_no_action' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/controller/resolve.rb:46:in `resolve' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/controller.rb:150:in `handle' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher/action.rb:17:in `process' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher.rb:85:in `filter' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher.rb:84:in `each' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher.rb:84:in `filter' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher.rb:44:in `dispatch' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher.rb:43:in `catch' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher.rb:43:in `dispatch' [2007-07-19 22:23:37] ERROR /home/lasso/darcs/ramaze/lib/ramaze/dispatcher.rb:42:in `catch' In the case of a 500 error I think this information is vital, but not for 404:s. The first line really tells all there is to know. This is of course purely cosmetic, but also affects file size when logging to file. Thanks again for the quick patch! /lasso -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From m.fellinger at gmail.com Thu Jul 19 18:55:52 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 20 Jul 2007 07:55:52 +0900 Subject: [Rg 59] Re: Dispatching errors to current controller In-Reply-To: <469FCBDA.8060802@lassoweb.se> References: <469BA513.40509@lassoweb.se> <469E6499.5080807@lassoweb.se> <9c00d3e00707190737x182f4164u4794b39735f416c@mail.gmail.com> <469FCBDA.8060802@lassoweb.se> Message-ID: <9c00d3e00707191555o41b24efh78c872a872e90076@mail.gmail.com> > Another improvement might be to cut down on the number of errors emitted > to Informer in the case of a missing action/controller. For a simple > Ramaze::Error::NoAction I get quite much info emitted to the console: I'll have a look at it as well :) ^ manveru From john at oxyliquit.de Thu Jul 19 13:31:26 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 19 Jul 2007 20:31:26 +0300 Subject: [Rg 60] Ramaze Graphics Message-ID: Hi, as promised, (not yet finished, just half-thought ideas) some graphs for ramaze like I did for Nitro. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -------------- next part -------------- A non-text attachment was scrubbed... Name: ramaze4.png Type: image/png Size: 37561 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070719/cc6fd08e/attachment-0005.png -------------- next part -------------- A non-text attachment was scrubbed... Name: ramaze1.png Type: image/png Size: 20795 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070719/cc6fd08e/attachment-0006.png -------------- next part -------------- A non-text attachment was scrubbed... Name: ramaze5.png Type: image/png Size: 52244 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070719/cc6fd08e/attachment-0007.png -------------- next part -------------- A non-text attachment was scrubbed... Name: ramaze3.png Type: image/png Size: 30193 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070719/cc6fd08e/attachment-0008.png -------------- next part -------------- A non-text attachment was scrubbed... Name: ramaze2.png Type: image/png Size: 40826 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070719/cc6fd08e/attachment-0009.png From m.fellinger at gmail.com Sat Jul 21 14:52:12 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 22 Jul 2007 03:52:12 +0900 Subject: [Rg 61] [ANN] Ramaze version 0.1.3 Message-ID: <9c00d3e00707211152i32f547bave7fdc3541c09e482@mail.gmail.com> This time we are proud to announce Version 0.1.3 of the Ramaze framework, a light and modular open source web framework. Since the last release some polishing and improvements have been made, it seems like Ramaze is now mostly feature-complete. An extensive set of specs is covering almost every detail of the implementation and usage. It is developed by several people and already in production-use at some companies. Home page: http://ramaze.rubyforge.org IRC: #ramaze on irc.freenode.net Short summary of changes from 0.1.2 to 0.1.3: - Better error handling - Many bugs fixed - Some speedup - Lots of docs added - Smoother sourcereload - New Wiki example - jQuery 1.1.3.1 A complete Changelog is available at http://manveru.mine.nu/ramaze/doc/CHANGELOG Known issues: - Haml: either use Haml version 1.5.2 or require ActionPack. Features: - Builds on top of the recently released Rack library, which provides easy use of adapters like Mongrel, WEBrick, CGI or FCGI. - Supports a wide range of templating-engines like: Amrita2, Erubis, Haml, Liquid, Markaby, Remarkably and its own engine called Ezamar. - Highly modular structure, you can just use the parts you like. This also means that it's very simple to add your own customizations. - A variety of helpers is already available, giving you things like advanced caching, OpenID-authentication or aspect-oriented programming for your controllers. - It is possible to use the ORM you like, be it ActiveRecord, Og, Kansas or something more simplistic like a wrapper around YAML::Store. - Good documentation: although we don't have 100% (dcov says around 75%) documentation right now, just about every part of Ramaze is covered with basic and advanced docs. There are a variety of examples and a tutorial available. - Friendly community: lastly, but still quite important, there are people from all over the world using Ramaze, so you can get almost instant help and info. For more information please come to http://ramaze.rubyforge.org or ask directly on IRC (irc://irc.freenode.net/#ramaze) Thank you, Michael 'manveru' Fellinger and the Ramaze community From jesuswasramazing.10.pistos at geoshell.com Mon Jul 23 12:20:06 2007 From: jesuswasramazing.10.pistos at geoshell.com (jesuswasramazing.10.pistos at geoshell.com) Date: Mon, 23 Jul 2007 12:20:06 -0400 Subject: [Rg 62] Google Map update Message-ID: <6c9d9ef0707230920i37e1e13hfc20383d491c0ffe@mail.gmail.com> Just an update of my entry on the Ramaze users Google Map. -- http://blog.purepistos.net -------------- next part -------------- A non-text attachment was scrubbed... Name: map.patch Type: application/octet-stream Size: 837 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070723/6e437d5e/attachment.obj From lasso at lassoweb.se Tue Jul 24 14:45:15 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Tue, 24 Jul 2007 20:45:15 +0200 Subject: [Rg 63] Error handling (again) Message-ID: <46A648BB.6060500@lassoweb.se> Hi! I'm sorry to report that the "one error handler per controller" does not seem to work as intended. It works good when with 404 errors - I get redirected to /somepath/error...but with 500 errors I always get redirected to /error. Someone else seen this and worked around it? Sincerely /lasso -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From lasso at lassoweb.se Tue Jul 24 15:11:57 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Tue, 24 Jul 2007 21:11:57 +0200 Subject: [Rg 64] Global.tidy does not work anymore? Message-ID: <46A64EFD.9010900@lassoweb.se> Hi! According to the docs the following code should activate the tidy functionality: include Ramaze::Tool::Tidy Global.tidy = true When running this code I get: main.rb:44: undefined method `tidy=' for # (NoMethodError) Any ideas about what might be wrong? Kindly /lasso -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From m.fellinger at gmail.com Tue Jul 24 23:27:55 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 25 Jul 2007 12:27:55 +0900 Subject: [Rg 65] Re: Global.tidy does not work anymore? In-Reply-To: <46A64EFD.9010900@lassoweb.se> References: <46A64EFD.9010900@lassoweb.se> Message-ID: <9c00d3e00707242027v3a9010e1w6c7454810379cbac@mail.gmail.com> On 7/25/07, Lars Olsson wrote: > Hi! > > According to the docs the following code should activate the tidy > functionality: > > include Ramaze::Tool::Tidy > Global.tidy = true > > > When running this code I get: > main.rb:44: undefined method `tidy=' for > # (NoMethodError) > > Any ideas about what might be wrong? I'm right now updating the rdoc, must be stale information. We had to remove support for tidy because it has a serious memoryleak. If you want to activate it still, try: Ramaze::Dispatcher::Action::FILTER << Ramaze::Tool::Tidy Ramaze::Tool::Tidy.trait[:enable] = true you might have to adjust some of the paths and options, but it all should be clear when you take a look at the li/ramaze/tool/tidy.rb Sorry, i must have forgot about that in the announcement. Another thing is, Global won't let you assign arbitrary keys anymore since it's no OpenStruct. Hopefully that made reporting this faster :) In future we will add deprecation-statements, so it's clear what changed how and how to fix it. ^ manveru From m.fellinger at gmail.com Wed Jul 25 00:26:47 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 25 Jul 2007 13:26:47 +0900 Subject: [Rg 66] Re: Error handling (again) In-Reply-To: <46A648BB.6060500@lassoweb.se> References: <46A648BB.6060500@lassoweb.se> Message-ID: <9c00d3e00707242126y14dbdcc7l9278a6e2eae462a3@mail.gmail.com> On 7/25/07, Lars Olsson wrote: > Hi! > > I'm sorry to report that the "one error handler per controller" does not > seem to work as intended. It works good when with 404 errors - I get > redirected to /somepath/error...but with 500 errors I always get > redirected to /error. > > Someone else seen this and worked around it? I'll fix that, give me a little bit :) ^ manveru From m.fellinger at gmail.com Wed Jul 25 03:17:24 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 25 Jul 2007 16:17:24 +0900 Subject: [Rg 67] Re: Error handling (again) In-Reply-To: <9c00d3e00707242126y14dbdcc7l9278a6e2eae462a3@mail.gmail.com> References: <46A648BB.6060500@lassoweb.se> <9c00d3e00707242126y14dbdcc7l9278a6e2eae462a3@mail.gmail.com> Message-ID: <9c00d3e00707250017r7c43b02fxe22666cc86d753ba@mail.gmail.com> On 7/25/07, Michael Fellinger wrote: > On 7/25/07, Lars Olsson wrote: > > Hi! > > > > I'm sorry to report that the "one error handler per controller" does not > > seem to work as intended. It works good when with 404 errors - I get > > redirected to /somepath/error...but with 500 errors I always get > > redirected to /error. > > > > Someone else seen this and worked around it? > > I'll fix that, give me a little bit :) OK, i (hopefully) fixed it the way you wanted: http://tinyurl.com/33apb6 Let me know how this works for you. ^ manveru From lasso at lassoweb.se Wed Jul 25 17:57:55 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Wed, 25 Jul 2007 23:57:55 +0200 Subject: [Rg 68] Re: Error handling (again) In-Reply-To: <9c00d3e00707250017r7c43b02fxe22666cc86d753ba@mail.gmail.com> References: <46A648BB.6060500@lassoweb.se> <9c00d3e00707242126y14dbdcc7l9278a6e2eae462a3@mail.gmail.com> <9c00d3e00707250017r7c43b02fxe22666cc86d753ba@mail.gmail.com> Message-ID: <46A7C763.1070707@lassoweb.se> Seems to be working consistently with both 404:s and 500:s now. Thanks for fixing this! /lasso Michael Fellinger skrev: > OK, i (hopefully) fixed it the way you wanted: http://tinyurl.com/33apb6 > Let me know how this works for you. > > ^ manveru From lasso at lassoweb.se Wed Jul 25 18:12:24 2007 From: lasso at lassoweb.se (Lars Olsson) Date: Thu, 26 Jul 2007 00:12:24 +0200 Subject: [Rg 69] Re: Global.tidy does not work anymore? In-Reply-To: <9c00d3e00707242027v3a9010e1w6c7454810379cbac@mail.gmail.com> References: <46A64EFD.9010900@lassoweb.se> <9c00d3e00707242027v3a9010e1w6c7454810379cbac@mail.gmail.com> Message-ID: <46A7CAC8.7040200@lassoweb.se> Hi! I took a look at the current filter code and spent some parts of my afternoon writing my own REXML-based filter to use as a drop-in replacement. I will release it to world+dog as soon as I get those pesky newlines sorted...In the meantime, some questions: 1) Wouldn't it be nice with some API enhancements for filters (similar to Nitro's rendering pipeline)? I'm thinking Action.add_filter, Action.remove_filter, Action.filters and the like. I'll take a stab at it in a couple of days if no one else beats me to it. 2. While looking at the filter code I realized that Ramaze seems to use a lot of singleton classes. This might be useful in some cases, but in the current case I just found it confusing...Is there any particular reason for using a singleton class in this particular case? Kindly /lasso Michael Fellinger skrev: > I'm right now updating the rdoc, must be stale information. > We had to remove support for tidy because it has a serious memoryleak. > If you want to activate it still, try: > > Ramaze::Dispatcher::Action::FILTER << Ramaze::Tool::Tidy > Ramaze::Tool::Tidy.trait[:enable] = true -- ________________________________________ Lars Olsson lasso at lassoweb.se http://www.lassoweb.se/ From m.fellinger at gmail.com Wed Jul 25 21:35:32 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 26 Jul 2007 10:35:32 +0900 Subject: [Rg 70] Re: Global.tidy does not work anymore? In-Reply-To: <46A7CAC8.7040200@lassoweb.se> References: <46A64EFD.9010900@lassoweb.se> <9c00d3e00707242027v3a9010e1w6c7454810379cbac@mail.gmail.com> <46A7CAC8.7040200@lassoweb.se> Message-ID: <9c00d3e00707251835q4eebc1f8ga5458e1fadf11aa8@mail.gmail.com> On 7/26/07, Lars Olsson wrote: > Hi! > > I took a look at the current filter code and spent some parts of my > afternoon writing my own REXML-based filter to use as a drop-in > replacement. I will release it to world+dog as soon as I get those pesky > newlines sorted...In the meantime, some questions: That would be cool, i really would like a replacement for tidy... > 1) Wouldn't it be nice with some API enhancements for filters (similar > to Nitro's rendering pipeline)? I'm thinking Action.add_filter, > Action.remove_filter, Action.filters and the like. I'll take a stab at > it in a couple of days if no one else beats me to it. That would be nice. I don't use anything but localization currently, but the way to work with it is quite awful at the moment. > 2. While looking at the filter code I realized that Ramaze seems to use > a lot of singleton classes. This might be useful in some cases, but in > the current case I just found it confusing...Is there any particular > reason for using a singleton class in this particular case? This just kind of grew out of the program-flow. It is faster in general to use singleton-methods (yeah, benchmarked) and works better in most cases since large parts of Ramaze are without a state and (almost) purely functional, so you can use the methods anytime from anywhere. I'm open for suggestions, but in my opinion there are always many ways to do it and this is just one that happens to work :) ^ manveru