Commit Graph

1199 Commits

Author SHA1 Message Date
Joshua Peek
11af089cee Extract ActionController rescue templates into Rescue and ShowExceptions middleware.
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
2009-05-02 23:02:22 -05:00
Joshua Peek
24affdc88c Deprecate Controller.process interface 2009-05-02 15:37:29 -05:00
Joshua Peek
f32cf44870 Switch functional tests to run through the rack interface instead of process 2009-05-02 15:29:18 -05:00
Joshua Peek
a8b75c480f Functional test runner finalizes response just like the integration test runner. In both runners, the @response object will now behave the same.
Some functional tests will need to be updated if they are relying on preprocessed data on the response.
2009-05-02 14:57:40 -05:00
Joshua Peek
3900f4007e Deprecate assert_redirect_to's partial hash matching 2009-05-02 14:23:44 -05:00
Ruy Asan
3be3470fab Added routing test for irregular ID requirements and custom member action.
[#2595 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-05-01 15:02:32 -07:00
Joshua Peek
664ae187a9 Update some old tests to use AC TestProcess 2009-04-30 23:46:35 -05:00
Joshua Peek
05bd863c02 alias method chain process with test 2009-04-30 23:46:35 -05:00
Jeremy Kemper
6ae839bf48 Merge branch 'master' of git@github.com:rails/rails 2009-04-30 16:45:39 -07:00
John F. Douthat
e59835bd09 Fix action-cached exception responses.
Methods raising ActiveRecord::RecordNotFound were returning 404 on first request and 200 OK with blank body on subsequent requests.

[#2533 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-04-30 16:43:01 -07:00
Jeremy Kemper
f0b9e28619 Fix render :json => nil [#2589 state:resolved] 2009-04-30 16:34:00 -07:00
Joshua Peek
00d1a57e9f Start moving TestRequest and TestResponse into ActionDispatch 2009-04-30 17:26:03 -05:00
Joshua Peek
9bac470c7a Group integration test helpers and delegate other helpers to request and response objects 2009-04-30 14:28:42 -05:00
Joshua Peek
988513ac7a Framework backtrace cleaning is handled by ActiveSupport now 2009-04-30 11:42:01 -05:00
Joshua Peek
c0a372ba87 Deprecate template, session, assigns, and layout accessors on response object. Instead access them through the controller instance. This mainly affects functional test assertions. 2009-04-28 23:29:46 -05:00
Yehuda Katz + Carl Lerche
cecafc52ee Refactor ActionView::Template
ActionView::Template is now completely independent from template
  storage, which allows different back ends such as the database.
  ActionView::Template's only responsibility is to take in the
  template source (passed in from ActionView::Path), compile it,
  and render it.
2009-04-27 11:49:11 -07:00
Joshua Peek
21aa32692c Delegate controller.session to request.session and deprecate response session 2009-04-27 13:11:17 -05:00
Jeremy Kemper
a88ddf8cc3 Don't return bare string as rack body 2009-04-27 00:00:03 -07:00
Jeremy Kemper
5577d561f9 Merge branch 'master' of git@github.com:rails/rails 2009-04-26 15:18:51 -07:00
Joshua Peek
0494909679 Inherit TestSession from Session::AbstractStore and add indifferent access to Session::AbstractStore. 2009-04-26 14:33:57 -05:00
Joshua Peek
6940c0de12 Unify functional and integration tests cookie helpers 2009-04-26 11:37:11 -05:00
Joshua Peek
5ea8d40156 Deprecate response.redirect_url_match?, use assert_match instead. 2009-04-26 11:16:14 -05:00
Jeremy Kemper
dc2caea9dc test uses Pathname 2009-04-24 23:17:15 -07:00
Joshua Peek
dd2ed32418 Start to integrate some of the features in Rack::Test.
Eventually commit ActionDispatch::Test::MockRequest and ActionDispatch::Test:: UploadedFile upstream.
2009-04-24 20:24:54 -05:00
rick
3c4c6bd0df * Add pluggable JSON backends with support for the JSON gem. [rick]
Example: ActiveSupport::JSON.backend = "JSONGem"

  All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode().  Use of #to_json is not recommended, as it may clash with other libraries that overwrite it.  However, you can recover Rails specific functionality
  if you really want to use #to_json.

    gem 'json'
    ActiveSupport::JSON.backend = "JSONGem"

    class ActiveRecord::Base
      alias to_json rails_to_json
    end
2009-04-23 00:08:40 -07:00
Joshua Peek
380431e4ed Fix test_rescue_routing_exceptions when running with rake 2009-04-21 21:11:23 -05:00
Joshua Peek
0b92bb97c1 refactor some coupled rescue tests 2009-04-21 20:41:31 -05:00
Joshua Peek
fc5c1b0e90 Session tests belong under dispatch folder 2009-04-21 19:57:18 -05:00
Mike Gunderloy
398b07e655 Remove excess mocking from polymorphic_url tests [#2330 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-04-21 14:32:52 +01:00
Mislav Marohnić
7ce0778a15 Always buffer rack.input if it is not rewindable
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-17 21:53:44 -05:00
Ross Kaffenburger and Bryan Helmkamp
256b0ee8e3 Don't check authenticity tokens for any AJAX requests 2009-04-15 16:04:21 -07:00
Carl Lerche & Yehuda Katz
3c1187699a Makes rails-dev-boost work again 2009-04-14 18:32:31 -07:00
Joshua Peek
c1b4a5eb56 Make dispatcher instances immutable 2009-04-14 16:21:06 -05:00
Carl Lerche & Yehuda Katz
647b83d50c Resurrecting 1.9 compatibility. 2009-04-13 16:56:04 -07:00
Carl Lerche & Yehuda Katz
906aebceed Bring abstract_controller up to date with rails/master
Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list
of commits that could not be applied cleanly or are obviated with the
abstract_controller refactor. They all need to be revisited to ensure
that fixes made in 2.3 do not reappear in 3.0:

2259ecf368e6a6715966f69216e3ee86bf1a82a7
AR not available
  * This will be reimplemented with ActionORM or equivalent

06182ea02e92afad579998aa80144588e8865ac3
implicitly rendering a js response should not use the default layout
[#1844 state:resolved]
  * This will be handled generically

893e9eb99504705419ad6edac14d00e71cef5f12
Improve view rendering performance in development mode and reinstate
template recompiling in production [#1909 state:resolved]
  * We will need to reimplement rails-dev-boost on top of the refactor;
    the changes here are very implementation specific and cannot be
    cleanly applied. The following commits are implicated:

      199e750d46c04970b5e7684998d09405648ecbd4
      3942cb406e1d5db0ac00e03153809cc8dc4cc4db
      f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690
      e3b166aab37ddc2fbab030b146eb61713b91bf55
      ae9f258e03c9fd5088da12c1c6cd216cc89a01f7
      44423126c6f6133a1d9cf1d0832b527e8711d40f

0cb020b4d6d838025859bd60fb8151c8e21b8e84
workaround for picking layouts based on wrong view_paths
[#1974 state:resolved]
  * The specifics of this commit no longer apply. Since it is a two-line
    commit, we will reimplement this change.

8c5cc66a831aadb159f3daaffa4208064c30af0e
make action_controller/layouts pick templates from the current instance's
view_paths instead of the class view_paths [#1974 state:resolved]
  * This does not apply at all. It should be trivial to apply the feature
    to the reimplemented ActionController::Base.

87e8b162463f13bd50d27398f020769460a770e3
fix HTML fallback for explicit templates [#2052 state:resolved]
  * There were a number of patches related to this that simply compounded
    each other. Basically none of them apply cleanly, and the underlying
    issue needs to be revisited. After discussing the underlying problem
    with Koz, we will defer these fixes for further discussion.
2009-04-13 15:18:45 -07:00
Yehuda Katz and Carl Lerche
1aadafda8d Updated old AC::Base for small changes to AV 2009-04-08 17:33:41 -07:00
Yehuda Katz and Carl Lerche
6c05b5e938 Temporarily modifies setup to call super directly. This can support more T::U runners. 2009-04-08 17:33:41 -07:00
Doug McInnes
c877857d59 Fix for TestResponse.cookies returning cookies unescaped [#1867 state:resolved]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-04-07 13:21:41 -05:00
Kenny Ortmann
f448c70b3f added tests for session options being defaulted correctly to rack defaults [#2403 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-07 09:18:42 -05:00
Ryan Angilly
dd2eb1ea7c adding session_options initialization and test [#2303 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-24 10:54:19 -05:00
David Dollar
4c2f09f23a Updates tests to cause the tests for the Request class not to proxy through a fake TestRequest object [#2278 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-24 10:54:16 -05:00
Peter Marklund
8fa4275a72 Reset request_parameters in TestRequest#recycle! to avoid multiple posts clobbering each other [#2271 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-24 10:54:15 -05:00
Joshua Peek
03700b4f01 just kill brittle test 2009-03-24 10:54:14 -05:00
Jeremy Kemper
6335f5d518 Merge branch 'master' into bodyparts 2009-03-18 11:18:48 -07:00
Joshua Peek
4185a4a5f5 update rack fixture to be ruby 1.9 compat 2009-03-15 23:48:07 -05:00
Joshua Peek
0706de4301 Better error message to try to figure out why the CI build is failing 2009-03-15 23:41:47 -05:00
Joshua Peek
d0e5417861 update rack fixture to be ruby 1.9 compat 2009-03-15 23:25:12 -05:00
Joshua Peek
367049cae6 Fix brittle Time.now mock 2009-03-15 23:17:31 -05:00
misfo
7706b57034 allowed render :file to take Pathnames [#2220 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-14 10:42:02 -05:00
Mike Gunderloy
07710fd3e0 Fix requirements for additional member/collection routes [#2054 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-14 10:06:00 -05:00