From rff.rff at gmail.com Mon Sep 3 03:52:31 2007 From: rff.rff at gmail.com (rff.rff at gmail.com) Date: Mon, 3 Sep 2007 09:52:31 +0200 Subject: [Rg 73] darcs patch: specs for wiktacular/{revert/unrevert} +... (and 5 more) Message-ID: <1188805951.0@ut> Sun Sep 2 18:56:03 CEST 2007 rff.rff at gmail.com * specs for wiktacular/{revert/unrevert} + refactoring Sun Sep 2 19:35:51 CEST 2007 rff.rff at gmail.com * these are just simple specs for example/blog, again more useful to show users how to write tests than to test the ramaze infrastructure. Strangely, all test pass but it is shown with a red bar from ramaze's rake. Sun Sep 2 19:41:20 CEST 2007 rff.rff at gmail.com * removed require ramaze from wiktacular specs ) Sun Sep 2 22:41:40 CEST 2007 rff.rff at gmail.com * Og's logger will write to STDERR which means that even if all tests pass SpecWrapper will show it in red and show the error report. It seems that using Ramaze::Inform as the default logger for it works, but maybe it should be done in start.rb, or we should use Logger.set(STDOUT) Mon Sep 3 09:19:39 CEST 2007 rff.rff at gmail.com * README for examples/blog Mon Sep 3 09:37:46 CEST 2007 rff.rff at gmail.com * more minimal READMES -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 17147 bytes Desc: A darcs patch for your repository! Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070903/b59f8ca5/attachment.bin From m.fellinger at gmail.com Mon Sep 3 04:06:12 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 3 Sep 2007 17:06:12 +0900 Subject: [Rg 74] Re: darcs patch: specs for wiktacular/{revert/unrevert} +... (and 5 more) In-Reply-To: <1188805951.0@ut> References: <1188805951.0@ut> Message-ID: <9c00d3e00709030106j74aec62cj1af92c74d4ab72ef@mail.gmail.com> On 9/3/07, rff.rff at gmail.com wrote: > Sun Sep 2 18:56:03 CEST 2007 rff.rff at gmail.com > * specs for wiktacular/{revert/unrevert} + refactoring > > Sun Sep 2 19:35:51 CEST 2007 rff.rff at gmail.com > * these are just simple specs for example/blog, again more useful to > show users how to write tests than to test the ramaze infrastructure. > > Strangely, all test pass but it is shown with a red bar from ramaze's rake. > > Sun Sep 2 19:41:20 CEST 2007 rff.rff at gmail.com > * removed require ramaze from wiktacular specs ) > > Sun Sep 2 22:41:40 CEST 2007 rff.rff at gmail.com > * Og's logger will write to STDERR which means that even if all tests pass > SpecWrapper will show it in red and show the error report. > It seems that using Ramaze::Inform as the default logger for it works, > but maybe it should be done in start.rb, or we should use Logger.set(STDOUT) > > Mon Sep 3 09:19:39 CEST 2007 rff.rff at gmail.com > * README for examples/blog > > Mon Sep 3 09:37:46 CEST 2007 rff.rff at gmail.com > * more minimal READMES Thanks, and applied. ^ manveru From rff.rff at gmail.com Mon Sep 3 05:01:53 2007 From: rff.rff at gmail.com (rff.rff at gmail.com) Date: Mon, 3 Sep 2007 11:01:53 +0200 Subject: [Rg 75] darcs patch: snippets specs for aquire, constant (and 1 more) Message-ID: <1188810113.0@ut> Mon Sep 3 10:55:32 CEST 2007 rff.rff at gmail.com * snippets specs for aquire,constant Mon Sep 3 10:59:38 CEST 2007 rff.rff at gmail.com * small spec for __DIR__ snippet -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 14862 bytes Desc: A darcs patch for your repository! Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070903/16f38608/attachment.bin From rff.rff at gmail.com Mon Sep 3 07:08:42 2007 From: rff.rff at gmail.com (rff.rff at gmail.com) Date: Mon, 3 Sep 2007 13:08:42 +0200 Subject: [Rg 76] darcs patch: snippets specs for aquire, constant (and 6 more) Message-ID: <1188817722.0@ut> Mon Sep 3 10:55:32 CEST 2007 rff.rff at gmail.com * snippets specs for aquire,constant Mon Sep 3 10:59:38 CEST 2007 rff.rff at gmail.com * small spec for __DIR__ snippet Mon Sep 3 12:24:05 CEST 2007 rff.rff at gmail.com * tests for snippet/string/camel_case Mon Sep 3 12:31:55 CEST 2007 rff.rff at gmail.com * spec for String#color Mon Sep 3 12:35:56 CEST 2007 rff.rff at gmail.com * spec for String#DIVIDE Mon Sep 3 12:41:57 CEST 2007 rff.rff at gmail.com * spec for String#snake_case Mon Sep 3 12:56:07 CEST 2007 rff.rff at gmail.com * remove useless snippets/openstruct -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 17897 bytes Desc: A darcs patch for your repository! Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070903/c49540c3/attachment-0001.bin From rff.rff at gmail.com Tue Sep 4 08:35:11 2007 From: rff.rff at gmail.com (rff.rff at gmail.com) Date: Tue, 4 Sep 2007 14:35:11 +0200 Subject: [Rg 77] darcs patch: spec for Ramaze#caller_info (and 2 more) Message-ID: <1188909311.0@ut> Tue Sep 4 13:54:14 CEST 2007 rff.rff at gmail.com * spec for Ramaze#caller_info Tue Sep 4 14:07:59 CEST 2007 rff.rff at gmail.com * spec for Ramaze#caller_lines Tue Sep 4 14:10:56 CEST 2007 rff.rff at gmail.com * doc fix for caller_lines -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13965 bytes Desc: A darcs patch for your repository! Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070904/8b928759/attachment.bin From rff.rff at gmail.com Wed Sep 5 05:41:10 2007 From: rff.rff at gmail.com (rff.rff at gmail.com) Date: Wed, 5 Sep 2007 11:41:10 +0200 Subject: [Rg 78] darcs patch: make snippets/struct/values_at behaviour... (and 2 more) Message-ID: <1188985270.0@ut> The two specs shoulkd be merged easily because they don't change behaviour. The first patch, though, changes Struct#values_at slightly so that it should be backwards compatible with the standard Struct#values_at behaviour. I can't see problems with this, and all tests still pass. Ah, it also removes a method call, thus it should be marginally faster (as in: 1 microsecond less per year) Wed Sep 5 11:32:13 CEST 2007 rff.rff at gmail.com * make snippets/struct/values_at behaviour compatible with standard ruby Wed Sep 5 11:34:39 CEST 2007 rff.rff at gmail.com * spec for Struct#fill Wed Sep 5 11:36:22 CEST 2007 rff.rff at gmail.com * spec for Struct#values_at -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 14256 bytes Desc: A darcs patch for your repository! Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070905/8cf51c1f/attachment-0001.bin From m.fellinger at gmail.com Thu Sep 6 09:14:05 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 6 Sep 2007 22:14:05 +0900 Subject: [Rg 79] Ramaze version 0.1.4 Message-ID: <9c00d3e00709060614j3c816118ue4d65f31b342a724@mail.gmail.com> This time we are proud to announce Version 0.1.4 of the Ramaze framework, a light and modular open source web framework. Since the last release hundreds of lines of documentation and specs have been written. Ramaze was ported to JRuby and received lots of special love regarding bugfixes and polishing the overall API. 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. Special (alphabetic) thanks go to: Aman 'tmm1' Gupta - specs, Sass support Fabian Buch - porting to JRuby Gabriele 'riffraff' Renzi - specs, documentation, cleanup Jonathan 'Kashia' Buch - documentation Riku R?is?nen - extensive testing Home page: http://ramaze.rubyforge.org IRC: #ramaze on irc.freenode.net Short summary of changes from 0.1.3 to 0.1.4: - Even better error handling. - Many bugs fixed. - Support for Sass CSS templates. - Layouts for actions. - Close to 100% documented methods/classes/methods. - Primitive filebased action-cache. - Runs on JRuby. - Easier integration of ramazes spec-helpers for your own applications. - Dirlisting functionality. A complete Changelog is available at http://manveru.net/ramaze/doc/CHANGELOG Known issues: - none yet, waiting for your reports :) Features: - Builds on top of the 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 ramaze at tmm1.net Mon Sep 10 16:47:45 2007 From: ramaze at tmm1.net (Aman Gupta) Date: Mon, 10 Sep 2007 16:47:45 -0400 Subject: [Rg 80] darcs patch: Updated spec for route In-Reply-To: References: Message-ID: Mon Sep 10 02:32:42 EDT 2007 Aman Gupta * Updated spec for route -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ramaze-general/attachments/20070910/ce7e421b/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: updated-spec-for-route.dpatch Type: application/octet-stream Size: 1534 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070910/ce7e421b/attachment.obj From v.konrad at lse.ac.uk Thu Sep 13 06:47:46 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Thu, 13 Sep 2007 11:47:46 +0100 Subject: [Rg 81] changing log level Message-ID: <20070913114746.2942d1f7@19.201.dyn.lse.ac.uk> Hello, It there a way to set the log-level (e.g. :error) other than changing the Informer class? Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From m.fellinger at gmail.com Thu Sep 13 22:29:17 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 14 Sep 2007 11:29:17 +0900 Subject: [Rg 82] Re: changing log level In-Reply-To: <20070913114746.2942d1f7@19.201.dyn.lse.ac.uk> References: <20070913114746.2942d1f7@19.201.dyn.lse.ac.uk> Message-ID: <9c00d3e00709131929m23c89eafj3ad3523991fc43ff@mail.gmail.com> On 9/13/07, Vladimir Konrad wrote: > > Hello, > > It there a way to set the log-level (e.g. :error) other than changing > the Informer class? You can define what tags to ignore if you use the LogHub (which is default) Ramaze::Inform.ignored_tags = [:info, :debug, :warn] ^ manveru From v.konrad at lse.ac.uk Fri Sep 14 04:28:17 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Fri, 14 Sep 2007 09:28:17 +0100 Subject: [Rg 83] Re: changing log level In-Reply-To: <9c00d3e00709131929m23c89eafj3ad3523991fc43ff@mail.gmail.com> References: <20070913114746.2942d1f7@19.201.dyn.lse.ac.uk> <9c00d3e00709131929m23c89eafj3ad3523991fc43ff@mail.gmail.com> Message-ID: <20070914092817.1508a5ef@19.201.dyn.lse.ac.uk> > > Hello, > > > > It there a way to set the log-level (e.g. :error) other than > > changing the Informer class? > > You can define what tags to ignore if you use the LogHub (which is > default) Ramaze::Inform.ignored_tags = [:info, :debug, :warn] Thank you, it works :-) . Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From rff.rff at gmail.com Tue Sep 18 14:25:30 2007 From: rff.rff at gmail.com (gabriele renzi) Date: Tue, 18 Sep 2007 20:25:30 +0200 Subject: [Rg 84] ramaze-general gmane nntp mirror Message-ID: <828083e70709181125h1f3b270bp81d43d05349f0e7f@mail.gmail.com> hi everyone, this is just a message to tell you (and to test) that we have a working mirror to access ramaze-general through the gmane usenet interface. For those interested the NG is at nntp://gmane.comp.lang.ruby.ramaze.general the mirror should become active once the first message is posted, that is, this one :) -- goto 10: http://www.goto10.it blog it: http://riffraff.blogsome.com blog en: http://www.riffraff.info -- goto 10: http://www.goto10.it blog it: http://riffraff.blogsome.com blog en: http://www.riffraff.info From v.konrad at lse.ac.uk Wed Sep 19 11:03:13 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Wed, 19 Sep 2007 16:03:13 +0100 Subject: [Rg 85] custom authentication helper Message-ID: <20070919160313.0285d8b4@19.201.dyn.lse.ac.uk> Hello, I have written custom authentication helper for active directory (based on AuthHelper in ramaze distribution) but cannot figure out how to use it. The file is called authentication_helper.rb and lives in src/helper directory. The file contains AuthenticationHelper module. In the controller file, i require it and use (in controller class) helper :authentication but this does not work (can't convert nil into string error). I looked through mailing list, examples and the source code (including test case for AuthHelper) but cannot figure this one out. Any ideas? Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From v.konrad at lse.ac.uk Wed Sep 19 11:22:29 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Wed, 19 Sep 2007 16:22:29 +0100 Subject: [Rg 86] Re: custom authentication helper In-Reply-To: <20070919160313.0285d8b4@19.201.dyn.lse.ac.uk> References: <20070919160313.0285d8b4@19.201.dyn.lse.ac.uk> Message-ID: <20070919162229.457001cd@19.201.dyn.lse.ac.uk> Forgot to add that if I include it to controller class and go to login, the test login works... But how do I use it as a helper? Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From ramaze at tmm1.net Wed Sep 19 13:31:02 2007 From: ramaze at tmm1.net (Aman Gupta) Date: Wed, 19 Sep 2007 13:31:02 -0400 Subject: [Rg 87] darcs patch: alias Ramaze.contrib to Ramaze::Contrib.load In-Reply-To: <20070919154515.A61F2CFDDA6@julie.tmm1.net> References: <20070919154515.A61F2CFDDA6@julie.tmm1.net> Message-ID: Wed Sep 19 11:36:55 EDT 2007 Aman Gupta * alias Ramaze.contrib to Ramaze::Contrib.load -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 3675 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070919/47bbfe71/attachment-0001.bin From v.konrad at lse.ac.uk Wed Sep 19 14:33:47 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Wed, 19 Sep 2007 19:33:47 +0100 Subject: [Rg 88] Re: [solved] custom authentication helper In-Reply-To: <20070919162229.457001cd@19.201.dyn.lse.ac.uk> References: <20070919160313.0285d8b4@19.201.dyn.lse.ac.uk> <20070919162229.457001cd@19.201.dyn.lse.ac.uk> Message-ID: <20070919193347.33a3fd92@19.201.dyn.lse.ac.uk> Oops! I figured it out (sorry for the noise) - one should check the change-log more often (custom helpers live in /helper). Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From ramaze at tmm1.net Wed Sep 19 11:48:47 2007 From: ramaze at tmm1.net (Aman Gupta) Date: Wed, 19 Sep 2007 11:48:47 -0400 (EDT) Subject: [Rg 89] darcs patch: alias Ramaze.contrib to Ramaze::Contrib.load Message-ID: <20070919154847.EA120CFDEAA@julie.tmm1.net> Wed Sep 19 11:36:55 EDT 2007 Aman Gupta * alias Ramaze.contrib to Ramaze::Contrib.load -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 3676 bytes Desc: A darcs patch for your repository! Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070919/706943b7/attachment.bin From m.fellinger at gmail.com Wed Sep 19 19:08:13 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 20 Sep 2007 08:08:13 +0900 Subject: [Rg 90] Re: [solved] custom authentication helper In-Reply-To: <20070919193347.33a3fd92@19.201.dyn.lse.ac.uk> References: <20070919160313.0285d8b4@19.201.dyn.lse.ac.uk> <20070919162229.457001cd@19.201.dyn.lse.ac.uk> <20070919193347.33a3fd92@19.201.dyn.lse.ac.uk> Message-ID: <9c00d3e00709191608g57b9eb05g2ea27cdee4d0205e@mail.gmail.com> On 9/20/07, Vladimir Konrad wrote: > > Oops! > > I figured it out (sorry for the noise) - one should check the > change-log more often (custom helpers live in /helper). Glad you figured it out :) Maybe worth noting is that the 'helper' method doesn't do anything special, it's like 5 lines to require a file and include the module in it into the controller. Have fun, ^ manveru From v.konrad at lse.ac.uk Thu Sep 20 04:49:47 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Thu, 20 Sep 2007 09:49:47 +0100 Subject: [Rg 91] Re: [solved] custom authentication helper In-Reply-To: <9c00d3e00709191608g57b9eb05g2ea27cdee4d0205e@mail.gmail.com> References: <20070919160313.0285d8b4@19.201.dyn.lse.ac.uk> <20070919162229.457001cd@19.201.dyn.lse.ac.uk> <20070919193347.33a3fd92@19.201.dyn.lse.ac.uk> <9c00d3e00709191608g57b9eb05g2ea27cdee4d0205e@mail.gmail.com> Message-ID: <20070920094947.20fa4f4b@19.201.dyn.lse.ac.uk> On the different note, I would like to put it in ramaze examples (in the repository), the question is: how do I do that with darcs + how to submit patch. It is really simple but could save work to someone else. Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From jesuswasramazing.10.pistos at geoshell.com Thu Sep 20 09:56:59 2007 From: jesuswasramazing.10.pistos at geoshell.com (jesuswasramazing.10.pistos at geoshell.com) Date: Thu, 20 Sep 2007 09:56:59 -0400 Subject: [Rg 92] Re: [solved] custom authentication helper In-Reply-To: <20070920094947.20fa4f4b@19.201.dyn.lse.ac.uk> References: <20070919160313.0285d8b4@19.201.dyn.lse.ac.uk> <20070919162229.457001cd@19.201.dyn.lse.ac.uk> <20070919193347.33a3fd92@19.201.dyn.lse.ac.uk> <9c00d3e00709191608g57b9eb05g2ea27cdee4d0205e@mail.gmail.com> <20070920094947.20fa4f4b@19.201.dyn.lse.ac.uk> Message-ID: <6c9d9ef0709200656v6cedeb13od06ec0b90cf728eb@mail.gmail.com> > I would like to put it in ramaze examples (in the repository), the > question is: how do I do that with darcs + how to submit patch. > > It is really simple but could save work to someone else. See http://ramaze.purepistos.net/doku.php/contributing . -- http://blog.purepistos.net From stephan at spaceboyz.net Thu Sep 20 14:18:09 2007 From: stephan at spaceboyz.net (Stephan Maka) Date: Thu, 20 Sep 2007 20:18:09 +0200 Subject: [Rg 93] [PATCH] Gestalt improvements Message-ID: <20070920181809.GA28913@chronos.sin> Hi there, I'm working on XSLT templates and Gestalt came handy for bringing controller instance data to XML, which is needed as template input. The attached patch extends the parameters to be not only the attributes but also text children. Both are being properly escaped now. Two specs are added. I hope the patch is in proper form, I've never used Darcs before. Stephan -------------- next part -------------- New patches: [Gestalt: allow text in arguments, properly escape this text and attributes stephan at spaceboyz.net**20070920153337] { hunk ./lib/ramaze/gestalt.rb 75 - _gestalt_build_tag meth, *args, &block + _gestalt_call_tag meth, args, &block hunk ./lib/ramaze/gestalt.rb 81 - _gestalt_build_tag :p, *args, &block + _gestalt_call_tag :p, args, &block + end + + def _gestalt_call_tag name, args, &block + if args.size == 1 and args[0].kind_of? Hash + # args are just attributes, children in block... + _gestalt_build_tag name, args[0], &block + else + # no attributes, but text + _gestalt_build_tag name, {}, args, &block + end hunk ./lib/ramaze/gestalt.rb 97 - def _gestalt_build_tag name, args = [] + def _gestalt_build_tag name, attr={}, text=[] hunk ./lib/ramaze/gestalt.rb 99 - if block_given? - @out << args.inject(''){ |s,v| s << %{ #{v[0]}="#{v[1]}"} } + @out << attr.inject(''){ |s,v| s << %{ #{v[0]}="#{_gestalt_escape_entities(v[1])}"} } + if text != [] or block_given? hunk ./lib/ramaze/gestalt.rb 102 - text = yield - @out << text if text != @out and text.respond_to?(:to_str) + @out << _gestalt_escape_entities(text.to_s) + if block_given? + text = yield + @out << text.to_str if text != @out and text.respond_to?(:to_str) + end hunk ./lib/ramaze/gestalt.rb 109 - @out << args.inject(''){ |s,v| s << %{ #{v[0]}="#{v[1]}"} } hunk ./lib/ramaze/gestalt.rb 112 + + def _gestalt_escape_entities(s) + s.gsub(/&/, '&'). + gsub(/"/, '"'). + gsub(/'/, '''). + gsub(//, '>') + end hunk ./spec/ramaze/gestalt.rb 91 + end + + it "children as parameters" do + gestalt { + a "Hello" + b(23, 5) { "1" } + c(42) { + d + } + e("f & g") + }.should == 'Hello235142f & g' + end + + it "escapeable attributes" do + gestalt { + a(:href => "http://example.org/?a=one&b=two") { + "Click here" + } + }.should == 'Click here' } Context: [Add $0 to files being sourcereloaded. Michael Fellinger **20070919062417] [Implement Global.ignore and spec it. Michael Fellinger **20070919062143] [Add Global.cache_alternative so you can specify a different cache-class to use for only certain caches. For example: Ramaze::Global.cache_alternative[:sessions] = Ramaze::MemcachedCache Michael Fellinger **20070918104659] [Small improvment to the sequel/fill contrib Michael Fellinger **20070918054112] [Add contrib/sequel/fill Michael Fellinger **20070918053330] [alias redirect_referer to redirect_referrer in RedirectHelper Michael Fellinger **20070918045439] [Allow custom /helper directory in apps, will be searched before ramazes helpers. Michael Fellinger **20070918014843] [Add the wikore example and fix spec for wiktacular a little. Michael Fellinger **20070917114503] [Improve output of spec wrapper a bit. Michael Fellinger **20070917114458] [Adding path for OSX to tool/tidy and improve readability of the spec for it a bit. Michael Fellinger **20070912125255] [Fixing dependence on the debug.rb implementation of ruby, since this may vary between different versions/implementations, use gestalt.rb instead, the oldest and most stable file we have. Michael Fellinger **20070912090809] [Small beautification/speedup for the mocked http Michael Fellinger **20070911084731] [Clean up the controller/resolve part a bit, implement raise_no_filter which throws a NoFilter error now and fix a minor bug that would result in a faulty response if an element of Cache.resolved was no valid action. Added docs for all methods in Controller. Michael Fellinger **20070911162955] [Restructuring of how contribs are handled, introducing the Ramaze::Contrib namespace, adding Global.contribs so we can add a unified shutdown in future, fixing routing so it won't try to match an already resolved route again and thereby avoiding recursion. Michael Fellinger **20070911144843] [Adding snippet for Array#put_within/put_before/put_after plus specs. docs missing. Michael Fellinger **20070911054158] [Updated spec for route Aman Gupta **20070910063242] [This introduces the first contrib for routes, slight restructuring of Controller::resolve to allow filtering based on Controller::FILTER like we know it from Dispatcher. Added dictionary.rb from facets to allow sorted but hash-like routes-adding. Spec for routes added as small showcase. Michael Fellinger **20070910044521] [Add basic Ramaze::contrib as future helping instance for contributed things. Michael Fellinger **20070910044506] [make snippets/struct/values_at behaviour compatible with standard ruby (orig. by riffraff) Michael Fellinger **20070907083216] [Fix for directory-listing, always sort files/dirs shown Michael Fellinger **20070907083158] [TAG 0.1.4 Michael Fellinger **20070906135219] Patch bundle hash: 0e37f422edda9ea3cd13c87954f6b61150a46fd5 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070920/56fea048/attachment.bin From m.fellinger at gmail.com Thu Sep 20 22:13:44 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 21 Sep 2007 11:13:44 +0900 Subject: [Rg 94] Re: [PATCH] Gestalt improvements In-Reply-To: <20070920181809.GA28913@chronos.sin> References: <20070920181809.GA28913@chronos.sin> Message-ID: <9c00d3e00709201913k6bcac56fx4c0e7076e9af1561@mail.gmail.com> On 9/21/07, Stephan Maka wrote: > Hi there, > > I'm working on XSLT templates and Gestalt came handy for bringing > controller instance data to XML, which is needed as template input. > > The attached patch extends the parameters to be not only the attributes > but also text children. Both are being properly escaped now. Two specs > are added. > > I hope the patch is in proper form, I've never used Darcs before. Thank you very much, i reviewed and applied the patch. Maybe you should think about using CGI::HTMLescape at some point. ^ manveru From v.konrad at lse.ac.uk Fri Sep 21 04:37:05 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Fri, 21 Sep 2007 09:37:05 +0100 Subject: [Rg 95] [patch] - added example for ldap or ad authentication Message-ID: <20070921093705.235ba45e@19.201.dyn.lse.ac.uk> Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: ramaze_bundle.gz Type: application/x-gzip Size: 1650 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070921/e1febfef/attachment-0001.gz From rff_rff at yahoo.it Thu Sep 20 16:27:16 2007 From: rff_rff at yahoo.it (gabriele renzi) Date: Thu, 20 Sep 2007 20:27:16 +0000 (UTC) Subject: [Rg 96] Re: [PATCH] Gestalt improvements References: <20070920181809.GA28913@chronos.sin> Message-ID: On Thu, 20 Sep 2007 20:18:09 +0200, Stephan Maka wrote: > Hi there, > > I'm working on XSLT templates and Gestalt came handy for bringing > controller instance data to XML, which is needed as template input. > > The attached patch extends the parameters to be not only the attributes > but also text children. Both are being properly escaped now. Two specs > are added. > > I hope the patch is in proper form, I've never used Darcs before. FWIW, the patch is well formed, and once applied it also seems to work correctly. But this message is just to point out how happy I am that the nitro community is keen on writing specs when implementing features :) I just have a small doubt: if block_given? text = yield @out << text.to_str if text != @out and text.respond_to?(:to_str) end if the result of the block does not respond to to_str and/or is not @out, nothing happens, which could hide errors, I think. Wouldn't it be better to just have: if block_given? text = yield @out << text.to_str if text != @out end so that the behaviour is more fail-early? -- goto 10: http://www.goto10.it blog it: http://riffraff.blogsome.com blog en: http://www.riffraff.info From stephan at spaceboyz.net Fri Sep 21 06:29:31 2007 From: stephan at spaceboyz.net (Stephan Maka) Date: Fri, 21 Sep 2007 12:29:31 +0200 Subject: [Rg 97] Re: [PATCH] Gestalt improvements In-Reply-To: References: <20070920181809.GA28913@chronos.sin> Message-ID: <20070921102931.GB28913@chronos.sin> gabriele renzi wrote: > correctly. But this message is just to point out how happy I am that the > nitro community is keen on writing specs when implementing features :) I wrote two specs. What do you suggest? > I just have a small doubt: > if block_given? > text = yield > @out << text.to_str if text != @out and text.respond_to?(:to_str) > end > > if the result of the block does not respond to to_str and/or is not @out, > nothing happens, which could hide errors, I think. > > Wouldn't it be better to just have: > > if block_given? > text = yield > @out << text.to_str if text != @out > end > so that the behaviour is more fail-early? Your suggested solution tries to invoke :to_str on the object returned by the block. That could be an Array returned by Array#each which hasn't a :to_str method. When we change :to_str to :to_s we're challenged by this failure: gestalt { tr do %w[one two three].each do |s| td { s } end end } => "onetwothreeonetwothree" I find the restricted environment in Gestalt due to instance_eval very difficult to handle. Isn't there another way of pulling Gestalt's method_missing into the invoking code without losing @out? Stephan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070921/a25d131e/attachment.bin From rff_rff at yahoo.it Fri Sep 21 08:03:51 2007 From: rff_rff at yahoo.it (gabriele renzi) Date: Fri, 21 Sep 2007 12:03:51 +0000 (UTC) Subject: [Rg 98] Re: [PATCH] Gestalt improvements References: <20070920181809.GA28913@chronos.sin> <20070921102931.GB28913@chronos.sin> Message-ID: On Fri, 21 Sep 2007 12:29:31 +0200, Stephan Maka wrote: > gabriele renzi wrote: >> correctly. But this message is just to point out how happy I am that the >> nitro community is keen on writing specs when implementing features :) > > I wrote two specs. What do you suggest? nothing, I was happy exactly because you wrote those :) > Your suggested solution tries to invoke :to_str on the object returned > by the block. That could be an Array returned by Array#each which hasn't > a :to_str method. ah, I overlooked that, sorry. -- goto 10: http://www.goto10.it blog it: http://riffraff.blogsome.com blog en: http://www.riffraff.info From stephan at spaceboyz.net Fri Sep 21 19:10:48 2007 From: stephan at spaceboyz.net (Stephan Maka) Date: Sat, 22 Sep 2007 01:10:48 +0200 Subject: [Rg 99] [PATCH] XSLT template support Message-ID: <20070921231048.GC28913@chronos.sin> Hi, this is preliminary support for XSLT templates, along with specs and an example. The extFunctions code is rather complicated and I could switch to Facets' Functor pattern, if that dependency is allowed. Please comment, Stephan -------------- next part -------------- New patches: [Ramaze support for XSLT templates, example stephan at spaceboyz.net**20070920011044] { addfile ./examples/templates/template/external.xsl hunk ./examples/templates/template/external.xsl 1 + + + + + + + + + + <xsl:value-of select="@title"/> + + + + + + + + + +

+ +

+
+ + +
    + +
+
+ + +
  • + +
  • +
    + + + + + + + + +

    + +

    +
    + +
    addfile ./examples/templates/template_xslt.rb hunk ./examples/templates/template_xslt.rb 1 +# Copyright (c) 2006 Michael Fellinger m.fellinger at gmail.com +# All files in this distribution are subject to the terms of the Ruby license. + +require 'ramaze' +require 'ramaze/gestalt' + +include Ramaze + +class MainController < Controller + template_root __DIR__/:template + trait :engine => Template::XSLT + + def index + redirect R(:external) + end + + def external *args + r = lambda { |*a| R(*a) } + + #options = {:place => :internal, :action => 'internal', + # :args => args, :request => request, :this => self} + Ramaze::Gestalt.build do + page(:title=>"Template::XSLT") do + heading "The external Template for XSLT" + text "Here you can pass some stuff if you like, parameters are just passed like this:" + list do + item { + link(:href => r.call(@this, :external, :one)) { "external/one" } + } + item { + link(:href => r.call(@this, :external, :one, :two, :three)) { "external/one/two/three" } + } + item { + link(:href => r.call(@this, :external, :one, :foo => :bar)) { "external/one?foo=bar" } + } + end + text "The arguments you have passed to this action are:" + if args.empty? + text "none" + else + list { + args.each do |arg| + item arg + end + } + end + end + end + end +end + +Ramaze.start hunk ./lib/ramaze/template.rb 19 - %w[ Amrita2 Erubis Haml Liquid Markaby Remarkably Sass ].each do |const| + %w[ Amrita2 Erubis Haml Liquid Markaby Remarkably Sass XSLT ].each do |const| addfile ./lib/ramaze/template/xslt.rb hunk ./lib/ramaze/template/xslt.rb 1 +require 'xml/libxml' +require 'xml/xslt' + +module Ramaze + + # Use the Gestalt helper to put your controller result + # into proper XML form + # + # TODO: + # * Error handling + # * Support for XML::XSLT::extFunction + # * Non-fatal failure when missing Ruby-XSLT + module Template + class XSLT < Template + ENGINES[self] = %w[ xsl ] + + class << self + + # Entry point for Action#render + + def transform action + result, file = result_and_file(action) + + xslt = XML::XSLT.new + xslt.xsl = action.template + xslt.xml = result + xslt.serve + end + + end + end + end +end } [XSLT templates: add extFunctions capability stephan at spaceboyz.net**20070921115648] { adddir ./spec/ramaze/template/xslt hunk ./lib/ramaze/template/xslt.rb 3 +require 'thread' hunk ./lib/ramaze/template/xslt.rb 11 + # * Complex extFunction return values hunk ./lib/ramaze/template/xslt.rb 13 - # * Support for XML::XSLT::extFunction - # * Non-fatal failure when missing Ruby-XSLT + # * Maybe prevent extFunction to be called by HTTP hunk ./lib/ramaze/template/xslt.rb 18 + XSLT_EXT_FUNCTIONS_LOCK = Mutex.new + hunk ./lib/ramaze/template/xslt.rb 25 + + if options = action.instance.ancestral_trait[:xslt_options] and + fun_xmlns = options[:fun_xmlns] + # If a controller uses extFunctions, lock the whole + # transform action with a Mutex to prevent mixing + # extFunction binding and callback of two controller + # instances with one fun_xmlns. + ext_functions_synchronize do + register_ext_functions action.instance, fun_xmlns + do_transform action + end + + else + do_transform action + end + + end + + private + + def do_transform(action) hunk ./lib/ramaze/template/xslt.rb 53 + + def ext_functions_synchronize &block + Inform.debug "Locking extFunctions Mutex #{XSLT_EXT_FUNCTIONS_LOCK.inspect}" + XSLT_EXT_FUNCTIONS_LOCK.synchronize &block + end + + def register_ext_functions instance, fun_xmlns + + instance.methods.each do |method| + if method =~ /^xslt_.+/ + method_name = method[5..-1] + + proxy_instance = make_functor(method_name.intern) { |*a| + instance.send method.intern, *a + } + + XML::XSLT.extFunction method_name.gsub('_', '-'), fun_xmlns, proxy_instance + end + end + + end + + def make_functor(m, &block) + # Create anonymous class and instantiate; + # anonymous because only this one object with this + # particular custom method should call &block + o = Class.new.new + + class << o + def create_method(name, &block) + self.class.send(:define_method, name, &block) + end + end + + o.create_method(m, &block) + o + end hunk ./spec/ramaze/gestalt.rb 9 + # This is useful for any controller using Gestalt, + # should be made a MixIn somewhen. addfile ./spec/ramaze/template/xslt.rb hunk ./spec/ramaze/template/xslt.rb 1 +# Copyright (c) 2006 Michael Fellinger m.fellinger at gmail.com +# All files in this distribution are subject to the terms of the Ruby license. + +require 'spec/helper' + +testcase_requires 'xml/xslt' +testcase_requires 'ramaze/gestalt' + +class TCTemplateXSLTController < Ramaze::Controller + template_root 'spec/ramaze/template/xslt/' + trait :engine => Ramaze::Template::XSLT + trait :xslt_options => { :fun_xmlns => 'urn:test' } + + def index + gestalt { + hi 'tobi' + } + end + + def ruby_version + @version = RUBY_VERSION + + gestalt { + document + } + end + + def xslt_get_ruby_version + @version + end + + private + + def gestalt &block + Ramaze::Gestalt.new(&block).to_s + end + +end + +describe "XSLT" do + ramaze(:mapping => {'/' => TCTemplateXSLTController}) + + it "index" do + get('/').body.should == "hi tobi" + end + + it "ruby_version through external functions" do + get('/ruby_version').body.should == RUBY_VERSION + end +end + addfile ./spec/ramaze/template/xslt/index.xsl hunk ./spec/ramaze/template/xslt/index.xsl 1 + + + + + + + + + + + + addfile ./spec/ramaze/template/xslt/ruby_version.xsl hunk ./spec/ramaze/template/xslt/ruby_version.xsl 1 + + + + + + + + + + } [XSLT template spec: two more examples stephan at spaceboyz.net**20070921130029] { hunk ./spec/ramaze/template/xslt.rb 8 +testcase_requires 'rexml/document' hunk ./spec/ramaze/template/xslt.rb 33 + def products + gestalt { + order { + first + items + } + } + end + + def xslt_get_products + REXML::Document.new \ + gestalt { + list { + %w[Onion Bacon].each { |product| + item product + } + } + } + end + + def concat_words + gestalt { + document + } + end + + def xslt_concat(*args) + args.to_s + end + hunk ./spec/ramaze/template/xslt.rb 81 + + it "external functions returning XML data" do + get('/products').body. + gsub(/<\?.+\?>/, '').strip. + should == 'OnionOnionBacon' + end + + it "parameters" do + get('/concat_words').body.should == 'oneonetwoonetwothree' + end addfile ./spec/ramaze/template/xslt/concat_words.xsl hunk ./spec/ramaze/template/xslt/concat_words.xsl 1 + + + + + + + + + + + + addfile ./spec/ramaze/template/xslt/products.xsl hunk ./spec/ramaze/template/xslt/products.xsl 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + hunk ./spec/ramaze/template/xslt/ruby_version.xsl 5 - exclude-result-prefixes="xsl"> + exclude-result-prefixes="test xsl"> } [XSLT template example: add Content-Type stephan at spaceboyz.net**20070921225525] { hunk ./examples/templates/template_xslt.rb 2 +# Copyright (c) 2007 Stephan Maka stephan at spaceboyz.net hunk ./examples/templates/template_xslt.rb 20 + response['Content-Type'] = 'application/xhtml+xml' hunk ./lib/ramaze/template/xslt.rb 1 +# Copyright (c) 2007 Stephan Maka stephan at spaceboyz.net +# All files in this distribution are subject to the terms of the Ruby license. + hunk ./lib/ramaze/template/xslt.rb 14 - # * Complex extFunction return values hunk ./lib/ramaze/template/xslt.rb 57 - Inform.debug "Locking extFunctions Mutex #{XSLT_EXT_FUNCTIONS_LOCK.inspect}" hunk ./lib/ramaze/template/xslt.rb 76 + # Can be replaced by Ruby Facets' Functor pattern } Context: [Slight 'beautifcation' for specwrapper Michael Fellinger **20070921081739] [SourceReload#reload_glob is now SourceReload.trait[:reload_glob] for ultimate control. Michael Fellinger **20070921080937] [This improves logging a bit by introducing the :dev tag and so lowering the overall output in default mode. Michael Fellinger **20070921064236] [alias Ramaze.contrib to Ramaze::Contrib.load Aman Gupta **20070919153655] [Gestalt: allow text in arguments, properly escape this text and attributes stephan at spaceboyz.net**20070920153337] [Add $0 to files being sourcereloaded. Michael Fellinger **20070919062417] [Implement Global.ignore and spec it. Michael Fellinger **20070919062143] [Add Global.cache_alternative so you can specify a different cache-class to use for only certain caches. For example: Ramaze::Global.cache_alternative[:sessions] = Ramaze::MemcachedCache Michael Fellinger **20070918104659] [Small improvment to the sequel/fill contrib Michael Fellinger **20070918054112] [Add contrib/sequel/fill Michael Fellinger **20070918053330] [alias redirect_referer to redirect_referrer in RedirectHelper Michael Fellinger **20070918045439] [Allow custom /helper directory in apps, will be searched before ramazes helpers. Michael Fellinger **20070918014843] [Add the wikore example and fix spec for wiktacular a little. Michael Fellinger **20070917114503] [Improve output of spec wrapper a bit. Michael Fellinger **20070917114458] [Adding path for OSX to tool/tidy and improve readability of the spec for it a bit. Michael Fellinger **20070912125255] [Fixing dependence on the debug.rb implementation of ruby, since this may vary between different versions/implementations, use gestalt.rb instead, the oldest and most stable file we have. Michael Fellinger **20070912090809] [Small beautification/speedup for the mocked http Michael Fellinger **20070911084731] [Clean up the controller/resolve part a bit, implement raise_no_filter which throws a NoFilter error now and fix a minor bug that would result in a faulty response if an element of Cache.resolved was no valid action. Added docs for all methods in Controller. Michael Fellinger **20070911162955] [Restructuring of how contribs are handled, introducing the Ramaze::Contrib namespace, adding Global.contribs so we can add a unified shutdown in future, fixing routing so it won't try to match an already resolved route again and thereby avoiding recursion. Michael Fellinger **20070911144843] [Adding snippet for Array#put_within/put_before/put_after plus specs. docs missing. Michael Fellinger **20070911054158] [Updated spec for route Aman Gupta **20070910063242] [This introduces the first contrib for routes, slight restructuring of Controller::resolve to allow filtering based on Controller::FILTER like we know it from Dispatcher. Added dictionary.rb from facets to allow sorted but hash-like routes-adding. Spec for routes added as small showcase. Michael Fellinger **20070910044521] [Add basic Ramaze::contrib as future helping instance for contributed things. Michael Fellinger **20070910044506] [make snippets/struct/values_at behaviour compatible with standard ruby (orig. by riffraff) Michael Fellinger **20070907083216] [Fix for directory-listing, always sort files/dirs shown Michael Fellinger **20070907083158] [TAG 0.1.4 Michael Fellinger **20070906135219] Patch bundle hash: 057156156e12aba1ef2d9329f3cc99a57d736775 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/ramaze-general/attachments/20070922/28660443/attachment.bin From m.fellinger at gmail.com Sat Sep 22 13:38:54 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 23 Sep 2007 02:38:54 +0900 Subject: [Rg 100] Re: [PATCH] XSLT template support In-Reply-To: <20070921231048.GC28913@chronos.sin> References: <20070921231048.GC28913@chronos.sin> Message-ID: <9c00d3e00709221038n5361fcc9nf04221ec39aea2d4@mail.gmail.com> On 9/22/07, Stephan Maka wrote: > Hi, > > this is preliminary support for XSLT templates, along with specs and an > example. The extFunctions code is rather complicated and I could switch > to Facets' Functor pattern, if that dependency is allowed. I'm going to have a closer look at this very soon, in general any dependency is allowed, as long as it doesn't disturb the rest of ramaze, as in, the specs should still run afterwards ;) I don't see a problem if it simplifies the structure of your code significantly. Let me get back to you as soon as i find the time, with a better comment about the code itself. ^ manveru From v.konrad at lse.ac.uk Thu Sep 27 10:38:05 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Thu, 27 Sep 2007 15:38:05 +0100 Subject: [Rg 101] how to set http response header 'cache-control:no-store' Message-ID: <20070927153805.13a2799c@19.201.dyn.lse.ac.uk> Hello again, I am trying to disable browser caching (meta does not work with latest firefox) and for this cache-control:no-store should be set. I tried: Ramaze::Response.current.header['cache-control'] = 'no-store' in controller method and template method but it does not work. Any ideas? Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From m.fellinger at gmail.com Thu Sep 27 21:36:19 2007 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 28 Sep 2007 10:36:19 +0900 Subject: [Rg 102] Re: how to set http response header 'cache-control:no-store' In-Reply-To: <20070927153805.13a2799c@19.201.dyn.lse.ac.uk> References: <20070927153805.13a2799c@19.201.dyn.lse.ac.uk> Message-ID: <9c00d3e00709271836o2c3eac23qe760b8abce11e2a8@mail.gmail.com> On 9/27/07, Vladimir Konrad wrote: > > Hello again, > > I am trying to disable browser caching (meta does not work with latest > firefox) and for this cache-control:no-store should be set. > > I tried: > > Ramaze::Response.current.header['cache-control'] = 'no-store' > > in controller method and template method but it does not work. > > Any ideas? Well, two. In case you didn't find out yet, you have to write 'Cache-Control', not 'cache-control' http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html has more information on that. Second, try following approach: http://pastie.caboo.se/101619 I will try to make it more comfortable to define default headers, they are being set in rack currently, so we would have to introduce a separate handling of it... I'm happy to take any suggestions :) ^ manveru From john at oxyliquit.de Fri Sep 28 03:50:49 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 28 Sep 2007 09:50:49 +0200 Subject: [Rg 103] Re: how to set http response header 'cache-control:no-store' In-Reply-To: <9c00d3e00709271836o2c3eac23qe760b8abce11e2a8@mail.gmail.com> References: <20070927153805.13a2799c@19.201.dyn.lse.ac.uk> <9c00d3e00709271836o2c3eac23qe760b8abce11e2a8@mail.gmail.com> Message-ID: Hi, > Second, try following approach: > http://pastie.caboo.se/101619 Just a thought: Ramaze::Dispatcher::Action::FILTER << proc {|response| response.header['Cache-Control'] = 'no-store' } would suffice I guess, no class needed. :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From v.konrad at lse.ac.uk Fri Sep 28 05:43:45 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Fri, 28 Sep 2007 10:43:45 +0100 Subject: [Rg 104] Re: how to set http response header 'cache-control:no-store' In-Reply-To: <9c00d3e00709271836o2c3eac23qe760b8abce11e2a8@mail.gmail.com> References: <20070927153805.13a2799c@19.201.dyn.lse.ac.uk> <9c00d3e00709271836o2c3eac23qe760b8abce11e2a8@mail.gmail.com> Message-ID: <20070928104345.5d29745c@19.201.dyn.lse.ac.uk> > you have to write 'Cache-Control', > not 'cache-control' > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html > has more information on that. Thank you for the correction and the link. > Second, try following approach: > http://pastie.caboo.se/101619 It works :-) Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm From v.konrad at lse.ac.uk Fri Sep 28 05:46:44 2007 From: v.konrad at lse.ac.uk (Vladimir Konrad) Date: Fri, 28 Sep 2007 10:46:44 +0100 Subject: [Rg 105] Re: how to set http response header 'cache-control:no-store' In-Reply-To: References: <20070927153805.13a2799c@19.201.dyn.lse.ac.uk> <9c00d3e00709271836o2c3eac23qe760b8abce11e2a8@mail.gmail.com> Message-ID: <20070928104644.5cb52613@19.201.dyn.lse.ac.uk> > Just a thought: > > Ramaze::Dispatcher::Action::FILTER << proc {|response| > response.header['Cache-Control'] = 'no-store' > } > > would suffice I guess, no class needed. :P This works too. Thank you. Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm