Re: The 2.2 release

2014-09-06 Thread Magnus Holm
_ > Camping-list mailing list > Camping-list@rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Re: first app - some questions

2014-06-09 Thread Magnus Holm
Marshal.dump(123) # => "\x04\bi\x01{" Marshal.load("\x04\bi\x01{") # => 123 -- // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Re: first app - some questions

2014-06-07 Thread Magnus Holm
cond time the user gets a completely different page. That's because the state is different. You might know about cookies: sessions are like cookies that only the server know how to set. It's impossible for the client to set its own session; every session has to be set thr

Re: app doesn't run on windows

2014-06-07 Thread Magnus Holm
gt;> itself and I don't get any more errors. >> >> But I do get this error: >> Camping Problem! / not found >> >> And that's it. No other info. The app is exactly the same as the one >> running in LMDE. >> >> Could this issue be related to

Re: multi-line input field

2014-05-12 Thread Magnus Holm
for displaying the value. >>> >>> I'd like to accomplish multi-line input field. The purpose of such a >>> text box is to enter a bit longer comments. >>> >>> Can it be done? >>> >>> regards, >>> seba >>> >>>

Re: views - html form duplication

2014-04-24 Thread Magnus Holm
On Thu, Apr 24, 2014 at 10:08 PM, Sebastjan Hribar wrote: > Hi, > > I have a question about duplicating a html form in my views. > > To create a new review form in the app I've composed a html form which is a > table and I've ended up with 200+ lines of code due to table row and data > blocks. > >

Re: first app - some questions

2014-04-22 Thread Magnus Holm
On Mon, Apr 21, 2014 at 7:32 PM, Sebastjan Hribar wrote: > Hi, > > I've updated the gist with my next version: > > https://gist.github.com/sebastjan-hribar/11081389 > > It works as I wanted but for now I left out the styling. > > My question is, is this the correct way of setting up routes? That

Re: camping tutorial pre-2

2014-04-16 Thread Magnus Holm
Do you have the exact code you've entered? You can use https://gist.github.com/ to share it. // Magnus Holm On Wed, Apr 16, 2014 at 1:14 PM, Sebastjan Hribar wrote: > Hi Guys, > > I found this pre-2 tutorial on the ruby-camping-links.1.ai site: > http://polzr.blo

Re: Mab::Mixin::Error This tag is already closed

2014-01-24 Thread Magnus Holm
Interesting. Could you post the personnes_list template? // Magnus Holm On Fri, Jan 24, 2014 at 12:51 PM, Francois Sery wrote: > Bonjour, > it's me again. Deploying a camping app on amazon ec2 i have a > > Mab::Mixin::Error at /admin/personnes > > This tag is already c

Re: camping app on elastic beanstalk

2014-01-17 Thread Magnus Holm
Do you actually call App.create? Camping will not do this for you automatically (unless you're using the Camping Server, aka bin/camping). // Magnus Holm On Fri, Jan 17, 2014 at 9:07 AM, Francois Sery wrote: > Bonjour, > here is my app code and the trace. thanks fo

Re: Multiple camping apps in the same rackup?

2014-01-01 Thread Magnus Holm
Yes: map "http://example.com"; do run App end // Magnus Holm On Wed, Jan 1, 2014 at 7:16 AM, Tim Uckun wrote: > Can you match on top level domains? > > > On Wed, Jan 1, 2014 at 1:05 AM, Magnus Holm wrote: >> >> Sorry for the late reply. >> >&

Re: Multiple camping apps in the same rackup?

2013-12-31 Thread Magnus Holm
Sorry for the late reply. The easiest way is to use a config.ru file (this is how you probably run your Camping app anyway): # in config.ru map "/hello" do run Hello end map "/sinatra" do run Sinatra::Application.new end // Magnus Holm On Sun, Dec 8, 2

Re: how do i customize the 404 "campin problem" page?

2013-12-31 Thread Magnus Holm
Sorry for the late reply. Here's how you override the 404: module YourApp def r404(path) "My custom 404" end end // Magnus Holm On Tue, Dec 10, 2013 at 12:32 PM, Francois Sery wrote: > Bonjour, > one more newbie question: how do i customize the 404 "camp

Re: 2 differents layout for my app

2013-12-31 Thread Magnus Holm
Yeah, I would probably have two different apps which connects to the same database (and possibly uses the same models). // Magnus Holm On Tue, Dec 10, 2013 at 4:10 PM, Francois Sery wrote: > @deveritt: i dont want to switch css. My app has a "front end" and an "admin >

Re: Camping without markaby.

2013-12-22 Thread Magnus Holm
This should work: Camping.goes :Xmas module Xmas::Controllers class Index def get render :index end end end __END__ @@ index.erb Hello <%= 'world' %> // Magnus Holm On Sun, Dec 22, 2013 at 10:26 PM, Tim Uckun wrote: > How can I use something other

Re: how to handle >4K session in camping

2013-12-10 Thread Magnus Holm
On Mon, Nov 4, 2013 at 8:55 PM, låzaro wrote: > Sorry for the thread hacking but, how could be run camping as standalone CGI > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. You can use Rack: app.cgi: #!/usr/bin/env ruby require 'rack' require 'my_app' Rack::Se

Re: how to handle >4K session in camping

2013-12-06 Thread Magnus Holm
You should not store a large amount of data in the session. The session is stored in a cookie, and everything you store there has to be sent back and forth over the network. You can however store an ID in the session and lookup data in your database. // Magnus Holm On Tue, Dec 3, 2013 at 12:04

Re: Omniauth and rack middleware

2013-10-24 Thread Magnus Holm
Hi Francois, Just use `MyApp.use`: Camping.goes :Nuts module Nuts use OmniAuth::Builder do provider :facebook, 'FACEBOOK_ID', 'FACEBOOK_SECRET' end end // Magnus Holm On Tue, Oct 22, 2013 at 9:11 AM, Francois Sery wrote: > Bonjour > I m new to rack middlew

Re: mounting multiples app

2013-05-22 Thread Magnus Holm
You need to create a custom config.ru: config.ru: require_relative 'app1' require_relative 'app2' map '/app1' do run App1 end map '/app2' do run App2 end // Magnus Holm On Wed, May 22, 2013 at 2:05 PM, låzaro wrote: > Hi, I tryin

Re: charset for french words

2013-03-29 Thread Magnus Holm
You can re-define the #service-method which will be invoked on every request, and there set the correct charset: Camping.goes :Nuts module Nuts def service(*) @headers['Content-Type'] = 'text/html; charset=utf-8' super end end // Magnus Holm On Fri, Mar

Re: Add Rake Middleware

2013-03-28 Thread Magnus Holm
Sure: Camping.goes :Noes module Noes use Rack::Foobar end On Thursday, March 28, 2013, curtis bissonnette wrote: > Is there a simple way to add some Rake middleware to the camping server? > Specifically I'm hoping to include sass and coffee-script support server > side. >

Re: modify the way active record Pluralize/singularize

2013-03-22 Thread Magnus Holm
e here for more examples: http://api.rubyonrails.org/classes/ActiveSupport/Inflector/Inflections.html // Magnus Holm On Fri, Mar 22, 2013 at 2:16 PM, Francois Sery wrote: > hello, i'm new to Camping and i dont speek english very well so , please, > forgive my mistakes...here is my question:

Re: Mab::Mixin::Error at /

2013-03-21 Thread Magnus Holm
Yikes! I broke everything! I've pushed out camping 2.1.532, could you try that? gem install camping -v 2.1.532 // Magnus Holm On Thu, Mar 21, 2013 at 1:57 AM, curtis bissonnette wrote: > I'm doing something stupid I know... I just started using camping and it > looks great.

Re: Apache Passenger and Reloader

2013-01-03 Thread Magnus Holm
On Wed, Jan 2, 2013 at 7:02 PM, Koaps Freeman wrote: > Hi Guys, > > I just started playing with camping and so far it's pretty awesomo. > > After much messing around I was finally able to get Apache Passenger, > Camping and ActiveRecord to PostgreSQL working. > > One thing I was wondering about, c

Re: Feature: Inline templates?

2012-08-15 Thread Magnus Holm
t MIME-type: __END__ /style.css * { margin: 0; padding: 0 } // Magnus Holm On Wed, Aug 15, 2012 at 4:44 PM, Jenna Fox wrote: > What makes this better than a here doc? > > — > Jenna > > On Wednesday, 15 August 2012 at 6:18 PM, judo...@gmail.com wrote: > > It's been impl

Re: ChillDB License

2012-05-02 Thread Magnus Holm
On Wed, May 2, 2012 at 3:00 PM, Jenna Fox wrote: > This is very helpful! I don't really mind though. Maybe public domain is > best. I'm not a big believer in copyright. Public domain is "people can do whatever they want with it". BSD is "people can do whatever they want with it, but I retain cop

Re: framework size, forking etc.

2012-04-18 Thread Magnus Holm
On Wed, Apr 18, 2012 at 17:49, Jenna Fox wrote: > I think the trouble with streaming over the rack interface is that it's > confusing. I'm fairly good at ruby, but I'm not entirely sure how it would > even work. I guess I need to run my app in a threaded web server, running > every request in it's

Re: framework size, forking etc.

2012-04-18 Thread Magnus Holm
On Wed, Apr 18, 2012 at 15:07, Daniel Bryan wrote: > Thought I'd weigh in for what it's worth, Thanks, I find it very interesting. > My naive first impression of Camping basically took no notice of the whole > 3/4k thing. I appreciate that it's a cool programming feat, and I love the > attitude

Re: framework size, forking etc.

2012-04-17 Thread Magnus Holm
On Mon, Apr 16, 2012 at 22:27, Nokan Emiro wrote: >> >> For now I'm feeling like a pretty bad "maintainer". I'm not using >> Camping enough to see where things need to be fixed, I'm crappy at >> actually shipping stuff, and I'm not sure if I believe that Camping is >> a correct starting point for

Re: framework size, forking etc.

2012-04-16 Thread Magnus Holm
On Mon, Apr 16, 2012 at 22:14, Nokan Emiro wrote: > 2012/4/16 Bartosz Dziewoński >> >> W dniu 16 kwietnia 2012 20:50 użytkownik Nokan Emiro >> napisał: >> > Actually I think it's not logical that you can build HTML by default >> > using >> > Markaby, but you can't build CSS in the same way. >> >

Re: framework size, forking etc.

2012-04-16 Thread Magnus Holm
On Sun, Apr 15, 2012 at 01:59, david costa wrote: > Hi all :) > I have been playing with Sinatra a lot lately and perhaps *some* things are > done easily there (URL mapping, static files) but being a DSL and not a > framework it is a bit different. For many things camping does the job very > well

Re: http_referrer

2012-04-16 Thread Magnus Holm
On Mon, Apr 16, 2012 at 13:45, Nokan Emiro wrote: > Actually env[] works with mongrel also, not just fcgi or passenger. > (No, it's not a typo: env, and not ENV. But I'm sure ENV works too.) Yes, env inside Camping is the same @env (it's just an attr_accessor). Same for @body, @request, @method,

Re: http_referrer

2012-04-15 Thread Magnus Holm
On Sat, Apr 14, 2012 at 10:38, Dave Everitt wrote: > Haha! How did you get Spock on board... :-) > > I must admit I'm a little confused about the sytnax for environmental > variables, because as well as >   @env[HTTP_REFERER] > this also works: >   ENV['SCRIPT_NAME'] > > For a test I just used it

Re: Camping's URL mapping system

2012-04-13 Thread Magnus Holm
means web servers would need to be explicitly configured to duplicate > that behaviour at a lower level - a simple quick camping setup would always > serve files through camping, making debugging easier and applications more > reliably portable. People who need the performance boost of

Re: Camping's URL mapping system

2012-04-12 Thread Magnus Holm
On Thu, Apr 12, 2012 at 15:59, Jenna Fox wrote: > The problem is basically this: > > Sometimes you want to reference static files, and other components of your > site. I have a Gallery app mounted at http://creativepony.com/gallery/ and > it causes me all sorts of trouble. Often times to reference

Re: ~ AppController

2012-04-07 Thread Magnus Holm
You can override #service: module App def service(*args) p({:controller => self.class, :method => @method, :args => args}) p :before super ensure p :after end end // Magnus Holm On Sat, Apr 7, 2012 at 18:11, Nokan Emiro wrote: > Hi, > > What's the

Re: http_referrer

2012-04-06 Thread Magnus Holm
It should be in @env: @env['HTTP_REFERER'] (Note that it's misspelled in the spec) // Magnus Holm On Friday 6. April 2012 at 15:01, Nokan Emiro wrote: > Hi, > > How can I access the Rack request object in a controller? I need > to know the HTTP_REFERRER, but I

Re: http_referrer

2012-04-06 Thread Magnus Holm
Try @request. // Magnus Holm On Friday 6. April 2012 at 16:27, Nokan Emiro wrote: > I'm sorry bothering you, it was there in env, env['HTTP_REFERER']. > > (But it still would be useful sometimes to access the Rack's Request > object...) > > > >

Re: Camping Multimount

2012-02-18 Thread Magnus Holm
On Fri, Feb 17, 2012 at 22:13, Isak Andersson wrote: > Hi, sorry if I'm repeating is email or something, Cinnamon crashed as I was > sending the mail and > the result in the sent folder was completely empty, so I'm just gonna have > to write it all over > again, wee! > > Anyways, my question was a

Re: +1 shorter domain name

2012-02-01 Thread Magnus Holm
On Wed, Feb 1, 2012 at 04:18, adam moore wrote: > I've recently been using Arch linux and 90% of the appeal comes from > their awesome user-led wiki.. > Something which we can gradually add to, build on camping of course, > and which hand-holds beginners would be ideal I think > The website will

Camping 2.2 pre-release

2012-01-25 Thread Magnus Holm
gem install camping --source http://gems.judofyr.net/ *wonders how much Mab breaks* // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

New reloader

2012-01-15 Thread Magnus Holm
at /. (If you named the file app2.rb, App2 would be mounted). If you need the previous functionality, just create a config.ru: map '/app' do run App end map '/app2' do run App2 end This gives you more control and can be reused by other servers (Thin, Passenger)

Mab is pretty much done

2012-01-15 Thread Magnus Holm
ead do title "Web Page" end body do div.wrapper! do yield end end end end end // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Re: Is it possible to read session data from Camping::Session in a middleware?

2012-01-02 Thread Magnus Holm
On Mon, Jan 2, 2012 at 12:39, Daniel Bryan wrote: > Ah, thanks. > > I thought that the order of calling 'use' would explicitly describe the > order. This was my main problem - since Camping's doing a bit of a hack to > neatly slot the middleware in without people needing a rackup file or > whateve

Re: Camping Server: automatically serve static files from public/

2011-12-20 Thread Magnus Holm
On Tue, Dec 20, 2011 at 11:19, Paul van Tilburg wrote: > On Tue, Dec 20, 2011 at 11:06:09AM +0100, Isak Andersson wrote: >> I think Alternative 2 makes the most sense. Then you can have multiple apps >> that don't share the public folder. Plus, you put almost everything in the >> app folder anyway

Re: Remove "camping app.rb app2.rb" support?

2011-12-20 Thread Magnus Holm
On Tue, Dec 20, 2011 at 12:14, Magnus Holm wrote: > I think the ability to load multiple Camping apps at once makes things > a lot more difficult (e.g. how to deal with static files). > > Does anyone actually use this feature? > > // Magnus Holm Just realized that we have a sl

Re: Remove "camping app.rb app2.rb" support?

2011-12-20 Thread Magnus Holm
On Tue, Dec 20, 2011 at 16:36, David Susco wrote: > Magnus, would that still support the dynamic reloading of the app file > that the camping server does now? > > Dave Yes. It will watch both apps. ___ Camping-list mailing list Camping-list@rubyforge.or

Re: Remove "camping app.rb app2.rb" support?

2011-12-20 Thread Magnus Holm
On Tue, Dec 20, 2011 at 15:14, Isak Andersson wrote: > Den 2011-12-20 14:09:02 skrev David Susco : > > >> I've never found myself working on multiple apps at once in a dev >> environment. >> >> Dave > > > I haven't either, but I can definitely see myself using it sometime. The new Camping Server

Topic branch-rules in camping/camping

2011-12-20 Thread Magnus Holm
, please fork and commit there. // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Remove "camping app.rb app2.rb" support?

2011-12-20 Thread Magnus Holm
I think the ability to load multiple Camping apps at once makes things a lot more difficult (e.g. how to deal with static files). Does anyone actually use this feature? // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http

Re: Mab: The tiny Markaby-alternative

2011-12-20 Thread Magnus Holm
On Mon, Dec 19, 2011 at 23:24, Jenna Fox wrote: > I'd like markaby to be a hard dependancy - it's the default, if it isn't > installed beginners get terribly confused, and installing one more gem > really isn't going to cause problems for people - computers have so much > free space these days. If

Re: Mab: The tiny Markaby-alternative

2011-12-20 Thread Magnus Holm
2011/12/19 Bartosz Dziewoński : > 2011/12/19 Magnus Holm : >> The real question here is: Should it be a part of camping/mab.rb or >> the Mab-gem? I'm definitely for adding many features (indentation, >> attribute-validation, flow-validation), but not in Camping. The

Re: Camping Server: automatically serve static files from public/

2011-12-19 Thread Magnus Holm
On Mon, Dec 19, 2011 at 23:26, Jenna Fox wrote: > 'public' is a weird word which has special meaning in the context of web > development for legacy reasons. I think we could find a better word. > 'Resources', 'web', 'files'? Phusion Passenger uses 'public' to run a Rack-application, so it certain

Re: setting controllers etc

2011-12-19 Thread Magnus Holm
On Mon, Dec 19, 2011 at 19:38, wrote: > Okay sure, you can make it simpler, but you still have to type a bunch of > stuff when you are making a controller. > > And now that we have 'set :views' I think it comes with to add the other > stuff because you immediately think, oh well then I can set co

Dealing with extensions

2011-12-19 Thread Magnus Holm
/) Other suggestions? // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Camping Server: automatically serve static files from public/

2011-12-19 Thread Magnus Holm
erved from app/public or app2/public? // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Plan for 2.2

2011-12-19 Thread Magnus Holm
- I've been rewriting the Reloader/Server code a bit to support rackup-files too. I want to merge that. - Resolve the Markaby-thingie. - Figure out how to deal with static files (see other thread). - Figure out how to handle extensions to Camping (see other thread). Anything else? // Magnus

Re: Mab: The tiny Markaby-alternative

2011-12-19 Thread Magnus Holm
On Mon, Dec 19, 2011 at 21:34, Isak Andersson wrote: >> My suggestion would be to make it Markaby 2.0 (of course, once it's >> running and mostly backwards-compatible), keeping the old gem name, >> and to develop on a branch in markaby repo. > > > Yeah, we should more or less do a rewrite and make

Re: Mab: The tiny Markaby-alternative

2011-12-19 Thread Magnus Holm
2011/12/19 Bartosz Dziewoński : > 2011/12/19 Magnus Holm : >> That's actually supported. If an attribute is `true` it will use the >> attribute name as the value. (so checked: true is the same as checked: >> "checked"). Also, false and nil attributes won'

Re: Markaby license issue

2011-12-19 Thread Magnus Holm
On Mon, Dec 19, 2011 at 19:10, Dave Everitt wrote: >> >> Magnus: this commit implements a tiny and fast Markaby-alternative (called >> Mab) ... it's completely inline in camping/mab.rb, but it should be fairy >> easy to create another Rubygem where we could implement for advanced >> features (inde

Re: setting controllers etc

2011-12-19 Thread Magnus Holm
On Mon, Dec 19, 2011 at 00:47, Jenna Fox wrote: > "sit there and write a module for each one"? > > You mean, type 'MyApp::Controllers::'? You could make it simpler by adding a > C = MyApp::Controllers line before your controller requires, then you could > write 'class C::Whatever < R('/url')' sort

Re: Mab: The tiny Markaby-alternative

2011-12-19 Thread Magnus Holm
2011/12/18 Bartosz Dziewoński : > I don't have time to look thru now, but it doesn't seem to support > boolean attributes (e.g. `input checked:true` should render checked="checked" />)? I was very much missing this feature in old > Markaby, and finally even wrote a patch, as you might remember[1].

Mab: The tiny Markaby-alternative

2011-12-18 Thread Magnus Holm
https://github.com/camping/camping/pull/50 Right now it's completely inline in camping/mab.rb, but it should be fairy easy to create another Rubygem where we could implement for advanced features (indentation, AJAX-stuff, whatever). // Magnus

Re: Markaby license issue

2011-12-18 Thread Magnus Holm
On Sun, Dec 18, 2011 at 02:47, Steve Klabnik wrote: > A wild project appears: http://krainboltgreene.github.com/dapper-dan/ Some problems: * It doesn't support CSS proxy (div.wrapper! { … ] == div(:id => 'wrapper') { … }) * It doesn't escape stuff * It doesn't specify its dependencies correctly

Markaby license issue

2011-12-17 Thread Magnus Holm
G-file (or something else that explicitly says the license) related to Markaby, please let us know! If not, I'm wondering what we should do. I don't think that _why would really care if people brought his libraries forward, but I kinda get an uneasy

Re: Camping.use Before, Rack::File.new('public')

2011-12-17 Thread Magnus Holm
2011/12/16 Bartosz Dziewoński : > I usually just use Rack::Static: > > module App >  use Rack::Static, :urls => ['/static'] > end > > This would serve ./static/jquery.js at > localhost:3301/static/jquery.js, though - with the directory included > in URL - but will also serve files from subdirectori

Camping.use Before, Rack::File.new('public')

2011-12-16 Thread Magnus Holm
Here's one useful snippet: def (Before="").new(a,*o)Rack::Cascade.new(o

Re: Camping goes heroku. Hopefully.

2011-11-14 Thread Magnus Holm
On Mon, Nov 14, 2011 at 19:44, Steve Klabnik wrote: >> Just remember that the free version of Heroku doesn't include database >> support. > > Whaaa? Since when? http://www.heroku.com/pricing#0-0 says you get 5MB for $0. Hm… Really? It seems I got the wrong impression after their price change… O

Re: Camping goes heroku. Hopefully.

2011-11-13 Thread Magnus Holm
On Sun, Nov 13, 2011 at 18:27, Piotr S wrote: > Well yeah. I know about the gems and configu.ru. > It's the magic part of switching between databases that really gives me the > mental workout. See http://devcenter.heroku.com/articles/rack#database_access for how to connect ActiveRecord to the dat

Re: which view am I inside?

2011-10-14 Thread Magnus Holm
On Thu, Oct 13, 2011 at 23:36, Nokan Emiro wrote: > My question was about the layout.  Suppose that Alfa and Beta are > menu items in the layout, and I want to mark the current menu item > with different appearance: > > > module App::Views >   def layout >     case .  #<--- Which view am I cur

Re: Passenger, Rack and __END__ error

2011-10-14 Thread Magnus Holm
> right. > > This will probably never work, though: [http://pastie.org/2693243] > > – Matthias Woah, I never realized that __END__ was valid on its own line inside a heredoc/string… ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforg

Re: how to catch 404s?

2011-10-13 Thread Magnus Holm
oesn't have the method. // Magnus Holm On Thu, Oct 13, 2011 at 21:25, Nokan Emiro wrote: > How can I hide/catch the "Camping problem! /xxx not found" pages? > It would be great to define my own handler instead, or sim

Re: which view am I inside?

2011-10-13 Thread Magnus Holm
On Thu, Oct 13, 2011 at 21:33, Nokan Emiro wrote: > How can I guess the view's name in my layout method? > > It would be great to know because of highlight the current > menu item the user has selected.  Of course I can store it in > a variable in my controller just before I call render :view, but

Re: Passenger, Rack and __END__ error

2011-10-13 Thread Magnus Holm
2011/10/13 Matthias Wächter : > On 13.10.2011 20:02, Magnus Holm wrote: >> >> I don't think rackup-files can have __END__. > > https://github.com/rack/rack/blob/master/test/builder/end.ru > > – Matthias It's broken: https://github.com/rack/rack/pull/253

Re: Camping into production

2011-10-13 Thread Magnus Holm
On Thu, Oct 13, 2011 at 21:16, Nokan Emiro wrote: > >> SCRIPT_NAME is the mount-path. >> PATH_INFO is the internal app-path. >> >> So if you want your application available at xxx.com/my_app/, then the >> request xxx.com/my_app/add will look like this: >> >>  SCRIPT_NAME="/my_app" >>  PATH_INFO="/

Re: Passenger, Rack and __END__ error

2011-10-13 Thread Magnus Holm
Try to split it up in two files: app.rb: The app config.ru: require 'app' run Nuts I don't think rackup-files can have __END__. // Magnus Holm On Thu, Oct 13, 2011 at 17:48, Dave Everitt wrote: > I might be missing something stupid.. but Passenger doesn'

Re: Camping into production

2011-10-13 Thread Magnus Holm
On Wed, Oct 12, 2011 at 22:20, Nokan Emiro wrote: >> It seems to me that PATH_INFO is still not properly handled, but that >> it's always empty. > > You are right, PATH_INFO is always empty.  If I fill it with the > $SCRIPT_NAME > value, controllers can be accessed again.  But links generated by R

Re: Camping into production

2011-10-12 Thread Magnus Holm
On Wed, Oct 12, 2011 at 21:07, Nokan Emiro wrote: > >> Thanks!   I had to hack a bit in camping-2.1.469.gemspec, >> but now it works. > > > I'm sorry to say this but it still does not work.  :(    I was incautious. > > After the redirect it shows the right URL in the browser.  That's fine, > but n

Re: run my Camping app as a Rack app

2011-10-12 Thread Magnus Holm
On Tue, Oct 11, 2011 at 18:21, Nokan Emiro wrote: > Thanks for the explanation. > > I have had the create method in my application, it calls > Models::create_scheme, because I have migrations too. > (Everything encapsulated, that's what I like about Camping.) > > Actually the problem with X.create

Re: Camping into production

2011-10-11 Thread Magnus Holm
On Tue, Oct 11, 2011 at 20:46, Nokan Emiro wrote: > Thanks!   I had to hack a bit in camping-2.1.469.gemspec, > but now it works. :) > > u Damn, I hate these issues with YAML and gemspecs :/ I uploaded a new version that hopefully will install nicely on 1.8 too. Could you try to re-install it in

Re: Camping into production

2011-10-11 Thread Magnus Holm
On Tue, Oct 11, 2011 at 18:00, Nokan Emiro wrote: > Sensiteve parts are masked with ***. > > http://pastie.org/2676396 > > u. Thanks. This is a bug in Camping which has been fixed in 5423c7a0. You can install the latest development version of Camping by running: gem install camping --sou

Re: run my Camping app as a Rack app

2011-10-11 Thread Magnus Holm
On Sun, Oct 9, 2011 at 15:43, Nokan Emiro wrote: > Hi, > > Could you please show me the preferred/nicest way > to run my Camping application as a Rack all?  I like > doing my work in Rack because it's easy to run my app > in a standalone webserver, or "mount" it to a path in > my production enviro

Re: Camping into production

2011-10-11 Thread Magnus Holm
On Tue, Oct 11, 2011 at 09:02, Nokan Emiro wrote: > Hi, > > As you already know I'm working on turning my Camping app > into production.  Unfortunatelly I find lots of problems on my way. > The next one is here: > > My Camping app does something dirty on the 'redirect CtrllerName' > lines.  The we

Re: Helpers and R() routes

2011-10-05 Thread Magnus Holm
I've added a failing test: https://github.com/camping/camping/commit/7aa0e1fa934806f964ad120c1b4bb21783c7e008 Will look into it later :-) // Magnus Holm On Wed, Oct 5, 2011 at 03:34, Jenna Fox wrote: > It'd be cool if in the next version of camping, you could use > R(Contr

Re: Simplest easiest rss feeds?

2011-10-05 Thread Magnus Holm
On Wed, Oct 5, 2011 at 02:20, Jenna Fox wrote: > I'm looking to make rss feeds of some of my controller data - what's the > simplest way to render some? Is there some way I can feed a json-like arrays > of hashes type of structure in to some gem and get out an xml feed? Would it > be more of a bui

Re: Maintenance release of 2.1

2011-10-03 Thread Magnus Holm
On Sun, Oct 2, 2011 at 14:26, Jenna Fox wrote: > I wouldn't bother with reducing the revision number. If anything > having weirdly high ones makes the project seem more alive and active. > Is the minor number even functionally useful here? Maybe we should > ditch that and just keep major as a "loo

Re: Feature: Inline templates?

2011-10-02 Thread Magnus Holm
2011/9/24 Bartosz Dziewoński : > A comment after some time: I'd appreciate it more if I could just have > one "external" file with all the templates, and one with the Camping > code, and I could "link in" the templates to parse using this > mechanism. This works, although it's kinda hacky: eval(

Maintenance release of 2.1

2011-10-02 Thread Magnus Holm
thinking of changing REV to "number of commits since previous release", simply to avoid some high revision numbers. Thoughts? Okay with a little maintenance release? Okay with some undocumented experimental features? Okay with REV? Okay with decreas

Re: Feature: Simple controllers?

2011-10-02 Thread Magnus Holm
2011/9/24 Bartosz Dziewoński : > So, are we reverting it? It's still in the latest GitHub commit. I've reverted it. ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Re: failing test

2011-09-24 Thread Magnus Holm
Pretty sure this is related to incompatability with the latest Rack (which suddenly slightly "broke" the Session-API). It's fixed in latest master. Maybe we should just do a release soon. // Magnus Holm On Sat, Sep 24, 2011 at 22:22, Paul van Tilburg wrote: > Hi! > >

Re: What is the Best Way to Install Camping in 2011?

2011-09-07 Thread Magnus Holm
On Wed, Sep 7, 2011 at 16:00, Ed Heil wrote: > And that turned out to be fixable with a global search and replace of " > 00:00:00.0Z" to "" in my gemspecs.  Rock. :) Great! Feel free to bother us more if you encounter more problems :) ___ Campin

Re: What is the Best Way to Install Camping in 2011?

2011-09-07 Thread Magnus Holm
On Wed, Sep 7, 2011 at 04:35, Ed Heil wrote: > Gave this a shot, and now when I run Camping I get: > > Invalid gemspec in > [/Library/Ruby/Gems/1.8/specifications/camping-2.1.448.gemspec]: Illformed > requirement ["# 0.8.7"] > > Is that bad? Try to upgrade RubyGems: sudo gem update --system I

Re: Using CouchDB in Camping - looking for advice

2011-08-30 Thread Magnus Holm
On Mon, Aug 29, 2011 at 05:39, Daniel Bryan wrote: > Woah, that sounds pretty cool. Are you using RubyParser or Ripper? > > Neither. I'm using sourcify ( > http://rubydoc.info/gems/sourcify/0.5.0/frames ) to convert blocks into an > S Expression, and then my own library to parse that and spit out

Re: What is the Best Way to Install Camping in 2011?

2011-08-30 Thread Magnus Holm
We definitely need to put out a new release. Try this in the meantime: gem install camping --source http://gems.judofyr.net/ (I've just updated the DNS record, so it might take an hour or two to propagate correctly) // Magnus Holm On Tue, Aug 30, 2011 at 07:09, John Beppu wrote: &g

Re: Using CouchDB in Camping - looking for advice

2011-08-28 Thread Magnus Holm
On Sun, Aug 28, 2011 at 04:58, Daniel Bryan wrote: > Hello camping people > > I've written a Ruby library for working with CouchDB. It's a pretty thin > API - it provides a database object, a document object (a glorified hash) > and a design object. > > In case anyone's not familiar with CouchDB,

Re: Feature: Inline templates?

2011-08-26 Thread Magnus Holm
On Aug 26, 2011 6:42 PM, "Bartosz Dziewoński" wrote: > > If this only supports Erb, then we should throw it away as fast as > possible ;) I see no reason why would anyone want to use something > *that* dinosauric in a new project. > > If it also supports (or can support), say, Haml, then I see how

Re: Feature: Simple controllers?

2011-08-25 Thread Magnus Holm
On Aug 25, 2011 10:54 PM, "John Beppu" wrote: > > If I wanted that notation, I'd just use Sinatra. ;) > > Like Bartosz, I like having named controllers so that I can pass them to R() when generating links. Does it make it better that you can name them too? Index = get "/" do ... end Se

Re: Feature: Simple controllers?

2011-08-25 Thread Magnus Holm
On Thu, Aug 25, 2011 at 21:28, David Susco wrote: > Would you have to write the RE for every declaration? > > ie... > >  module App::Controllers >   get '/(.*)' do |name| >     "Hello #{name}" >   end > >   put '/(.*)' do |name| >     "Hello #{name}" >   end >  end That wouldn't work. Camping wou

Feature: Inline templates?

2011-08-25 Thread Magnus Holm
Another feature! Inline templates: module App::Controllers get '/' do @title = "My Perfect App" render :index end end __END__ @@ index.erb Welcome to <%= @title %> What'd you think? Keep or throw away? It costs us 184 bytes

Feature: Simple controllers?

2011-08-25 Thread Magnus Holm
I just pushed a new feature to Camping: Simple controllers. module App::Controllers get '/(.*)' do |name| "Hello #{name}" end end What do you think? Useful? Or should I revert it? It currently costs us 87 by

  1   2   3   >