aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-061-1/+1
| | | | | | | | | | | | | | | | | | | by Active Support) Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
* load active_support/core_ext/object/inclusion in active_support/railsXavier Noria2012-08-021-1/+0
|
* freeze the header objectAaron Patterson2012-07-291-0/+2
|
* raise exceptions on header set after response committedAaron Patterson2012-07-291-0/+19
|
* make sure appropriate headers are set and deletedAaron Patterson2012-07-291-0/+11
|
* added live responses which can be written and read in separate threadsAaron Patterson2012-07-291-0/+34
|
* adding a buffered stream to the response objectAaron Patterson2012-07-291-0/+20
|
* fix failure test 'test_can_wait_until_commit(ResponseTest)' in actionpackVladimir Strakhov2012-07-281-2/+2
|
* threads can wait on responses to be committedAaron Patterson2012-07-271-0/+9
|
* Remove ActionDispatch::Head middleware in favor of Rack::HeadSantiago Pastorino2012-07-231-8/+0
| | | | Closes #7110 there's more work to do on rack-cache issue 69
* Don't assume resource param is :id when using shallow routesAndrew White2012-07-201-0/+12
| | | | | Since #5581 added support for resources with custom params we should not assume that it is :id when using shallow resource routing.
* Support constraints on resource custom params when nestingAndrew White2012-07-201-1/+12
| | | | | | | The Mapper looks for a :id constraint in the scope to see whether it should apply a constraint for nested resources. Since #5581 added support for resource params other than :id, we need to check for a constraint on the parent resource's param name and not assume it's :id.
* Add support for optional root segments containing slashesAndrew White2012-07-171-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optional segments with a root scope need to have the leading slash outside of the parentheses, otherwise the generated url will be empty. However if the route has non-optional elements then the leading slash needs to remain inside the parentheses otherwise the generated url will have two leading slashes, e.g: Blog::Application.routes.draw do get '/(:category)', :to => 'posts#index', :as => :root get '/(:category)/author/:name', :to => 'posts#author', :as => :author end $ rake routes root GET /(:category)(.:format) posts#index author GET (/:category)/author/:name(.:format) posts#author This change adds support for optional segments that contain a slash, allowing support for urls like /page/2 for the root path, e.g: Blog::Application.routes.draw do get '/(page/:page)', :to => 'posts#index', :as => :root end $ rake routes root GET /(page/:page)(.:format) posts#index Fixes #7073
* Raise a helpful error message on #mount misuseCarl Lerche2012-07-101-0/+9
|
* Rename RouteInspector to RoutesInspectorCarlos Antonio da Silva2012-07-081-2/+2
| | | | Follow the consistency defined in dbc43bc.
* move route_inspector to actionpack@schneems and @mattt2012-07-071-0/+170
| | | | this is so we can show route output in the development when we get a routing error. Railties can use features of ActionDispatch, but ActionDispatch should not depend on Railties.
* 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.
* Remove more tests related to draw external routes filesRafael Mendonça França2012-06-292-51/+1
| | | | Related with 5e7d6bba79393de0279917f93b82f3b7b176f4b5
* Support unicode character route in config/routes.rb.kennyj2012-06-161-2/+2
|
* Fix buildSantiago Pastorino2012-06-131-2/+2
|
* Array parameters should not contain nil values.Aaron Patterson2012-06-121-0/+4
|
* both string and sumbol will be interpolated as string no need to convert to_sganesh2012-06-111-5/+5
|