From abfc4dad3ebb17eccd32d1f1eb8a3e9c0f6e6e4e Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Mon, 30 Nov 2009 15:58:38 -0800 Subject: Remove global Rails initializers --- railties/lib/rails.rb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails.rb') diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index c23b67e321..aeac85f4b3 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -10,4 +10,19 @@ require 'rails/core' require 'rails/configuration' require 'rails/deprecation' require 'rails/initializer' -require 'rails/plugin' \ No newline at end of file +require 'rails/plugin' +require 'rails/ruby_version_check' + +# For Ruby 1.8, this initialization sets $KCODE to 'u' to enable the +# multibyte safe operations. Plugin authors supporting other encodings +# should override this behaviour and set the relevant +default_charset+ +# on ActionController::Base. +# +# For Ruby 1.9, UTF-8 is the default internal and external encoding. +if RUBY_VERSION < '1.9' + $KCODE='u' +else + Encoding.default_external = Encoding::UTF_8 +end + +RAILS_ENV = (ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development").dup unless defined?(RAILS_ENV) \ No newline at end of file -- cgit v1.2.3 From 39034997d1bd1fbaf33ddf1d6e3996b3c298a409 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Wed, 2 Dec 2009 10:14:02 -0800 Subject: Add support for bare ActiveSupport via config.active_support.bare --- railties/lib/rails.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/lib/rails.rb') diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index aeac85f4b3..b7cae9a9ac 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -1,5 +1,9 @@ require "pathname" +require 'active_support' +require 'active_support/core_ext/kernel/reporting' +require 'active_support/core_ext/logger' + require 'rails/initializable' require 'rails/application' require 'rails/railties_path' -- cgit v1.2.3 From 1b27f5c4f72384081083fa025b6b10e5ab02ae5e Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 15 Dec 2009 22:07:12 -0800 Subject: Add the ability for plugins to set default configuration settings. --- railties/lib/rails.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails.rb') diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index b7cae9a9ac..85aeb4af24 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -3,9 +3,11 @@ require "pathname" require 'active_support' require 'active_support/core_ext/kernel/reporting' require 'active_support/core_ext/logger' +require 'action_dispatch' require 'rails/initializable' require 'rails/application' +require 'rails/plugin' require 'rails/railties_path' require 'rails/version' require 'rails/rack' @@ -14,7 +16,6 @@ require 'rails/core' require 'rails/configuration' require 'rails/deprecation' require 'rails/initializer' -require 'rails/plugin' require 'rails/ruby_version_check' # For Ruby 1.8, this initialization sets $KCODE to 'u' to enable the @@ -29,4 +30,4 @@ else Encoding.default_external = Encoding::UTF_8 end -RAILS_ENV = (ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development").dup unless defined?(RAILS_ENV) \ No newline at end of file +RAILS_ENV = (ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development").dup unless defined?(RAILS_ENV) -- cgit v1.2.3 From dc677f7665e5ec74b5a313ba656bba19dc0f853d Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Tue, 22 Dec 2009 17:03:23 -0800 Subject: tests pass with requiring the frameworks in rails.rb --- railties/lib/rails.rb | 42 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) (limited to 'railties/lib/rails.rb') diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 85aeb4af24..9fb3cd9f94 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -1,33 +1,9 @@ -require "pathname" - -require 'active_support' -require 'active_support/core_ext/kernel/reporting' -require 'active_support/core_ext/logger' -require 'action_dispatch' - -require 'rails/initializable' -require 'rails/application' -require 'rails/plugin' -require 'rails/railties_path' -require 'rails/version' -require 'rails/rack' -require 'rails/paths' -require 'rails/core' -require 'rails/configuration' -require 'rails/deprecation' -require 'rails/initializer' -require 'rails/ruby_version_check' - -# For Ruby 1.8, this initialization sets $KCODE to 'u' to enable the -# multibyte safe operations. Plugin authors supporting other encodings -# should override this behaviour and set the relevant +default_charset+ -# on ActionController::Base. -# -# For Ruby 1.9, UTF-8 is the default internal and external encoding. -if RUBY_VERSION < '1.9' - $KCODE='u' -else - Encoding.default_external = Encoding::UTF_8 -end - -RAILS_ENV = (ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development").dup unless defined?(RAILS_ENV) +require "rails/core" + +%w(active_model active_record action_controller action_view action_mailer active_resource).each do |framework| + begin + require framework + require "#{framework}/rails" + rescue LoadError + end +end \ No newline at end of file -- cgit v1.2.3