diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-24 18:10:23 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-24 18:10:23 -0800 |
commit | d01f75b1f091c37d14ece70cbe5f52f20f25d64c (patch) | |
tree | d794dba5b7d8b6f12339bcac8901e0379a8e6086 /railties/lib | |
parent | 536c239966da020777c501d8a2fa7f026fb3a451 (diff) | |
download | rails-d01f75b1f091c37d14ece70cbe5f52f20f25d64c.tar.gz rails-d01f75b1f091c37d14ece70cbe5f52f20f25d64c.tar.bz2 rails-d01f75b1f091c37d14ece70cbe5f52f20f25d64c.zip |
Initializer#env relies on StringInquirer autoload. Style fixes.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/initializer.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index fcf6ea3feb..82b7b604ae 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -57,10 +57,7 @@ module Rails end def env - @_env ||= begin - require 'active_support/string_inquirer' - ActiveSupport::StringInquirer.new(RAILS_ENV) - end + @_env ||= ActiveSupport::StringInquirer.new(RAILS_ENV) end def cache @@ -263,7 +260,7 @@ module Rails def require_frameworks configuration.frameworks.each { |framework| require(framework.to_s) } rescue LoadError => e - # re-raise because Mongrel would swallow it + # Re-raise as RuntimeError because Mongrel would swallow LoadError. raise e.to_s end @@ -869,10 +866,10 @@ Run `rake gems:install` to install the missing gems. def framework_paths paths = %w(railties railties/lib activesupport/lib) - paths << 'actionpack/lib' if frameworks.include? :action_controller or frameworks.include? :action_view + paths << 'actionpack/lib' if frameworks.include?(:action_controller) || frameworks.include?(:action_view) [:active_record, :action_mailer, :active_resource, :action_web_service].each do |framework| - paths << "#{framework.to_s.gsub('_', '')}/lib" if frameworks.include? framework + paths << "#{framework.to_s.gsub('_', '')}/lib" if frameworks.include?(framework) end paths.map { |dir| "#{framework_root_path}/#{dir}" }.select { |dir| File.directory?(dir) } |