Rails 2.2.2

Updated to Rails 2.2.2.
Added a couple more Ruby 1.9 fixes, but that's pretty much at a standstill,
until one gets Maruku and HTML5lib working right under Ruby 1.9.
This commit is contained in:
Jacques Distler 2008-11-24 15:53:39 -06:00
parent 1b69b148de
commit 2e81ca2d30
716 changed files with 8009 additions and 113047 deletions

View file

@ -147,7 +147,10 @@ module Rails
initialize_dependency_mechanism
initialize_whiny_nils
initialize_temporary_session_directory
initialize_time_zone
initialize_i18n
initialize_framework_settings
initialize_framework_views
@ -267,6 +270,7 @@ module Rails
end
def add_gem_load_paths
Rails::GemDependency.add_frozen_gem_path
unless @configuration.gems.empty?
require "rubygems"
@configuration.gems.each { |gem| gem.add_load_paths }
@ -503,6 +507,18 @@ Run `rake gems:install` to install the missing gems.
end
end
# Set the i18n configuration from config.i18n but special-case for the load_path which should be
# appended to what's already set instead of overwritten.
def initialize_i18n
configuration.i18n.each do |setting, value|
if setting == :load_path
I18n.load_path += value
else
I18n.send("#{setting}=", value)
end
end
end
# Initializes framework-specific settings for each of the loaded frameworks
# (Configuration#frameworks). The available settings map to the accessors
# on each of the corresponding Base classes.
@ -731,6 +747,9 @@ Run `rake gems:install` to install the missing gems.
# timezone to <tt>:utc</tt>.
attr_accessor :time_zone
# Accessor for i18n settings.
attr_accessor :i18n
# Create a new Configuration instance, initialized with the default
# values.
def initialize
@ -754,6 +773,7 @@ Run `rake gems:install` to install the missing gems.
self.database_configuration_file = default_database_configuration_file
self.routes_configuration_file = default_routes_configuration_file
self.gems = default_gems
self.i18n = default_i18n
for framework in default_frameworks
self.send("#{framework}=", Rails::OrderedOptions.new)
@ -881,6 +901,7 @@ Run `rake gems:install` to install the missing gems.
components
config
lib
vendor
).map { |dir| "#{root_path}/#{dir}" }.select { |dir| File.directory?(dir) }
paths.concat builtin_directories
@ -966,6 +987,18 @@ Run `rake gems:install` to install the missing gems.
def default_gems
[]
end
def default_i18n
i18n = Rails::OrderedOptions.new
i18n.load_path = []
if File.exist?(File.join(RAILS_ROOT, 'config', 'locales'))
i18n.load_path << Dir[File.join(RAILS_ROOT, 'config', 'locales', '*.{rb,yml}')]
i18n.load_path.flatten!
end
i18n
end
end
end