aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Invert precedence of content in ActionDispatch::Static"Andrew White2012-12-071-10/+5
| | | | This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
* Invert precedence of content in ActionDispatch::StaticAndrew White2012-12-061-5/+10
| | | | | | | | | | This commit inverts the precedence in ActionDispatch::Static so that dynamic content will be served before static content. This is so that precompiled assets do not inadvertently get included when running in development mode - it should have no effect in production where static files are usually handled by the web server. Closes #6421
* Fixed issue where routes with globs caused constraints on that glob toMaura Fitzgerald2012-12-041-0/+29
| | | | | | be ignored. A regular expression constraint gets overwritten when the routes.rb file is processed. Changed the overwriting to an ||= instead of an = assignment.
* Improve clarity of routing testsAndrew White2012-11-261-634/+1081
| | | | | | | | | | | | | | | | | Move the routes for each test inside the test method so that it's easier to see which routes are applicable to which test. To ensure that each test wasn't invalidated the changes were done by first removing all of the routes, ensuring that all of the tests failed and then adding the routes back to each test one by one. One test for `assert_recognizes` was removed as it wasn't actually testing the defined routes and is now tested more thoroughly in routing_assertions_test.rb. One downside is that the test suite takes about 1s longer due to having to using `method_missing` for handling the url helpers as using `include url_helpers` isn't isolated for each test.
* Allow setting a symbol as path in scope on routesGuillermo Iguaran2012-11-211-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Was surprising found that this example doesn't work: scope :api do resources :users end and the right form to use it is: scope 'api' do resources :users end I think this should work similary as `namespace` where both are allowed. These two are equivalent: namespace :api do resources :users end namespace 'api' do resources :user end
* Correct the use of params options when given to url_forCarlos Antonio da Silva2012-11-191-9/+3
| | | | Merge url for tests and add changelog entry for #8233.
* Fix issue with params in url_fortumayun2012-11-191-0/+8
| | | | | | With a "params" argument, the following error is raised: undefined method `reject!` for "":String
* Refactor request tests, remove #with_set methodCarlos Antonio da Silva2012-11-191-8/+3
|
* Merge pull request #8112 from rails/encrypted_cookiesSantiago Pastorino2012-11-152-7/+30
|\ | | | | Encrypted cookies
| * Allow users to change the default salt if they want, shouldn't be necessarySantiago Pastorino2012-11-031-1/+4
| |
| * Add cookie.encrypted which returns an EncryptedCookieJarSantiago Pastorino2012-11-031-0/+15
| | | | | | | | | | | | | | | | | | How to use it? cookies.encrypted[:discount] = 45 => Set-Cookie: discount=ZS9ZZ1R4cG1pcUJ1bm80anhQang3dz09LS1mbDZDSU5scGdOT3ltQ2dTdlhSdWpRPT0%3D--ab54663c9f4e3bc340c790d6d2b71e92f5b60315; path=/ cookies.encrypted[:discount] => 45
| * Sign cookies using key deriverSantiago Pastorino2012-11-032-7/+12
| |
* | 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