Commit Graph

87 Commits

Author SHA1 Message Date
Jeremy Kemper
15f7f1a380 Missed Reloadable bits and pieces
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-14 01:00:32 +00:00
David Heinemeier Hansson
85800c110e Update copyright span
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-09 17:57:16 +00:00
Rick Olson
9d4225f129 Fixed that dispatcher preparation callbacks only run once in production mode. Mock Routes.reload so that dispatcher preparation callback tests run. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7033 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-15 23:28:51 +00:00
Jeremy Kemper
c5f00580d3 Fix precedence error in failsafe rescue. Closes #8625.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-12 16:46:25 +00:00
Jeremy Kemper
e4e275dde3 Fix syntax error in dispatcher than wrecked failsafe responses. Closes #8625.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-11 18:05:02 +00:00
David Heinemeier Hansson
70ac560e42 Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-28 15:57:29 +00:00
Jeremy Kemper
f1e08b351d Improve dispatcher failsafe responses. Beef up compatibility with Mongrel's CGI wrapper.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6307 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-04 12:31:21 +00:00
David Heinemeier Hansson
014fdde93a Attempt at fixing the preparation_callbacks, nzkoz will double check
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-27 00:43:27 +00:00
Michael Koziarski
c6d47806bf Allow config.to_prepare to work, make the dispatcher safe to 're require'. [Koz, Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-26 23:56:00 +00:00
David Heinemeier Hansson
2e2bf2d149 If only life was that simple (it didnt help)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 05:56:51 +00:00
David Heinemeier Hansson
e8eb743ba6 Replace the elaborate reloading connection checking scheme, just fix the Ruby-based MySQL adapter, ye?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-01 05:37:56 +00:00
David Heinemeier Hansson
0a86122a24 Only reload connections in development mode that supports (and requires that) -- in other words, only do it for SQLite (closes #6687, #6700) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-26 22:10:55 +00:00
David Heinemeier Hansson
619e5c29f4 Tried delaying database disconnect until after dependency resolution (references #6687, #6700) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-25 19:59:00 +00:00
David Heinemeier Hansson
a02dbe0a3d Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-23 05:16:46 +00:00
Tobias Lütke
a64c6af57c Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action.
This allos handling of ActionController::RoutingError which were previously always handeled by ActionController#Base


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5516 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-13 20:23:00 +00:00
Nicholas Seckar
d3100ec855 Alter prior change to use require_dependency instead of require_or_load. Causes ApplicationController to be reloaded again. Closes #6587.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5471 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-09 18:22:44 +00:00
Nicholas Seckar
e51112c15d Remove temporary crutch to help ApplicationController be unloaded. Closes #6496.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-07 19:52:27 +00:00
David Heinemeier Hansson
fef2d880a5 Update copyright times
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-03 18:53:05 +00:00
Jeremy Kemper
12ff554cd4 Tighten rescue clauses. Closes #5985.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-31 03:16:28 +00:00
Nicholas Seckar
30fa7053be Add silencing to deprecations; avoid self-scolding.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4760 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-14 18:15:44 +00:00
Rick Olson
651e57a72c Rearrange application resetting and preparation, fix bug with leaking subclasses hash in ActiveRecord::Base [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-09 16:52:42 +00:00
David Heinemeier Hansson
36dfeb9a36 Cause ApplicationController to be reloaded
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-09 16:50:27 +00:00
Rick Olson
c0657a9084 Fix Dispatcher.reset_application! so that AR subclasses are removed and Observers re-initialized *after* Reloadable classes are removed. Closes #5743. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4716 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-07 17:00:03 +00:00
Nicholas Seckar
cbc3afb878 Add Dispatcher.to_prepare and config.to_prepare to provide a pre-request hook.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4686 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-06 02:51:53 +00:00
Rick Olson
26eefd79a4 Tweak the Rails load order so observers are loaded after plugins, and reloaded in development mode. Closed #5279. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4684 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-06 02:12:53 +00:00
Rick Olson
2e88b5d37f Fixed the failsafe response so it uses either the current recognized controller or ApplicationController. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-28 23:09:29 +00:00
Jeremy Kemper
7231bfb59c Dispatcher processes rescued actions with the same controller that processed the request. Closes #4625.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 01:34:22 +00:00
Jamis Buck
b20c575ac0 New routes implementation. Simpler, faster, easier to understand. The published API for config/routes.rb is unchanged, but nearly everything else is different, so expect breakage in plugins and libs that try to fiddle with routes.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 15:42:08 +00:00
David Heinemeier Hansson
11323ceb28 Added that Dispatcher exceptions should not be shown to the user unless a default log has not been configured. Instead show public/500.html [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-05 04:52:31 +00:00
David Heinemeier Hansson
46796e74cf Fixed that rails --version should have the return code of 0 (success) (closes #4560) [blair@orcaware.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4145 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-03 22:39:36 +00:00
Rick Olson
e320f28945 Make the 3rd arg optional for #failsafe_response
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 14:33:07 +00:00
Rick Olson
31a499ac27 Added a backtrace to the evil WSOD (White Screen of Death). Closes #4073. TODO: Clearer exceptions [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3809 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-07 07:27:54 +00:00
Jeremy Kemper
2b02596b96 Clear stale, cached connections left behind by defunct threads. Eliminate duplicate connection cache.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 22:08:00 +00:00
Jeremy Kemper
3cfea287ba Speed up class -> connection caching and stale connection verification. Closes #3979.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3693 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 21:37:30 +00:00
Nicholas Seckar
ad9cabd77c Remove LoadingModule
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3526 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-03 20:29:39 +00:00
Nicholas Seckar
6d7b0374d1 Add LoadingModule.clear! back temporarily
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3524 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-02 16:56:15 +00:00
Nicholas Seckar
4bb6f863b4 Pluralization bites again
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-02 05:08:42 +00:00
Nicholas Seckar
7a43a05a2b Further improvements to reloading code
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-02 04:54:07 +00:00
David Heinemeier Hansson
01b1a87729 Added reusable reloading support through the inclusion of the Relodable module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets [DHH]. Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]. Refactored extensions to module, class, and object in active support [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-29 00:37:39 +00:00
Jeremy Kemper
dc64887f21 Connection cache to speed up retrieve_connection and get rid of dirty connection marking. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-04 05:56:49 +00:00
Jeremy Kemper
81c5242f43 r3181@asus: jeremy | 2005-11-19 02:52:24 -0800
Mark connections for verification.  Retrieve connection verifies before returning a connection.  Verification tests whether the connection is marked then reconnects if the connection is inactive.  All active connections are marked for verification after a request is handled.  References #428.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-19 10:55:11 +00:00
Jeremy Kemper
1cfd25a774 Failsafe response handler for dispatcher.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2841 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-02 01:20:36 +00:00
Jeremy Kemper
144f78be41 Move Dispatcher.dispatch CGI.new out of default args and into rescuable block so the dispatcher catches its errors rather than the fcgi handler.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-01 18:29:41 +00:00
Jamis Buck
ae294afa8d Documentation updates/fixes for railties
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 03:00:44 +00:00
David Heinemeier Hansson
6a51940117 Fixed memory leak with Active Record classes when Dependencies.mechanism = :load #1704 [c.r.mcgrath@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2276 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-20 11:23:13 +00:00
Nicholas Seckar
49d5cadbb2 Only load breakpoint in development mode and when BREAKPOINT_SERVER_PORT is defined. Closes #1957
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-31 00:47:51 +00:00
Jamis Buck
3cc47a4297 Use SIGHUP to dynamically reload an fcgi process without restarting it. Refactored dispatch.fcgi so that the RailsFCGIHandler is in the lib dir.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-29 11:07:20 +00:00
Jamis Buck
0d8455c1a2 ActionMailer::Base subclasses are reloaded with other rails components #1262
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1492 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-24 11:57:40 +00:00
David Heinemeier Hansson
4e0ffab8b0 Removed the mutex from the WEBrick adapter under the production environment so concurrent requests can be served
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-22 12:59:36 +00:00
David Heinemeier Hansson
6b6d6d29f6 Dont activate the query cache just yet
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1278 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-02 17:26:29 +00:00