From kprojection at gmail.com Mon Aug 4 00:37:17 2008 From: kprojection at gmail.com (Eric Mill) Date: Mon, 4 Aug 2008 00:37:17 -0400 Subject: Resolved: Apache + CGI/FastCGI + mod_rewrite In-Reply-To: References: <391a49da0807191152j2f373731u26b617e8b2ac9784@mail.gmail.com> Message-ID: True to my word, I have created a page for using Camping 2.0 on shared hosts: http://github.com/why/camping/wikis/camping-on-shared-hosting Thanks to Magnus and Jenna especially for helping figure it all out. -- Eric On Sat, Jul 19, 2008 at 11:50 PM, Eric Mill wrote: > Ah, hot damn, Magnus, you really took this problem to heart. As the > creator of the "Camping on Dreamhost" wiki pages on the Camping and > Dreamhost wikis, I will be updating both with your work (and testing > it verbatim on Dreamhost). You rule! > > -- Eric > > On Sat, Jul 19, 2008 at 2:52 PM, Magnus Holm wrote: >> This is the last time I try to fix something in the middle of the >> night! Feel free to call me a Stupid Snake, 'cause this has been >> messy. Anyway, I think I've finally solved this. >> >> Here it is: http://pastie.org/237138 :-) >> >> -- >> Magnus Holm >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > From gerald at vanbeta.com Mon Aug 18 10:56:32 2008 From: gerald at vanbeta.com (Gerald Bauer) Date: Mon, 18 Aug 2008 07:56:32 -0700 Subject: S6/S9 (Single Web-Page) Adaption of Going Camping PDF Slide Deck by Jeremy McAnally @ GoRuCo Message-ID: <1f058eab0808180756ma2023cew8166ad5eb5550847@mail.gmail.com> Hello, I've created a S6/S9 version of Jeremy McAnally's GoRuCo slide deck titled "Go Camping" that offers a single-web page version that in addition to offering a full-screen slide show (in your browser) is easy-to-print for offline reading. (S6/S9 Tip: Use the t-key to toggle between outline and slide show view.) More @ http://slideshow.rubyforge.org/camping.html Cheers. -- Gerald Bauer - Internet Professional - http://geraldbauer.ca From anibalrojas at gmail.com Mon Aug 18 13:48:20 2008 From: anibalrojas at gmail.com (=?ISO-8859-1?Q?An=EDbal_Rojas?=) Date: Tue, 19 Aug 2008 13:18:20 +1930 Subject: S6/S9 (Single Web-Page) Adaption of Going Camping PDF Slide Deck by Jeremy McAnally @ GoRuCo In-Reply-To: <1f058eab0808180756ma2023cew8166ad5eb5550847@mail.gmail.com> References: <1f058eab0808180756ma2023cew8166ad5eb5550847@mail.gmail.com> Message-ID: Gerald, Doesn't work in Firefox 2.0.0.16 :-( (anyway I will be upgrading my Ubuntu laptop in the next few days) Best regards, -- An?bal On Tue, Aug 19, 2008 at 10:26 AM, Gerald Bauer wrote: > Hello, > > I've created a S6/S9 version of Jeremy McAnally's GoRuCo slide > deck titled "Go Camping" that offers a single-web page version that in > addition to offering a full-screen slide show (in your browser) is > easy-to-print for offline reading. (S6/S9 Tip: Use the t-key to toggle > between outline and slide show view.) > > More @ http://slideshow.rubyforge.org/camping.html > > Cheers. > > -- > Gerald Bauer - Internet Professional - http://geraldbauer.ca > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From gerald at vanbeta.com Mon Aug 18 16:51:25 2008 From: gerald at vanbeta.com (Gerald Bauer) Date: Mon, 18 Aug 2008 13:51:25 -0700 Subject: S6/S9 (Single Web-Page) Adaption of Going Camping PDF Slide Deck by Jeremy McAnally @ GoRuCo In-Reply-To: References: <1f058eab0808180756ma2023cew8166ad5eb5550847@mail.gmail.com> Message-ID: <1f058eab0808181351l27f52f97r5d1977a717a875ec@mail.gmail.com> Hello An?bal, > Doesn't work in Firefox 2.0.0.16 :-( (anyway I will be upgrading > my Ubuntu laptop in the next few days) Sorry to hear it and thanks for reporting. I'll try to get it working on Firefox 2.x later this week. Wasn't aware that it's not working. In the meantime the plain text source (in Textile) is available @ http://slideshow.rubyforge.org/svn/samples/camping.textile Should work in any browser (even text-only) ;-) Cheers. -- Gerald Bauer - Internet Professional - http://geraldbauer.ca From anibalrojas at gmail.com Tue Aug 19 11:25:16 2008 From: anibalrojas at gmail.com (=?ISO-8859-1?Q?An=EDbal_Rojas?=) Date: Wed, 20 Aug 2008 10:55:16 +1930 Subject: S6/S9 (Single Web-Page) Adaption of Going Camping PDF Slide Deck by Jeremy McAnally @ GoRuCo In-Reply-To: <1f058eab0808181351l27f52f97r5d1977a717a875ec@mail.gmail.com> References: <1f058eab0808180756ma2023cew8166ad5eb5550847@mail.gmail.com> <1f058eab0808181351l27f52f97r5d1977a717a875ec@mail.gmail.com> Message-ID: No prob, I took a look at it using Opera, just wanted to let you know. By the way please feed free to register, both you and your blog (http://geraldbauer.ca) at RubyCorner.com a directory for blogs related to the Ruby Programming Language or any of the related technologies. Best regards, -- An?bal Rojas http://hasmanydevelopers.com http://rubycorner.com http://anibal.rojas.com.ve On Tue, Aug 19, 2008 at 4:21 PM, Gerald Bauer wrote: > Hello An?bal, > >> Doesn't work in Firefox 2.0.0.16 :-( (anyway I will be upgrading >> my Ubuntu laptop in the next few days) > > Sorry to hear it and thanks for reporting. I'll try to get it > working on Firefox 2.x later this week. Wasn't aware that it's not > working. In the meantime the plain text source (in Textile) is > available @ http://slideshow.rubyforge.org/svn/samples/camping.textile > > Should work in any browser (even text-only) ;-) Cheers. > > -- > Gerald Bauer - Internet Professional - http://geraldbauer.ca > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From ironald at gmail.com Thu Aug 21 04:30:25 2008 From: ironald at gmail.com (Ronald Evangelista) Date: Thu, 21 Aug 2008 16:30:25 +0800 Subject: Error creating association extensions in camping Message-ID: associations.rb:1368:in `const_set': wrong constant name Blog::Models::UserEntriesAssociationExtension (NameError) class User < Base has_many :entries do def find_recent # code end end end any hints what needs to be done to make it unsurprising (pols-friendly) to work with camping+activerecord? anyone else tried has_finder?. cheers! -------------- next part -------------- An HTML attachment was scrubbed... URL: From ironald at gmail.com Thu Aug 21 04:48:59 2008 From: ironald at gmail.com (Ronald Evangelista) Date: Thu, 21 Aug 2008 16:48:59 +0800 Subject: Error creating association extensions in camping Message-ID: This way works: module RecentFinder def find_recent end end class User < Base has_many :entries, :extend=>RecentFinder end -------------- next part -------------- An HTML attachment was scrubbed... URL: From mailing-lists at joshuaschairbaum.com Wed Aug 27 21:20:40 2008 From: mailing-lists at joshuaschairbaum.com (Josh Schairbaum) Date: Wed, 27 Aug 2008 21:20:40 -0400 Subject: Form File Uploads Message-ID: Is there a good blog post, article tutorial, anything on doing a file upload in Camping? I've been looking around, but I haven't found anything yet. Regards, Josh From blueberry at creativepony.com Wed Aug 27 22:47:27 2008 From: blueberry at creativepony.com (Bluebie, Jenna) Date: Thu, 28 Aug 2008 12:47:27 +1000 Subject: Form File Uploads In-Reply-To: References: Message-ID: If you're using Camping 2.0 stuff off github, file uploads work exactly as they do in regular rack, so search around for rack upload examples. :) In camping 1.5, it works quite similarly, like this: input.fieldname.tempfile.length #=> how many bytes long it is input.fieldname[:type] #=> mimetype of upload input.fieldname.tempfile.read #=> gets you the files contents... tempfile will be some kind of an IO object. I think you can do .filename also, but I don't use it in my projects. Rack is similar, though at least in builds before Mash got in on the action, the syntax was a bit different. From zimbatm at oree.ch Thu Aug 28 06:46:52 2008 From: zimbatm at oree.ch (zimbatm) Date: Thu, 28 Aug 2008 12:46:52 +0200 Subject: [TIP] optional multi-pane layout Message-ID: This is a nice little trick to defer some block execution in a multi-pane layout module Views def layout html do #... body do div.main { yield } div.right! &@_right_pane if @_right_pane end end end def _right_pane(&block) @_right_pane = block end # So now on your view def some_view # use that method if you need the right pane _right_pane do # Some code in the right pane end # And here goes your regular view end end Cheers, zimbatm From john.beppu at gmail.com Thu Aug 28 07:57:54 2008 From: john.beppu at gmail.com (John Beppu) Date: Thu, 28 Aug 2008 04:57:54 -0700 Subject: [TIP] optional multi-pane layout In-Reply-To: References: Message-ID: <21a10fe00808280457j6ab8aa17lb6df1153f4fd45c4@mail.gmail.com> That's pretty damned cool. Good technique! --beppu On Thu, Aug 28, 2008 at 3:46 AM, zimbatm wrote: > This is a nice little trick to defer some block execution in a multi-pane > layout > > module Views > def layout > html do > #... > body do > div.main { yield } > div.right! &@_right_pane if @_right_pane > end > end > end > > def _right_pane(&block) > @_right_pane = block > end > > # So now on your view > def some_view > # use that method if you need the right pane > _right_pane do > # Some code in the right pane > end > > # And here goes your regular view > end > end > > Cheers, > zimbatm > _______________________________________________ > 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 kprojection at gmail.com Thu Aug 28 10:53:54 2008 From: kprojection at gmail.com (Eric Mill) Date: Thu, 28 Aug 2008 10:53:54 -0400 Subject: [TIP] optional multi-pane layout In-Reply-To: <21a10fe00808280457j6ab8aa17lb6df1153f4fd45c4@mail.gmail.com> References: <21a10fe00808280457j6ab8aa17lb6df1153f4fd45c4@mail.gmail.com> Message-ID: That's an awesome tip for Markaby. I'll remember that! On Thu, Aug 28, 2008 at 7:57 AM, John Beppu wrote: > That's pretty damned cool. Good technique! > > --beppu > > On Thu, Aug 28, 2008 at 3:46 AM, zimbatm wrote: >> >> This is a nice little trick to defer some block execution in a multi-pane >> layout >> >> module Views >> def layout >> html do >> #... >> body do >> div.main { yield } >> div.right! &@_right_pane if @_right_pane >> end >> end >> end >> >> def _right_pane(&block) >> @_right_pane = block >> end >> >> # So now on your view >> def some_view >> # use that method if you need the right pane >> _right_pane do >> # Some code in the right pane >> end >> >> # And here goes your regular view >> end >> end >> >> Cheers, >> zimbatm >> _______________________________________________ >> 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 judofyr at gmail.com Thu Aug 28 14:30:58 2008 From: judofyr at gmail.com (Magnus Holm) Date: Thu, 28 Aug 2008 20:30:58 +0200 Subject: Camping::Apps returns! Message-ID: <391a49da0808281130m10588c3ex8ea8524b596b64dc@mail.gmail.com> Camping::Apps is back! I don't know the *exact* reason it was being removed, but now it's a monkey-patched array which at least doesn't leak memory when using together with the reloader (were there more problems with this?). I really think we need this, since there's no guaranty that only Camping-apps will have a class-method called #goes and "Object.constants.map{|c|Object.const_get(c)}" also caused a really weird error on Rubinus a while ago (I haven't checked if this still applies). Anyway, I think it's worth the bytes. I've pushed it to my experimental-branch[1] together with some other, semi-experimental (see [2]) and byte-saving patches. Can anyone who knows why it got pulled out, see if this version is "safe"? [1] http://bit.ly/judofyr-excamping [2] Getting rid of the old #meta_def and instead using modules: http://bit.ly/extend-not-define-on-metaclass From zimbatm at oree.ch Thu Aug 28 15:54:14 2008 From: zimbatm at oree.ch (zimbatm) Date: Thu, 28 Aug 2008 21:54:14 +0200 Subject: Camping::Apps returns! In-Reply-To: <391a49da0808281130m10588c3ex8ea8524b596b64dc@mail.gmail.com> References: <391a49da0808281130m10588c3ex8ea8524b596b64dc@mail.gmail.com> Message-ID: Hi Magnus, If I remember well, I am the one who introduced AND removed Camping::Apps. I'm not sure anymore but I think it wasn't really used and that solutions never really satisfied me. Do you have any use for it ? Cheers, zimbatm From judofyr at gmail.com Thu Aug 28 16:06:20 2008 From: judofyr at gmail.com (Magnus Holm) Date: Thu, 28 Aug 2008 22:06:20 +0200 Subject: Camping::Apps returns! In-Reply-To: References: <391a49da0808281130m10588c3ex8ea8524b596b64dc@mail.gmail.com> Message-ID: <391a49da0808281306h1665dd74ubeee61187e4157e7@mail.gmail.com> Well, it's being used in mab.rb and ar.rb: Old way: Object.constants.map{|c|Object.const_get(c)}.each do |c| c::Models.module_eval $AR_EXTRAS if c.respond_to?(:goes) end New way: Camping::Apps.each do |c| c::Models.module_eval $AR_EXTRAS end Which may break if you got another class/module with #goes... On Thu, Aug 28, 2008 at 9:54 PM, zimbatm wrote: > Hi Magnus, > > If I remember well, I am the one who introduced AND removed > Camping::Apps. I'm not sure anymore but I think it wasn't really used > and that solutions never really satisfied me. Do you have any use for > it ? > > Cheers, > zimbatm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Magnus Holm -------------- next part -------------- An HTML attachment was scrubbed... URL: From aredridel at nbtsc.org Thu Aug 28 19:05:12 2008 From: aredridel at nbtsc.org (Aria Stewart) Date: Thu, 28 Aug 2008 17:05:12 -0600 Subject: Camping::Apps returns! In-Reply-To: References: <391a49da0808281130m10588c3ex8ea8524b596b64dc@mail.gmail.com> Message-ID: On Aug 28, 2008, at 1:54 PM, zimbatm wrote: > Hi Magnus, > > If I remember well, I am the one who introduced AND removed > Camping::Apps. I'm not sure anymore but I think it wasn't really used > and that solutions never really satisfied me. Do you have any use for > it ? I most certainly do. In trying to keep the spirit of very simple apps working together, I've found getting a list of apps very useful. Also, good for The Camping Server to be able to make a list, too, I'd think. Aria Stewart aredridel at nbtsc.org From zimbatm at oree.ch Thu Aug 28 20:18:05 2008 From: zimbatm at oree.ch (zimbatm) Date: Fri, 29 Aug 2008 02:18:05 +0200 Subject: Comment on f658399b7512337f2b0f1d34264214a690404772 Message-ID: Or how two chars make the difference. A tale on my current project. While debugging a current app, I decided to start camping with $DEBUG = true. Suddenly, while loading a page, exceptions I have never seen started flowing in the console like the crocodiles in the river of the frogger game. This is because when $DEBUG is set to true, even handled/catched exceptions are printed to the console (but not the backtrace). This reminded me of "[href,:action,:src].map{|a|(h[a]=self/h[a])rescue 0". This is the line that escapes all urls to put them on the right path. Small instrumentation later, my page was generating 284! exceptions, with each a backtrace size of 65 in avg. By adding: 2 characters From: [:href,:action,:src].map{|a|(h[a]=self/h[a])rescue 0} To: [:href,:action,:src].map{|a|(h[a]&&=self/h[a])rescue 0} The exceptions dropped to 39 Finally, the poor man benchmark: [zimbatm at murray swarm]$ camping myapp.rb ** "myapp" app loaded ** Starting Mongrel on 0.0.0.0:3301 0.120000 0.010000 0.130000 ( 0.137303) 0.070000 0.010000 0.080000 ( 0.086835) 0.060000 0.010000 0.070000 ( 0.080585) 0.110000 0.010000 0.120000 ( 0.127002) 0.070000 0.020000 0.090000 ( 0.081667) [zimbatm at murray swarm]$ camping myapp.rb ** "myapp" app loaded ** Starting Mongrel on 0.0.0.0:3301 0.050000 0.010000 0.060000 ( 0.068349) 0.040000 0.010000 0.050000 ( 0.057737) 0.040000 0.010000 0.050000 ( 0.057360) 0.040000 0.010000 0.050000 ( 0.057386) 0.040000 0.010000 0.050000 ( 0.057580) Source : http://github.com/zimbatm/camping/tree/master Cheers, zimbatm From zimbatm at oree.ch Thu Aug 28 20:28:21 2008 From: zimbatm at oree.ch (zimbatm) Date: Fri, 29 Aug 2008 02:28:21 +0200 Subject: Camping::Apps returns! In-Reply-To: References: <391a49da0808281130m10588c3ex8ea8524b596b64dc@mail.gmail.com> Message-ID: Now I remember, there is a quirk. Make sure to remove the old app in the array when reloading the app in the Camping::Reloader. Cheers, zimbatm From judofyr at gmail.com Fri Aug 29 07:58:53 2008 From: judofyr at gmail.com (Magnus Holm) Date: Fri, 29 Aug 2008 13:58:53 +0200 Subject: Camping::Apps returns! In-Reply-To: References: <391a49da0808281130m10588c3ex8ea8524b596b64dc@mail.gmail.com> Message-ID: <391a49da0808290458k2a7ca577t96f69e7d809960b@mail.gmail.com> That's why I have monkey-patched it: Apps = [].instance_eval do def <<(i) delete_if { |f| f.to_s == i.to_s} super end self end Ex1 = Class.new Apps << Ex1 # => [Ex1] Object.send(:remove_const, :Ex1) Ex1 = Class.new Apps << Ex1 # => [Ex1] # the old one has been deleted. Yes, I realize we could make some changes in camping/reloader.rb, but I think this is more intuitive and do got lot's of spare bytes... On Fri, Aug 29, 2008 at 2:28 AM, zimbatm wrote: > Now I remember, there is a quirk. Make sure to remove the old app in > the array when reloading the app in the Camping::Reloader. > > Cheers, > zimbatm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Magnus Holm -------------- next part -------------- An HTML attachment was scrubbed... URL: