@env['REQUEST_METHOD'] is the HTTP method send by the client, @method is the
method (in lowercase) Camping is going to run ("r404" for 404 etc.)// Magnus Holm On Tue, Mar 23, 2010 at 17:01, Matt Zukowski <[email protected]> wrote: > Hey Magnus, while we have your attention, in 2.0 how do I get access to > e['REQUEST_METHOD'] inside the 'service' method? Trying to figure this out > as we speak... > > > On Tue, Mar 23, 2010 at 11:50 AM, Magnus Holm <[email protected]> wrote: > >> I find extending Camping apps to be quite easy, since it's all classes and >> modules, but I can understand that extending Camping itself can be >> difficult/weird. That said, I think a lot can be solved by defining >> #included and #extended. It would be great if you could tell us a bit >> exactly the problems you faced. We still have 1k left. >> >> Don't hurry, though. Let's get 2.0 out first. >> >> // Magnus Holm >> >> >> >> On Tue, Mar 23, 2010 at 16:07, Matt Zukowski <[email protected]> wrote: >> >>> I actually have a reststop app up and running fine with Camping 2.0 >>> (check out Taskr at http://github.com/zuk/taskr). Tthe catch is that >>> it's a version of 2.0 that I forked about this time last year, and looking >>> at the github graph, Magnus has committed a whole slew of changes since >>> then. So whatever broke Reststop must have been committed in the last 10 >>> months or so. >>> >>> To be honest over the last year I've mostly switched form Camping to >>> Sinatra (and lately to Node.js, which is really really cool by the way). The >>> problem with Camping, for me, is that trying to extend it is a nightmare. I >>> learned this the hard way while writing Reststop and Picnic. >>> >>> Anyway I have a bit of time right now, so since there seems to be some >>> interest, I'll pull down the latest version of Camping and see if I can make >>> it work with Reststop. I should also move Reststop to github while I'm at >>> it. >>> >>> On Mon, Mar 22, 2010 at 11:32 PM, Philippe Monnet >>> <[email protected]>wrote: >>> >>>> Hi David, >>>> >>>> I had played with RESTstop on the old Camping maybe six months ago. >>>> I have now started to take a look at what the issues are about. >>>> So far I have found a few things like: >>>> >>>> In reststop.rb: >>>> - the service method needs to retrieve the REQUEST_METHOD using >>>> @env['REQUEST_METHOD'] >>>> -the condition on the if statement on the last m.capture line of the >>>> render method needs to be adjusted (not sure what a[0] should be replaced >>>> with. So far I have temporarily replaced the line by: >>>> s = m.capture{send(:layout){s}} if m.respond_to?(:layout) >>>> >>>> In the blog.rb example >>>> - the version number for camping needs to be updated >>>> - require 'camping/db' should be removed since now obsolete >>>> - require 'markaby' needs to be added >>>> >>>> So far I can bring up the app in a browser, login, add a post. >>>> But if I use Restr I can only do a GET. The PUT currently fails with a >>>> 401. I will continue to try figuring it out over the next week or so. >>>> It would be great if the initial author could help us out. >>>> >>>> Philippe >>>> >>>> >>>> On 3/12/2010 8:04 AM, David Susco wrote: >>>> >>>> Has anyone managed to get camping to work with reststop using 1.9.354? >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Camping-list mailing list >>>> [email protected] >>>> http://rubyforge.org/mailman/listinfo/camping-list >>>> >>> >>> >>> _______________________________________________ >>> Camping-list mailing list >>> [email protected] >>> http://rubyforge.org/mailman/listinfo/camping-list >>> >> >> >> _______________________________________________ >> Camping-list mailing list >> [email protected] >> http://rubyforge.org/mailman/listinfo/camping-list >> > > > _______________________________________________ > Camping-list mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/camping-list >
_______________________________________________ Camping-list mailing list [email protected] http://rubyforge.org/mailman/listinfo/camping-list

