aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/mime_type_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-2/+2
|
* Use Hash#each_key instead of Hash#keys.eachErik Michaels-Ober2014-09-291-1/+1
| | | | | | Hash#keys.each allocates an array of keys; Hash#each_key iterates through the keys without allocating a new array. This is the reason why Hash#each_key exists.
* Expectations firstAkira Matsuda2014-08-181-1/+1
|
* Mime::PNG is already defined.Zuhao Wan2014-06-051-2/+0
|
* Fixed test for Mime::VCFArun Agrawal2013-12-061-3/+3
| | | | Added here 13dd38cee79be39f7b399e142fd78295dddd2abb
* Remove Mime::Type#verify_request? and Mime::Type.browser_generated_types ↵kennyj2013-06-021-5/+0
| | | | were deprecated.
* Fixed typo on AP dispatch Mime::Type testKalabiYau2013-04-011-1/+1
|
* depreacte unused Mime::Type#verify_request? and ↵grosser2012-09-241-3/+5
| | | | Mime::Type.browser_generated_types
* Refactor `Mime::Type`Aleksey Magusev2012-09-051-1/+1
| | | | | | | | | | | `parse` method performance improvements - ~27-33%: accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, , pronto/1.00.00, sslvpn/1.00.00.00, */*" Benchmark.measure{ 1_000_0.times { Mime::Type.parse(accept) }} old: 1.430000 0.000000 1.430000 ( 1.440977) new: 0.920000 0.000000 0.920000 ( 0.921813)
* Prevent conflict between mime types and Object methodsMircea Pricop2012-07-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | | Assuming the type ":touch", Collector.new was calling send(:touch), which instead of triggering method_missing and generating a new collector method, actually invoked the private method `touch` inherited from Object. By generating the method for each mime type as it is registered, the private methods on Object can never be reached by `send`, because the `Collector` will have them before `send` is called on it. To do this, a callback mechanism was added to Mime::Type This allows someone to add a callback for whenever a new mime type is registered. The callback then gets called with the new mime as a parameter. This is then used in AbstractController::Collector to generate new collector methods after each mime is registered.
* both string and sumbol will be interpolated as string no need to convert to_sganesh2012-06-111-5/+5
|
* Added parsing of arbitrary media type parameters.Steve Klabnik2012-03-051-0/+6
| | | | | | Based on #4918. Related to #4127.
* Failing test case that shows issue #736 should still be open.Scott W. Bradley2012-02-061-0/+6
|
* Add test for register_aliasJustin Campbell2011-12-171-0/+9
|
* Add test for type aliasesJustin Campbell2011-12-171-0/+11
|
* Allow symbols to be passed for extension aliasesJustin Campbell2011-12-171-0/+11
|
* Implement Mime::Type#respond_to? (consistently with #method_missing)Evgeniy Dolzhenko2011-09-251-0/+2
|
* No need to register again. As it's default now.Arun Agrawal2011-06-281-3/+3
| | | Removing gif from here because when it got unregister it start failing other places.
* Fix test to use Mime::ZipArun Agrawal2011-06-281-1/+1
|
* Use Mime::Type references.José Valim2011-02-081-0/+7
|
* Fix tests on 1.9.2.José Valim2010-11-281-5/+4
|
* trailing star mimes should respect the order in which mime types are defined.José Valim2010-11-281-13/+6
|
* process text/* if it appears in the middle ofNeeraj Singh2010-11-251-0/+20
| | | | HTTP_ACCEPT parameter
* processing image/* is an odditity because there isNeeraj Singh2010-11-251-6/+0
| | | | | | a test case which expects image/* to not to be expanded. So I am leaving image/* as it is and process only text/* and application/*
* clean up test by using unregister methodNeeraj Singh2010-11-251-2/+1
|
* unregister method implementation and testNeeraj Singh2010-11-251-0/+17
|
* sort lists before comparing themAaron Patterson2010-11-221-4/+4
|
* make test more resilient to future changes by notNeeraj Singh2010-11-221-2/+0
| | | | | | | | | | testing the count and not testing the internal value of the registered mime type. Ideally all mime type registration should be cleaned up in teardown. Signed-off-by: José Valim <jose.valim@gmail.com>
* rename star star to just one starNeeraj Singh2010-11-221-3/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* cleanup Mime::LOOKUP after registering image/gifNeeraj Singh2010-11-221-0/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* fix testNeeraj Singh2010-11-221-3/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* test for text/*, application/* and image/*Neeraj Singh2010-11-221-1/+27
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove useless use of :: in void context.Emilio Tagua2010-09-281-1/+0
|
* deOMGifying Railties, Active Support, and Action PackMikel Lindsaar2010-01-311-2/+2
|
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-1/+1
| | | | | | | | | | | | | | | | * request.formats is much simpler now * For XHRs or Accept headers with a single item, we use the Accept header * For other requests, we use params[:format] or fallback to HTML * This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser * For APIs, we can support single-item Accept headers, which disambiguates from the browsers * Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all */*, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml".
* Fixing pending tests and fixed some formats / partial rendering semanticsYehuda Katz + Carl Lerche2009-06-171-2/+2
|
* ActionPack components should no longer have undeclared dependencies.Yehuda Katz + Carl Lerche2009-06-081-2/+2
| | | | | | | * Tests can be run in isolation * Dependencies added * A few tests modified to avoid depending on AS deps not depended on my files they were testing
* Move dispatch related tests into test/dispatchJoshua Peek2009-01-281-0/+96