aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
Commit message (Collapse)AuthorAgeFilesLines
* test case to lock down the behavior of #7842Yves Senn2012-11-041-0/+5
|
* Add test to avoid regression of 1bfc5b4Rafael Mendonça França2012-11-021-0/+8
|
* Revert "Merge pull request #7668 from Draiken/fix_issue_6497"Rafael Mendonça França2012-11-021-7/+0
| | | | | | | | | | | | | | This reverts commit f4ad0ebe7a6b17658bddfeb996e3c34835b75623, reversing changes made to 8b2cbb3a832101f0e672ee309beca0f8c555b292. Conflicts: actionpack/CHANGELOG.md REASON: This added introduced a bug when you have a shorthand route inside a nested namespace. See https://github.com/rafaelfranca/rails/commit/281367eb770faf8077c1fd6194188e92ed1637a1
* Fix #8086 (BestStandardsSupport rewrites app X-UA-Compatible header, now ↵Nikita Afanasenko2012-11-011-0/+34
| | | | | | | appends). Now `BestStandardsSupport` middleware appends it's `X-UA-Compatible` value to app's value. Also test for `BestStandardsSupport` middleware added.
* Revert "if format is unknown NullMimeTypeObject is returned"Guillermo Iguaran2012-10-311-11/+1
| | | | This reverts commit a8560fa361958b33d76e4468eb5c07d82a20196e.
* if format is unknown NullMimeTypeObject is returnedAngelo capilleri2012-10-311-1/+11
| | | | | | | | | | If a unknown format is passed in a request, the methods html?, xml?, json? ...etc Nil Exception. This patch add a class NullMimeTypeObject, that is returned when request.format is unknown and it responds false to the methods that ends with '?'. It refers to #7837, not fixes because it's not considered a improvement not a bug.
* give access to the original exception raised in case of a parse errorAaron Patterson2012-10-251-0/+14
|
* do not lose backtrace information from the raised exceptionAaron Patterson2012-10-251-4/+5
|
* add test for fetch with a blockAaron Patterson2012-10-181-0/+4
|
* prefer composition over inheritenceAaron Patterson2012-10-181-0/+16
|
* resource and resources do no longer modify passed optionsYves Senn2012-10-011-0/+20
| | | | this is a patch for #7777.
* fix cache store testSteve Klabnik2012-09-301-0/+1
| | | | Pull #7800 broke the build, this should fix it.
* Merge pull request #7444 from szimek/params_parser_raises_parsing_errorAaron Patterson2012-09-262-2/+6
|\ | | | | Raise generic ParseError exception when ParamsParser fails parsing request params
| * Make ActionDispatch::ParamsParser::ParseError#original_exception return the ↵Szymon Nowak2012-08-272-2/+4
| | | | | | | | original exception.
| * Fix ActionDispatch::ParamsParser::ParseError message for XML and JSON parsers.Szymon Nowak2012-08-242-2/+4
| |
| * Raise generic ParseError exception when ActionDispatch::ParamsParser fails ↵Szymon Nowak2012-08-242-2/+2
| | | | | | | | parsing request params.
* | fixing most tests on Ruby 2.0Aaron Patterson2012-09-251-2/+2
| |
* | Merge pull request #7749 from blowmage/minitestAaron Patterson2012-09-251-0/+41
|\ \ | | | | | | Improve support for minitest's spec DSL
| * | Register AD::IntegrationTest for minitest's spec DSLMike Moore2012-09-241-0/+41
| | |
* | | depreacte unused Mime::Type#verify_request? and ↵grosser2012-09-242-7/+13
|/ / | | | | | | Mime::Type.browser_generated_types
* | fixes the suite for uploaded filesXavier Noria2012-09-231-6/+6
| |
* | Accept parameters in methods delegated to tempfileSergio Gil Pérez de la Manga2012-09-221-0/+6
| |
* | Delegate ActionDispatch::Http::UploadedFile#close to tempfileSergio Gil Pérez de la Manga2012-09-201-0/+6
| |
* | Removing to_shorthand from default_controller_and_action. Fixes #6497Luiz Felipe2012-09-191-0/+7
| | | | | | | | | | When using shortcut routes inside an engine the "to_shorthand" variable is set to true, causing the module scope of the route to not be applied.
* | Support for multiple etags in an If-None-Match headerTravis Warlick2012-09-151-0/+39
| | | | | | | | | | | | | | | | This is a rebased version of #2520. Conflicts: actionpack/test/dispatch/request_test.rb
* | Use internal instance variable naming scheme for mounted URL helper proxiesSam Pohlenz2012-09-091-0/+11
| |
* | set default_headers to nil after use it to avoid order dependent testsFrancesco Rodriguez2012-09-081-25/+32
| |
* | Add integration tests for reset_session in cookie storeAndreas Loupasakis2012-09-081-0/+20
| |
* | Add test for clear in ActionDispatch::Request::SessionAndreas Loupasakis2012-09-081-0/+9
| |
* | Dalli doesn't support autoloading of unloaded classesGuillermo Iguaran2012-09-061-5/+0
| |
* | Let's run action pack tests with DalliArun Agrawal2012-09-061-4/+4
| | | | | | | | There is no memcache gem left in repo.
* | Merge pull request #7522 from lexmag/mime_typeRafael Mendonça França2012-09-041-1/+1
|\ \ | | | | | | Refactor `Mime::Type`
| * | 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)
* | | Make enhanced routing Concerns more tell-don't-askErnie Miller2012-09-031-12/+15
| | |
* | | Fix concerns not executing block in mapperErnie Miller2012-09-031-0/+10
| | | | | | | | | | | | Also, add documentation for alternate usage.
* | | Allow routing concerns to accept a callableErnie Miller2012-09-031-2/+26
|/ / | | | | | | | | | | This allows us to make alterations to the generated routes based on the scope of the current mapper, and otherwise allows us to move larger blocks of concerns out of the routes file, altogether.
* | Revert "Merge pull request #7452 from arunagw/memcached_dalli"Jon Leighton2012-08-311-4/+4
| | | | | | | | | | | | | | This reverts commit 7256cb53e0c34e510a4d59a50d120c0358cf1d99, reversing changes made to 6ebe22c3ae716d089af1e5090ddb0d12b31af8ac. Reason: A test was failing.
* | Revert "Add missing require"Jon Leighton2012-08-311-1/+0
| | | | | | | | | | | | This reverts commit e4b33b08d6d2b88b627b1e52c4f349e57c5b89fc. https://github.com/rails/rails/pull/7452#issuecomment-8094302
* | Add Missing Keys from Journey on failed URL formatschneems2012-08-282-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many named routes have keys that are required to successfully resolve. If a key is left off like this: <%= link_to 'user', user_path %> This will produce an error like this: No route matches {:action=>"show", :controller=>"users"} Since we know that the :id is missing, we can add extra debugging information to the error message. No route matches {:action=>"show", :controller=>"users"} missing required keys: [:id] This will help new and seasoned developers look closer at their parameters. I've also subclassed the routing error to be clear that this error is a result of attempting to generate a url and not because the user is trying to visit a bad url. While this may sound trivial this error message is misleading and confuses most developers. The important part isn't what's in the options its's what's missing. Adding this information to the error message will make debugging much more obvious. This is the sister pull request of https://github.com/rails/journey/pull/44 which will be required to get they missing keys into the correct error message. Example Development Error in Rails: http://cl.ly/image/3S0T0n1T3421
* | Add missing requireRafael Mendonça França2012-08-281-0/+1
| |
* | Let's run action pack tests with DalliArun Agrawal2012-08-271-4/+4
|/ | | There is no memcache gem left in repo.
* Make sure :via works with mountPratik Naik2012-08-201-0/+9
|
* Added X-Content-Type-Options to the header defaults.Jim Jones2012-08-181-1/+3
| | | | With a value of "nosniff", this prevents Internet Explorer from MIME-sniffing a response away from the declared content-type.
* Extract common controllers to abstract_unitRafael Mendonça França2012-08-131-16/+4
|
* Implementing Routing ConcernsRafael Mendonça França2012-08-131-0/+94
| | | | | | | This pattern was introduced as a plugin by @dhh. The original implementation can be found in https://github.com/rails/routing_concerns
* push header merge down to a private method so that live responses can have ↵Aaron Patterson2012-08-131-0/+11
| | | | their own header object
* live response headers can be merged with a hashAaron Patterson2012-08-131-0/+6
|
* Fix handling SCRIPT_NAME from within mounted engine'sPiotr Sarnacki2012-08-111-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you mount your application at a path, for example /myapp, server should set SCRIPT_NAME to /myapp. With such information, rails application knows that it's mounted at /myapp path and it should generate routes relative to that path. Before this patch, rails handled SCRIPT_NAME correctly only for regular apps, but it failed to do it for mounted engines. The solution was to hardcode default_url_options[:script_name], which is not the best answer - it will work only when application is mounted at a fixed path. This patch fixes the situation by respecting original value of SCRIPT_NAME when generating application's routes from engine and the other way round - when you generate engine's routes from application. This is done by using one of 2 pieces of information in env - current SCRIPT_NAME or SCRIPT_NAME for a corresponding router. This is because we have 2 cases to handle: - generating engine's route from application: in this situation SCRIPT_NAME is basically SCRIPT_NAME set by the server and it indicates the place where application is mounted, so we can just pass it as :original_script_name in url_options. :original_script_name is used because if we use :script_name, router will ignore generating prefix for engine - generating application's route from engine: in this situation we already lost information about the SCRIPT_NAME that server used. For example if application is mounted at /myapp and engine is mounted at /blog, at this point SCRIPT_NAME is equal /myapp/blog. Because of that we need to keep reference to /myapp SCRIPT_NAME by binding it to the current router. Later on we can extract it and use when generating url Please note that starting from now you *should not* use default_url_options[:script_name] explicitly if your server already passes correct SCRIPT_NAME to rack env. (closes #6933)
* Test actual content of permanent cookiebrainopia2012-08-101-1/+1
|
* some testsEgor Homakov2012-08-091-0/+27
|