From ruby at monnet-usa.com Sun Jul 4 13:05:55 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sun, 04 Jul 2010 11:05:55 -0600 Subject: Camping 2.1 and whywentcamping.com In-Reply-To: <4C2B52D0.4090202@monnet-usa.com> References: <4C2B3F1D.3060606@monnet-usa.com> <4C2B52D0.4090202@monnet-usa.com> Message-ID: <4C30BF73.3060908@monnet-usa.com> Just for fun and to keep creative juives flowing I mocked up one idea of layout including a resizable look and a slideshow to showcase key points about Camping. That slideshow is using straight HTML and Javascript. See http://rubycamping.monnet-usa.com/ On 6/30/2010 8:21 AM, Philippe Monnet wrote: > Sorry I actually meant to say that all key content and navigation > should be visible in the top 1084 pixels (and maybe less). It's not so > much that we can make the page longer but you loose visitor's > attention span (see http://browsersize.googlelabs.com/). > > On 6/30/2010 7:46 AM, Magnus Holm wrote: >> On Wed, Jun 30, 2010 at 14:57, Philippe Monnet wrote: >> >>> Thanks Magnus! I love the idea of working on the web site for 2.1. >>> I am still not crazy about the web site name though - as it is not easy for >>> people to remember if they don't know the connection with _why. I personally >>> would have preferred rubycamping.com or something linking Camping to Ruby >>> somehow. But if everyone prefers that name I am fine with that. >>> >> Sure, I don't care what's the domain name will be. >> >> >>> A couple ideas for the site: >>> Keep the home page simple with all content fitting within 1280 x 1024 >>> >> I don't necessarily agree with this: users are used to scroll on the >> internet (e.g.http://vowsjs.org/) >> >> >>> Use a catchy design (need some help here) >>> >> Of course! Unfortunately, I can't really help here either. >> >> >>> Accentuate that Camping is about Ruby (maybe also include the ruby logo >>> somewhere) >>> >> Agree. >> >> >>> Have a brief note about the connection to _why and a link to a page >>> explaining the history of Camping with further links to _why's other sites >>> >> Agree. I feel these kind of pages should end up at the wiki (but we >> might want to move away from GitHub's wiki). >> >> >>> Encourage people to try it by capitalizing on some of Camping's strengths: >>> >>> Fast to learn - requires only basic Ruby skills >>> Much simpler than Rails but more structure than Sinatra/Padrino >>> Lightning fast and memory efficient allowing fast and efficient sites >>> Can evolve from simple file to organized directory structure >>> Can layer in more features later using persistence and choice of view >>> engines >>> >> Totally agree! >> >> >>> How about using some kind of an animated (auto advancing) slideshow to >>> highlight some of the benefits? See an example at: >>> http://blog.monnet-usa.com/?p=276 >>> >> Interesting. We'll have to check that out. >> >> >>> How about a page on learning with a link to the book as well as a list of >>> links for other tutorials or short explanations on key topics (e.g. how to >>> do migrations, how to use include/extend, how to use different view engines, >>> etc.)? >>> >> This should hopefully be a part of the reference section >> >> >>> How about a page about plugins with some brief description of their intent? >>> >> Wiki material? >> >> >>> I would love for us to include _why's cartoons in some of the sub pages ;-) >>> >> Agree. >> >> >>> Who would be interested in working together on the site? >>> >> I'm always interested, but I'm that good at design? >> >> >>> Could we do a couple graphic mockups of the main page? How should we >>> exchange them? Via the mailing list? >>> >> Not sure? >> >> >>> I am ready and excited to help with that. I think it would be great to >>> launch the site in time for _Why Day (Aug 19th)! >>> >>> Philippe >>> >>> >> Also, I think we should store a lot of information on a wiki; Camping >> is after all a pretty much "public" project. I still think we should >> have a separate website though (which should both work as a place >> where you can find Camping-related resources AND where we "advertise" >> to new people). >> _______________________________________________ >> 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 matma.rex at gmail.com Sun Jul 4 17:22:13 2010 From: matma.rex at gmail.com (=?UTF-8?Q?Bartosz_Dziewo=C5=84ski?=) Date: Sun, 4 Jul 2010 23:22:13 +0200 Subject: Camping 2.1 and whywentcamping.com In-Reply-To: <4C30BF73.3060908@monnet-usa.com> References: <4C2B3F1D.3060606@monnet-usa.com> <4C2B52D0.4090202@monnet-usa.com> <4C30BF73.3060908@monnet-usa.com> Message-ID: 2010/7/4 Philippe Monnet : > Just for fun and to keep creative juives flowing I mocked up one idea of > layout including a resizable look and a slideshow to showcase key points > about Camping. That slideshow is using straight HTML and Javascript. > See http://rubycamping.monnet-usa.com/ Try it at 1024x768. Just sayin'. Also the slideshow is too fast, actually I don't think that making it an automated slideshow is a good idea; let the viewer decide when to see next slide. Except for that, I'd say it looks good (I'm just a regular Camping user, not dev or anything). -- Matma Rex From ruby at monnet-usa.com Sun Jul 4 17:56:07 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sun, 04 Jul 2010 15:56:07 -0600 Subject: Camping 2.1 and whywentcamping.com In-Reply-To: References: <4C2B3F1D.3060606@monnet-usa.com> <4C2B52D0.4090202@monnet-usa.com> <4C30BF73.3060908@monnet-usa.com> Message-ID: <4C310377.8040301@monnet-usa.com> Hi Bartosz, Thanks for taking a look! I just tweaked the positioning a little to improve the look at 1024x768. Hope that helps somewhat. I could definitely benefit from some help from a true designer in the variable layout and multi-layer department. ;-) I also changed the slide viewing time from 6 to 15s - you can also pause the show using the little pause icon at the bottom left of the sign. Philippe On 7/4/2010 3:22 PM, Bartosz Dziewon'ski wrote: > 2010/7/4 Philippe Monnet: > >> Just for fun and to keep creative juives flowing I mocked up one idea of >> layout including a resizable look and a slideshow to showcase key points >> about Camping. That slideshow is using straight HTML and Javascript. >> See http://rubycamping.monnet-usa.com/ >> > Try it at 1024x768. Just sayin'. Also the slideshow is too fast, > actually I don't think that making it an automated slideshow is a good > idea; let the viewer decide when to see next slide. > > Except for that, I'd say it looks good (I'm just a regular Camping > user, not dev or anything). > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From deveritt at innotts.co.uk Mon Jul 5 12:57:27 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Mon, 5 Jul 2010 17:57:27 +0100 Subject: Camping 2.1 and whywentcamping.com In-Reply-To: <4C30BF73.3060908@monnet-usa.com> References: <4C2B3F1D.3060606@monnet-usa.com> <4C2B52D0.4090202@monnet-usa.com> <4C30BF73.3060908@monnet-usa.com> Message-ID: <9389C209-955F-4496-A9E0-63AB38869EEE@innotts.co.uk> Still busy, so just a brief comment... Philippe: I think this is a lot of fun - the slideshow is the kind of minimal introduction that really works. Better as inspiration than as a working website, so perhaps a combination of these graphics with the 'classic plain green' style at http://whywentcamping.judofyr.net would be a good way forward? We're such a diverse bunch I can't imagine a total consensus on the Camping site, but I think http://github.com/camping/ whywentcamping.com/ needs to be the starting-point - content is king at this stage, so Magnus' issue about the reference needs addressing: --- The reference is currently missing. I'm not quite sure how we would implement it. I guess we want: * To be able to view the whole reference in a single page * To be able to link to a specific section of the reference * To be able to comment on a specific section. View Issue: http://github.com/camping/whywentcamping.com/issues#issue/3 The reference show/hide JQuery fails on my latest Firefox, but this should be simple to fix. Dave Everitt > Just for fun and to keep creative juives flowing I mocked up one > idea of layout including a resizable look and a slideshow to > showcase key points about Camping. That slideshow is using straight > HTML and Javascript. > See http://rubycamping.monnet-usa.com/ From ruby at monnet-usa.com Mon Jul 5 13:55:26 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Mon, 05 Jul 2010 11:55:26 -0600 Subject: Camping 2.1 and whywentcamping.com In-Reply-To: <9389C209-955F-4496-A9E0-63AB38869EEE@innotts.co.uk> References: <4C2B3F1D.3060606@monnet-usa.com> <4C2B52D0.4090202@monnet-usa.com> <4C30BF73.3060908@monnet-usa.com> <9389C209-955F-4496-A9E0-63AB38869EEE@innotts.co.uk> Message-ID: <4C321C8E.3000502@monnet-usa.com> Dave, I just changed the background color to match the original site. Looks nicer now. I just looked into the Firefox issue on the reference page and I think that the 2 functions s and m need to be moved towards the top of the file so they can be declared before they are used. Once I monkey-patched them in Firebug it worked. Will need to update the source. On 7/5/2010 10:57 AM, Dave Everitt wrote: > Still busy, so just a brief comment... > > Philippe: I think this is a lot of fun - the slideshow is the kind of > minimal introduction that really works. > > Better as inspiration than as a working website, so perhaps a > combination of these graphics with the 'classic plain green' style at > http://whywentcamping.judofyr.net would be a good way forward? > > We're such a diverse bunch I can't imagine a total consensus on the > Camping site, but I think > http://github.com/camping/whywentcamping.com/ needs to be the > starting-point - content is king at this stage, so Magnus' issue about > the reference needs addressing: > --- > The reference is currently missing. I'm not quite sure how we would > implement it. I guess we want: > * To be able to view the whole reference in a single page > * To be able to link to a specific section of the reference > * To be able to comment on a specific section. > View Issue: http://github.com/camping/whywentcamping.com/issues#issue/3 > > The reference show/hide JQuery fails on my latest Firefox, but this > should be simple to fix. > > Dave Everitt > >> Just for fun and to keep creative juives flowing I mocked up one idea >> of layout including a resizable look and a slideshow to showcase key >> points about Camping. That slideshow is using straight HTML and >> Javascript. >> See http://rubycamping.monnet-usa.com/ > > _______________________________________________ > 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 dsusco at gmail.com Tue Jul 6 09:45:03 2010 From: dsusco at gmail.com (David Susco) Date: Tue, 6 Jul 2010 09:45:03 -0400 Subject: using reststop with tilt In-Reply-To: References: Message-ID: Still fooling around with this, no luck yet. Found some other things though. It seems I need to fully qualify controllers as arguments for URL and R methods when using Tilt (this is irrespective of whether I'm using reststop or not). Is there anything I can do to get around this? Also, is there anyway to call partials (markaby or other template files) from a template file? Dave On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: > I'm trying to use the new Tilt integration with reststop. All the > aliases and whatnot under "Implementing your own service" > (http://wiki.github.com/camping/reststop/) are there and :views has > been set in the options hash. I tried creating sub-directories in the > views directory (html, HTML) but I still couldn't get it to work. > > I can get my haml template to display if I get rid of the alias for > reststop_render. All the other render calls to markaby still work when > I do this too. However, I'm assuming I'm loosing the second argument > for render in reststop when I do this. > > Am I missing some other setting/configuration option to get this to > work with the alias for reststop_render? > > -- > Dave > -- Dave From ruby at monnet-usa.com Wed Jul 7 00:07:45 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Tue, 06 Jul 2010 22:07:45 -0600 Subject: using reststop with tilt In-Reply-To: References: Message-ID: <4C33FD91.2010306@monnet-usa.com> Hi David, I will look into this (probably this week-end though) - as I actually did not try Tilt at the same time as RESTstop. On 7/6/2010 7:45 AM, David Susco wrote: > Still fooling around with this, no luck yet. Found some other things though. > > It seems I need to fully qualify controllers as arguments for URL and > R methods when using Tilt (this is irrespective of whether I'm using > reststop or not). Is there anything I can do to get around this? > > Also, is there anyway to call partials (markaby or other template > files) from a template file? > > Dave > > On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: > >> I'm trying to use the new Tilt integration with reststop. All the >> aliases and whatnot under "Implementing your own service" >> (http://wiki.github.com/camping/reststop/) are there and :views has >> been set in the options hash. I tried creating sub-directories in the >> views directory (html, HTML) but I still couldn't get it to work. >> >> I can get my haml template to display if I get rid of the alias for >> reststop_render. All the other render calls to markaby still work when >> I do this too. However, I'm assuming I'm loosing the second argument >> for render in reststop when I do this. >> >> Am I missing some other setting/configuration option to get this to >> work with the alias for reststop_render? >> >> -- >> Dave >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruby at monnet-usa.com Wed Jul 7 21:58:05 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Wed, 07 Jul 2010 19:58:05 -0600 Subject: using reststop with tilt In-Reply-To: <4C33FD91.2010306@monnet-usa.com> References: <4C33FD91.2010306@monnet-usa.com> Message-ID: <4C3530AD.5050705@monnet-usa.com> I fixed the issue in the basic_render method. At the time I worked on RESTstop I had done the minimum needed to make it work with the new version of Camping. And when Tilt support was added I did not fully retrofit the code to make it work with Tilt templates. Problem corrected! Thanks David for helping us make the implementation more robust. I have also published a new 0.5.3 version of the gem. Philippe (@techarch) On 7/6/2010 10:07 PM, Philippe Monnet wrote: > Hi David, I will look into this (probably this week-end though) - as I > actually did not try Tilt at the same time as RESTstop. > > On 7/6/2010 7:45 AM, David Susco wrote: >> Still fooling around with this, no luck yet. Found some other things though. >> >> It seems I need to fully qualify controllers as arguments for URL and >> R methods when using Tilt (this is irrespective of whether I'm using >> reststop or not). Is there anything I can do to get around this? >> >> Also, is there anyway to call partials (markaby or other template >> files) from a template file? >> >> Dave >> >> On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: >> >>> I'm trying to use the new Tilt integration with reststop. All the >>> aliases and whatnot under "Implementing your own service" >>> (http://wiki.github.com/camping/reststop/) are there and :views has >>> been set in the options hash. I tried creating sub-directories in the >>> views directory (html, HTML) but I still couldn't get it to work. >>> >>> I can get my haml template to display if I get rid of the alias for >>> reststop_render. All the other render calls to markaby still work when >>> I do this too. However, I'm assuming I'm loosing the second argument >>> for render in reststop when I do this. >>> >>> Am I missing some other setting/configuration option to get this to >>> work with the alias for reststop_render? >>> >>> -- >>> Dave >>> >>> >> >> > > > _______________________________________________ > 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 deveritt at innotts.co.uk Thu Jul 8 05:35:12 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Thu, 8 Jul 2010 10:35:12 +0100 Subject: Camping 2.1 and whywentcamping.com In-Reply-To: <4C321C8E.3000502@monnet-usa.com> References: <4C2B3F1D.3060606@monnet-usa.com> <4C2B52D0.4090202@monnet-usa.com> <4C30BF73.3060908@monnet-usa.com> <9389C209-955F-4496-A9E0-63AB38869EEE@innotts.co.uk> <4C321C8E.3000502@monnet-usa.com> Message-ID: <02DD1383-BB54-4BD7-A9B7-546FB4BC9044@innotts.co.uk> Hi Philippe We could do with the markup for the api from http:// camping.rubyforge.org/api.html adding to the whywentcamping.com repo, then it'll be ready for tweaking/editing/styling - I've added a comment to the open issue about this that also mentions the FF3 JQuery problem. Dave > Dave, I just changed the background color to match the original > site. Looks nicer now. > > I just looked into the Firefox issue on the reference page and I > think that the 2 functions s and m need to be moved towards the top > of the file so they can be declared before they are used. Once I > monkey-patched them in Firebug it worked. Will need to update the > source. > > > On 7/5/2010 10:57 AM, Dave Everitt wrote: >> >> Still busy, so just a brief comment... >> >> Philippe: I think this is a lot of fun - the slideshow is the kind >> of minimal introduction that really works. >> >> Better as inspiration than as a working website, so perhaps a >> combination of these graphics with the 'classic plain green' style >> athttp://whywentcamping.judofyr.net would be a good way forward? >> >> We're such a diverse bunch I can't imagine a total consensus on >> the Camping site, but I thinkhttp://github.com/camping/ >> whywentcamping.com/ needs to be the starting-point - content is >> king at this stage, so Magnus' issue about the reference needs >> addressing: >> --- >> The reference is currently missing. I'm not quite sure how we >> would implement it. I guess we want: >> * To be able to view the whole reference in a single page >> * To be able to link to a specific section of the reference >> * To be able to comment on a specific section. >> View Issue: http://github.com/camping/whywentcamping.com/ >> issues#issue/3 >> >> The reference show/hide JQuery fails on my latest Firefox, but >> this should be simple to fix. >> >> Dave Everitt >> >>> Just for fun and to keep creative juives flowing I mocked up one >>> idea of layout including a resizable look and a slideshow to >>> showcase key points about Camping. That slideshow is using >>> straight HTML and Javascript. >>> See http://rubycamping.monnet-usa.com/ >> From judofyr at gmail.com Thu Jul 8 15:55:51 2010 From: judofyr at gmail.com (Magnus Holm) Date: Thu, 8 Jul 2010 21:55:51 +0200 Subject: Wiki vs homepage Message-ID: Hey guys, Philippe had some interesting points about the website: 1. Keep the home page simple with all content fitting within 1280 x 1024 2. Use a catchy design (need some help here) 3. Accentuate that Camping is about Ruby (maybe also include the ruby logo somewhere) 4. Have a brief note about the connection to _why and a link to a page explaining the history of Camping with further links to _why's other sites 5. Encourage people to try it by capitalizing on some of Camping's strengths: - Fast to learn - requires only basic Ruby skills - Much simpler than Rails but more structure than Sinatra/Padrino - Lightning fast and memory efficient allowing fast and efficient sites - Can evolve from simple file to organized directory structure - Can layer in more features later using persistence and choice of view engines 6. How about using some kind of an animated (auto advancing) slideshow to highlight some of the benefits? See an example at: http://blog.monnet-usa.com/?p=276 7. How about a page on learning with a link to the book as well as a list of links for other tutorials or short explanations on key topics (e.g. how to do migrations, how to use include/extend, how to use different view engines, etc.)? 8. How about a page about plugins with some brief description of their intent? 9. I would love for us to include _why's cartoons in some of the sub pages ;-) Now, the more I look at this list (and my own thoughts about the new camping site) I realize that we're talking about two different things: * A site to attract new users * A site to inform regular users It looks like my attempt (http://whywentcamping.judofyr.net/) tries to target the latter, while Philippe targeted the former (http://rubycamping.monnet-usa.com/). Both sites serves a purpose and I believe both are equally important. -- Here's what I propose: We split the site into two parts. We turn what I've created into a wiki. Everyone are welcome to edit and add their own content. Then we take Philippe's ideas/design/site and turn it into ruby-camping.com or whywentcamping.com or whatnot. It probably doesn't need to be more than a single page. What'd ya think? // Magnus Holm From judofyr at gmail.com Thu Jul 8 15:59:13 2010 From: judofyr at gmail.com (Magnus Holm) Date: Thu, 8 Jul 2010 21:59:13 +0200 Subject: API documentation good enough? Message-ID: As you might know, I'm not using Camping on a regular basis, so I'm just wondering if the API documentation (http://camping.rubyforge.org/api.html) is good enough? If not, is it something we can improve by simply updating camping-unbridged.rb? If not, do we rather want something like this? http://www.sinatrarb.com/intro.html // Magnus Holm From dsusco at gmail.com Thu Jul 8 16:19:44 2010 From: dsusco at gmail.com (David Susco) Date: Thu, 8 Jul 2010 16:19:44 -0400 Subject: using reststop with tilt In-Reply-To: <4C3530AD.5050705@monnet-usa.com> References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> Message-ID: Thanks Philippe, it's working great. Has anyone gotten partials to work with Tilt? Dave On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: > I fixed the issue in the basic_render method. At the time I worked on > RESTstop I had done the minimum needed to make it work with the new version > of Camping. And when Tilt support was added I did not fully retrofit the > code to make it work with Tilt templates. Problem corrected! > Thanks David for helping us make the implementation more robust. > > I have also published a new 0.5.3 version of the gem. > > Philippe (@techarch) > > On 7/6/2010 10:07 PM, Philippe Monnet wrote: > > Hi David, I will look into this (probably this week-end though) - as I > actually did not try Tilt at the same time as RESTstop. > > On 7/6/2010 7:45 AM, David Susco wrote: > > Still fooling around with this, no luck yet. Found some other things though. > > It seems I need to fully qualify controllers as arguments for URL and > R methods when using Tilt (this is irrespective of whether I'm using > reststop or not). Is there anything I can do to get around this? > > Also, is there anyway to call partials (markaby or other template > files) from a template file? > > Dave > > On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: > > > I'm trying to use the new Tilt integration with reststop. All the > aliases and whatnot under "Implementing your own service" > (http://wiki.github.com/camping/reststop/) are there and :views has > been set in the options hash. I tried creating sub-directories in the > views directory (html, HTML) but I still couldn't get it to work. > > I can get my haml template to display if I get rid of the alias for > reststop_render. All the other render calls to markaby still work when > I do this too. However, I'm assuming I'm loosing the second argument > for render in reststop when I do this. > > Am I missing some other setting/configuration option to get this to > work with the alias for reststop_render? > > -- > Dave > > > > > > _______________________________________________ > 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 > -- Dave From ruby at monnet-usa.com Thu Jul 8 22:20:04 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Thu, 08 Jul 2010 20:20:04 -0600 Subject: Wiki vs homepage In-Reply-To: References: Message-ID: <4C368754.4020604@monnet-usa.com> Yeah, I agree that it makes sense to have two sites, one to promote Camping and one to serve as the official reference. And a wiki would be very convenient for that. On 7/8/2010 1:55 PM, Magnus Holm wrote: > Hey guys, > > Philippe had some interesting points about the website: > > 1. Keep the home page simple with all content fitting within 1280 x 1024 > 2. Use a catchy design (need some help here) > 3. Accentuate that Camping is about Ruby (maybe also include the ruby > logo somewhere) > 4. Have a brief note about the connection to _why and a link to a page > explaining the history of Camping with further links to _why's other > sites > 5. Encourage people to try it by capitalizing on some of Camping's strengths: > - Fast to learn - requires only basic Ruby skills > - Much simpler than Rails but more structure than Sinatra/Padrino > - Lightning fast and memory efficient allowing fast and efficient sites > - Can evolve from simple file to organized directory structure > - Can layer in more features later using persistence and choice of view engines > 6. How about using some kind of an animated (auto advancing) slideshow > to highlight some of the benefits? See an example at: > http://blog.monnet-usa.com/?p=276 > 7. How about a page on learning with a link to the book as well as a > list of links for other tutorials or short explanations on key topics > (e.g. how to do migrations, how to use include/extend, how to use > different view engines, etc.)? > 8. How about a page about plugins with some brief description of their intent? > 9. I would love for us to include _why's cartoons in some of the sub pages ;-) > > Now, the more I look at this list (and my own thoughts about the new > camping site) I realize that we're talking about two different things: > > * A site to attract new users > * A site to inform regular users > > It looks like my attempt (http://whywentcamping.judofyr.net/) tries to > target the latter, while Philippe targeted the former > (http://rubycamping.monnet-usa.com/). Both sites serves a purpose and > I believe both are equally important. > > -- > > Here's what I propose: We split the site into two parts. We turn what > I've created into a wiki. Everyone are welcome to edit and add their > own content. > > Then we take Philippe's ideas/design/site and turn it into > ruby-camping.com or whywentcamping.com or whatnot. It probably doesn't > need to be more than a single page. > > What'd ya think? > > // 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 Thu Jul 8 22:43:13 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Thu, 08 Jul 2010 20:43:13 -0600 Subject: API documentation good enough? In-Reply-To: References: Message-ID: <4C368CC1.5000306@monnet-usa.com> I think the api doc is pretty decent (I have read it many times) and I like the fact that it is easy to keep up-to-date based on the camping-unabridged.rb file. Also the book is a nice way to get started with Camping. We could then add more books based on more advanced topics like for example: 1. Migrations (past the initial one) 2. Controller filtering 3. Creating Markaby helpers 4. Using Tilt 5. Returning static content 6. Embedding CSS at the end of the file 7. Use of module_eval, extend, include 8. Extending Camping 9. Plugins Philippe (@techarch) On 7/8/2010 1:59 PM, Magnus Holm wrote: > As you might know, I'm not using Camping on a regular basis, so I'm > just wondering if the API documentation > (http://camping.rubyforge.org/api.html) is good enough? > > If not, is it something we can improve by simply updating camping-unbridged.rb? > > If not, do we rather want something like this? > http://www.sinatrarb.com/intro.html > > > // 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 Thu Jul 8 22:54:08 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Thu, 08 Jul 2010 20:54:08 -0600 Subject: using reststop with tilt In-Reply-To: References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> Message-ID: <4C368F50.7030502@monnet-usa.com> David, If you're using Tilt, to make partials work in ERB or HAML you would need to explicitly call render with the name of the partial. So for example, in ERB: <%=render "_mypartial" %> Philippe (@techarch) On 7/8/2010 2:19 PM, David Susco wrote: > Thanks Philippe, it's working great. > > Has anyone gotten partials to work with Tilt? > > Dave > > On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: > >> I fixed the issue in the basic_render method. At the time I worked on >> RESTstop I had done the minimum needed to make it work with the new version >> of Camping. And when Tilt support was added I did not fully retrofit the >> code to make it work with Tilt templates. Problem corrected! >> Thanks David for helping us make the implementation more robust. >> >> I have also published a new 0.5.3 version of the gem. >> >> Philippe (@techarch) >> >> On 7/6/2010 10:07 PM, Philippe Monnet wrote: >> >> Hi David, I will look into this (probably this week-end though) - as I >> actually did not try Tilt at the same time as RESTstop. >> >> On 7/6/2010 7:45 AM, David Susco wrote: >> >> Still fooling around with this, no luck yet. Found some other things though. >> >> It seems I need to fully qualify controllers as arguments for URL and >> R methods when using Tilt (this is irrespective of whether I'm using >> reststop or not). Is there anything I can do to get around this? >> >> Also, is there anyway to call partials (markaby or other template >> files) from a template file? >> >> Dave >> >> On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: >> >> >> I'm trying to use the new Tilt integration with reststop. All the >> aliases and whatnot under "Implementing your own service" >> (http://wiki.github.com/camping/reststop/) are there and :views has >> been set in the options hash. I tried creating sub-directories in the >> views directory (html, HTML) but I still couldn't get it to work. >> >> I can get my haml template to display if I get rid of the alias for >> reststop_render. All the other render calls to markaby still work when >> I do this too. However, I'm assuming I'm loosing the second argument >> for render in reststop when I do this. >> >> Am I missing some other setting/configuration option to get this to >> work with the alias for reststop_render? >> >> -- >> Dave >> >> >> >> >> >> _______________________________________________ >> 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 dsusco at gmail.com Fri Jul 9 09:10:36 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 9 Jul 2010 09:10:36 -0400 Subject: using reststop with tilt In-Reply-To: <4C368F50.7030502@monnet-usa.com> References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> Message-ID: Arg, I new it would be something simple. Thanks. Dave On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet wrote: > David, > > If you're using Tilt, to make partials work in ERB or HAML you would need to > explicitly call render with the name of the partial. So for example, in ERB: > ??? <%=render "_mypartial" %> > > Philippe (@techarch) > > On 7/8/2010 2:19 PM, David Susco wrote: > > Thanks Philippe, it's working great. > > Has anyone gotten partials to work with Tilt? > > Dave > > On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: > > > I fixed the issue in the basic_render method. At the time I worked on > RESTstop I had done the minimum needed to make it work with the new version > of Camping. And when Tilt support was added I did not fully retrofit the > code to make it work with Tilt templates. Problem corrected! > Thanks David for helping us make the implementation more robust. > > I have also published a new 0.5.3 version of the gem. > > Philippe (@techarch) > > On 7/6/2010 10:07 PM, Philippe Monnet wrote: > > Hi David, I will look into this (probably this week-end though) - as I > actually did not try Tilt at the same time as RESTstop. > > On 7/6/2010 7:45 AM, David Susco wrote: > > Still fooling around with this, no luck yet. Found some other things though. > > It seems I need to fully qualify controllers as arguments for URL and > R methods when using Tilt (this is irrespective of whether I'm using > reststop or not). Is there anything I can do to get around this? > > Also, is there anyway to call partials (markaby or other template > files) from a template file? > > Dave > > On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: > > > I'm trying to use the new Tilt integration with reststop. All the > aliases and whatnot under "Implementing your own service" > (http://wiki.github.com/camping/reststop/) are there and :views has > been set in the options hash. I tried creating sub-directories in the > views directory (html, HTML) but I still couldn't get it to work. > > I can get my haml template to display if I get rid of the alias for > reststop_render. All the other render calls to markaby still work when > I do this too. However, I'm assuming I'm loosing the second argument > for render in reststop when I do this. > > Am I missing some other setting/configuration option to get this to > work with the alias for reststop_render? > > -- > Dave > > > > > > _______________________________________________ > 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 > -- Dave From dsusco at gmail.com Fri Jul 9 11:14:00 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 9 Jul 2010 11:14:00 -0400 Subject: using reststop with tilt In-Reply-To: References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> Message-ID: FYI, when not using reststop, calling render :_some_partial from a template will automatically wrap the partial in the layout. I think this is because the render method automatically wraps a view in the layout if the layout exists, rather than checking if the first character is an underscore and then wrapping the view in the layout if this is not the case (like the basic_render method from reststop). Another thing that is not possibly when using Tilt (whether using reststop or not) is calling a partial that takes arguments. For instance, I have a Markaby partial for a button: def _button href, text='Cancel' a.button text, :href=>href end I can call that from other Markaby views with: _button R(SomeController), 'Some Controller' But I can't call render on that method because the camping lookup method will try to turn the entire render argument into a symbol. It's trying to lookup a method "_button R(SomeController), 'Some Controller'" rather than a method "_button" with the arguments "R(SomeController), 'Some Controller'". Hopefully that was clear enough. Dave On Fri, Jul 9, 2010 at 9:10 AM, David Susco wrote: > Arg, I new it would be something simple. Thanks. > > Dave > > On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet wrote: >> David, >> >> If you're using Tilt, to make partials work in ERB or HAML you would need to >> explicitly call render with the name of the partial. So for example, in ERB: >> ??? <%=render "_mypartial" %> >> >> Philippe (@techarch) >> >> On 7/8/2010 2:19 PM, David Susco wrote: >> >> Thanks Philippe, it's working great. >> >> Has anyone gotten partials to work with Tilt? >> >> Dave >> >> On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: >> >> >> I fixed the issue in the basic_render method. At the time I worked on >> RESTstop I had done the minimum needed to make it work with the new version >> of Camping. And when Tilt support was added I did not fully retrofit the >> code to make it work with Tilt templates. Problem corrected! >> Thanks David for helping us make the implementation more robust. >> >> I have also published a new 0.5.3 version of the gem. >> >> Philippe (@techarch) >> >> On 7/6/2010 10:07 PM, Philippe Monnet wrote: >> >> Hi David, I will look into this (probably this week-end though) - as I >> actually did not try Tilt at the same time as RESTstop. >> >> On 7/6/2010 7:45 AM, David Susco wrote: >> >> Still fooling around with this, no luck yet. Found some other things though. >> >> It seems I need to fully qualify controllers as arguments for URL and >> R methods when using Tilt (this is irrespective of whether I'm using >> reststop or not). Is there anything I can do to get around this? >> >> Also, is there anyway to call partials (markaby or other template >> files) from a template file? >> >> Dave >> >> On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: >> >> >> I'm trying to use the new Tilt integration with reststop. All the >> aliases and whatnot under "Implementing your own service" >> (http://wiki.github.com/camping/reststop/) are there and :views has >> been set in the options hash. I tried creating sub-directories in the >> views directory (html, HTML) but I still couldn't get it to work. >> >> I can get my haml template to display if I get rid of the alias for >> reststop_render. All the other render calls to markaby still work when >> I do this too. However, I'm assuming I'm loosing the second argument >> for render in reststop when I do this. >> >> Am I missing some other setting/configuration option to get this to >> work with the alias for reststop_render? >> >> -- >> Dave >> >> >> >> >> >> _______________________________________________ >> 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 >> > > > > -- > Dave > -- Dave From dsusco at gmail.com Fri Jul 9 11:18:41 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 9 Jul 2010 11:18:41 -0400 Subject: Wiki vs homepage In-Reply-To: <4C368754.4020604@monnet-usa.com> References: <4C368754.4020604@monnet-usa.com> Message-ID: I agree to the separation as well. A site that introduces camping with a simple example/tutorial and that links to a wiki (with more advanced stuff) and the mailing list is a good way to go about it. Dave On Thu, Jul 8, 2010 at 10:20 PM, Philippe Monnet wrote: > Yeah, I agree that it makes sense to have two sites, one to promote Camping > and one to serve as the official reference. And a wiki would be very > convenient for that. > > On 7/8/2010 1:55 PM, Magnus Holm wrote: > > Hey guys, > > Philippe had some interesting points about the website: > > 1. Keep the home page simple with all content fitting within 1280 x 1024 > 2. Use a catchy design (need some help here) > 3. Accentuate that Camping is about Ruby (maybe also include the ruby > logo somewhere) > 4. Have a brief note about the connection to _why and a link to a page > explaining the history of Camping with further links to _why's other > sites > 5. Encourage people to try it by capitalizing on some of Camping's > strengths: > - Fast to learn - requires only basic Ruby skills > - Much simpler than Rails but more structure than Sinatra/Padrino > - Lightning fast and memory efficient allowing fast and efficient sites > - Can evolve from simple file to organized directory structure > - Can layer in more features later using persistence and choice of view > engines > 6. How about using some kind of an animated (auto advancing) slideshow > to highlight some of the benefits? See an example at: > http://blog.monnet-usa.com/?p=276 > 7. How about a page on learning with a link to the book as well as a > list of links for other tutorials or short explanations on key topics > (e.g. how to do migrations, how to use include/extend, how to use > different view engines, etc.)? > 8. How about a page about plugins with some brief description of their > intent? > 9. I would love for us to include _why's cartoons in some of the sub pages > ;-) > > Now, the more I look at this list (and my own thoughts about the new > camping site) I realize that we're talking about two different things: > > * A site to attract new users > * A site to inform regular users > > It looks like my attempt (http://whywentcamping.judofyr.net/) tries to > target the latter, while Philippe targeted the former > (http://rubycamping.monnet-usa.com/). Both sites serves a purpose and > I believe both are equally important. > > -- > > Here's what I propose: We split the site into two parts. We turn what > I've created into a wiki. Everyone are welcome to edit and add their > own content. > > Then we take Philippe's ideas/design/site and turn it into > ruby-camping.com or whywentcamping.com or whatnot. It probably doesn't > need to be more than a single page. > > What'd ya think? > > // Magnus Holm > _______________________________________________ > 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 > -- Dave From ruby at monnet-usa.com Fri Jul 9 12:09:29 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Fri, 09 Jul 2010 10:09:29 -0600 Subject: using reststop with tilt In-Reply-To: References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> Message-ID: <4C3749B9.8070600@monnet-usa.com> For issue #1: I think I added the change on line 166( when committing my last changes for gem 0.5.3) to check for partials in the normal flow of restop_render. Could you verify you have the latest? For issue #2: what does your <%=render ... %> code looks like? Is only the name of the partial inside the quotes (e.g. <%=render "_mypartial" 123 'arg2' %> )? If so the Camping render should be only performing the lookup on the partial name (the v argument) and send the other arguments along. On 7/9/2010 9:14 AM, David Susco wrote: > FYI, when not using reststop, calling render :_some_partial from a > template will automatically wrap the partial in the layout. > > I think this is because the render method automatically wraps a view > in the layout if the layout exists, rather than checking if the first > character is an underscore and then wrapping the view in the layout if > this is not the case (like the basic_render method from reststop). > > Another thing that is not possibly when using Tilt (whether using > reststop or not) is calling a partial that takes arguments. For > instance, I have a Markaby partial for a button: > > def _button href, text='Cancel' > a.button text, :href=>href > end > > I can call that from other Markaby views with: > > _button R(SomeController), 'Some Controller' > > But I can't call render on that method because the camping lookup > method will try to turn the entire render argument into a symbol. It's > trying to lookup a method "_button R(SomeController), 'Some > Controller'" rather than a method "_button" with the arguments > "R(SomeController), 'Some Controller'". > > Hopefully that was clear enough. > > Dave > > On Fri, Jul 9, 2010 at 9:10 AM, David Susco wrote: > >> Arg, I new it would be something simple. Thanks. >> >> Dave >> >> On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet wrote: >> >>> David, >>> >>> If you're using Tilt, to make partials work in ERB or HAML you would need to >>> explicitly call render with the name of the partial. So for example, in ERB: >>> <%=render "_mypartial" %> >>> >>> Philippe (@techarch) >>> >>> On 7/8/2010 2:19 PM, David Susco wrote: >>> >>> Thanks Philippe, it's working great. >>> >>> Has anyone gotten partials to work with Tilt? >>> >>> Dave >>> >>> On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: >>> >>> >>> I fixed the issue in the basic_render method. At the time I worked on >>> RESTstop I had done the minimum needed to make it work with the new version >>> of Camping. And when Tilt support was added I did not fully retrofit the >>> code to make it work with Tilt templates. Problem corrected! >>> Thanks David for helping us make the implementation more robust. >>> >>> I have also published a new 0.5.3 version of the gem. >>> >>> Philippe (@techarch) >>> >>> On 7/6/2010 10:07 PM, Philippe Monnet wrote: >>> >>> Hi David, I will look into this (probably this week-end though) - as I >>> actually did not try Tilt at the same time as RESTstop. >>> >>> On 7/6/2010 7:45 AM, David Susco wrote: >>> >>> Still fooling around with this, no luck yet. Found some other things though. >>> >>> It seems I need to fully qualify controllers as arguments for URL and >>> R methods when using Tilt (this is irrespective of whether I'm using >>> reststop or not). Is there anything I can do to get around this? >>> >>> Also, is there anyway to call partials (markaby or other template >>> files) from a template file? >>> >>> Dave >>> >>> On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: >>> >>> >>> I'm trying to use the new Tilt integration with reststop. All the >>> aliases and whatnot under "Implementing your own service" >>> (http://wiki.github.com/camping/reststop/) are there and :views has >>> been set in the options hash. I tried creating sub-directories in the >>> views directory (html, HTML) but I still couldn't get it to work. >>> >>> I can get my haml template to display if I get rid of the alias for >>> reststop_render. All the other render calls to markaby still work when >>> I do this too. However, I'm assuming I'm loosing the second argument >>> for render in reststop when I do this. >>> >>> Am I missing some other setting/configuration option to get this to >>> work with the alias for reststop_render? >>> >>> -- >>> Dave >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> >> >> >> -- >> Dave >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsusco at gmail.com Fri Jul 9 13:12:45 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 9 Jul 2010 13:12:45 -0400 Subject: using reststop with tilt In-Reply-To: <4C3749B9.8070600@monnet-usa.com> References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> <4C3749B9.8070600@monnet-usa.com> Message-ID: I do have the latest reststop gem, but the problem occurs when I'm *not* using reststop. The regular camping render method does not check for the _, where as the reststop render does. Line 166 is reststop is working, but there's no equivalent logic (that I can see) in camping render. I've tried calling partials in haml like this without any luck: =render :_button R(SomeController) 'Some Controller' =render "_button" R(SomeController) 'Some Controller' Dave On Fri, Jul 9, 2010 at 12:09 PM, Philippe Monnet wrote: > For issue #1: I think I added the change? on line 166( when committing my > last changes for gem 0.5.3) to check for partials in the normal flow of > restop_render. Could you verify you have the latest? > > For issue #2: what does your <%=render ... %> code looks like? > Is only the name of the partial inside the quotes (e.g. <%=render > "_mypartial" 123 'arg2' %> )? If so the Camping render should be only > performing the lookup on the partial name (the v argument) and send the > other arguments along. > > On 7/9/2010 9:14 AM, David Susco wrote: > > FYI, when not using reststop, calling render :_some_partial from a > template will automatically wrap the partial in the layout. > > I think this is because the render method automatically wraps a view > in the layout if the layout exists, rather than checking if the first > character is an underscore and then wrapping the view in the layout if > this is not the case (like the basic_render method from reststop). > > Another thing that is not possibly when using Tilt (whether using > reststop or not) is calling a partial that takes arguments. For > instance, I have a Markaby partial for a button: > > def _button href, text='Cancel' > a.button text, :href=>href > end > > I can call that from other Markaby views with: > > _button R(SomeController), 'Some Controller' > > But I can't call render on that method because the camping lookup > method will try to turn the entire render argument into a symbol. It's > trying to lookup a method "_button R(SomeController), 'Some > Controller'" rather than a method "_button" with the arguments > "R(SomeController), 'Some Controller'". > > Hopefully that was clear enough. > > Dave > > On Fri, Jul 9, 2010 at 9:10 AM, David Susco wrote: > > > Arg, I new it would be something simple. Thanks. > > Dave > > On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet > wrote: > > > David, > > If you're using Tilt, to make partials work in ERB or HAML you would need to > explicitly call render with the name of the partial. So for example, in ERB: > ??? <%=render "_mypartial" %> > > Philippe (@techarch) > > On 7/8/2010 2:19 PM, David Susco wrote: > > Thanks Philippe, it's working great. > > Has anyone gotten partials to work with Tilt? > > Dave > > On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: > > > I fixed the issue in the basic_render method. At the time I worked on > RESTstop I had done the minimum needed to make it work with the new version > of Camping. And when Tilt support was added I did not fully retrofit the > code to make it work with Tilt templates. Problem corrected! > Thanks David for helping us make the implementation more robust. > > I have also published a new 0.5.3 version of the gem. > > Philippe (@techarch) > > On 7/6/2010 10:07 PM, Philippe Monnet wrote: > > Hi David, I will look into this (probably this week-end though) - as I > actually did not try Tilt at the same time as RESTstop. > > On 7/6/2010 7:45 AM, David Susco wrote: > > Still fooling around with this, no luck yet. Found some other things though. > > It seems I need to fully qualify controllers as arguments for URL and > R methods when using Tilt (this is irrespective of whether I'm using > reststop or not). Is there anything I can do to get around this? > > Also, is there anyway to call partials (markaby or other template > files) from a template file? > > Dave > > On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: > > > I'm trying to use the new Tilt integration with reststop. All the > aliases and whatnot under "Implementing your own service" > (http://wiki.github.com/camping/reststop/) are there and :views has > been set in the options hash. I tried creating sub-directories in the > views directory (html, HTML) but I still couldn't get it to work. > > I can get my haml template to display if I get rid of the alias for > reststop_render. All the other render calls to markaby still work when > I do this too. However, I'm assuming I'm loosing the second argument > for render in reststop when I do this. > > Am I missing some other setting/configuration option to get this to > work with the alias for reststop_render? > > -- > Dave > > > > > > _______________________________________________ > 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 > > > > -- > Dave > > > > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Dave From judofyr at gmail.com Fri Jul 9 16:20:02 2010 From: judofyr at gmail.com (Magnus Holm) Date: Fri, 9 Jul 2010 22:20:02 +0200 Subject: using reststop with tilt In-Reply-To: References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> <4C3749B9.8070600@monnet-usa.com> Message-ID: Should we apply a patch like this? diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb index 636ad6f..f3195b3 100644 --- a/lib/camping-unabridged.rb +++ b/lib/camping-unabridged.rb @@ -272,7 +272,7 @@ module Camping def render(v, o={}, &b) if t = lookup(v) s = (t == true) ? mab{ send(v, &b) } : t.render(self, o[:locals] || {}, &b) - s = render(L, o.merge(L => false)) { s } if o[L] != false && lookup(L) + s = render(L, o.merge(L => false)) { s } if v.to_s[0] != ?_ && o[L] != false && lookup(L) s else raise "Can't find template #{v}" Also, currently you can pass arguments to `render`. What about this? diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb index 636ad6f..c262757 100644 --- a/lib/camping-unabridged.rb +++ b/lib/camping-unabridged.rb @@ -269,9 +269,10 @@ module Camping # end # end # - def render(v, o={}, &b) + def render(v, *a, &b) if t = lookup(v) - s = (t == true) ? mab{ send(v, &b) } : t.render(self, o[:locals] || {}, &b) + o = a[0] || {} + s = (t == true) ? mab{ send(v, *a, &b) } : t.render(self, o[:locals] || {}, &b) s = render(L, o.merge(L => false)) { s } if o[L] != false && lookup(L) s else // Magnus Holm On Fri, Jul 9, 2010 at 19:12, David Susco wrote: > I do have the latest reststop gem, but the problem occurs when I'm > *not* using reststop. The regular camping render method does not check > for the _, where as the reststop render does. Line 166 is reststop is > working, but there's no equivalent logic (that I can see) in camping > render. > > I've tried calling partials in haml like this without any luck: > > =render :_button R(SomeController) 'Some Controller' > =render "_button" R(SomeController) 'Some Controller' > > Dave > > On Fri, Jul 9, 2010 at 12:09 PM, Philippe Monnet wrote: >> For issue #1: I think I added the change? on line 166( when committing my >> last changes for gem 0.5.3) to check for partials in the normal flow of >> restop_render. Could you verify you have the latest? >> >> For issue #2: what does your <%=render ... %> code looks like? >> Is only the name of the partial inside the quotes (e.g. <%=render >> "_mypartial" 123 'arg2' %> )? If so the Camping render should be only >> performing the lookup on the partial name (the v argument) and send the >> other arguments along. >> >> On 7/9/2010 9:14 AM, David Susco wrote: >> >> FYI, when not using reststop, calling render :_some_partial from a >> template will automatically wrap the partial in the layout. >> >> I think this is because the render method automatically wraps a view >> in the layout if the layout exists, rather than checking if the first >> character is an underscore and then wrapping the view in the layout if >> this is not the case (like the basic_render method from reststop). >> >> Another thing that is not possibly when using Tilt (whether using >> reststop or not) is calling a partial that takes arguments. For >> instance, I have a Markaby partial for a button: >> >> ? def _button href, text='Cancel' >> ? ? a.button text, :href=>href >> ? end >> >> I can call that from other Markaby views with: >> >> _button R(SomeController), 'Some Controller' >> >> But I can't call render on that method because the camping lookup >> method will try to turn the entire render argument into a symbol. It's >> trying to lookup a method "_button R(SomeController), 'Some >> Controller'" rather than a method "_button" with the arguments >> "R(SomeController), 'Some Controller'". >> >> Hopefully that was clear enough. >> >> Dave >> >> On Fri, Jul 9, 2010 at 9:10 AM, David Susco wrote: >> >> >> Arg, I new it would be something simple. Thanks. >> >> Dave >> >> On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet >> wrote: >> >> >> David, >> >> If you're using Tilt, to make partials work in ERB or HAML you would need to >> explicitly call render with the name of the partial. So for example, in ERB: >> ??? <%=render "_mypartial" %> >> >> Philippe (@techarch) >> >> On 7/8/2010 2:19 PM, David Susco wrote: >> >> Thanks Philippe, it's working great. >> >> Has anyone gotten partials to work with Tilt? >> >> Dave >> >> On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: >> >> >> I fixed the issue in the basic_render method. At the time I worked on >> RESTstop I had done the minimum needed to make it work with the new version >> of Camping. And when Tilt support was added I did not fully retrofit the >> code to make it work with Tilt templates. Problem corrected! >> Thanks David for helping us make the implementation more robust. >> >> I have also published a new 0.5.3 version of the gem. >> >> Philippe (@techarch) >> >> On 7/6/2010 10:07 PM, Philippe Monnet wrote: >> >> Hi David, I will look into this (probably this week-end though) - as I >> actually did not try Tilt at the same time as RESTstop. >> >> On 7/6/2010 7:45 AM, David Susco wrote: >> >> Still fooling around with this, no luck yet. Found some other things though. >> >> It seems I need to fully qualify controllers as arguments for URL and >> R methods when using Tilt (this is irrespective of whether I'm using >> reststop or not). Is there anything I can do to get around this? >> >> Also, is there anyway to call partials (markaby or other template >> files) from a template file? >> >> Dave >> >> On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: >> >> >> I'm trying to use the new Tilt integration with reststop. All the >> aliases and whatnot under "Implementing your own service" >> (http://wiki.github.com/camping/reststop/) are there and :views has >> been set in the options hash. I tried creating sub-directories in the >> views directory (html, HTML) but I still couldn't get it to work. >> >> I can get my haml template to display if I get rid of the alias for >> reststop_render. All the other render calls to markaby still work when >> I do this too. However, I'm assuming I'm loosing the second argument >> for render in reststop when I do this. >> >> Am I missing some other setting/configuration option to get this to >> work with the alias for reststop_render? >> >> -- >> Dave >> >> >> >> >> >> _______________________________________________ >> 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 >> >> >> >> -- >> Dave >> >> >> >> >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > > > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From ruby at monnet-usa.com Fri Jul 9 17:30:54 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Fri, 09 Jul 2010 15:30:54 -0600 Subject: using reststop with tilt In-Reply-To: References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> <4C3749B9.8070600@monnet-usa.com> Message-ID: <4C37950E.2090103@monnet-usa.com> Yes I think the first patch makes sense to filter out partials from the process of applying the layout. For the second patch now I get why Dave's parameters were not being used. So now your change would send *a . Cool. Dave do you want to try that out? And then Magnus can go ahead and apply it and maybe also to update the official gem. On 7/9/2010 2:20 PM, Magnus Holm wrote: > Should we apply a patch like this? > > diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb > index 636ad6f..f3195b3 100644 > --- a/lib/camping-unabridged.rb > +++ b/lib/camping-unabridged.rb > @@ -272,7 +272,7 @@ module Camping > def render(v, o={},&b) > if t = lookup(v) > s = (t == true) ? mab{ send(v,&b) } : t.render(self, > o[:locals] || {},&b) > - s = render(L, o.merge(L => false)) { s } if o[L] != false&& lookup(L) > + s = render(L, o.merge(L => false)) { s } if v.to_s[0] != ?_ > && o[L] != false&& lookup(L) > s > else > raise "Can't find template #{v}" > > Also, currently you can pass arguments to `render`. What about this? > > diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb > index 636ad6f..c262757 100644 > --- a/lib/camping-unabridged.rb > +++ b/lib/camping-unabridged.rb > @@ -269,9 +269,10 @@ module Camping > # end > # end > # > - def render(v, o={},&b) > + def render(v, *a,&b) > if t = lookup(v) > - s = (t == true) ? mab{ send(v,&b) } : t.render(self, > o[:locals] || {},&b) > + o = a[0] || {} > + s = (t == true) ? mab{ send(v, *a,&b) } : t.render(self, > o[:locals] || {},&b) > s = render(L, o.merge(L => false)) { s } if o[L] != false&& lookup(L) > s > else > > > // Magnus Holm > > > > On Fri, Jul 9, 2010 at 19:12, David Susco wrote: > >> I do have the latest reststop gem, but the problem occurs when I'm >> *not* using reststop. The regular camping render method does not check >> for the _, where as the reststop render does. Line 166 is reststop is >> working, but there's no equivalent logic (that I can see) in camping >> render. >> >> I've tried calling partials in haml like this without any luck: >> >> =render :_button R(SomeController) 'Some Controller' >> =render "_button" R(SomeController) 'Some Controller' >> >> Dave >> >> On Fri, Jul 9, 2010 at 12:09 PM, Philippe Monnet wrote: >> >>> For issue #1: I think I added the change on line 166( when committing my >>> last changes for gem 0.5.3) to check for partials in the normal flow of >>> restop_render. Could you verify you have the latest? >>> >>> For issue #2: what does your<%=render ... %> code looks like? >>> Is only the name of the partial inside the quotes (e.g.<%=render >>> "_mypartial" 123 'arg2' %> )? If so the Camping render should be only >>> performing the lookup on the partial name (the v argument) and send the >>> other arguments along. >>> >>> On 7/9/2010 9:14 AM, David Susco wrote: >>> >>> FYI, when not using reststop, calling render :_some_partial from a >>> template will automatically wrap the partial in the layout. >>> >>> I think this is because the render method automatically wraps a view >>> in the layout if the layout exists, rather than checking if the first >>> character is an underscore and then wrapping the view in the layout if >>> this is not the case (like the basic_render method from reststop). >>> >>> Another thing that is not possibly when using Tilt (whether using >>> reststop or not) is calling a partial that takes arguments. For >>> instance, I have a Markaby partial for a button: >>> >>> def _button href, text='Cancel' >>> a.button text, :href=>href >>> end >>> >>> I can call that from other Markaby views with: >>> >>> _button R(SomeController), 'Some Controller' >>> >>> But I can't call render on that method because the camping lookup >>> method will try to turn the entire render argument into a symbol. It's >>> trying to lookup a method "_button R(SomeController), 'Some >>> Controller'" rather than a method "_button" with the arguments >>> "R(SomeController), 'Some Controller'". >>> >>> Hopefully that was clear enough. >>> >>> Dave >>> >>> On Fri, Jul 9, 2010 at 9:10 AM, David Susco wrote: >>> >>> >>> Arg, I new it would be something simple. Thanks. >>> >>> Dave >>> >>> On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet >>> wrote: >>> >>> >>> David, >>> >>> If you're using Tilt, to make partials work in ERB or HAML you would need to >>> explicitly call render with the name of the partial. So for example, in ERB: >>> <%=render "_mypartial" %> >>> >>> Philippe (@techarch) >>> >>> On 7/8/2010 2:19 PM, David Susco wrote: >>> >>> Thanks Philippe, it's working great. >>> >>> Has anyone gotten partials to work with Tilt? >>> >>> Dave >>> >>> On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: >>> >>> >>> I fixed the issue in the basic_render method. At the time I worked on >>> RESTstop I had done the minimum needed to make it work with the new version >>> of Camping. And when Tilt support was added I did not fully retrofit the >>> code to make it work with Tilt templates. Problem corrected! >>> Thanks David for helping us make the implementation more robust. >>> >>> I have also published a new 0.5.3 version of the gem. >>> >>> Philippe (@techarch) >>> >>> On 7/6/2010 10:07 PM, Philippe Monnet wrote: >>> >>> Hi David, I will look into this (probably this week-end though) - as I >>> actually did not try Tilt at the same time as RESTstop. >>> >>> On 7/6/2010 7:45 AM, David Susco wrote: >>> >>> Still fooling around with this, no luck yet. Found some other things though. >>> >>> It seems I need to fully qualify controllers as arguments for URL and >>> R methods when using Tilt (this is irrespective of whether I'm using >>> reststop or not). Is there anything I can do to get around this? >>> >>> Also, is there anyway to call partials (markaby or other template >>> files) from a template file? >>> >>> Dave >>> >>> On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: >>> >>> >>> I'm trying to use the new Tilt integration with reststop. All the >>> aliases and whatnot under "Implementing your own service" >>> (http://wiki.github.com/camping/reststop/) are there and :views has >>> been set in the options hash. I tried creating sub-directories in the >>> views directory (html, HTML) but I still couldn't get it to work. >>> >>> I can get my haml template to display if I get rid of the alias for >>> reststop_render. All the other render calls to markaby still work when >>> I do this too. However, I'm assuming I'm loosing the second argument >>> for render in reststop when I do this. >>> >>> Am I missing some other setting/configuration option to get this to >>> work with the alias for reststop_render? >>> >>> -- >>> Dave >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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 >>> >>> >>> >>> -- >>> Dave >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Camping-list mailing list >>> Camping-list at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/camping-list >>> >>> >> >> >> -- >> Dave >> _______________________________________________ >> 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 dsusco at gmail.com Fri Jul 9 21:47:36 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 9 Jul 2010 21:47:36 -0400 Subject: using reststop with tilt In-Reply-To: <4C37950E.2090103@monnet-usa.com> References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> <4C3749B9.8070600@monnet-usa.com> <4C37950E.2090103@monnet-usa.com> Message-ID: Thanks Magnus, those changes make sense to me. I can test them out no problem, just not until Monday. I'll send out another e-mail then. Thanks, Dave On Fri, Jul 9, 2010 at 5:30 PM, Philippe Monnet wrote: > Yes I think the first patch makes sense to filter out partials from the > process of applying the layout. > For the second patch now I get why Dave's parameters were not being used. So > now your change would send *a . Cool. > Dave do you want to try that out? > And then Magnus can go ahead and apply it and maybe also to update the > official gem. > > On 7/9/2010 2:20 PM, Magnus Holm wrote: > > Should we apply a patch like this? > > diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb > index 636ad6f..f3195b3 100644 > --- a/lib/camping-unabridged.rb > +++ b/lib/camping-unabridged.rb > @@ -272,7 +272,7 @@ module Camping > def render(v, o={}, &b) > if t = lookup(v) > s = (t == true) ? mab{ send(v, &b) } : t.render(self, > o[:locals] || {}, &b) > - s = render(L, o.merge(L => false)) { s } if o[L] != false && > lookup(L) > + s = render(L, o.merge(L => false)) { s } if v.to_s[0] != ?_ > && o[L] != false && lookup(L) > s > else > raise "Can't find template #{v}" > > Also, currently you can pass arguments to `render`. What about this? > > diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb > index 636ad6f..c262757 100644 > --- a/lib/camping-unabridged.rb > +++ b/lib/camping-unabridged.rb > @@ -269,9 +269,10 @@ module Camping > # end > # end > # > - def render(v, o={}, &b) > + def render(v, *a, &b) > if t = lookup(v) > - s = (t == true) ? mab{ send(v, &b) } : t.render(self, > o[:locals] || {}, &b) > + o = a[0] || {} > + s = (t == true) ? mab{ send(v, *a, &b) } : t.render(self, > o[:locals] || {}, &b) > s = render(L, o.merge(L => false)) { s } if o[L] != false && > lookup(L) > s > else > > > // Magnus Holm > > > > On Fri, Jul 9, 2010 at 19:12, David Susco wrote: > > > I do have the latest reststop gem, but the problem occurs when I'm > *not* using reststop. The regular camping render method does not check > for the _, where as the reststop render does. Line 166 is reststop is > working, but there's no equivalent logic (that I can see) in camping > render. > > I've tried calling partials in haml like this without any luck: > > =render :_button R(SomeController) 'Some Controller' > =render "_button" R(SomeController) 'Some Controller' > > Dave > > On Fri, Jul 9, 2010 at 12:09 PM, Philippe Monnet > wrote: > > > For issue #1: I think I added the change? on line 166( when committing my > last changes for gem 0.5.3) to check for partials in the normal flow of > restop_render. Could you verify you have the latest? > > For issue #2: what does your <%=render ... %> code looks like? > Is only the name of the partial inside the quotes (e.g. <%=render > "_mypartial" 123 'arg2' %> )? If so the Camping render should be only > performing the lookup on the partial name (the v argument) and send the > other arguments along. > > On 7/9/2010 9:14 AM, David Susco wrote: > > FYI, when not using reststop, calling render :_some_partial from a > template will automatically wrap the partial in the layout. > > I think this is because the render method automatically wraps a view > in the layout if the layout exists, rather than checking if the first > character is an underscore and then wrapping the view in the layout if > this is not the case (like the basic_render method from reststop). > > Another thing that is not possibly when using Tilt (whether using > reststop or not) is calling a partial that takes arguments. For > instance, I have a Markaby partial for a button: > > ? def _button href, text='Cancel' > ? ? a.button text, :href=>href > ? end > > I can call that from other Markaby views with: > > _button R(SomeController), 'Some Controller' > > But I can't call render on that method because the camping lookup > method will try to turn the entire render argument into a symbol. It's > trying to lookup a method "_button R(SomeController), 'Some > Controller'" rather than a method "_button" with the arguments > "R(SomeController), 'Some Controller'". > > Hopefully that was clear enough. > > Dave > > On Fri, Jul 9, 2010 at 9:10 AM, David Susco wrote: > > > Arg, I new it would be something simple. Thanks. > > Dave > > On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet > wrote: > > > David, > > If you're using Tilt, to make partials work in ERB or HAML you would need to > explicitly call render with the name of the partial. So for example, in ERB: > ??? <%=render "_mypartial" %> > > Philippe (@techarch) > > On 7/8/2010 2:19 PM, David Susco wrote: > > Thanks Philippe, it's working great. > > Has anyone gotten partials to work with Tilt? > > Dave > > On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: > > > I fixed the issue in the basic_render method. At the time I worked on > RESTstop I had done the minimum needed to make it work with the new version > of Camping. And when Tilt support was added I did not fully retrofit the > code to make it work with Tilt templates. Problem corrected! > Thanks David for helping us make the implementation more robust. > > I have also published a new 0.5.3 version of the gem. > > Philippe (@techarch) > > On 7/6/2010 10:07 PM, Philippe Monnet wrote: > > Hi David, I will look into this (probably this week-end though) - as I > actually did not try Tilt at the same time as RESTstop. > > On 7/6/2010 7:45 AM, David Susco wrote: > > Still fooling around with this, no luck yet. Found some other things though. > > It seems I need to fully qualify controllers as arguments for URL and > R methods when using Tilt (this is irrespective of whether I'm using > reststop or not). Is there anything I can do to get around this? > > Also, is there anyway to call partials (markaby or other template > files) from a template file? > > Dave > > On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: > > > I'm trying to use the new Tilt integration with reststop. All the > aliases and whatnot under "Implementing your own service" > (http://wiki.github.com/camping/reststop/) are there and :views has > been set in the options hash. I tried creating sub-directories in the > views directory (html, HTML) but I still couldn't get it to work. > > I can get my haml template to display if I get rid of the alias for > reststop_render. All the other render calls to markaby still work when > I do this too. However, I'm assuming I'm loosing the second argument > for render in reststop when I do this. > > Am I missing some other setting/configuration option to get this to > work with the alias for reststop_render? > > -- > Dave > > > > > > _______________________________________________ > 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 > > > > -- > Dave > > > > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > > > -- > Dave > _______________________________________________ > 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 > -- Dave From dsusco at gmail.com Sat Jul 10 08:51:54 2010 From: dsusco at gmail.com (David Susco) Date: Sat, 10 Jul 2010 08:51:54 -0400 Subject: using reststop with tilt In-Reply-To: References: <4C33FD91.2010306@monnet-usa.com> <4C3530AD.5050705@monnet-usa.com> <4C368F50.7030502@monnet-usa.com> <4C3749B9.8070600@monnet-usa.com> <4C37950E.2090103@monnet-usa.com> Message-ID: Got a chance to work on this this morning. First patch worked fine, no problem. The second wasn't working for me until I remembered you need to separate out a method's name as its own argument when passing it to another method. So, from my example above, you need to do this: render :_button, R(SomeController), 'Some Controller' The comma after _button is the key. Anyway, they both worked for me, thanks Magnus. Dave On Fri, Jul 9, 2010 at 9:47 PM, David Susco wrote: > Thanks Magnus, those changes make sense to me. I can test them out no > problem, just not until Monday. I'll send out another e-mail then. > > Thanks, > Dave > > On Fri, Jul 9, 2010 at 5:30 PM, Philippe Monnet wrote: >> Yes I think the first patch makes sense to filter out partials from the >> process of applying the layout. >> For the second patch now I get why Dave's parameters were not being used. So >> now your change would send *a . Cool. >> Dave do you want to try that out? >> And then Magnus can go ahead and apply it and maybe also to update the >> official gem. >> >> On 7/9/2010 2:20 PM, Magnus Holm wrote: >> >> Should we apply a patch like this? >> >> diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb >> index 636ad6f..f3195b3 100644 >> --- a/lib/camping-unabridged.rb >> +++ b/lib/camping-unabridged.rb >> @@ -272,7 +272,7 @@ module Camping >> ? ? ?def render(v, o={}, &b) >> ? ? ? ?if t = lookup(v) >> ? ? ? ? ?s = (t == true) ? mab{ send(v, &b) } : t.render(self, >> o[:locals] || {}, &b) >> - ? ? ? ?s = render(L, o.merge(L => false)) { s } if o[L] != false && >> lookup(L) >> + ? ? ? ?s = render(L, o.merge(L => false)) { s } if v.to_s[0] != ?_ >> && o[L] != false && lookup(L) >> ? ? ? ? ?s >> ? ? ? ?else >> ? ? ? ? ?raise "Can't find template #{v}" >> >> Also, currently you can pass arguments to `render`. What about this? >> >> diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb >> index 636ad6f..c262757 100644 >> --- a/lib/camping-unabridged.rb >> +++ b/lib/camping-unabridged.rb >> @@ -269,9 +269,10 @@ module Camping >> ? ? ?# ? ? end >> ? ? ?# ? end >> ? ? ?# >> - ? ?def render(v, o={}, &b) >> + ? ?def render(v, *a, &b) >> ? ? ? ?if t = lookup(v) >> - ? ? ? ?s = (t == true) ? mab{ send(v, &b) } : t.render(self, >> o[:locals] || {}, &b) >> + ? ? ? ?o = a[0] || {} >> + ? ? ? ?s = (t == true) ? mab{ send(v, *a, &b) } : t.render(self, >> o[:locals] || {}, &b) >> ? ? ? ? ?s = render(L, o.merge(L => false)) { s } if o[L] != false && >> lookup(L) >> ? ? ? ? ?s >> ? ? ? ?else >> >> >> // Magnus Holm >> >> >> >> On Fri, Jul 9, 2010 at 19:12, David Susco wrote: >> >> >> I do have the latest reststop gem, but the problem occurs when I'm >> *not* using reststop. The regular camping render method does not check >> for the _, where as the reststop render does. Line 166 is reststop is >> working, but there's no equivalent logic (that I can see) in camping >> render. >> >> I've tried calling partials in haml like this without any luck: >> >> =render :_button R(SomeController) 'Some Controller' >> =render "_button" R(SomeController) 'Some Controller' >> >> Dave >> >> On Fri, Jul 9, 2010 at 12:09 PM, Philippe Monnet >> wrote: >> >> >> For issue #1: I think I added the change? on line 166( when committing my >> last changes for gem 0.5.3) to check for partials in the normal flow of >> restop_render. Could you verify you have the latest? >> >> For issue #2: what does your <%=render ... %> code looks like? >> Is only the name of the partial inside the quotes (e.g. <%=render >> "_mypartial" 123 'arg2' %> )? If so the Camping render should be only >> performing the lookup on the partial name (the v argument) and send the >> other arguments along. >> >> On 7/9/2010 9:14 AM, David Susco wrote: >> >> FYI, when not using reststop, calling render :_some_partial from a >> template will automatically wrap the partial in the layout. >> >> I think this is because the render method automatically wraps a view >> in the layout if the layout exists, rather than checking if the first >> character is an underscore and then wrapping the view in the layout if >> this is not the case (like the basic_render method from reststop). >> >> Another thing that is not possibly when using Tilt (whether using >> reststop or not) is calling a partial that takes arguments. For >> instance, I have a Markaby partial for a button: >> >> ? def _button href, text='Cancel' >> ? ? a.button text, :href=>href >> ? end >> >> I can call that from other Markaby views with: >> >> _button R(SomeController), 'Some Controller' >> >> But I can't call render on that method because the camping lookup >> method will try to turn the entire render argument into a symbol. It's >> trying to lookup a method "_button R(SomeController), 'Some >> Controller'" rather than a method "_button" with the arguments >> "R(SomeController), 'Some Controller'". >> >> Hopefully that was clear enough. >> >> Dave >> >> On Fri, Jul 9, 2010 at 9:10 AM, David Susco wrote: >> >> >> Arg, I new it would be something simple. Thanks. >> >> Dave >> >> On Thu, Jul 8, 2010 at 10:54 PM, Philippe Monnet >> wrote: >> >> >> David, >> >> If you're using Tilt, to make partials work in ERB or HAML you would need to >> explicitly call render with the name of the partial. So for example, in ERB: >> ??? <%=render "_mypartial" %> >> >> Philippe (@techarch) >> >> On 7/8/2010 2:19 PM, David Susco wrote: >> >> Thanks Philippe, it's working great. >> >> Has anyone gotten partials to work with Tilt? >> >> Dave >> >> On Wed, Jul 7, 2010 at 9:58 PM, Philippe Monnet wrote: >> >> >> I fixed the issue in the basic_render method. At the time I worked on >> RESTstop I had done the minimum needed to make it work with the new version >> of Camping. And when Tilt support was added I did not fully retrofit the >> code to make it work with Tilt templates. Problem corrected! >> Thanks David for helping us make the implementation more robust. >> >> I have also published a new 0.5.3 version of the gem. >> >> Philippe (@techarch) >> >> On 7/6/2010 10:07 PM, Philippe Monnet wrote: >> >> Hi David, I will look into this (probably this week-end though) - as I >> actually did not try Tilt at the same time as RESTstop. >> >> On 7/6/2010 7:45 AM, David Susco wrote: >> >> Still fooling around with this, no luck yet. Found some other things though. >> >> It seems I need to fully qualify controllers as arguments for URL and >> R methods when using Tilt (this is irrespective of whether I'm using >> reststop or not). Is there anything I can do to get around this? >> >> Also, is there anyway to call partials (markaby or other template >> files) from a template file? >> >> Dave >> >> On Wed, Jun 30, 2010 at 9:46 AM, David Susco wrote: >> >> >> I'm trying to use the new Tilt integration with reststop. All the >> aliases and whatnot under "Implementing your own service" >> (http://wiki.github.com/camping/reststop/) are there and :views has >> been set in the options hash. I tried creating sub-directories in the >> views directory (html, HTML) but I still couldn't get it to work. >> >> I can get my haml template to display if I get rid of the alias for >> reststop_render. All the other render calls to markaby still work when >> I do this too. However, I'm assuming I'm loosing the second argument >> for render in reststop when I do this. >> >> Am I missing some other setting/configuration option to get this to >> work with the alias for reststop_render? >> >> -- >> Dave >> >> >> >> >> >> _______________________________________________ >> 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 >> >> >> >> -- >> Dave >> >> >> >> >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> >> >> >> -- >> Dave >> _______________________________________________ >> 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 >> > > > > -- > Dave > -- Dave From blueberry at creativepony.com Tue Jul 13 22:34:36 2010 From: blueberry at creativepony.com (Jenna Fox) Date: Wed, 14 Jul 2010 12:34:36 +1000 Subject: Wiki vs homepage In-Reply-To: References: Message-ID: <30AD14C9-7040-45E3-86DA-9A5F0027F5A4@creativepony.com> I agree wholly on the design front, and would like to contribute cartoony doodles and simple (not Backend Web Developer simple, but Designer Simple) web designs in vaguely _why's quirky fun style, if you guys are up for that. I'm currently rather more focused on Hackety Hack's web stuff, but in a couple of weeks when I get tired of drawing fruit bats and laser-breathing dinosaurs, Maybe camping would be a fun place to doodle? :) If I forget, poke me @Bluebie. @Judofyr - if you want to chat, I am a at creativepony.com on msn/jabber these days. :) Oh, and I don't know what the others think of this idea, but there is some talk of HetyH having a forum in the next refresh of it's website. How would you guys feel about being a part of that? I'm rather fond of the idea of reuniting the old _why community in some common shared space like that, though I'd fully understand if you guys feel it'd be a smelly situation to be a category in another project's forum. Maybe instead - if you guys are pro-forum - there could be a website.. perhaps named something like 'Whyism', a special little cult of _why place for us all to hang out and talk about all his old projects, and our new stuff too. To keep the spirit of it all alive? ? Jenna Fox http://creativepony.com On 09/07/2010, at 5:55 AM, Magnus Holm wrote: > Hey guys, > > Philippe had some interesting points about the website: > > 1. Keep the home page simple with all content fitting within 1280 x 1024 > 2. Use a catchy design (need some help here) > 3. Accentuate that Camping is about Ruby (maybe also include the ruby > logo somewhere) > 4. Have a brief note about the connection to _why and a link to a page > explaining the history of Camping with further links to _why's other > sites > 5. Encourage people to try it by capitalizing on some of Camping's strengths: > - Fast to learn - requires only basic Ruby skills > - Much simpler than Rails but more structure than Sinatra/Padrino > - Lightning fast and memory efficient allowing fast and efficient sites > - Can evolve from simple file to organized directory structure > - Can layer in more features later using persistence and choice of view engines > 6. How about using some kind of an animated (auto advancing) slideshow > to highlight some of the benefits? See an example at: > http://blog.monnet-usa.com/?p=276 > 7. How about a page on learning with a link to the book as well as a > list of links for other tutorials or short explanations on key topics > (e.g. how to do migrations, how to use include/extend, how to use > different view engines, etc.)? > 8. How about a page about plugins with some brief description of their intent? > 9. I would love for us to include _why's cartoons in some of the sub pages ;-) > > Now, the more I look at this list (and my own thoughts about the new > camping site) I realize that we're talking about two different things: > > * A site to attract new users > * A site to inform regular users > > It looks like my attempt (http://whywentcamping.judofyr.net/) tries to > target the latter, while Philippe targeted the former > (http://rubycamping.monnet-usa.com/). Both sites serves a purpose and > I believe both are equally important. > > -- > > Here's what I propose: We split the site into two parts. We turn what > I've created into a wiki. Everyone are welcome to edit and add their > own content. > > Then we take Philippe's ideas/design/site and turn it into > ruby-camping.com or whywentcamping.com or whatnot. It probably doesn't > need to be more than a single page. > > What'd ya think? > > // Magnus Holm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list From blueberry at creativepony.com Tue Jul 13 22:49:22 2010 From: blueberry at creativepony.com (Jenna Fox) Date: Wed, 14 Jul 2010 12:49:22 +1000 Subject: Wiki vs homepage In-Reply-To: References: Message-ID: Another passing thought: It'd be very much in the spirit of freeform fun little hacks if the camping website included a section of user created apps. They would need to be moderated somehow, unless someone were to set up a try-rubyish highly sandboxed environment to run them. It just seems like there'd be no better way to show what Camping is all about than to have it's very own website full of fun little examples of camping apps, with a way to see the source code of each right in there. If you guys had something like that, i'd love to contribute some quirky little multiplayer games, and an extremely simple chat thing. :) What with rack mounts, this should be easy, right? Why did say at art & code that he didn't really care if the code editor part of HetyH was really good - what mattered was the sharing. The forum. The code messaging system. The apps which could talk to each other over the web through the various APIs. That was the important part of hackety hack. I think that's the important part of camping as well. The main reason I use Camping over Sinatra and the likes is the way it feels so warm and fuzzy, and I know if I have any troubles, I get to come talk to all you awesome people. :) If we had the sandboxed thing, it'd be fairly trivial to include a little cli app in the camping gem to upload the app in to a whyism or hetyh or whatever account, where it could sit in a little bin of recent uploads, and be attached to forum posts, or shared out like tinyurls. The most important part of all that is kids. Kids don't have web servers. It's all well and good to have camping ourselves, but if we're to think for one minute that we're helping kids learn ruby (which after all, was _why's mission), we've got to be offering some fairly easy way for them to host this stuff. Does anyone know much about sandboxing? Anyone know if it'd be particularly difficult to do things like monkeypatch the IO class to effectively chroot and secure a camping app? Can we disable `system calls` too? What's involved in making something like that viable? Hosts like Dreamhost seem to already be making use of Passenger to dynamically allocate ruby processes to apps, so they can be booted up when requested and shut down after they idle for a minute. :) ? Jenna Fox http://creativepony.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From blueberry at creativepony.com Wed Jul 14 10:43:21 2010 From: blueberry at creativepony.com (Jenna Fox) Date: Thu, 15 Jul 2010 00:43:21 +1000 Subject: API documentation good enough? In-Reply-To: References: Message-ID: <7832BD0A-92D5-4C11-8B0A-4D4E9EABD08B@creativepony.com> Or maybe a beginners comic, along the lines of the poignant guide? On 09/07/2010, at 5:59 AM, Magnus Holm wrote: > As you might know, I'm not using Camping on a regular basis, so I'm > just wondering if the API documentation > (http://camping.rubyforge.org/api.html) is good enough? > > If not, is it something we can improve by simply updating camping-unbridged.rb? > > If not, do we rather want something like this? > http://www.sinatrarb.com/intro.html > > > // Magnus Holm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list From ruby at monnet-usa.com Sat Jul 17 08:40:16 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sat, 17 Jul 2010 06:40:16 -0600 Subject: Wiki vs homepage In-Reply-To: <30AD14C9-7040-45E3-86DA-9A5F0027F5A4@creativepony.com> References: <30AD14C9-7040-45E3-86DA-9A5F0027F5A4@creativepony.com> Message-ID: <4C41A4B0.50709@monnet-usa.com> Jenna, it would be fun to incorporate your cartoons in both the promo site and the wiki. On 7/13/2010 8:34 PM, Jenna Fox wrote: > I agree wholly on the design front, and would like to contribute cartoony doodles and simple (not Backend Web Developer simple, but Designer Simple) web designs in vaguely _why's quirky fun style, if you guys are up for that. I'm currently rather more focused on Hackety Hack's web stuff, but in a couple of weeks when I get tired of drawing fruit bats and laser-breathing dinosaurs, Maybe camping would be a fun place to doodle? :) > > If I forget, poke me @Bluebie. > > @Judofyr - if you want to chat, I am a at creativepony.com on msn/jabber these days. :) > > Oh, and I don't know what the others think of this idea, but there is some talk of HetyH having a forum in the next refresh of it's website. How would you guys feel about being a part of that? I'm rather fond of the idea of reuniting the old _why community in some common shared space like that, though I'd fully understand if you guys feel it'd be a smelly situation to be a category in another project's forum. > > Maybe instead - if you guys are pro-forum - there could be a website.. perhaps named something like 'Whyism', a special little cult of _why place for us all to hang out and talk about all his old projects, and our new stuff too. To keep the spirit of it all alive? > > ? > Jenna Fox > http://creativepony.com > > On 09/07/2010, at 5:55 AM, Magnus Holm wrote: > > >> Hey guys, >> >> Philippe had some interesting points about the website: >> >> 1. Keep the home page simple with all content fitting within 1280 x 1024 >> 2. Use a catchy design (need some help here) >> 3. Accentuate that Camping is about Ruby (maybe also include the ruby >> logo somewhere) >> 4. Have a brief note about the connection to _why and a link to a page >> explaining the history of Camping with further links to _why's other >> sites >> 5. Encourage people to try it by capitalizing on some of Camping's strengths: >> - Fast to learn - requires only basic Ruby skills >> - Much simpler than Rails but more structure than Sinatra/Padrino >> - Lightning fast and memory efficient allowing fast and efficient sites >> - Can evolve from simple file to organized directory structure >> - Can layer in more features later using persistence and choice of view engines >> 6. How about using some kind of an animated (auto advancing) slideshow >> to highlight some of the benefits? See an example at: >> http://blog.monnet-usa.com/?p=276 >> 7. How about a page on learning with a link to the book as well as a >> list of links for other tutorials or short explanations on key topics >> (e.g. how to do migrations, how to use include/extend, how to use >> different view engines, etc.)? >> 8. How about a page about plugins with some brief description of their intent? >> 9. I would love for us to include _why's cartoons in some of the sub pages ;-) >> >> Now, the more I look at this list (and my own thoughts about the new >> camping site) I realize that we're talking about two different things: >> >> * A site to attract new users >> * A site to inform regular users >> >> It looks like my attempt (http://whywentcamping.judofyr.net/) tries to >> target the latter, while Philippe targeted the former >> (http://rubycamping.monnet-usa.com/). Both sites serves a purpose and >> I believe both are equally important. >> >> -- >> >> Here's what I propose: We split the site into two parts. We turn what >> I've created into a wiki. Everyone are welcome to edit and add their >> own content. >> >> Then we take Philippe's ideas/design/site and turn it into >> ruby-camping.com or whywentcamping.com or whatnot. It probably doesn't >> need to be more than a single page. >> >> What'd ya think? >> >> // Magnus Holm >> _______________________________________________ >> 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 ruby at monnet-usa.com Sat Jul 17 09:05:14 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sat, 17 Jul 2010 07:05:14 -0600 Subject: Wiki vs homepage In-Reply-To: References: Message-ID: <4C41AA8A.7010107@monnet-usa.com> I think having a section off of the promo site (and linked from the wiki too) to showcase simple user-created apps is a great idea as I have not seen that concept on other sites. I believe Magnus is building a TryCamping thing too which would be awesome too. I agree with the fact that making it easier for kids/teens to play with Camping would be fantastic. I am not sure exactly how to make that happen but you are onto something with monkey patching part of Ruby too make it safer / easier to do that. /!\ warning - stream of consciousness coming up ... How about if we used a key-value store (like CouchDB/MongoDB/TokyoCabinet/...) as an application repository? Here is a potential scenario assuming a Camping "enthusiast" already has an app working locally on their box: 1-Enthusiast chooses to create an app in the "CampingGround" / sandbox 2-We create a definition for the app as well as a source file based on an minimal template 3-We store both in the key-value db 4-We mount the app and wire the reloader to look for timestamp changes on the key-value store record 5-Enthusiast uploads the code - saves commit the code changes to the key-value store 6-Enthusiast runs the mounted app Maybe we could convince a host like Heroku to facilitate this. Is this crazy? Any other ideas? -Philippe On 7/13/2010 8:49 PM, Jenna Fox wrote: > Another passing thought: It'd be very much in the spirit of freeform > fun little hacks if the camping website included a section of user > created apps. They would need to be moderated somehow, unless someone > were to set up a try-rubyish highly sandboxed environment to run them. > It just seems like there'd be no better way to show what Camping is > all about than to have it's very own website full of fun little > examples of camping apps, with a way to see the source code of each > right in there. If you guys had something like that, i'd love to > contribute some quirky little multiplayer games, and an extremely > simple chat thing. :) > > What with rack mounts, this should be easy, right? > > Why did say at art & code that he didn't really care if the code > editor part of HetyH was really good - what mattered was the sharing. > The forum. The code messaging system. The apps which could talk to > each other over the web through the various APIs. That was the > important part of hackety hack. I think that's the important part of > camping as well. The main reason I use Camping over Sinatra and the > likes is the way it feels so warm and fuzzy, and I know if I have any > troubles, I get to come talk to all you awesome people. :) > > If we had the sandboxed thing, it'd be fairly trivial to include a > little cli app in the camping gem to upload the app in to a whyism or > hetyh or whatever account, where it could sit in a little bin of > recent uploads, and be attached to forum posts, or shared out like > tinyurls. > > The most important part of all that is kids. Kids don't have web > servers. It's all well and good to have camping ourselves, but if > we're to think for one minute that we're helping kids learn ruby > (which after all, was _why's mission), we've got to be offering some > fairly easy way for them to host this stuff. > > Does anyone know much about sandboxing? Anyone know if it'd be > particularly difficult to do things like monkeypatch the IO class to > effectively chroot and secure a camping app? Can we disable `system > calls` too? What's involved in making something like that viable? > Hosts like Dreamhost seem to already be making use of Passenger to > dynamically allocate ruby processes to apps, so they can be booted up > when requested and shut down after they idle for a minute. :) > > ? > Jenna Fox > http://creativepony.com/ > > > _______________________________________________ > 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 blueberry at creativepony.com Tue Jul 20 00:35:07 2010 From: blueberry at creativepony.com (Jenna Fox) Date: Tue, 20 Jul 2010 14:35:07 +1000 Subject: Wiki vs homepage In-Reply-To: <4C41AA8A.7010107@monnet-usa.com> References: <4C41AA8A.7010107@monnet-usa.com> Message-ID: I love the idea of having Key/Value databases available to camping apps as a standard thing on the platform. They aren't the same thing as a filesystem though, and I don't think we should pretend otherwise. If we don't want to give users filesystem access, that's *fine*, even though I don't see why we shouldn't. What about this - We make a sister project, ForeverHash, which works just like a normal hash except that when you .new it you have to give it a name, like ForeverHash.new(:people), resulting in people.db existing some place in the filesystem. We could have a campers-toolkit gem which would default to using yaml or marshal or whatever to shove that stuff in a file on close, and read it in on launch. When stuff like TokyoCabinet is available, it'd just magically be faster and awesomer. campers-toolkit could have tons of neat little bonus toys like that. Thing is, Heroku is this big scary thing which is all about performance and big deployments and commercialisation and not at all about learning and hacking and making stupid little games and programs that do your math homework for you (that's why I learnt to write basic!). We already have Heroku. We don't need another abstraction to it. Fake filesystem atop a key/value database would be a fun hack, but it'd go crazy with things like the exotic file locks sqlite uses. I propose this: We settle on the idea that we are in fact an awesome bunch and that camping still has that wonderful educational essence of it's beginnings, and that being loosely connected to _why, we already have some weight with educators. There are computer labs full to the brim with boxes doing nearly nothing in schools all around the place! The internet itself was practically born of excessive computing power at universities needing to find something to do with itself! So I propose we stop eating the little scraps of free stuff the capitalist processes that drive services like heroku and dreamhost produce, and really try and pester the educational systems of the world - see if they'll give us a server and plug it in to some pipes to get this idea going. If we can get a dedicated server somewhere, making secured little app hosting is trivial and fun and super easy to do! Web hosting friends inform me that linuxes have no worries at all with hundreds of thousands of user accounts. That's how tryruby worked way back when - it made a new user account when you entered your first command, ran it, and removed the account if it idled out. That's how try ruby was secure! All we need to do is use the same tools shared webhosts have been using for decades, like unix file permissions and apache or ngynix and passenger and chroot and a user account per user or app, and we have a totally viable way to do this. Passenger will run as many processes as each app needs, and shut them down when nobody is using that app. The ruby processes can run under that user's account, and we can automatically apply permissions to the files as they're uploaded and updated. Then we just short out the system/``/chown type commands in the ruby process with a little bootstrap code added to the rackup and we've got it sorted. The tech here is easy and fun. Getting a server to run it on could be tricky - but we have avenues to explore. We NEED to get a good website up with a blog (I suggest a tumblr, because it doesn't cost anything, can have group committers, all the features we need, and it too is connected to the rich heritage of _why :) Then we can put the callout. Once a plan is formed for the tech and the look of the thing, we can get a blog post up explaining the idea and asking for help, and start mailing it around to universities and schools, asking if they have any extra servers they might donate to the cause. Carnegie Mellon physically hosted art && code. Maybe they'd host us too! // Sidebar: Okay, so yaml and marshal would suck as a backend because it'd go crazy without any obvious reason if the user launched multiple processes, as they may well do if using lighttpd. Still, it doesn't have to be *fast*, so maybe there's some sort of compramise to be had? Marshal the values, and store them in some sort of indexy thing, where we could use filesystem locks to keep from writing over eachother, and garbage collect / compress every now and then. That could work really well, and could be nice pure ruby. Mmmm. Is this crazy? Am I a nut for thinking that a simple multiprocess safe key/value store would actually be really easy to do? I've played with the filesystem as a storage medium a fair bit.. it seems like it should be almost trivial! Maybe I should make this right now! On Sat, Jul 17, 2010 at 11:05 PM, Philippe Monnet wrote: > I think having a section off of the promo site (and linked from the wiki > too) to showcase simple user-created apps is a great idea as I have not seen > that concept on other sites. > I believe Magnus is building a TryCamping thing too which would be awesome > too. > > I agree with the fact that making it easier for kids/teens to play with > Camping would be fantastic. > I am not sure exactly how to make that happen but you are onto something > with monkey patching part of Ruby too make it safer / easier to do that. > > /!\ warning - stream of consciousness coming up ... > > How about if we used a key-value store (like > CouchDB/MongoDB/TokyoCabinet/...) as an application repository? Here is a > potential scenario assuming a Camping "enthusiast" already has an app > working locally on their box: > 1-Enthusiast chooses to create an app in the "CampingGround" / sandbox > 2-We create a definition for the app as well as a source file based on an > minimal template > 3-We store both in the key-value db > 4-We mount the app and wire the reloader to look for timestamp changes on > the key-value store record > 5-Enthusiast uploads the code - saves commit the code changes to the > key-value store > 6-Enthusiast runs the mounted app > > Maybe we could convince a host like Heroku to facilitate this. > Is this crazy? Any other ideas? > > -Philippe > > > On 7/13/2010 8:49 PM, Jenna Fox wrote: > > Another passing thought: It'd be very much in the spirit of freeform fun > little hacks if the camping website included a section of user created apps. > They would need to be moderated somehow, unless someone were to set up a > try-rubyish highly sandboxed environment to run them. It just seems like > there'd be no better way to show what Camping is all about than to have it's > very own website full of fun little examples of camping apps, with a way to > see the source code of each right in there. If you guys had something like > that, i'd love to contribute some quirky little multiplayer games, and an > extremely simple chat thing. :) > > What with rack mounts, this should be easy, right? > > Why did say at art & code that he didn't really care if the code editor > part of HetyH was really good - what mattered was the sharing. The forum. > The code messaging system. The apps which could talk to each other over the > web through the various APIs. That was the important part of hackety hack. I > think that's the important part of camping as well. The main reason I use > Camping over Sinatra and the likes is the way it feels so warm and fuzzy, > and I know if I have any troubles, I get to come talk to all you awesome > people. :) > > If we had the sandboxed thing, it'd be fairly trivial to include a little > cli app in the camping gem to upload the app in to a whyism or hetyh or > whatever account, where it could sit in a little bin of recent uploads, and > be attached to forum posts, or shared out like tinyurls. > > The most important part of all that is kids. Kids don't have web servers. > It's all well and good to have camping ourselves, but if we're to think for > one minute that we're helping kids learn ruby (which after all, was _why's > mission), we've got to be offering some fairly easy way for them to host > this stuff. > > Does anyone know much about sandboxing? Anyone know if it'd be particularly > difficult to do things like monkeypatch the IO class to effectively chroot > and secure a camping app? Can we disable `system calls` too? What's involved > in making something like that viable? Hosts like Dreamhost seem to already > be making use of Passenger to dynamically allocate ruby processes to apps, > so they can be booted up when requested and shut down after they idle for a > minute. :) > > ? > Jenna Fox > http://creativepony.com/ > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.orghttp://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 deveritt at innotts.co.uk Tue Jul 20 08:15:43 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Tue, 20 Jul 2010 13:15:43 +0100 Subject: Wiki vs homepage In-Reply-To: References: <4C41AA8A.7010107@monnet-usa.com> Message-ID: Jenna - just to say I really agree with your post and - but for some pressing paid work - would respond in more detail. The education thing is a real opportunity - Dave Everitt > I propose this: We settle on the idea that we are in fact an > awesome bunch and that camping still has that wonderful educational > essence of it's beginnings, and that being loosely connected to > _why, we already have some weight with educators. There are > computer labs full to the brim with boxes doing nearly nothing in > schools all around the place! From _ at whats-your.name Tue Jul 20 14:31:26 2010 From: _ at whats-your.name (carmen) Date: Tue, 20 Jul 2010 18:31:26 +0000 Subject: database filesystem duality In-Reply-To: References: <4C41AA8A.7010107@monnet-usa.com> Message-ID: <20100720183039.GA7146@x200.Belkin> it began with camping, Matju had been using Ruby in Gridflow since ages before, so he pointed me to poignant guide and i noticed the announcement on redhanded and tried out > store them in some sort of indexy thing, where we could use filesystem locks > to keep from writing over eachother, and garbage collect / compress every > now and then. That could work really well, and could be nice pure ruby. > Mmmm. Is this crazy? Am I a nut for thinking that a simple multiprocess safe > key/value store would actually be really easy to do? I've played with the > filesystem as a storage medium a fair bit.. it seems like it should be > almost trivial! Maybe I should make this right now! eventualy i had wiped out all the varying parts with replacements, but it is important to remember Camping provided the scaffolding to get off the ground went 1.9x Ruby because of proper lexical scoping of blocks (mainly) + fast but that broke Markaby..and there was all this code in there with Builder and such and god knows what i was suposed to fix (multipled by metaprogramming tweak-ness) Ruby's Hash/Array connstructors obviated a custom template-language parser or meta-methodery hacks (magic?) http://element.rubyforge.org/git?p=element.git;a=blob;f=ruby/H.rb so sqlite databases being locked by other processes, mysql servers that werent running or had a wrong password (or hardpowerd and required myisamcks). then redland's SWIG wrappers segfaulting ruby with memory errors back to FS. i guess "E" class is sort of a "jquery for a filesystem" sitting at convergence of HTTP URIs, and filesystem paths so i want to read today's email (delivered by getmail, with a 1 line procmailrc rule to put into dirs by date, and cloud-persisted across phones/netbooks with rsync/ceph/nfs) so GET /mail, it goes to thiS: fn '/mail/GET',->e,r{[303,{Location: '/m/'+(Time.now.strftime '%Y/%m/%d')+'/*?'+(r ?r['QUERY_STRING']:'')}]} which constructs today's path, and redirects: GET /m/2010/07/20/*?view=threads there are no 'routes' just a mapping from URI to resourceSet. which includes globbing, 'fragments' of documents (after #), and depth-first traversal (for pagination of large quantities of stuff, or sorted values) so that glob all todays mails, extracts the triples and creates a (Hash) model alive for the request. views are specified in QS, so ?view=threads, you get a basic overview: http://i574.photobucket.com/albums/ss187/ix9/hyper/2010-03-27-051943_1280x800_scrot.png triple sources are functions that yield 3 values, and exist for most of the comon things. so your message, AANLkTimtVV0C39kyPJYJ-ve1uXHGRH1TsC6x3Q8G-IpB at mail.gmail.com has an ID, and URI and the Filesystem cant just store this as is, unless you want 3 million files in a dir. so using sometihng git-like: irb(main):005:0> E('AANLkTimtVV0C39kyPJYJ-ve1uXHGRH1TsC6x3Q8G-IpB at mail.gmail.com').d => "/var/E/ee/dc/QUFOTGtUaW10VlYwQzM5a3lQSllKLXZlMXVYSEdSSDFUc0M2eDNROEctSXBCQG1haWwuZ21haWwuY29t" does its best to use a path similar to the URI, to not nuke everything outright irb(main):006:0> E('http://camping.org').d => "/var/http://camping.org" in addition to these paths, theres a path of metadata _about_ this path irb(main):007:0> E('http://camping.org').u => # so , in this way, you can create indexed properties: eg, mail references are ugly index paths like: /usr/src/index/<>/http:/rdfs.org/sioc/ns#reference/<>/E/e0/43/MTI3OTYyODYzMi4zMjcxLjEwLmNhbWVsQG1pZGdhcmQ= so when i request a message, provide a query in the QS: fn 'data/thread',->d,_,m{d.walk SIOC+'reference',m} this walks those index paths and constructs the entire thread def walk p,m={},v={} m.merge! memoModel v[uri]=true ((attr p)||[]).concat(((E p).po self)||[]).map{|r| r.E.walk p,m,v if !v[r.uri]} m end ..theres functions to go to/from memory models, lookup FS indexes, and so on, in probably camping-style (ive been told my code is 'obfuscated' anwyas) some other doc @ http://blog.whats-your.name/public/carmen.html creating a 265 message thread including finding all the messages and rendering a view takes about a second on my laptop, which is fine for my needs. you could use the resourceSet X mtimes as a cache key since all data is (convertable to/from) RDF you could go crazy with 4store and SPARQL if you needed more insane indexing options so yeah, let me know what you come up with, im interested in checking it out if a darn OS booted, you have a FS.., From dsusco at gmail.com Wed Jul 21 15:05:43 2010 From: dsusco at gmail.com (David Susco) Date: Wed, 21 Jul 2010 15:05:43 -0400 Subject: using Tilt requires full controller reference Message-ID: When using Tilt for views I need to completely specify the controller within the template file. For example, in a Markaby view I can do this: URL(LogIn) But in a template file I have to do this: URL(MyApp::Controllers::LogIn) Is there anyway around this? -- Dave From judofyr at gmail.com Wed Jul 21 15:29:58 2010 From: judofyr at gmail.com (Magnus Holm) Date: Wed, 21 Jul 2010 21:29:58 +0200 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: This is a well-known bug in Tilt: http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f The thread includes a quite simple patch for 1.8, and a larger, very hackish patch for 1.8+1.9. // Magnus Holm On Wed, Jul 21, 2010 at 21:05, David Susco wrote: > When using Tilt for views I need to completely specify the controller > within the template file. > > For example, in a Markaby view I can do this: > > URL(LogIn) > > But in a template file I have to do this: > > URL(MyApp::Controllers::LogIn) > > Is there anyway around this? > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From judofyr at gmail.com Wed Jul 21 16:50:05 2010 From: judofyr at gmail.com (Magnus Holm) Date: Wed, 21 Jul 2010 22:50:05 +0200 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: Here's an updated patch which include comments and doesn't leak on 1.9: http://gist.github.com/485111 // Magnus Holm On Wed, Jul 21, 2010 at 21:29, Magnus Holm wrote: > This is a well-known bug in Tilt: > http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f > > The thread includes a quite simple patch for 1.8, and a larger, very > hackish patch for 1.8+1.9. > > > // Magnus Holm > > > > On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >> When using Tilt for views I need to completely specify the controller >> within the template file. >> >> For example, in a Markaby view I can do this: >> >> URL(LogIn) >> >> But in a template file I have to do this: >> >> URL(MyApp::Controllers::LogIn) >> >> Is there anyway around this? >> >> -- >> Dave >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > From dsusco at gmail.com Wed Jul 21 16:53:10 2010 From: dsusco at gmail.com (David Susco) Date: Wed, 21 Jul 2010 16:53:10 -0400 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: Thanks Magnus, I gave that a shot but I'm still getting an argument error: Anonymous modules have no name to be referenced by I'm trying to wrap my mind around what this patch is doing, but I don't see the connection between constants and a reference to a controller. Dave On Wed, Jul 21, 2010 at 3:29 PM, Magnus Holm wrote: > This is a well-known bug in Tilt: > http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f > > The thread includes a quite simple patch for 1.8, and a larger, very > hackish patch for 1.8+1.9. > > > // Magnus Holm > > > > On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >> When using Tilt for views I need to completely specify the controller >> within the template file. >> >> For example, in a Markaby view I can do this: >> >> URL(LogIn) >> >> But in a template file I have to do this: >> >> URL(MyApp::Controllers::LogIn) >> >> Is there anyway around this? >> >> -- >> Dave >> _______________________________________________ >> 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 > -- Dave From judofyr at gmail.com Wed Jul 21 17:26:12 2010 From: judofyr at gmail.com (Magnus Holm) Date: Wed, 21 Jul 2010 23:26:12 +0200 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: A reference to a controller is also a constant. Everything which starts with an uppercase letter is in fact a constant. Hm. Could you give me a backtrace? It seems like it's ActiveSupport's const_missing or something like that. You don't really need to read/understand all those comments in the patch. It's all related to the fact that Tilt defines the template as a method under the Tilt::CompileSite (which is included in each request in Camping) so when you call #render it actually calls a method called #_tilt_ajdbakjasjdbakjsbdk in the background. Calling a method is way faster than instance_eval, so this gives a significant speed improvement. The problem by defining the method under Tilt::CompileSite is that constant lookup is now relative to Tilt::CompileSite instead of your request. This is what the patch fixes. // Magnus Holm On Wed, Jul 21, 2010 at 22:53, David Susco wrote: > Thanks Magnus, > > I gave that a shot but I'm still getting an argument error: > > Anonymous modules have no name to be referenced by > > I'm trying to wrap my mind around what this patch is doing, but I > don't see the connection between constants and a reference to a > controller. > > Dave > > On Wed, Jul 21, 2010 at 3:29 PM, Magnus Holm wrote: >> This is a well-known bug in Tilt: >> http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f >> >> The thread includes a quite simple patch for 1.8, and a larger, very >> hackish patch for 1.8+1.9. >> >> >> // Magnus Holm >> >> >> >> On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >>> When using Tilt for views I need to completely specify the controller >>> within the template file. >>> >>> For example, in a Markaby view I can do this: >>> >>> URL(LogIn) >>> >>> But in a template file I have to do this: >>> >>> URL(MyApp::Controllers::LogIn) >>> >>> Is there anyway around this? >>> >>> -- >>> Dave >>> _______________________________________________ >>> 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 >> > > > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From ruby at monnet-usa.com Fri Jul 23 08:52:13 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Fri, 23 Jul 2010 06:52:13 -0600 Subject: Wiki vs homepage In-Reply-To: References: Message-ID: <4C49907D.1090403@monnet-usa.com> Ok I would really like to get the promo site going so that we have something up and running before Why Day (Aug 19th per http://whyday.org/). I propose the following: 1. I can go ahead and buy the ruby-camping.com domain - should someone also buy the .org equivalent? I think the promo site has to have a straightforward name related to ruby and camping (similar to ruby-lang) to make it easy for people to remember the site or search for it. (We can use whywentcamping.com for something else like either the doc site or the site focusing on learning and hosting simple apps - see Jenna's ideas on this) 2. Until we know what other things we want to do with ruby-camping.com in terms of showcasing apps and all, I can either host the site: a) at my host (1&1 - ok for now with straight content only - the downside is I will be the bottleneck for updates b) or deploy it on Heroku - we can have multiple collaborators to push content via git. This would also give us more flexibility in the long run (like diff versions of Ruby, db, plugins, etc - and maybe we can get sponsored 3. For the time being I will leave the site as straight HTML and Javascript (we can switch it to Camping+Tilt later) 4. I will create a ruby-camping.com project under camping in GitHub and upload the content. This way anyone can contribute to the design - wink wink uh-hmm Jenna/Dave/Matt/... ;-) Let me know if you're ok with this or provide alternatives. I'd like to get this done this week-end. Philippe (@techarch) On 7/8/2010 1:55 PM, Magnus Holm wrote: > Hey guys, > > Philippe had some interesting points about the website: > > 1. Keep the home page simple with all content fitting within 1280 x 1024 > 2. Use a catchy design (need some help here) > 3. Accentuate that Camping is about Ruby (maybe also include the ruby > logo somewhere) > 4. Have a brief note about the connection to _why and a link to a page > explaining the history of Camping with further links to _why's other > sites > 5. Encourage people to try it by capitalizing on some of Camping's strengths: > - Fast to learn - requires only basic Ruby skills > - Much simpler than Rails but more structure than Sinatra/Padrino > - Lightning fast and memory efficient allowing fast and efficient sites > - Can evolve from simple file to organized directory structure > - Can layer in more features later using persistence and choice of view engines > 6. How about using some kind of an animated (auto advancing) slideshow > to highlight some of the benefits? See an example at: > http://blog.monnet-usa.com/?p=276 > 7. How about a page on learning with a link to the book as well as a > list of links for other tutorials or short explanations on key topics > (e.g. how to do migrations, how to use include/extend, how to use > different view engines, etc.)? > 8. How about a page about plugins with some brief description of their intent? > 9. I would love for us to include _why's cartoons in some of the sub pages ;-) > > Now, the more I look at this list (and my own thoughts about the new > camping site) I realize that we're talking about two different things: > > * A site to attract new users > * A site to inform regular users > > It looks like my attempt (http://whywentcamping.judofyr.net/) tries to > target the latter, while Philippe targeted the former > (http://rubycamping.monnet-usa.com/). Both sites serves a purpose and > I believe both are equally important. > > -- > > Here's what I propose: We split the site into two parts. We turn what > I've created into a wiki. Everyone are welcome to edit and add their > own content. > > Then we take Philippe's ideas/design/site and turn it into > ruby-camping.com or whywentcamping.com or whatnot. It probably doesn't > need to be more than a single page. > > What'd ya think? > > // 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 steve at steveklabnik.com Fri Jul 23 11:39:13 2010 From: steve at steveklabnik.com (Steve Klabnik) Date: Fri, 23 Jul 2010 11:39:13 -0400 Subject: Wiki vs homepage In-Reply-To: <4C49907D.1090403@monnet-usa.com> References: <4C49907D.1090403@monnet-usa.com> Message-ID: I don't know if it's available or not, but why not campingrb.com rather than ruby-camping.com? Many of the other small web frameworks follow this url scheme (sinatrarb and padrinorb). Or maybe not. I just think it's an interesting url for Ruby projects. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsusco at gmail.com Fri Jul 23 12:01:29 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 23 Jul 2010 12:01:29 -0400 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: Hey Magnus, I patched the files and it's still the same thing. Here's the backtrace, let me know if you want browser dump as well. 127.0.0.1 - - [23/Jul/2010 11:48:39] "GET /Home HTTP/1.1" 500 95353 0.3607 ArgumentError: Anonymous modules have no name to be referenced by /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:in `to_constant_name' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:391:in `qualified_name_for' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:104:in `const_missing' /var/www/apps/crud/riki/views/layout.haml:23:in `evaluate_source' /usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:195:in `evaluate' /usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:560:in `evaluate' /usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:128:in `render' (eval):15:in `render' (eval):15:in `render' ./riki/controllers.rb:85:in `get' (eval):27:in `send' (eval):27:in `service' (eval):27:in `catch' (eval):27:in `service' (eval):38:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in `call' (eval):42:in `call' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:176:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:242:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in `run' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:144:in `start' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in `start' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/camping:9 /usr/local/bin/camping:19:in `load' /usr/local/bin/camping:19 On Wed, Jul 21, 2010 at 5:26 PM, Magnus Holm wrote: > A reference to a controller is also a constant. Everything which > starts with an uppercase letter is in fact a constant. > > Hm. Could you give me a backtrace? It seems like it's ActiveSupport's > const_missing or something like that. > > You don't really need to read/understand all those comments in the > patch. It's all related to the fact that Tilt defines the template as > a method under the Tilt::CompileSite (which is included in each > request in Camping) so when you call #render it actually calls a > method called #_tilt_ajdbakjasjdbakjsbdk in the background. Calling a > method is way faster than instance_eval, so this gives a significant > speed improvement. The problem by defining the method under > Tilt::CompileSite is that constant lookup is now relative to > Tilt::CompileSite instead of your request. This is what the patch > fixes. > > // Magnus Holm > > > > On Wed, Jul 21, 2010 at 22:53, David Susco wrote: >> Thanks Magnus, >> >> I gave that a shot but I'm still getting an argument error: >> >> Anonymous modules have no name to be referenced by >> >> I'm trying to wrap my mind around what this patch is doing, but I >> don't see the connection between constants and a reference to a >> controller. >> >> Dave >> >> On Wed, Jul 21, 2010 at 3:29 PM, Magnus Holm wrote: >>> This is a well-known bug in Tilt: >>> http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f >>> >>> The thread includes a quite simple patch for 1.8, and a larger, very >>> hackish patch for 1.8+1.9. >>> >>> >>> // Magnus Holm >>> >>> >>> >>> On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >>>> When using Tilt for views I need to completely specify the controller >>>> within the template file. >>>> >>>> For example, in a Markaby view I can do this: >>>> >>>> URL(LogIn) >>>> >>>> But in a template file I have to do this: >>>> >>>> URL(MyApp::Controllers::LogIn) >>>> >>>> Is there anyway around this? >>>> >>>> -- >>>> Dave >>>> _______________________________________________ >>>> 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 >>> >> >> >> >> -- >> Dave >> _______________________________________________ >> 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 > -- Dave From deveritt at innotts.co.uk Fri Jul 23 12:25:58 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Fri, 23 Jul 2010 17:25:58 +0100 Subject: Wiki vs homepage In-Reply-To: References: <4C49907D.1090403@monnet-usa.com> Message-ID: Hi Steve - I really like that idea. Of course, someone (us) is going to have to actually purchase the domain at some point :-) - Dave E > I don't know if it's available or not, but why not campingrb.com > rather than ruby-camping.com? Many of the other small web > frameworks follow this url scheme (sinatrarb and padrinorb). From ruby at monnet-usa.com Fri Jul 23 12:38:16 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Fri, 23 Jul 2010 10:38:16 -0600 Subject: Wiki vs homepage In-Reply-To: References: <4C49907D.1090403@monnet-usa.com> Message-ID: <4C49C578.4070700@monnet-usa.com> My preference would be to have Ruby explicitly mentioned in the name and a clear easy-to-read url. This makes it a bit more SEO friendly too which is important for a promo site. IMHO suffixing with rb is not very visually attractive. On 7/23/2010 9:39 AM, Steve Klabnik wrote: > I don't know if it's available or not, but why not campingrb.com > rather than ruby-camping.com > ? Many of the other small web frameworks > follow this url scheme (sinatrarb and padrinorb). > > Or maybe not. I just think it's an interesting url for Ruby projects. > > > _______________________________________________ > 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 deveritt at innotts.co.uk Fri Jul 23 13:58:52 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Fri, 23 Jul 2010 18:58:52 +0100 Subject: Wiki vs homepage In-Reply-To: References: <4C41AA8A.7010107@monnet-usa.com> Message-ID: <5BAA512C-48F0-4868-AAA8-657BEA4151B5@innotts.co.uk> Anyone know who did this: http://camping.tumblr.com/ ? Dave E > Jenna: I suggest a tumblr, because it doesn't cost anything, can > have group committers, all the features we need, and it too is > connected to the rich heritage of _why :) From deveritt at innotts.co.uk Fri Jul 23 14:19:09 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Fri, 23 Jul 2010 19:19:09 +0100 Subject: Wiki vs homepage In-Reply-To: <4C49C578.4070700@monnet-usa.com> References: <4C49907D.1090403@monnet-usa.com> <4C49C578.4070700@monnet-usa.com> Message-ID: May not be attractive, but if it's already a ruby-related meme, worth considering - Dave E On 23 Jul 2010, at 17:38, Philippe Monnet wrote: >> My preference would be to have Ruby explicitly mentioned in the >> name and a clear easy-to-read url. This makes it a bit more SEO >> friendly too which is important for a promo site. IMHO suffixing >> with rb is not very visually attractive. >> >> On 7/23/2010 9:39 AM, Steve Klabnik wrote: >>> >>> I don't know if it's available or not, but why not campingrb.com >>> rather than ruby-camping.com? Many of the other small web >>> frameworks follow this url scheme (sinatrarb and padrinorb). >> From judofyr at gmail.com Fri Jul 23 15:09:47 2010 From: judofyr at gmail.com (Magnus Holm) Date: Fri, 23 Jul 2010 21:09:47 +0200 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: Wait, forget about that Tilt patch. Try this instead: module App include X end // Magnus Holm On Fri, Jul 23, 2010 at 18:01, David Susco wrote: > Hey Magnus, I patched the files and it's still the same thing. Here's > the backtrace, let me know if you want browser dump as well. > > 127.0.0.1 - - [23/Jul/2010 11:48:39] "GET /Home HTTP/1.1" 500 95353 0.3607 > ArgumentError: Anonymous modules have no name to be referenced by > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:in > `to_constant_name' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:391:in > `qualified_name_for' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:104:in > `const_missing' > ? ? ? ?/var/www/apps/crud/riki/views/layout.haml:23:in `evaluate_source' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:195:in `evaluate' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:560:in `evaluate' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:128:in `render' > ? ? ? ?(eval):15:in `render' > ? ? ? ?(eval):15:in `render' > ? ? ? ?./riki/controllers.rb:85:in `get' > ? ? ? ?(eval):27:in `send' > ? ? ? ?(eval):27:in `service' > ? ? ? ?(eval):27:in `catch' > ? ? ? ?(eval):27:in `service' > ? ? ? ?(eval):38:in `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in > `call' > ? ? ? ?(eval):42:in `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:176:in > `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in > `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in > `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:242:in > `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in > `call' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in > `service' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' > ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in > `run' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:144:in > `start' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in `start' > ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/camping:9 > ? ? ? ?/usr/local/bin/camping:19:in `load' > ? ? ? ?/usr/local/bin/camping:19 > > > On Wed, Jul 21, 2010 at 5:26 PM, Magnus Holm wrote: >> A reference to a controller is also a constant. Everything which >> starts with an uppercase letter is in fact a constant. >> >> Hm. Could you give me a backtrace? It seems like it's ActiveSupport's >> const_missing or something like that. >> >> You don't really need to read/understand all those comments in the >> patch. It's all related to the fact that Tilt defines the template as >> a method under the Tilt::CompileSite (which is included in each >> request in Camping) so when you call #render it actually calls a >> method called #_tilt_ajdbakjasjdbakjsbdk in the background. Calling a >> method is way faster than instance_eval, so this gives a significant >> speed improvement. The problem by defining the method under >> Tilt::CompileSite is that constant lookup is now relative to >> Tilt::CompileSite instead of your request. This is what the patch >> fixes. >> >> // Magnus Holm >> >> >> >> On Wed, Jul 21, 2010 at 22:53, David Susco wrote: >>> Thanks Magnus, >>> >>> I gave that a shot but I'm still getting an argument error: >>> >>> Anonymous modules have no name to be referenced by >>> >>> I'm trying to wrap my mind around what this patch is doing, but I >>> don't see the connection between constants and a reference to a >>> controller. >>> >>> Dave >>> >>> On Wed, Jul 21, 2010 at 3:29 PM, Magnus Holm wrote: >>>> This is a well-known bug in Tilt: >>>> http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f >>>> >>>> The thread includes a quite simple patch for 1.8, and a larger, very >>>> hackish patch for 1.8+1.9. >>>> >>>> >>>> // Magnus Holm >>>> >>>> >>>> >>>> On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >>>>> When using Tilt for views I need to completely specify the controller >>>>> within the template file. >>>>> >>>>> For example, in a Markaby view I can do this: >>>>> >>>>> URL(LogIn) >>>>> >>>>> But in a template file I have to do this: >>>>> >>>>> URL(MyApp::Controllers::LogIn) >>>>> >>>>> Is there anyway around this? >>>>> >>>>> -- >>>>> Dave >>>>> _______________________________________________ >>>>> 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 >>>> >>> >>> >>> >>> -- >>> Dave >>> _______________________________________________ >>> 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 >> > > > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From dsusco at gmail.com Fri Jul 23 15:48:58 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 23 Jul 2010 15:48:58 -0400 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: lol, at first I thought you were messing with me. X is the apps Controllers module, correct? Will I always have to do this when using Tilt? Or only until this patch makes it into a gem? Dave On Fri, Jul 23, 2010 at 3:09 PM, Magnus Holm wrote: > Wait, forget about that Tilt patch. Try this instead: > > ?module App > ? ?include X > ?end > > // Magnus Holm > > > > On Fri, Jul 23, 2010 at 18:01, David Susco wrote: >> Hey Magnus, I patched the files and it's still the same thing. Here's >> the backtrace, let me know if you want browser dump as well. >> >> 127.0.0.1 - - [23/Jul/2010 11:48:39] "GET /Home HTTP/1.1" 500 95353 0.3607 >> ArgumentError: Anonymous modules have no name to be referenced by >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:in >> `to_constant_name' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:391:in >> `qualified_name_for' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:104:in >> `const_missing' >> ? ? ? ?/var/www/apps/crud/riki/views/layout.haml:23:in `evaluate_source' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:195:in `evaluate' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:560:in `evaluate' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:128:in `render' >> ? ? ? ?(eval):15:in `render' >> ? ? ? ?(eval):15:in `render' >> ? ? ? ?./riki/controllers.rb:85:in `get' >> ? ? ? ?(eval):27:in `send' >> ? ? ? ?(eval):27:in `service' >> ? ? ? ?(eval):27:in `catch' >> ? ? ? ?(eval):27:in `service' >> ? ? ? ?(eval):38:in `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in >> `call' >> ? ? ? ?(eval):42:in `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:176:in >> `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in >> `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in >> `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:242:in >> `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in >> `call' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in >> `service' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' >> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in >> `run' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:144:in >> `start' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in `start' >> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/camping:9 >> ? ? ? ?/usr/local/bin/camping:19:in `load' >> ? ? ? ?/usr/local/bin/camping:19 >> >> >> On Wed, Jul 21, 2010 at 5:26 PM, Magnus Holm wrote: >>> A reference to a controller is also a constant. Everything which >>> starts with an uppercase letter is in fact a constant. >>> >>> Hm. Could you give me a backtrace? It seems like it's ActiveSupport's >>> const_missing or something like that. >>> >>> You don't really need to read/understand all those comments in the >>> patch. It's all related to the fact that Tilt defines the template as >>> a method under the Tilt::CompileSite (which is included in each >>> request in Camping) so when you call #render it actually calls a >>> method called #_tilt_ajdbakjasjdbakjsbdk in the background. Calling a >>> method is way faster than instance_eval, so this gives a significant >>> speed improvement. The problem by defining the method under >>> Tilt::CompileSite is that constant lookup is now relative to >>> Tilt::CompileSite instead of your request. This is what the patch >>> fixes. >>> >>> // Magnus Holm >>> >>> >>> >>> On Wed, Jul 21, 2010 at 22:53, David Susco wrote: >>>> Thanks Magnus, >>>> >>>> I gave that a shot but I'm still getting an argument error: >>>> >>>> Anonymous modules have no name to be referenced by >>>> >>>> I'm trying to wrap my mind around what this patch is doing, but I >>>> don't see the connection between constants and a reference to a >>>> controller. >>>> >>>> Dave >>>> >>>> On Wed, Jul 21, 2010 at 3:29 PM, Magnus Holm wrote: >>>>> This is a well-known bug in Tilt: >>>>> http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f >>>>> >>>>> The thread includes a quite simple patch for 1.8, and a larger, very >>>>> hackish patch for 1.8+1.9. >>>>> >>>>> >>>>> // Magnus Holm >>>>> >>>>> >>>>> >>>>> On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >>>>>> When using Tilt for views I need to completely specify the controller >>>>>> within the template file. >>>>>> >>>>>> For example, in a Markaby view I can do this: >>>>>> >>>>>> URL(LogIn) >>>>>> >>>>>> But in a template file I have to do this: >>>>>> >>>>>> URL(MyApp::Controllers::LogIn) >>>>>> >>>>>> Is there anyway around this? >>>>>> >>>>>> -- >>>>>> Dave >>>>>> _______________________________________________ >>>>>> 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Dave >>>> _______________________________________________ >>>> 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 >>> >> >> >> >> -- >> Dave >> _______________________________________________ >> 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 -- Dave From judofyr at gmail.com Fri Jul 23 17:44:39 2010 From: judofyr at gmail.com (Magnus Holm) Date: Fri, 23 Jul 2010 23:44:39 +0200 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: You'll have to agree that "include X" sounds so much better than "include Controllers"? :-) Could you test one more thing for me? Without a Tilt patch, can you add `require 'camping/templates'` right after `require 'camping'` and check if it still works? Here you go: `gem install camping --source http://gems.judofyr.net/` // Magnus Holm On Fri, Jul 23, 2010 at 21:48, David Susco wrote: > lol, at first I thought you were messing with me. X is the apps > Controllers module, correct? > > Will I always have to do this when using Tilt? Or only until this > patch makes it into a gem? > > Dave > > On Fri, Jul 23, 2010 at 3:09 PM, Magnus Holm wrote: >> Wait, forget about that Tilt patch. Try this instead: >> >> ?module App >> ? ?include X >> ?end >> >> // Magnus Holm >> >> >> >> On Fri, Jul 23, 2010 at 18:01, David Susco wrote: >>> Hey Magnus, I patched the files and it's still the same thing. Here's >>> the backtrace, let me know if you want browser dump as well. >>> >>> 127.0.0.1 - - [23/Jul/2010 11:48:39] "GET /Home HTTP/1.1" 500 95353 0.3607 >>> ArgumentError: Anonymous modules have no name to be referenced by >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:in >>> `to_constant_name' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:391:in >>> `qualified_name_for' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:104:in >>> `const_missing' >>> ? ? ? ?/var/www/apps/crud/riki/views/layout.haml:23:in `evaluate_source' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:195:in `evaluate' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:560:in `evaluate' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:128:in `render' >>> ? ? ? ?(eval):15:in `render' >>> ? ? ? ?(eval):15:in `render' >>> ? ? ? ?./riki/controllers.rb:85:in `get' >>> ? ? ? ?(eval):27:in `send' >>> ? ? ? ?(eval):27:in `service' >>> ? ? ? ?(eval):27:in `catch' >>> ? ? ? ?(eval):27:in `service' >>> ? ? ? ?(eval):38:in `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in >>> `call' >>> ? ? ? ?(eval):42:in `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:176:in >>> `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in >>> `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in >>> `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:242:in >>> `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in >>> `call' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in >>> `service' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' >>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in >>> `run' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:144:in >>> `start' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in `start' >>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/camping:9 >>> ? ? ? ?/usr/local/bin/camping:19:in `load' >>> ? ? ? ?/usr/local/bin/camping:19 >>> >>> >>> On Wed, Jul 21, 2010 at 5:26 PM, Magnus Holm wrote: >>>> A reference to a controller is also a constant. Everything which >>>> starts with an uppercase letter is in fact a constant. >>>> >>>> Hm. Could you give me a backtrace? It seems like it's ActiveSupport's >>>> const_missing or something like that. >>>> >>>> You don't really need to read/understand all those comments in the >>>> patch. It's all related to the fact that Tilt defines the template as >>>> a method under the Tilt::CompileSite (which is included in each >>>> request in Camping) so when you call #render it actually calls a >>>> method called #_tilt_ajdbakjasjdbakjsbdk in the background. Calling a >>>> method is way faster than instance_eval, so this gives a significant >>>> speed improvement. The problem by defining the method under >>>> Tilt::CompileSite is that constant lookup is now relative to >>>> Tilt::CompileSite instead of your request. This is what the patch >>>> fixes. >>>> >>>> // Magnus Holm >>>> >>>> >>>> >>>> On Wed, Jul 21, 2010 at 22:53, David Susco wrote: >>>>> Thanks Magnus, >>>>> >>>>> I gave that a shot but I'm still getting an argument error: >>>>> >>>>> Anonymous modules have no name to be referenced by >>>>> >>>>> I'm trying to wrap my mind around what this patch is doing, but I >>>>> don't see the connection between constants and a reference to a >>>>> controller. >>>>> >>>>> Dave >>>>> >>>>> On Wed, Jul 21, 2010 at 3:29 PM, Magnus Holm wrote: >>>>>> This is a well-known bug in Tilt: >>>>>> http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f >>>>>> >>>>>> The thread includes a quite simple patch for 1.8, and a larger, very >>>>>> hackish patch for 1.8+1.9. >>>>>> >>>>>> >>>>>> // Magnus Holm >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >>>>>>> When using Tilt for views I need to completely specify the controller >>>>>>> within the template file. >>>>>>> >>>>>>> For example, in a Markaby view I can do this: >>>>>>> >>>>>>> URL(LogIn) >>>>>>> >>>>>>> But in a template file I have to do this: >>>>>>> >>>>>>> URL(MyApp::Controllers::LogIn) >>>>>>> >>>>>>> Is there anyway around this? >>>>>>> >>>>>>> -- >>>>>>> Dave >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Dave >>>>> _______________________________________________ >>>>> 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 >>>> >>> >>> >>> >>> -- >>> Dave >>> _______________________________________________ >>> 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 > > > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From deveritt at innotts.co.uk Sun Jul 25 06:53:11 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Sun, 25 Jul 2010 11:53:11 +0100 Subject: Camping on StackOverflow Message-ID: Camping has a new user on StackOverflow :-) - I just stumbled across this: http://stackoverflow.com/questions/2618535/camping-return-user-to- recent-entries-but-keep-errors If anyone with a StackOverflow account wants to leap in? Dave Everitt From judofyr at gmail.com Sun Jul 25 08:00:10 2010 From: judofyr at gmail.com (Magnus Holm) Date: Sun, 25 Jul 2010 14:00:10 +0200 Subject: Camping on StackOverflow In-Reply-To: References: Message-ID: I've asked some of them (even though they are several months olds) and have also subscribed to the camping-tag. I'll try to automatically forward them to the camping-list :-) // Magnus Holm On Sun, Jul 25, 2010 at 12:53, Dave Everitt wrote: > Camping has a new user on StackOverflow :-) - I just stumbled across this: > > http://stackoverflow.com/questions/2618535/camping-return-user-to-recent-entries-but-keep-errors > > If anyone with a StackOverflow account wants to leap in? > > Dave Everitt > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From ruby at monnet-usa.com Sun Jul 25 09:11:51 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sun, 25 Jul 2010 07:11:51 -0600 Subject: Camping on StackOverflow In-Reply-To: References: Message-ID: <4C4C3817.9060702@monnet-usa.com> I think we probably need to also keep an eye on StackOverflow since it is now one of the top tech destinations with a super high amount of developer traffic. I just subscribed to the Camping tag RSS feed too. Also when answering we can encourage people to join our mailing list in our comments. I will check more often as I use StackOverflow several times a week anyway. I guess it's all part of our diversification to get the word out on Camping. Do you guys think we should cherry pick interesting questions every so often and either cross post to our list or maybe add to an FAQ page? On 7/25/2010 6:00 AM, Magnus Holm wrote: > I've asked some of them (even though they are several months olds) and > have also subscribed to the camping-tag. I'll try to automatically > forward them to the camping-list :-) > > > // Magnus Holm > > > > On Sun, Jul 25, 2010 at 12:53, Dave Everitt wrote: > >> Camping has a new user on StackOverflow :-) - I just stumbled across this: >> >> http://stackoverflow.com/questions/2618535/camping-return-user-to-recent-entries-but-keep-errors >> >> If anyone with a StackOverflow account wants to leap in? >> >> Dave Everitt >> >> _______________________________________________ >> 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 ruby at monnet-usa.com Sun Jul 25 09:22:32 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sun, 25 Jul 2010 07:22:32 -0600 Subject: Camping on StackOverflow In-Reply-To: <4C4C3817.9060702@monnet-usa.com> References: <4C4C3817.9060702@monnet-usa.com> Message-ID: <4C4C3A98.1070100@monnet-usa.com> Oh, and if you have an account on SO don't forget to use your voting power to upvote or downvote! :-) On 7/25/2010 7:11 AM, Philippe Monnet wrote: > I think we probably need to also keep an eye on StackOverflow since it > is now one of the top tech destinations with a super high amount of > developer traffic. I just subscribed to the Camping tag RSS feed too. > Also when answering we can encourage people to join our mailing list > in our comments. I will check more often as I use StackOverflow > several times a week anyway. I guess it's all part of our > diversification to get the word out on Camping. Do you guys think we > should cherry pick interesting questions every so often and either > cross post to our list or maybe add to an FAQ page? > > > On 7/25/2010 6:00 AM, Magnus Holm wrote: >> I've asked some of them (even though they are several months olds) and >> have also subscribed to the camping-tag. I'll try to automatically >> forward them to the camping-list :-) >> >> >> // Magnus Holm >> >> >> >> On Sun, Jul 25, 2010 at 12:53, Dave Everitt wrote: >> >>> Camping has a new user on StackOverflow :-) - I just stumbled across this: >>> >>> http://stackoverflow.com/questions/2618535/camping-return-user-to-recent-entries-but-keep-errors >>> >>> If anyone with a StackOverflow account wants to leap in? >>> >>> Dave Everitt >>> >>> _______________________________________________ >>> 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 deveritt at innotts.co.uk Sun Jul 25 10:18:13 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Sun, 25 Jul 2010 15:18:13 +0100 Subject: Camping on StackOverflow In-Reply-To: <4C4C3817.9060702@monnet-usa.com> References: <4C4C3817.9060702@monnet-usa.com> Message-ID: <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> There aren't enough Camping questions on SO to cherry pick :-) but getting them to use the mailing list would be good, although we'd also want to answer directly on SO - Dave E. > On 25 Jul 2010, at 14:11, Philippe Monnet wrote: > I think we probably need to also keep an eye on StackOverflow since > it is now one of the top tech destinations with a super high amount > of developer traffic. I just subscribed to the Camping tag RSS feed > too. Also when answering we can encourage people to join our > mailing list in our comments. I will check more often as I use > StackOverflow several times a week anyway. I guess it's all part of > our diversification to get the word out on Camping. Do you guys > think we should cherry pick interesting questions every so often > and either cross post to our list or maybe add to an FAQ page? > >> On 7/25/2010 6:00 AM, Magnus Holm wrote: >> I've asked some of them (even though they are several months olds) >> and have also subscribed to the camping-tag. I'll try to >> automatically forward them to the camping-list :-) > From ruby at monnet-usa.com Sun Jul 25 11:04:10 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sun, 25 Jul 2010 09:04:10 -0600 Subject: Wiki vs homepage In-Reply-To: References: <4C49907D.1090403@monnet-usa.com> <4C49C578.4070700@monnet-usa.com> Message-ID: <4C4C526A.5010201@monnet-usa.com> Also in the spirit of SEO, maybe we just need to have multiple domain names all linking back or redirecting to ruby-camping.com. I am willing to buy and commit to ruby-camping.com so anyone else is free to buy campingrb.com or any other naming permutation they like. This way we can all have our cake and eat it too! Any objections at this point on me moving forward? On 7/23/2010 12:19 PM, Dave Everitt wrote: > May not be attractive, but if it's already a ruby-related meme, worth > considering - Dave E > > On 23 Jul 2010, at 17:38, Philippe Monnet wrote: > >>> My preference would be to have Ruby explicitly mentioned in the name >>> and a clear easy-to-read url. This makes it a bit more SEO friendly >>> too which is important for a promo site. IMHO suffixing with rb is >>> not very visually attractive. >>> >>> On 7/23/2010 9:39 AM, Steve Klabnik wrote: >>>> >>>> I don't know if it's available or not, but why not campingrb.com >>>> rather than ruby-camping.com? Many of the other small web >>>> frameworks follow this url scheme (sinatrarb and padrinorb). >>> > > _______________________________________________ > 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 deveritt at innotts.co.uk Sun Jul 25 12:06:42 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Sun, 25 Jul 2010 17:06:42 +0100 Subject: Wiki vs homepage In-Reply-To: <4C4C526A.5010201@monnet-usa.com> References: <4C49907D.1090403@monnet-usa.com> <4C49C578.4070700@monnet-usa.com> <4C4C526A.5010201@monnet-usa.com> Message-ID: <835A8066-9849-468E-A467-6A9C315D2D9D@innotts.co.uk> Not from me. ruby-camping.com is fine and I'm aware of the SEO implications. My offer of server space (on our Linux VPS + Ruby 1.9) still stands - Dave E > On 25 Jul 2010, at 16:04, Philippe Monnet wrote: > > Also in the spirit of SEO, maybe we just need to have multiple > domain names all linking back or redirecting to ruby-camping.com. I > am willing to buy and commit to ruby-camping.com so anyone else is > free to buy campingrb.com or any other naming permutation they > like. This way we can all have our cake and eat it too! > Any objections at this point on me moving forward? > >> On 7/23/2010 12:19 PM, Dave Everitt wrote: >> May not be attractive, but if it's already a ruby-related meme, >> worth considering - Dave E >> >>> On 23 Jul 2010, at 17:38, Philippe Monnet wrote: >>> >>>> >>>> My preference would be to have Ruby explicitly mentioned in the >>>> name and a clear easy-to-read url. This makes it a bit more SEO >>>> friendly too which is important for a promo site. IMHO suffixing >>>> with rb is not very visually attractive. >>>> >>>>> On 7/23/2010 9:39 AM, Steve Klabnik wrote: >>>>> >>>>> I don't know if it's available or not, but why not >>>>> campingrb.com rather than ruby-camping.com? Many of the other >>>>> small web frameworks follow this url scheme (sinatrarb and >>>>> padrinorb). > From a at creativepony.com Sun Jul 25 12:09:40 2010 From: a at creativepony.com (Jenna Fox) Date: Mon, 26 Jul 2010 02:09:40 +1000 Subject: Camping on StackOverflow In-Reply-To: <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> References: <4C4C3817.9060702@monnet-usa.com> <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> Message-ID: Speaking of the mailing list: rubyforge sucks! Couldn't we have something nice, like librelist? Those hackety hack guys with their fancy mailing list put ours to shame. _why is still the admin contact of this list. :| On 26/07/2010, at 12:18 AM, Dave Everitt wrote: > There aren't enough Camping questions on SO to cherry pick :-) but getting them to use the mailing list would be good, although we'd also want to answer directly on SO - Dave E. > >> On 25 Jul 2010, at 14:11, Philippe Monnet wrote: >> I think we probably need to also keep an eye on StackOverflow since it is now one of the top tech destinations with a super high amount of developer traffic. I just subscribed to the Camping tag RSS feed too. Also when answering we can encourage people to join our mailing list in our comments. I will check more often as I use StackOverflow several times a week anyway. I guess it's all part of our diversification to get the word out on Camping. Do you guys think we should cherry pick interesting questions every so often and either cross post to our list or maybe add to an FAQ page? >> >>> On 7/25/2010 6:00 AM, Magnus Holm wrote: >>> I've asked some of them (even though they are several months olds) and have also subscribed to the camping-tag. I'll try to automatically forward them to the camping-list :-) >> > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list From deveritt at innotts.co.uk Sun Jul 25 12:22:38 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Sun, 25 Jul 2010 17:22:38 +0100 Subject: Camping on StackOverflow In-Reply-To: References: <4C4C3817.9060702@monnet-usa.com> <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> Message-ID: <15BA6310-61FB-4433-ACA5-5F29EBB7883C@innotts.co.uk> Librelist looks great. Can it take the existing archives? How can inboard links to the existing list be forwarded? Are the killer questions - Dave E. > Speaking of the mailing list: rubyforge sucks! Couldn't we have > something nice, like librelist? Those hackety hack guys with their > fancy mailing list put ours to shame. > > _why is still the admin contact of this list. :| From ruby at monnet-usa.com Sun Jul 25 12:50:44 2010 From: ruby at monnet-usa.com (Philippe Monnet) Date: Sun, 25 Jul 2010 10:50:44 -0600 Subject: Camping on StackOverflow In-Reply-To: <15BA6310-61FB-4433-ACA5-5F29EBB7883C@innotts.co.uk> References: <4C4C3817.9060702@monnet-usa.com> <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> <15BA6310-61FB-4433-ACA5-5F29EBB7883C@innotts.co.uk> Message-ID: <4C4C6B64.9080209@monnet-usa.com> There is an interesting comment on the Librelist site: "... All archives are accessible efficiently via rsync as maildir directories. This means you can _/host your mailing list archives on your project's site rather than directing users to Librelist/_. Librelist also provides simple archive browsing for smaller projects that can't host themselves. ...". I am not very Unix savvy at all but does this imply you could "rsynch" from RubyForge? I am way out of my depth here... On 7/25/2010 10:22 AM, Dave Everitt wrote: > Librelist looks great. Can it take the existing archives? How can > inboard links to the existing list be forwarded? Are the killer > questions - Dave E. > >> Speaking of the mailing list: rubyforge sucks! Couldn't we have >> something nice, like librelist? Those hackety hack guys with their >> fancy mailing list put ours to shame. >> >> _why is still the admin contact of this 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 deveritt at innotts.co.uk Sun Jul 25 13:42:45 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Sun, 25 Jul 2010 18:42:45 +0100 Subject: Camping on StackOverflow In-Reply-To: <4C4C6B64.9080209@monnet-usa.com> References: <4C4C3817.9060702@monnet-usa.com> <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> <15BA6310-61FB-4433-ACA5-5F29EBB7883C@innotts.co.uk> <4C4C6B64.9080209@monnet-usa.com> Message-ID: <6023A6DC-7C56-4055-A002-30709F39778E@innotts.co.uk> That still leaves "How can inboard links to the existing list be forwarded?" Can we redirect* from rubyforge? Given that broken links to rubyforge mailing list posts are going to exaggerate the 'Camping is dead' impression - Dave E > On 25 Jul 2010, at 17:50, Philippe Monnet wrote: > > There is an interesting comment on the Librelist site: "... All > archives are accessible efficiently via rsync as maildir > directories. This means you can host your mailing list archives on > your project?s site rather than directing users to Librelist. > Librelist also provides simple archive browsing for smaller > projects that can?t host themselves. ...". > I am not very Unix savvy at all but does this imply you could > "rsynch" from RubyForge? I am way out of my depth here... > > > On 7/25/2010 10:22 AM, Dave Everitt wrote: >> >> Librelist looks great. Can it take the existing archives? How can >> inboard links to the existing list be forwarded? Are the killer >> questions - Dave E. >> >>> Speaking of the mailing list: rubyforge sucks! Couldn't we have >>> something nice, like librelist? Those hackety hack guys with >>> their fancy mailing list put ours to shame. >>> >>> _why is still the admin contact of this 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 dsusco at gmail.com Mon Jul 26 09:59:48 2010 From: dsusco at gmail.com (David Susco) Date: Mon, 26 Jul 2010 09:59:48 -0400 Subject: using Tilt requires full controller reference In-Reply-To: References: Message-ID: Alright I updated camping to .405, did a pristine on Tilt (v1.0.1), removed the include X from my Base module and my controllers are still being found (no anonymous modules errors). Re: your test, I required camping/template and got this: NameError: uninitialized constant Riki::Base::Template /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing' (eval):13:in `lookup' (eval):12:in `fetch' (eval):12:in `lookup' (eval):15:in `render' ./riki/controllers.rb:11:in `get' (eval):28:in `send' (eval):28:in `service' (eval):28:in `catch' (eval):28:in `service' (eval):39:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in `call' (eval):43:in `call' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.405/bin/../lib/camping/server.rb:176:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.405/bin/../lib/camping/server.rb:242:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in `run' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.405/bin/../lib/camping/server.rb:144:in `start' /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in `start' /usr/local/lib/ruby/gems/1.8/gems/camping-2.0.405/bin/camping:9 /usr/local/bin/camping:19:in `load' /usr/local/bin/camping:19 On Fri, Jul 23, 2010 at 5:44 PM, Magnus Holm wrote: > You'll have to agree that "include X" sounds so much better than > "include Controllers"? :-) > > Could you test one more thing for me? Without a Tilt patch, can you > add `require 'camping/templates'` right after `require 'camping'` and > check if it still works? > > Here you go: `gem install camping --source http://gems.judofyr.net/` > > // Magnus Holm > > > > On Fri, Jul 23, 2010 at 21:48, David Susco wrote: >> lol, at first I thought you were messing with me. X is the apps >> Controllers module, correct? >> >> Will I always have to do this when using Tilt? Or only until this >> patch makes it into a gem? >> >> Dave >> >> On Fri, Jul 23, 2010 at 3:09 PM, Magnus Holm wrote: >>> Wait, forget about that Tilt patch. Try this instead: >>> >>> ?module App >>> ? ?include X >>> ?end >>> >>> // Magnus Holm >>> >>> >>> >>> On Fri, Jul 23, 2010 at 18:01, David Susco wrote: >>>> Hey Magnus, I patched the files and it's still the same thing. Here's >>>> the backtrace, let me know if you want browser dump as well. >>>> >>>> 127.0.0.1 - - [23/Jul/2010 11:48:39] "GET /Home HTTP/1.1" 500 95353 0.3607 >>>> ArgumentError: Anonymous modules have no name to be referenced by >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:in >>>> `to_constant_name' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:391:in >>>> `qualified_name_for' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:104:in >>>> `const_missing' >>>> ? ? ? ?/var/www/apps/crud/riki/views/layout.haml:23:in `evaluate_source' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:195:in `evaluate' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:560:in `evaluate' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/tilt-1.0.1/lib/tilt.rb:128:in `render' >>>> ? ? ? ?(eval):15:in `render' >>>> ? ? ? ?(eval):15:in `render' >>>> ? ? ? ?./riki/controllers.rb:85:in `get' >>>> ? ? ? ?(eval):27:in `send' >>>> ? ? ? ?(eval):27:in `service' >>>> ? ? ? ?(eval):27:in `catch' >>>> ? ? ? ?(eval):27:in `service' >>>> ? ? ? ?(eval):38:in `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/session/cookie.rb:37:in >>>> `call' >>>> ? ? ? ?(eval):42:in `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:176:in >>>> `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:35:in `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in >>>> `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in >>>> `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:242:in >>>> `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in >>>> `call' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in >>>> `service' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start' >>>> ? ? ? ?/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in >>>> `run' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/../lib/camping/server.rb:144:in >>>> `start' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:83:in `start' >>>> ? ? ? ?/usr/local/lib/ruby/gems/1.8/gems/camping-2.0.392/bin/camping:9 >>>> ? ? ? ?/usr/local/bin/camping:19:in `load' >>>> ? ? ? ?/usr/local/bin/camping:19 >>>> >>>> >>>> On Wed, Jul 21, 2010 at 5:26 PM, Magnus Holm wrote: >>>>> A reference to a controller is also a constant. Everything which >>>>> starts with an uppercase letter is in fact a constant. >>>>> >>>>> Hm. Could you give me a backtrace? It seems like it's ActiveSupport's >>>>> const_missing or something like that. >>>>> >>>>> You don't really need to read/understand all those comments in the >>>>> patch. It's all related to the fact that Tilt defines the template as >>>>> a method under the Tilt::CompileSite (which is included in each >>>>> request in Camping) so when you call #render it actually calls a >>>>> method called #_tilt_ajdbakjasjdbakjsbdk in the background. Calling a >>>>> method is way faster than instance_eval, so this gives a significant >>>>> speed improvement. The problem by defining the method under >>>>> Tilt::CompileSite is that constant lookup is now relative to >>>>> Tilt::CompileSite instead of your request. This is what the patch >>>>> fixes. >>>>> >>>>> // Magnus Holm >>>>> >>>>> >>>>> >>>>> On Wed, Jul 21, 2010 at 22:53, David Susco wrote: >>>>>> Thanks Magnus, >>>>>> >>>>>> I gave that a shot but I'm still getting an argument error: >>>>>> >>>>>> Anonymous modules have no name to be referenced by >>>>>> >>>>>> I'm trying to wrap my mind around what this patch is doing, but I >>>>>> don't see the connection between constants and a reference to a >>>>>> controller. >>>>>> >>>>>> Dave >>>>>> >>>>>> On Wed, Jul 21, 2010 at 3:29 PM, Magnus Holm wrote: >>>>>>> This is a well-known bug in Tilt: >>>>>>> http://groups.google.com/group/tiltrb/browse_thread/thread/19fef5370c4d417f >>>>>>> >>>>>>> The thread includes a quite simple patch for 1.8, and a larger, very >>>>>>> hackish patch for 1.8+1.9. >>>>>>> >>>>>>> >>>>>>> // Magnus Holm >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jul 21, 2010 at 21:05, David Susco wrote: >>>>>>>> When using Tilt for views I need to completely specify the controller >>>>>>>> within the template file. >>>>>>>> >>>>>>>> For example, in a Markaby view I can do this: >>>>>>>> >>>>>>>> URL(LogIn) >>>>>>>> >>>>>>>> But in a template file I have to do this: >>>>>>>> >>>>>>>> URL(MyApp::Controllers::LogIn) >>>>>>>> >>>>>>>> Is there anyway around this? >>>>>>>> >>>>>>>> -- >>>>>>>> Dave >>>>>>>> _______________________________________________ >>>>>>>> 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 >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Dave >>>>>> _______________________________________________ >>>>>> 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 >>>>> >>>> >>>> >>>> >>>> -- >>>> Dave >>>> _______________________________________________ >>>> 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 >> >> >> >> -- >> Dave >> _______________________________________________ >> 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 -- Dave From a at creativepony.com Mon Jul 26 10:21:40 2010 From: a at creativepony.com (A Creative Pony) Date: Tue, 27 Jul 2010 00:21:40 +1000 Subject: Camping on StackOverflow In-Reply-To: <6023A6DC-7C56-4055-A002-30709F39778E@innotts.co.uk> References: <4C4C3817.9060702@monnet-usa.com> <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> <15BA6310-61FB-4433-ACA5-5F29EBB7883C@innotts.co.uk> <4C4C6B64.9080209@monnet-usa.com> <6023A6DC-7C56-4055-A002-30709F39778E@innotts.co.uk> Message-ID: Alls we need to do is this. Now listen up closely and I'll tell you a little story about a silly little hack. Once upon a time, a pony was seen to be doing semaphore with her ears from atop a a great and mighty buffalo. But it wasn't a real buffalo, it was actually a great big rock that happened to look identical to a buffalo. Like a floating point rounding error away from being an actual buffalo. Really words don't do it justice.. Where was I? Oh yes. So the guys from Area 51 went down, thinking it were some kind of alien horse, communicating messages of destruction or peace, but when they decoded the semaphore message, it said this LISTEN UP HUMANS STOP WE SEE YOU HAVE SOME ISSUES AND YOU NEED TO > COMMUNICATE MORE EFFECTIVELY STOP YOUR MAILING LISTS ARE A GOOD START STOP > THEY ARE TOO DIVISIVE HOWEVER AND LACK GOOD DATA PORTABILITY STOP WE SUGGEST > YOU CONNECT THEM TOGETHER BY FORGING A SUBSCRIBE REQUEST EMAIL FROM ONE LIST > AND SEND IT TO THE OTHER STOP THEN YOU CAN CONFIRM IT BECAUSE THE MESSAGE > WILL GO THROUGH TO THE LIST EXCLAMATION POINT IT IS A TRUE FACT THAT MAILING > LISTS WORK JUST LIKE ROMANTIC COMEDIES STOP WE HOPE THIS KNOWLEDGE HELPS AND > YOUR MAILING LISTS ENJOY THEIR DATE EVEN IF THEY LEARN TO RESENT YOU ALL FOR > TRICKING THEM STOP AND HERE ARE SOME PRIME NUMBERS SO YOU KNOW WE ARE ALIENS > 2 3 5 7 11 13 17 19 23 29? And that's the tale of how we came to solve all of the world's hunger and poverty, and why on this special day every year, the 26th of July, we celebrate by eating a giant pizza in the centre of the city! ? Jenna On Mon, Jul 26, 2010 at 3:42 AM, Dave Everitt wrote: > That still leaves "How can inboard links to the existing list be > forwarded?" Can we redirect* from rubyforge? Given that broken links to > rubyforge mailing list posts are going to exaggerate the 'Camping is dead' > impression - Dave E > > On 25 Jul 2010, at 17:50, Philippe Monnet wrote: >> >> There is an interesting comment on the Librelist site: "... All archives >> are accessible efficiently via rsync as maildir directories. This means you >> can host your mailing list archives on your project?s site rather than >> directing users to Librelist. Librelist also provides simple archive >> browsing for smaller projects that can?t host themselves. ...". >> I am not very Unix savvy at all but does this imply you could "rsynch" >> from RubyForge? I am way out of my depth here... >> >> >> On 7/25/2010 10:22 AM, Dave Everitt wrote: >> >>> >>> Librelist looks great. Can it take the existing archives? How can inboard >>> links to the existing list be forwarded? Are the killer questions - Dave E. >>> >>> Speaking of the mailing list: rubyforge sucks! Couldn't we have >>>> something nice, like librelist? Those hackety hack guys with their fancy >>>> mailing list put ours to shame. >>>> >>>> _why is still the admin contact of this 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 >> > > _______________________________________________ > > 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 deveritt at innotts.co.uk Mon Jul 26 17:43:57 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Mon, 26 Jul 2010 22:43:57 +0100 Subject: Camping on StackOverflow In-Reply-To: References: <4C4C3817.9060702@monnet-usa.com> <35AA86AF-83F0-438C-BEAF-97505762E025@innotts.co.uk> <15BA6310-61FB-4433-ACA5-5F29EBB7883C@innotts.co.uk> <4C4C6B64.9080209@monnet-usa.com> <6023A6DC-7C56-4055-A002-30709F39778E@innotts.co.uk> Message-ID: <39E4893A-DF05-496F-B4E3-868F7F523B49@innotts.co.uk> I love it. Thank you to the Creative Pony :-) - Dave E. > Alls we need to do is this. Now listen up closely and I'll tell you > a little story about a silly little hack. > > Once upon a time, a pony was seen to be doing semaphore with her > ears from atop a a great and mighty buffalo. But it wasn't a real > buffalo, it was actually a great big rock that happened to look > identical to a buffalo. Like a floating point rounding error away > from being an actual buffalo. Really words don't do it justice.. > Where was I? Oh yes. So the guys from Area 51 went down, thinking > it were some kind of alien horse, communicating messages of > destruction or peace, but when they decoded the semaphore message, > it said this > > LISTEN UP HUMANS STOP WE SEE YOU HAVE SOME ISSUES AND YOU NEED TO > COMMUNICATE MORE EFFECTIVELY STOP YOUR MAILING LISTS ARE A GOOD > START STOP THEY ARE TOO DIVISIVE HOWEVER AND LACK GOOD DATA > PORTABILITY STOP WE SUGGEST YOU CONNECT THEM TOGETHER BY FORGING A > SUBSCRIBE REQUEST EMAIL FROM ONE LIST AND SEND IT TO THE OTHER STOP > THEN YOU CAN CONFIRM IT BECAUSE THE MESSAGE WILL GO THROUGH TO THE > LIST EXCLAMATION POINT IT IS A TRUE FACT THAT MAILING LISTS WORK > JUST LIKE ROMANTIC COMEDIES STOP WE HOPE THIS KNOWLEDGE HELPS AND > YOUR MAILING LISTS ENJOY THEIR DATE EVEN IF THEY LEARN TO RESENT > YOU ALL FOR TRICKING THEM STOP AND HERE ARE SOME PRIME NUMBERS SO > YOU KNOW WE ARE ALIENS 2 3 5 7 11 13 17 19 23 29? > > And that's the tale of how we came to solve all of the world's > hunger and poverty, and why on this special day every year, the > 26th of July, we celebrate by eating a giant pizza in the centre of > the city! > > ? > Jenna > > On Mon, Jul 26, 2010 at 3:42 AM, Dave Everitt > wrote: > That still leaves "How can inboard links to the existing list be > forwarded?" Can we redirect* from rubyforge? Given that broken > links to rubyforge mailing list posts are going to exaggerate the > 'Camping is dead' impression - Dave E > > On 25 Jul 2010, at 17:50, Philippe Monnet wrote: > > There is an interesting comment on the Librelist site: "... All > archives are accessible efficiently via rsync as maildir > directories. This means you can host your mailing list archives on > your project?s site rather than directing users to Librelist. > Librelist also provides simple archive browsing for smaller > projects that can?t host themselves. ...". > I am not very Unix savvy at all but does this imply you could > "rsynch" from RubyForge? I am way out of my depth here... > > > On 7/25/2010 10:22 AM, Dave Everitt wrote: > > Librelist looks great. Can it take the existing archives? How can > inboard links to the existing list be forwarded? Are the killer > questions - Dave E. > > Speaking of the mailing list: rubyforge sucks! Couldn't we have > something nice, like librelist? Those hackety hack guys with their > fancy mailing list put ours to shame. > > _why is still the admin contact of this list. :| > From noreply at github.com Tue Jul 27 14:12:49 2010 From: noreply at github.com (GitHub) Date: Tue, 27 Jul 2010 11:12:49 -0700 Subject: [GitHub] Camping Ruby 1.9.1 Message-ID: Anyone see this, submitted as an issue on GitHub? - Dave E. ---- skylerrichter reported an issue: Is camping compatible with ruby 1.9.1? I just upgraded my server to 1.9.1 and now I am getting this: NoMethodError at /register undefined method `scan' for :Register:Symbol Ruby (eval): in block (2 levels) in M, line 30 If I reload the camping app I then get a standard camping 404 Camping Problem! / not found Is this an issue with ruby 1.9.1 or did I do something wrong when I compiled ruby? View Issue: http://github.com/camping/camping/issues#issue/26 From judofyr at gmail.com Sat Jul 31 07:20:01 2010 From: judofyr at gmail.com (Magnus Holm) Date: Sat, 31 Jul 2010 13:20:01 +0200 Subject: Multiple inserts in ActiveRecord Message-ID: Hey campers, I'm wondering if any of you know a better solution to skylerrichter's problem: http://github.com/camping/camping/issues#issue/28 The basic idea is that he want to create a Company, and then the first User in that Company: @company = Company.create( :name => @input.name, :sub_domain => @input.subdomain) # Create the first user: @user = User.create( :company_id => @company.id, :first_name => @input.first_name, :last_name => @input.last_name, :email => @input.email, :password => @input.password) Both Company and User has validations, so there's a possibility that they don't actually get saved to the DB, and in that case he don't want *any* of them to be saved (I assume). I was thinking about something like this: begin Company.transaction do @company = Company.create!( :name => @input.name, :sub_domain => @input.subdomain) @user = User.create!( :company_id => @company.id, :first_name => @input.first_name, :last_name => @input.last_name, :email => @input.email, :password => @input.password) end rescue @errors = [@company, @user].compact.map(&:full_messages).flatten render :errors else redirect Login end But I'm wondering if there's a better way to solve this? // Magnus Holm From dsusco at gmail.com Sat Jul 31 08:31:16 2010 From: dsusco at gmail.com (David Susco) Date: Sat, 31 Jul 2010 08:31:16 -0400 Subject: Multiple inserts in ActiveRecord In-Reply-To: References: Message-ID: You could check if both the company and user are valid, and if so create them. @company = Company.new (...) @user = User.new (...) if (@company.valid? and @user.valid?) @company.save @user.save ) Dave On Sat, Jul 31, 2010 at 7:20 AM, Magnus Holm wrote: > Hey campers, > > I'm wondering if any of you know a better solution to skylerrichter's > problem: http://github.com/camping/camping/issues#issue/28 > > The basic idea is that he want to create a Company, and then the first > User in that Company: > > ? @company = Company.create( > ? ? :name => @input.name, > ? ? :sub_domain => @input.subdomain) > > ? # Create the first user: > ? @user = User.create( > ? ? :company_id => @company.id, > ? ? :first_name => @input.first_name, > ? ? :last_name => @input.last_name, > ? ? :email => @input.email, > ? ? :password => @input.password) > > Both Company and User has validations, so there's a possibility that > they don't actually get saved to the DB, and in that case he don't want > *any* of them to be saved (I assume). I was thinking about something like this: > > ? begin > ? ? Company.transaction do > ? ? ? @company = Company.create!( > ? ? ? ? :name => @input.name, > ? ? ? ? :sub_domain => @input.subdomain) > > ? ? ? @user = User.create!( > ? ? ? ? :company_id => @company.id, > ? ? ? ? :first_name => @input.first_name, > ? ? ? ? :last_name => @input.last_name, > ? ? ? ? :email => @input.email, > ? ? ? ? :password => @input.password) > ? ? end > ? rescue > ? ? @errors = [@company, @user].compact.map(&:full_messages).flatten > ? ? render :errors > ? else > ? ? redirect Login > ? end > > But I'm wondering if there's a better way to solve this? > > // Magnus Holm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Dave From skylerrichter at gmail.com Sat Jul 31 12:17:03 2010 From: skylerrichter at gmail.com (Skyler Richter) Date: Sat, 31 Jul 2010 10:17:03 -0600 Subject: Multiple inserts in ActiveRecord In-Reply-To: References: Message-ID: @David Susco I figured that was the way to do it. Thats what I tried the first time but I seem to only be able to validate 1 item at a time. It only validates the company model and it ignores the "&& @user.valid?" If I rearrange my code so that the user gets saved first then only the user validates and then it ignores the "&& @company.valid?". Any ideas? On Sat, Jul 31, 2010 at 6:31 AM, David Susco wrote: > You could check if both the company and user are valid, and if so create them. > > @company = Company.new (...) > @user = User.new (...) > > if (@company.valid? and @user.valid?) > ?@company.save > ?@user.save > ) > > Dave > > On Sat, Jul 31, 2010 at 7:20 AM, Magnus Holm wrote: >> Hey campers, >> >> I'm wondering if any of you know a better solution to skylerrichter's >> problem: http://github.com/camping/camping/issues#issue/28 >> >> The basic idea is that he want to create a Company, and then the first >> User in that Company: >> >> ? @company = Company.create( >> ? ? :name => @input.name, >> ? ? :sub_domain => @input.subdomain) >> >> ? # Create the first user: >> ? @user = User.create( >> ? ? :company_id => @company.id, >> ? ? :first_name => @input.first_name, >> ? ? :last_name => @input.last_name, >> ? ? :email => @input.email, >> ? ? :password => @input.password) >> >> Both Company and User has validations, so there's a possibility that >> they don't actually get saved to the DB, and in that case he don't want >> *any* of them to be saved (I assume). I was thinking about something like this: >> >> ? begin >> ? ? Company.transaction do >> ? ? ? @company = Company.create!( >> ? ? ? ? :name => @input.name, >> ? ? ? ? :sub_domain => @input.subdomain) >> >> ? ? ? @user = User.create!( >> ? ? ? ? :company_id => @company.id, >> ? ? ? ? :first_name => @input.first_name, >> ? ? ? ? :last_name => @input.last_name, >> ? ? ? ? :email => @input.email, >> ? ? ? ? :password => @input.password) >> ? ? end >> ? rescue >> ? ? @errors = [@company, @user].compact.map(&:full_messages).flatten >> ? ? render :errors >> ? else >> ? ? redirect Login >> ? end >> >> But I'm wondering if there's a better way to solve this? >> >> // Magnus Holm >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > > > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From omar.gomez at gmail.com Sat Jul 31 20:12:34 2010 From: omar.gomez at gmail.com (=?ISO-8859-1?Q?Omar_G=F3mez?=) Date: Sat, 31 Jul 2010 19:12:34 -0500 Subject: Reloading in a standard config.ru rack app (Camping 2.0) Message-ID: Dear Camping ninjas, I've been using Camping via bin/camping and reloading works as expected OK. What I have not been able to do is to correctly setup a Camping app with reloading support in a standard config.ru rack app. Thanks for your attention --Omar G?mez -- Follow me at: Twitter: http://twitter.com/omargomez Buzz: http://www.google.com/profiles/108165850309051561506#buzz From dsusco at gmail.com Sat Jul 31 23:43:23 2010 From: dsusco at gmail.com (David Susco) Date: Sat, 31 Jul 2010 23:43:23 -0400 Subject: Multiple inserts in ActiveRecord In-Reply-To: References: Message-ID: That's weird, I can't test anything until Monday but what happens when you nest it in two ifs? If @company.valid? if @user.valid? save On Sat, Jul 31, 2010 at 12:17 PM, Skyler Richter wrote: > @David Susco > > I figured that was the way to do it. Thats what I tried the first time > but I seem to only be able to validate 1 item at a time. It only > validates the company model and it ignores the "&& @user.valid?" If I > rearrange my code so that the user gets saved first then only the user > validates and then it ignores the "&& @company.valid?". Any ideas? > > On Sat, Jul 31, 2010 at 6:31 AM, David Susco wrote: >> You could check if both the company and user are valid, and if so create them. >> >> @company = Company.new (...) >> @user = User.new (...) >> >> if (@company.valid? and @user.valid?) >> ?@company.save >> ?@user.save >> ) >> >> Dave >> >> On Sat, Jul 31, 2010 at 7:20 AM, Magnus Holm wrote: >>> Hey campers, >>> >>> I'm wondering if any of you know a better solution to skylerrichter's >>> problem: http://github.com/camping/camping/issues#issue/28 >>> >>> The basic idea is that he want to create a Company, and then the first >>> User in that Company: >>> >>> ? @company = Company.create( >>> ? ? :name => @input.name, >>> ? ? :sub_domain => @input.subdomain) >>> >>> ? # Create the first user: >>> ? @user = User.create( >>> ? ? :company_id => @company.id, >>> ? ? :first_name => @input.first_name, >>> ? ? :last_name => @input.last_name, >>> ? ? :email => @input.email, >>> ? ? :password => @input.password) >>> >>> Both Company and User has validations, so there's a possibility that >>> they don't actually get saved to the DB, and in that case he don't want >>> *any* of them to be saved (I assume). I was thinking about something like this: >>> >>> ? begin >>> ? ? Company.transaction do >>> ? ? ? @company = Company.create!( >>> ? ? ? ? :name => @input.name, >>> ? ? ? ? :sub_domain => @input.subdomain) >>> >>> ? ? ? @user = User.create!( >>> ? ? ? ? :company_id => @company.id, >>> ? ? ? ? :first_name => @input.first_name, >>> ? ? ? ? :last_name => @input.last_name, >>> ? ? ? ? :email => @input.email, >>> ? ? ? ? :password => @input.password) >>> ? ? end >>> ? rescue >>> ? ? @errors = [@company, @user].compact.map(&:full_messages).flatten >>> ? ? render :errors >>> ? else >>> ? ? redirect Login >>> ? end >>> >>> But I'm wondering if there's a better way to solve this? >>> >>> // Magnus Holm >>> _______________________________________________ >>> Camping-list mailing list >>> Camping-list at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/camping-list >>> >> >> >> >> -- >> Dave >> _______________________________________________ >> 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 > -- Dave