mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Added check for RAILS_FRAMEWORK_ROOT constant that allows the Rails framework to be found in a different place than vendor/rails. Should be set in boot.rb. [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
34df9be0e5
commit
f8bcfa6e04
2 changed files with 17 additions and 8 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Added check for RAILS_FRAMEWORK_ROOT constant that allows the Rails framework to be found in a different place than vendor/rails. Should be set in boot.rb. [DHH]
|
||||
|
||||
* Fixed that static requests could unlock the mutex guarding dynamic requests in the WEBrick servlet #3433 [tom@craz8.com]
|
||||
|
||||
* Fixed documentation tasks to work with Rake 0.7.0 #3563 [kazuhiko@fdiary.net]
|
||||
|
|
|
@ -447,6 +447,10 @@ module Rails
|
|||
::RAILS_ROOT
|
||||
end
|
||||
|
||||
def framework_root_path
|
||||
defined?(::RAILS_FRAMEWORK_ROOT) ? ::RAILS_FRAMEWORK_ROOT : "#{root_path}/vendor/rails"
|
||||
end
|
||||
|
||||
def default_frameworks
|
||||
[ :active_record, :action_controller, :action_view, :action_mailer, :action_web_service ]
|
||||
end
|
||||
|
@ -460,7 +464,6 @@ module Rails
|
|||
paths.concat(Dir["#{root_path}/components/[_a-z]*"])
|
||||
|
||||
# Followed by the standard includes.
|
||||
# TODO: Don't include dirs for frameworks that are not used
|
||||
paths.concat %w(
|
||||
app
|
||||
app/models
|
||||
|
@ -472,14 +475,18 @@ module Rails
|
|||
config
|
||||
lib
|
||||
vendor
|
||||
vendor/rails/railties
|
||||
vendor/rails/railties/lib
|
||||
vendor/rails/actionpack/lib
|
||||
vendor/rails/activesupport/lib
|
||||
vendor/rails/activerecord/lib
|
||||
vendor/rails/actionmailer/lib
|
||||
vendor/rails/actionwebservice/lib
|
||||
).map { |dir| "#{root_path}/#{dir}" }.select { |dir| File.directory?(dir) }
|
||||
|
||||
# TODO: Don't include dirs for frameworks that are not used
|
||||
paths.concat %w(
|
||||
railties
|
||||
railties/lib
|
||||
actionpack/lib
|
||||
activesupport/lib
|
||||
activerecord/lib
|
||||
actionmailer/lib
|
||||
actionwebservice/lib
|
||||
).map { |dir| "#{framework_root_path}/#{dir}" }.select { |dir| File.directory?(dir) }
|
||||
end
|
||||
|
||||
def default_log_path
|
||||
|
|
Loading…
Reference in a new issue