Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
load plugins only once.
Browse files Browse the repository at this point in the history
  • Loading branch information
shugo committed Feb 19, 2006
1 parent 8dae971 commit 7850818
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/apache/rails-dispatcher.rb
Expand Up @@ -34,10 +34,10 @@
RubySafeLevel 0 RubySafeLevel 0
RubyRequire apache/rails-dispatcher RubyRequire apache/rails-dispatcher
RubyTransHandler Apache::RailsDispatcher.instance
<Location /appname> <Location /appname>
SetHandler ruby-object SetHandler ruby-object
RubyHandler Apache::RailsDispatcher.instance RubyHandler Apache::RailsDispatcher.instance
RubyTransHandler Apache::RailsDispatcher.instance
RubyOption rails_uri_root /appname RubyOption rails_uri_root /appname
RubyOption rails_root /path/to/rails/root RubyOption rails_root /path/to/rails/root
RubyOption rails_env development RubyOption rails_env development
Expand All @@ -47,12 +47,16 @@


require "set" require "set"
require "singleton" require "singleton"
require "initializer"
require "active_support" require "active_support"
require "active_record" require "active_record"
require "action_controller" require "action_controller"
require "action_mailer" require "action_mailer"
require "action_web_service" require "action_web_service"
require "active_support/whiny_nil" require "active_support/whiny_nil"
require "rails_info"

Object.send(:remove_const, :RAILS_ENV)


module Apache module Apache
class RailsDispatcher class RailsDispatcher
Expand Down Expand Up @@ -422,3 +426,13 @@ def load(*args)
end end
end 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.