Commit Graph

57 Commits

Author SHA1 Message Date
Jeremy Kemper
f79caa49fb Complain if there's no such middleware 2009-12-28 20:24:28 -08:00
Joshua Peek
feb7382047 AD::Cascade that supports X-Cascade 2009-12-26 13:28:06 -06:00
Joshua Peek
b1aee9f4ee All AD modules are "deferrable" 2009-12-22 17:11:21 -06:00
Joshua Peek
a1bf2f96ce AD::StatusCodes support is now part of rack 2009-12-22 16:08:03 -06:00
David Heinemeier Hansson
eeda059818 Just a little tidying 2009-12-20 18:37:09 -08:00
Joshua Peek
7217d64f61 Use AbstractController error constants 2009-12-16 16:11:42 -06:00
Joshua Peek
1b82590c36 Reduce usage of interpret_status. It should also return a integer
not a string.
2009-12-10 22:02:50 -06:00
Carlhuda
c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
Bryan Helmkamp
bb84cab2fc Update reference to deprecated constant to avoid warnings 2009-11-28 23:41:03 -08:00
Yehuda Katz
e1b5e3cc70 Break up inflector to reduce the dependency burden on dependency-les methods like constantize. 2009-11-07 11:23:21 -08:00
Joshua Peek
21e7b84621 Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks 2009-10-12 22:15:43 -05:00
Joshua Peek
9bc8defe38 Use "run_callbacks :foo" since it is the public api for callbacks [#3329
state:resolved]
2009-10-12 21:58:49 -05:00
Joshua Peek
b480da5cd6 Coerce all out going body parts to Strings 2009-10-05 13:58:43 -05:00
Joshua Peek
ef58194129 Move Rails::Static into ActionDispatch 2009-09-26 11:37:42 -05:00
Joshua Peek
3fb623fa90 SessionRestoreError belongs in AD 2009-09-23 23:37:31 -05:00
José Valim
2407479603 Fixes Sam Ruby tests suite.
Signed-off-by: Yehuda Katz <wycats@gmail.com>
2009-09-21 17:56:24 -07:00
José Valim
a0233dd3b2 Use NewCallbacks on ActionDispatch::Callbacks. 2009-09-20 10:56:38 -03:00
Yehuda Katz
81c421386c 1.9 fix for changes to #to_s. By Sam Ruby. [#3228 state:resolved] 2009-09-18 10:35:42 -07:00
Joshua Peek
52aeb8d2e7 Beef up AD::Rescue to replace global exception handling lost in ApplicationController 2009-09-15 16:33:15 -05:00
Joshua Peek
a01bf41c61 Lazy require memcache for session middleware 2009-09-13 15:30:55 -05:00
Jay Pignata
bd97c3044a CookieStore should not be derived from Hash - reverting [#2268 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-03 15:15:15 -05:00
Jay Pignata
e0f1a7dc19 If session_options[:id] is requested when using CookieStore, unmarshal the session to access it [#2268 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-03 11:50:01 -05:00
Joshua Peek
6f40139b53 SessionHash#update and SessionHash#delete are missing a call to load! [#3056 state:resolved] 2009-08-31 13:39:06 -05:00
Carl Lerche
6a001e925e Require necessary active_support files in cookie store 2009-08-26 23:07:55 -07:00
Yehuda Katz + Carl Lerche
a21aaca8ea Rework Middleware stack to match the Rack middleware protocol more closely 2009-08-25 17:04:09 -07:00
Joshua Peek
b58acea569 Move legacy param_parsers config onto AD::ParamsParser 2009-08-21 16:49:33 -05:00
Jay Pignata
679128da58 Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
[#2481 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-15 16:51:03 -07:00
Yehuda Katz + Carl Lerche
86fc43fd58 ActionPack components should no longer have undeclared dependencies.
* 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
2009-06-08 13:34:07 -07:00
Joshua Peek
a1140a1031 Revert "Only save the session if we're actually writing to it [#2703 state:resolved]"
This reverts commit dd98280e38.
2009-05-30 09:36:08 -05:00
Johan Sörensen
dd98280e38 Only save the session if we're actually writing to it [#2703 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-28 09:35:17 -05:00
Hongli Lai (Phusion)
760cb63339 Make the default 500 Internal Server Error page more friendly. Many people don't know they're supposed to look in the log files. [#2716 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-27 15:01:03 -05:00
Carl Lerche
a1f280e83d Got all the dispatch tests running on new base 2009-05-26 15:03:09 -07:00
Jeremy Kemper
c86ec82cf6 Wrap string body in an array 2009-05-20 16:01:21 -07:00
Brian Lopez
b0de061e7b Allow ParamsParser to parse YAML from the request body IO directly
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-17 16:09:28 -05:00
Joshua Peek
092089015b Extract generic callbacks middleware from dispatcher 2009-05-17 13:39:55 -05:00
Joshua Peek
8118fca9be Merge Failsafe middleware into ShowExceptions 2009-05-17 12:24:59 -05:00
Brian Lopez
53dda29f8b Add support for parsing XML and JSON from an IO as well as a string [#2659 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-17 10:37:52 -05:00
Bryan Helmkamp
7f318c3ec5 Instead of checking Rails.env.test? in Failsafe middleware, check env["rails.raise_exceptions"] 2009-05-16 14:15:26 -04:00
Yehuda Katz + Carl Lerche
00a9d4b91c Merge branch 'master' into wip_abstract_controller
Conflicts:
	actionpack/lib/action_controller/abstract/callbacks.rb
	actionpack/lib/action_controller/abstract/renderer.rb
	actionpack/lib/action_controller/base/base.rb
	actionpack/lib/action_controller/dispatch/dispatcher.rb
	actionpack/lib/action_controller/routing/route_set.rb
	actionpack/lib/action_controller/testing/process.rb
	actionpack/test/abstract_controller/layouts_test.rb
	actionpack/test/controller/filters_test.rb
	actionpack/test/controller/helper_test.rb
	actionpack/test/controller/render_test.rb
	actionpack/test/new_base/test_helper.rb
2009-05-11 17:07:05 -07:00
Joshua Peek
bcc4537f2a Wrap dispatcher callbacks around the whole middleware chain. Kill unnecessary Reloader middleware. 2009-05-03 09:41:40 -05:00
Joshua Peek
e066019280 Show lazy middleware args in pretty print 2009-05-03 09:24:32 -05:00
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
Yehuda Katz + Carl Lerche
e046f36824 Renamed Base2 to Base and don't require old action_controller for new Base 2009-05-01 17:31:03 -07:00
Joshua Peek
ba9887c9c0 Switch to action_dispatch rack namespace 2009-04-30 13:45:12 -05:00
Jeremy Kemper
a88ddf8cc3 Don't return bare string as rack body 2009-04-27 00:00:03 -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
Hongli Lai (Phusion)
3cb97aeea8 Fix environment variable testing code in failsafe.rb.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-26 11:23:10 -05:00
Joshua Peek
82bc768dad Fix typo in stale session check [#2404 state:resolved] 2009-04-26 11:19:42 -05:00
Joshua Peek
4f412a10b6 Remove RewindableInput middleware since all input MUST be rewindable according to a recent change in the Rack 1.0 SPEC 2009-04-25 14:04:03 -05:00
Joshua Peek
044794fc9e Remove pending rack specifications until they are official 2009-04-25 13:41:30 -05:00