From ruby at monnet-usa.com Sat May 1 13:14:12 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sat, 01 May 2010 11:14:12 -0600 Subject: Changing render semantics? In-Reply-To: References: Message-ID: <4BDC6164.20508@monnet-usa.com> Got a chance today to verify all my apps and I am not using the multiple argument for of render. So go for it Magnus! :-) On 4/24/2010 4:39 PM, Magnus Holm wrote: > I'm trying to integrate Tilt (for providing Haml etc. support), but > are having some problems supporting both the previous `render` and > this new `render`. > > Previous render: > - loads Markaby when needed > - Always wraps the layout > - render :index # => Calls index() within Markaby > - render :index, 1, 2 # => Calls index(1, 2) within Markaby > > What I want from the new render: > - loads Markaby when needed > - loads Tilt when needed > - render :index, :layout => false # => Don't wraps the layout > - render :foo # => Will check #{VIEW_PATH}/foo.* and render that file > (falling back on the Markaby methid) > - render :foo, :locals => { :bar => 123 } # => Same as above, but with > local variables set > - render :index, :locals => { :foo => 123 } # => :locals is ignored if > it's a Markaby method > > I guess the question is: Does anybody actually use `render` with > multiple arguments (render :index, 1, 2)? If not, I guess we can > easily switch to this new `render` without breaking code. > > // Magnus Holm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruby at monnet-usa.com Sat May 8 19:43:29 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sat, 08 May 2010 17:43:29 -0600 Subject: Proposal for optional compilation and caching of Tilt templates Message-ID: <4BE5F721.8050300@monnet-usa.com> I gave Magnus' excellent integration of Tilt a whirl today and really love it. It's also cool because you can match different types of templates at the same time (e.g. Markaby + HAML). I found that while prototyping it would be nice to not have Camping compile and cache Tilt templates. So I used the new option capability and defined a :dynamic_templates option. e.g.: module TiltTest set :views, File.dirname(__FILE__) + '/views' set :dynamic_templates, true #... end I changed the Camping code to check for that option and only compile and cache if false. What do you think? Maybe we need a shorter or different name for the option? I checked in the changes in my fork: http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764 Magnus, you might have some additional ideas for tweaking this feature. So feel free to add/alter and merge to your liking. Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From judofyr at gmail.com Sat May 8 20:03:22 2010 From: judofyr at gmail.com (Magnus Holm) Date: Sun, 9 May 2010 03:03:22 +0300 Subject: Proposal for optional compilation and caching of Tilt templates In-Reply-To: References: <4BE5F721.8050300@monnet-usa.com> Message-ID: Thanks for testing it out ;) I agree: we can't cache templates in development and you shouldn't need to set an option for that, however we also want Camping to be speedy out-of-box. What about applying your patch, but also make bin/camping set :dynamic_templates to true if it's not set already? If you want to force caching (or force not-caching) in your app, you simply set :dynamic_templates, true/false. And if you don't, it compiles if you i.e. run it through a configuration.ru, but is dynamic with bin/camping. Best of both worlds? On May 9, 2010 12:43 AM, "Philippe Monnet" wrote: I gave Magnus' excellent integration of Tilt a whirl today and really love it. It's also cool because you can match different types of templates at the same time (e.g. Markaby + HAML). I found that while prototyping it would be nice to not have Camping compile and cache Tilt templates. So I used the new option capability and defined a :dynamic_templates option. e.g.: module TiltTest set :views, File.dirname(__FILE__) + '/views' set :dynamic_templates, true #... end I changed the Camping code to check for that option and only compile and cache if false. What do you think? Maybe we need a shorter or different name for the option? I checked in the changes in my fork: http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764 Magnus, you might have some additional ideas for tweaking this feature. So feel free to add/alter and merge to your liking. Philippe _______________________________________________ Camping-list mailing list Camping-list at rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruby at monnet-usa.com Sun May 9 16:10:55 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sun, 09 May 2010 14:10:55 -0600 Subject: Proposal for optional compilation and caching of Tilt templates In-Reply-To: References: <4BE5F721.8050300@monnet-usa.com> Message-ID: <4BE716CF.705@monnet-usa.com> I just made the changes and merged up to the main Camping branch: I am now setting the new :dynamic_templates option when you run the camping server (only). Magnus I did not rebuild the official gem yet. Maybe you could do that. On 5/8/2010 6:03 PM, Magnus Holm wrote: > > Thanks for testing it out ;) > > I agree: we can't cache templates in development and you shouldn't > need to set an option for that, however we also want Camping to be > speedy out-of-box. > > What about applying your patch, but also make bin/camping set > :dynamic_templates to true if it's not set already? > > If you want to force caching (or force not-caching) in your app, you > simply set :dynamic_templates, true/false. And if you don't, it > compiles if you i.e. run it through a configuration.ru > , but is dynamic with bin/camping. Best of > both worlds? > >> On May 9, 2010 12:43 AM, "Philippe Monnet" > > wrote: >> >> I gave Magnus' excellent integration of Tilt a whirl today and really >> love it. >> It's also cool because you can match different types of templates at >> the same time (e.g. Markaby + HAML). >> >> I found that while prototyping it would be nice to not have Camping >> compile and cache Tilt templates. >> So I used the new option capability and defined a :dynamic_templates >> option. >> >> e.g.: >> >> module TiltTest >> set :views, File.dirname(__FILE__) + '/views' >> set :dynamic_templates, true >> >> #... >> end >> >> I changed the Camping code to check for that option and only compile >> and cache if false. >> What do you think? >> Maybe we need a shorter or different name for the option? >> >> I checked in the changes in my fork: >> http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764 >> >> Magnus, you might have some additional ideas for tweaking this >> feature. So feel free to add/alter and merge to your liking. >> >> Philippe >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list -------------- next part -------------- An HTML attachment was scrubbed... URL: From judofyr at gmail.com Sun May 9 17:04:47 2010 From: judofyr at gmail.com (Magnus Holm) Date: Mon, 10 May 2010 00:04:47 +0300 Subject: Proposal for optional compilation and caching of Tilt templates In-Reply-To: <4BE716CF.705@monnet-usa.com> References: <4BE5F721.8050300@monnet-usa.com> <4BE716CF.705@monnet-usa.com> Message-ID: Nice! Great to see some contributions to Camping. Still wondering what's the best way to handle small releases. We could mark it as --prerelease on Gemcutter or keep having it on my server. I also don't release 2.1 until we have at least some tests. Could just be a wrapper around the test/apps-directory which makes sure they run properly, but I want at least have *something*. // Magnus Holm On Sun, May 9, 2010 at 23:10, Philippe Monnet wrote: > I just made the changes and merged up to the main Camping branch: > I am now setting the new :dynamic_templates option when you run the camping > server (only). > > Magnus I did not rebuild the official gem yet. Maybe you could do that. > > On 5/8/2010 6:03 PM, Magnus Holm wrote: > > Thanks for testing it out ;) > > I agree: we can't cache templates in development and you shouldn't need to > set an option for that, however we also want Camping to be speedy > out-of-box. > > What about applying your patch, but also make bin/camping set > :dynamic_templates to true if it's not set already? > > If you want to force caching (or force not-caching) in your app, you simply > set :dynamic_templates, true/false. And if you don't, it compiles if you > i.e. run it through a configuration.ru, but is dynamic with bin/camping. > Best of both worlds? > > On May 9, 2010 12:43 AM, "Philippe Monnet" wrote: > > I gave Magnus' excellent integration of Tilt a whirl today and really love > it. > It's also cool because you can match different types of templates at the > same time (e.g. Markaby + HAML). > > I found that while prototyping it would be nice to not have Camping compile > and cache Tilt templates. > So I used the new option capability and defined a :dynamic_templates option. > > e.g.: > > module TiltTest > ??? set :views, File.dirname(__FILE__) + '/views' > ??? set :dynamic_templates, true > > ??? #... > end > > I changed the Camping code to check for that option and only compile and > cache if false. > What do you think? > Maybe we need a shorter or different name for the option? > > I checked in the changes in my fork: > http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764 > > Magnus, you might have some additional ideas for tweaking this feature. So > feel free to add/alter and merge to your liking. > > Philippe > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From ruby at monnet-usa.com Thu May 13 10:17:15 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Thu, 13 May 2010 08:17:15 -0600 Subject: Published a blog post on how to use MongoDB with Camping Message-ID: <4BEC09EB.5000106@monnet-usa.com> If you are interested in trying out MongoDB from a Camping perspective: http://bit.ly/a8jdzq I am curious about other folks using MongoDB too. - Philippe (@techarch) -------------- next part -------------- An HTML attachment was scrubbed... URL: From djr.nzl at gmail.com Wed May 19 20:47:01 2010 From: djr.nzl at gmail.com (David Ray) Date: Thu, 20 May 2010 12:47:01 +1200 Subject: Camping on Ruby 1.9.1 on Win32 Message-ID: <4BF48685.7000002@gmail.com> Hi all, Can I go camping with ruby 1.9.1 on win32? Many thanks, Dave. From judofyr at gmail.com Thu May 20 04:18:04 2010 From: judofyr at gmail.com (Magnus Holm) Date: Thu, 20 May 2010 10:18:04 +0200 Subject: Camping on Ruby 1.9.1 on Win32 In-Reply-To: <4BF48685.7000002@gmail.com> References: <4BF48685.7000002@gmail.com> Message-ID: Hey Dave, Yeah, Camping should work on both 1.9.1 and Windows, but I haven't tested it in a while. Try it out, and please let us know if there's something that doesn't work :) // Magnus Holm On Thu, May 20, 2010 at 02:47, David Ray wrote: > Hi all, > > Can I go camping with ruby 1.9.1 on win32? > > Many thanks, > Dave. > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From judofyr at gmail.com Sat May 22 05:08:07 2010 From: judofyr at gmail.com (Magnus Holm) Date: Sat, 22 May 2010 11:08:07 +0200 Subject: gem install camping --source http://gems.judofyr.net/ Message-ID: Philippe has fixed a few bugs in the experimental template support I "released" a few weeks ago and a little bug in XSendfile. Great work :-) Markaby should also work in 1.9 now (thanks to David for bug report!) If you're running the experimental gem (see http://www.mail-archive.com/camping-list at rubyforge.org/msg01033.html for changes), you should do a: gem install camping --source http://gems.judofyr.net/ // Magnus Holm From judofyr at gmail.com Mon May 31 11:20:11 2010 From: judofyr at gmail.com (Magnus Holm) Date: Mon, 31 May 2010 17:20:11 +0200 Subject: Should we incorporate a filtering mechanism in controllers? In-Reply-To: <04A81A8F-55B5-4CFE-912A-AC25CB34281E@innotts.co.uk> References: <4BCB8F51.1070300@monnet-usa.com> <04A81A8F-55B5-4CFE-912A-AC25CB34281E@innotts.co.uk> Message-ID: Hm? Camping already has filters: module App def service(*a) # before super ensure # after end end I'm not sure if we need to add another way to support filters? // Magnus Holm On Mon, Apr 19, 2010 at 11:56, Dave Everitt wrote: > Philippe - dead simple for me. I was put off Rails a long time ago, which is > how I landed on Camping - Dave Everitt > >> Do people prefer something simple dead easy like filtering_camping? Or >> would people prefer something more like filters in Rails? > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From ruby at monnet-usa.com Mon May 31 12:17:44 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Mon, 31 May 2010 10:17:44 -0600 Subject: filtering_camping is now available as a gem Message-ID: <4C03E128.6070405@monnet-usa.com> To make it easy for people to use the CampingFilters module available on GitHub (http://github.com/judofyr/filtering_camping), I have created and published a corresponding gem with Magnus' approval. You can find it at: http://rubygems.org/gems/filtering_camping Btw Magnus and I are discussing the option to bundle the module in Camping in the future. Happy [controller] filtering! - Philippe (@techarch) -------------- next part -------------- An HTML attachment was scrubbed... URL: