Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

load plugins only once.

  • Loading branch information...
commit 7850818318668b6c063db7f20d7e1c100e0b9c5c 1 parent 8dae971
shugo authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 lib/apache/rails-dispatcher.rb
View
16 lib/apache/rails-dispatcher.rb
@@ -34,10 +34,10 @@
RubySafeLevel 0
RubyRequire apache/rails-dispatcher
- RubyTransHandler Apache::RailsDispatcher.instance
<Location /appname>
SetHandler ruby-object
RubyHandler Apache::RailsDispatcher.instance
+ RubyTransHandler Apache::RailsDispatcher.instance
RubyOption rails_uri_root /appname
RubyOption rails_root /path/to/rails/root
RubyOption rails_env development
@@ -47,12 +47,16 @@
require "set"
require "singleton"
+require "initializer"
require "active_support"
require "active_record"
require "action_controller"
require "action_mailer"
require "action_web_service"
require "active_support/whiny_nil"
+require "rails_info"
+
+Object.send(:remove_const, :RAILS_ENV)
module Apache
class RailsDispatcher
@@ -422,3 +426,13 @@ def load(*args)
end
end
end
+
+module Rails
+ class Initializer
+ @@loaded_plugins = Set.new
+
+ def loaded_plugins
+ return @@loaded_plugins
+ end
+ end
+end

0 comments on commit 7850818

Please sign in to comment.
Something went wrong with that request. Please try again.