Philippe Monnet | 1 May 2010 19:14

Re: Changing render semantics?

Got a chance today to verify all my apps and I am not using the multiple argument for of render.
So go for it Magnus! :-)

On 4/24/2010 4:39 PM, Magnus Holm wrote:
I'm trying to integrate Tilt (for providing Haml etc. support), but are having some problems supporting both the previous `render` and this new `render`. Previous render: - loads Markaby when needed - Always wraps the layout - render :index # => Calls index() within Markaby - render :index, 1, 2 # => Calls index(1, 2) within Markaby What I want from the new render: - loads Markaby when needed - loads Tilt when needed - render :index, :layout => false # => Don't wraps the layout - render :foo # => Will check #{VIEW_PATH}/foo.* and render that file (falling back on the Markaby methid) - render :foo, :locals => { :bar => 123 } # => Same as above, but with local variables set - render :index, :locals => { :foo => 123 } # => :locals is ignored if it's a Markaby method I guess the question is: Does anybody actually use `render` with multiple arguments (render :index, 1, 2)? If not, I guess we can easily switch to this new `render` without breaking code. // Magnus Holm _______________________________________________ Camping-list mailing list Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Philippe Monnet | 9 May 2010 01:43

Proposal for optional compilation and caching of Tilt templates

I gave Magnus' excellent integration of Tilt a whirl today and really love it.
It's also cool because you can match different types of templates at the same time (e.g. Markaby + HAML).

I found that while prototyping it would be nice to not have Camping compile and cache Tilt templates.
So I used the new option capability and defined a :dynamic_templates option.

e.g.:

module TiltTest
    set :views, File.dirname(__FILE__) + '/views'
    set :dynamic_templates, true
   
    #...
end

I changed the Camping code to check for that option and only compile and cache if false.
What do you think?
Maybe we need a shorter or different name for the option?

I checked in the changes in my fork: http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764

Magnus, you might have some additional ideas for tweaking this feature. So feel free to add/alter and merge to your liking.

Philippe
_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Magnus Holm | 9 May 2010 02:03
Picon
Gravatar

Re: Proposal for optional compilation and caching of Tilt templates

Thanks for testing it out ;)

I agree: we can't cache templates in development and you shouldn't need to set an option for that, however we also want Camping to be speedy out-of-box.

What about applying your patch, but also make bin/camping set :dynamic_templates to true if it's not set already?

If you want to force caching (or force not-caching) in your app, you simply set :dynamic_templates, true/false. And if you don't, it compiles if you i.e. run it through a configuration.ru, but is dynamic with bin/camping. Best of both worlds?

On May 9, 2010 12:43 AM, "Philippe Monnet" <ruby-O32XMImoVjOXzmuOJsdVMQ@public.gmane.org> wrote:

I gave Magnus' excellent integration of Tilt a whirl today and really love it.
It's also cool because you can match different types of templates at the same time (e.g. Markaby + HAML).

I found that while prototyping it would be nice to not have Camping compile and cache Tilt templates.
So I used the new option capability and defined a :dynamic_templates option.

e.g.:

module TiltTest
    set :views, File.dirname(__FILE__) + '/views'
    set :dynamic_templates, true
   
    #...
end

I changed the Camping code to check for that option and only compile and cache if false.
What do you think?
Maybe we need a shorter or different name for the option?

I checked in the changes in my fork: http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764

Magnus, you might have some additional ideas for tweaking this feature. So feel free to add/alter and merge to your liking.

Philippe

_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list
_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Philippe Monnet | 9 May 2010 22:10

Re: Proposal for optional compilation and caching of Tilt templates

I just made the changes and merged up to the main Camping branch:
I am now setting the new :dynamic_templates option when you run the camping server (only).

Magnus I did not rebuild the official gem yet. Maybe you could do that.

On 5/8/2010 6:03 PM, Magnus Holm wrote:

Thanks for testing it out ;)

I agree: we can't cache templates in development and you shouldn't need to set an option for that, however we also want Camping to be speedy out-of-box.

What about applying your patch, but also make bin/camping set :dynamic_templates to true if it's not set already?

If you want to force caching (or force not-caching) in your app, you simply set :dynamic_templates, true/false. And if you don't, it compiles if you i.e. run it through a configuration.ru, but is dynamic with bin/camping. Best of both worlds?

On May 9, 2010 12:43 AM, "Philippe Monnet" <ruby <at> monnet-usa.com> wrote:

I gave Magnus' excellent integration of Tilt a whirl today and really love it.
It's also cool because you can match different types of templates at the same time (e.g. Markaby + HAML).

I found that while prototyping it would be nice to not have Camping compile and cache Tilt templates.
So I used the new option capability and defined a :dynamic_templates option.

e.g.:

module TiltTest
    set :views, File.dirname(__FILE__) + '/views'
    set :dynamic_templates, true
   
    #...
end

I changed the Camping code to check for that option and only compile and cache if false.
What do you think?
Maybe we need a shorter or different name for the option?

I checked in the changes in my fork: http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764

Magnus, you might have some additional ideas for tweaking this feature. So feel free to add/alter and merge to your liking.

Philippe

_______________________________________________
Camping-list mailing list
Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/camping-list
_______________________________________________ Camping-list mailing list Camping-list-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/camping-list

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Magnus Holm | 9 May 2010 23:04
Picon
Gravatar

Re: Proposal for optional compilation and caching of Tilt templates

Nice! Great to see some contributions to Camping.

Still wondering what's the best way to handle small releases. We could
mark it as --prerelease on Gemcutter or keep having it on my server.

I also don't release 2.1 until we have at least some tests. Could just
be a wrapper around the test/apps-directory which makes sure they run
properly, but I want at least have *something*.

// Magnus Holm

On Sun, May 9, 2010 at 23:10, Philippe Monnet <ruby <at> monnet-usa.com> wrote:
> I just made the changes and merged up to the main Camping branch:
> I am now setting the new :dynamic_templates option when you run the camping
> server (only).
>
> Magnus I did not rebuild the official gem yet. Maybe you could do that.
>
> On 5/8/2010 6:03 PM, Magnus Holm wrote:
>
> Thanks for testing it out ;)
>
> I agree: we can't cache templates in development and you shouldn't need to
> set an option for that, however we also want Camping to be speedy
> out-of-box.
>
> What about applying your patch, but also make bin/camping set
> :dynamic_templates to true if it's not set already?
>
> If you want to force caching (or force not-caching) in your app, you simply
> set :dynamic_templates, true/false. And if you don't, it compiles if you
> i.e. run it through a configuration.ru, but is dynamic with bin/camping.
> Best of both worlds?
>
> On May 9, 2010 12:43 AM, "Philippe Monnet" <ruby <at> monnet-usa.com> wrote:
>
> I gave Magnus' excellent integration of Tilt a whirl today and really love
> it.
> It's also cool because you can match different types of templates at the
> same time (e.g. Markaby + HAML).
>
> I found that while prototyping it would be nice to not have Camping compile
> and cache Tilt templates.
> So I used the new option capability and defined a :dynamic_templates option.
>
> e.g.:
>
> module TiltTest
>     set :views, File.dirname(__FILE__) + '/views'
>     set :dynamic_templates, true
>
>     #...
> end
>
> I changed the Camping code to check for that option and only compile and
> cache if false.
> What do you think?
> Maybe we need a shorter or different name for the option?
>
> I checked in the changes in my fork:
> http://github.com/techarch/camping/commit/0152c606f286855ca7381c9394e9f05001d93764
>
> Magnus, you might have some additional ideas for tweaking this feature. So
> feel free to add/alter and merge to your liking.
>
> Philippe
>
> _______________________________________________
> Camping-list mailing list
> Camping-list <at> rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
> _______________________________________________
> Camping-list mailing list
> Camping-list <at> rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
> _______________________________________________
> Camping-list mailing list
> Camping-list <at> rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
_______________________________________________
Camping-list mailing list
Camping-list <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
Philippe Monnet | 13 May 2010 16:17

Published a blog post on how to use MongoDB with Camping

If you are interested in trying out MongoDB from a Camping perspective: http://bit.ly/a8jdzq
I am curious about other folks using MongoDB too.

- Philippe ( <at> techarch)
_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
David Ray | 20 May 2010 02:47
Picon

Camping on Ruby 1.9.1 on Win32

Hi all,

Can I go camping with ruby 1.9.1 on win32?

Many thanks,
Dave.
Magnus Holm | 20 May 2010 10:18
Picon
Gravatar

Re: Camping on Ruby 1.9.1 on Win32

Hey Dave,

Yeah, Camping should work on both 1.9.1 and Windows, but I haven't
tested it in a while. Try it out, and please let us know if there's
something that doesn't work :)

// Magnus Holm

On Thu, May 20, 2010 at 02:47, David Ray <djr.nzl@...> wrote:
> Hi all,
>
> Can I go camping with ruby 1.9.1 on win32?
>
> Many thanks,
> Dave.
>
> _______________________________________________
> Camping-list mailing list
> Camping-list@...
> http://rubyforge.org/mailman/listinfo/camping-list
>
Magnus Holm | 22 May 2010 11:08
Picon
Gravatar

http://gems.judofyr.net/

Philippe has fixed a few bugs in the experimental template support I
"released" a few weeks ago and a little bug in XSendfile. Great work
:-)

Markaby should also work in 1.9 now (thanks to David for bug report!)

If you're running the experimental gem (see
http://www.mail-archive.com/camping-list-GrnCvJ7WPxnNLxjTenLetw <at> public.gmane.org/msg01033.html
for changes), you should do a:

  gem install camping --source http://gems.judofyr.net/

// Magnus Holm
Magnus Holm | 31 May 2010 17:20
Picon
Gravatar

Re: Should we incorporate a filtering mechanism in controllers?

Hm…

Camping already has filters:

    module App
      def service(*a)
        # before
        super
      ensure
        # after
      end
    end

I'm not sure if we need to add another way to support filters…

// Magnus Holm

On Mon, Apr 19, 2010 at 11:56, Dave Everitt <deveritt <at> innotts.co.uk> wrote:
> Philippe - dead simple for me. I was put off Rails a long time ago, which is
> how I landed on Camping - Dave Everitt
>
>> Do people prefer something simple dead easy like filtering_camping? Or
>> would people prefer something more like filters in Rails?
>
> _______________________________________________
> Camping-list mailing list
> Camping-list <at> rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
_______________________________________________
Camping-list mailing list
Camping-list <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Gmane