Rails 2.3.3.1
Update to latest Rails. A little bit of jiggery-pokery is involved, since they neglected to re-include vendored Rack in this release.
This commit is contained in:
parent
329fafafce
commit
664552ac02
257 changed files with 4346 additions and 1682 deletions
31
vendor/rails/railties/lib/initializer.rb
vendored
31
vendor/rails/railties/lib/initializer.rb
vendored
|
@ -159,6 +159,8 @@ module Rails
|
|||
|
||||
add_support_load_paths
|
||||
|
||||
check_for_unbuilt_gems
|
||||
|
||||
load_gems
|
||||
load_plugins
|
||||
|
||||
|
@ -301,11 +303,30 @@ module Rails
|
|||
end
|
||||
|
||||
def load_gems
|
||||
unless $gems_build_rake_task
|
||||
unless $gems_rake_task
|
||||
@configuration.gems.each { |gem| gem.load }
|
||||
end
|
||||
end
|
||||
|
||||
def check_for_unbuilt_gems
|
||||
unbuilt_gems = @configuration.gems.select(&:frozen?).reject(&:built?)
|
||||
if unbuilt_gems.size > 0
|
||||
# don't print if the gems:build rake tasks are being run
|
||||
unless $gems_build_rake_task
|
||||
abort <<-end_error
|
||||
The following gems have native components that need to be built
|
||||
#{unbuilt_gems.map { |gem| "#{gem.name} #{gem.requirement}" } * "\n "}
|
||||
|
||||
You're running:
|
||||
ruby #{Gem.ruby_version} at #{Gem.ruby}
|
||||
rubygems #{Gem::RubyGemsVersion} at #{Gem.path * ', '}
|
||||
|
||||
Run `rake gems:build` to build the unbuilt gems.
|
||||
end_error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def check_gem_dependencies
|
||||
unloaded_gems = @configuration.gems.reject { |g| g.loaded? }
|
||||
if unloaded_gems.size > 0
|
||||
|
@ -420,7 +441,8 @@ Run `rake gems:install` to install the missing gems.
|
|||
|
||||
def initialize_database_middleware
|
||||
if configuration.frameworks.include?(:active_record)
|
||||
if ActionController::Base.session_store == ActiveRecord::SessionStore
|
||||
if configuration.frameworks.include?(:action_controller) &&
|
||||
ActionController::Base.session_store == ActiveRecord::SessionStore
|
||||
configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::ConnectionAdapters::ConnectionManagement
|
||||
configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::QueryCache
|
||||
else
|
||||
|
@ -565,7 +587,7 @@ Run `rake gems:install` to install the missing gems.
|
|||
Rails::Rack::Metal.metal_paths += plugin_loader.engine_metal_paths
|
||||
|
||||
configuration.middleware.insert_before(
|
||||
:"ActionController::RewindableInput",
|
||||
:"ActionController::ParamsParser",
|
||||
Rails::Rack::Metal, :if => Rails::Rack::Metal.metals.any?)
|
||||
end
|
||||
|
||||
|
@ -862,7 +884,7 @@ Run `rake gems:install` to install the missing gems.
|
|||
|
||||
# Enable threaded mode. Allows concurrent requests to controller actions and
|
||||
# multiple database connections. Also disables automatic dependency loading
|
||||
# after boot, and disables reloading code on every request, as these are
|
||||
# after boot, and disables reloading code on every request, as these are
|
||||
# fundamentally incompatible with thread safety.
|
||||
def threadsafe!
|
||||
self.preload_frameworks = true
|
||||
|
@ -1103,3 +1125,4 @@ class Rails::OrderedOptions < Array #:nodoc:
|
|||
return false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue