Stephen Caudill
2007-Sep-19 20:08 UTC
Ticket #190 (friendlier way to add / register a mime type)
Following up on #190 [1], I''ve just added a simple patch that allows the manipulation of the TYPES hash from within the Merb module. Use like: Merb.add_mime_type(:png,%w[image/png]) Merb.remove_mime_type(:png) It specifically disallows the removal of the :all MimeType, since content negotiation relies on it. I''m not super wonderful at API design, so comments and suggestions, are of course welcome. If everyone likes it as-is, just shout and I''ll commit it. -- Stephen [1] http://merb.devjavu.com/projects/merb/ticket/190
Stephen Caudill
2007-Sep-21 14:43 UTC
Ticket #190 (friendlier way to add / register a mime type)
Just wanted to bump this for comment. On Sep 19, 2007, at 4:08 PM, Stephen Caudill wrote:> Following up on #190 [1], I''ve just added a simple patch that > allows the manipulation of the TYPES hash from within the Merb > module. Use like: > > Merb.add_mime_type(:png,%w[image/png]) > Merb.remove_mime_type(:png) > > It specifically disallows the removal of the :all MimeType, since > content negotiation relies on it. > > I''m not super wonderful at API design, so comments and suggestions, > are of course welcome. If everyone likes it as-is, just shout and > I''ll commit it. > > -- > > Stephen > > [1] http://merb.devjavu.com/projects/merb/ticket/190
Diego Scataglini
2007-Sep-21 17:44 UTC
Ticket #190 (friendlier way to add / register a mime type)
I like the yml idea from the ticket discussion for the only exception that :all should be implied. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070921/0b9c0965/attachment.html
Ezra Zygmuntowicz
2007-Sep-21 18:16 UTC
Ticket #190 (friendlier way to add / register a mime type)
Stephen- Go ahead and commit the helper methods. I think that will work fine for now. Cheers- -Ezra On Sep 21, 2007, at 7:43 AM, Stephen Caudill wrote:> Just wanted to bump this for comment. > > On Sep 19, 2007, at 4:08 PM, Stephen Caudill wrote: > >> Following up on #190 [1], I''ve just added a simple patch that >> allows the manipulation of the TYPES hash from within the Merb >> module. Use like: >> >> Merb.add_mime_type(:png,%w[image/png]) >> Merb.remove_mime_type(:png) >> >> It specifically disallows the removal of the :all MimeType, since >> content negotiation relies on it. >> >> I''m not super wonderful at API design, so comments and suggestions, >> are of course welcome. If everyone likes it as-is, just shout and >> I''ll commit it. >> >> -- >> >> Stephen >> >> [1] http://merb.devjavu.com/projects/merb/ticket/190 > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel-- Ezra Zygmuntowicz -- Founder & Ruby Hacker -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)
Chris Farmiloe
2007-Sep-22 12:11 UTC
Ticket #190 (friendlier way to add / register a mime type)
I''ve always thought that all the configuration options should be in one place and in one format. I think it is messy to have a merb.yml for some options, then the three environments/*.rb files for others.... in fact I think I''ll start a new thread about structure generally :) Regards Farms. Design & Dev Oxygen. http://www.oxdi.eu On 21 Sep 2007, at 18:44, Diego Scataglini wrote:> I like the yml idea from the ticket discussion for the only > exception that :all should be implied. > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070922/3828877e/attachment.html