diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-12-16 12:05:27 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-16 12:05:27 +0000 |
commit | ce0e2084107a20a773a587335cfe54bf70ade795 (patch) | |
tree | fded8e2f6a2d459bdd4676bb9646d3b54cc9f3fe /railties | |
parent | 016fffff6d6e434ee7fa69531b08b07d99f48583 (diff) | |
parent | 9e2b4a10f7f091868b3c3701efb4c04048455706 (diff) | |
download | rails-ce0e2084107a20a773a587335cfe54bf70ade795.tar.gz rails-ce0e2084107a20a773a587335cfe54bf70ade795.tar.bz2 rails-ce0e2084107a20a773a587335cfe54bf70ade795.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 12 | ||||
-rw-r--r-- | railties/lib/rails/backtrace_cleaner.rb | 3 | ||||
-rw-r--r-- | railties/lib/tasks/databases.rake | 2 | ||||
-rw-r--r-- | railties/test/console_app_test.rb | 1 |
4 files changed, 7 insertions, 11 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 06a3332c42..56e8ce95ab 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -39,7 +39,7 @@ module Rails nil end end - + def backtrace_cleaner @@backtrace_cleaner ||= begin # Relies on ActiveSupport, so we have to lazy load to postpone definition until AS has been loaded @@ -148,7 +148,6 @@ module Rails initialize_dependency_mechanism initialize_whiny_nils - initialize_temporary_session_directory initialize_time_zone initialize_i18n @@ -501,13 +500,6 @@ Run `rake gems:install` to install the missing gems. require('active_support/whiny_nil') if configuration.whiny_nils end - def initialize_temporary_session_directory - if configuration.frameworks.include?(:action_controller) - session_path = "#{configuration.root_path}/tmp/sessions/" - ActionController::Base.session_options[:tmpdir] = File.exist?(session_path) ? session_path : Dir::tmpdir - end - end - # Sets the default value for Time.zone, and turns on ActiveRecord::Base#time_zone_aware_attributes. # If assigned value cannot be matched to a TimeZone, an exception will be raised. def initialize_time_zone @@ -529,7 +521,7 @@ 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 + # 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| diff --git a/railties/lib/rails/backtrace_cleaner.rb b/railties/lib/rails/backtrace_cleaner.rb index f344c6477d..94d34cda39 100644 --- a/railties/lib/rails/backtrace_cleaner.rb +++ b/railties/lib/rails/backtrace_cleaner.rb @@ -9,6 +9,8 @@ module Rails RAILS_NOISE = %w( script/server ) RUBY_NOISE = %w( rubygems/custom_require benchmark.rb ) + GEMS_DIR = Gem.default_dir + ALL_NOISE = VENDOR_DIRS + SERVER_DIRS + RAILS_NOISE + RUBY_NOISE def initialize @@ -16,6 +18,7 @@ module Rails add_filter { |line| line.sub(RAILS_ROOT, '') } add_filter { |line| line.sub(ERB_METHOD_SIG, '') } add_filter { |line| line.sub('./', '/') } # for tests + add_filter { |line| line.sub(/(#{GEMS_DIR})\/gems\/([a-z]+)-([0-9.]+)\/(.*)/, '\2 (\3) \4')} # http://gist.github.com/30430 add_silencer { |line| ALL_NOISE.any? { |dir| line.include?(dir) } } end end diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 3a576063fa..68ffefae0b 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -380,7 +380,7 @@ namespace :db do end namespace :sessions do - desc "Creates a sessions migration for use with CGI::Session::ActiveRecordStore" + desc "Creates a sessions migration for use with ActiveRecord::SessionStore" task :create => :environment do raise "Task unavailable to this database (no migration support)" unless ActiveRecord::Base.connection.supports_migrations? require 'rails_generator' diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb index 6cfc907b80..cbaf230594 100644 --- a/railties/test/console_app_test.rb +++ b/railties/test/console_app_test.rb @@ -4,6 +4,7 @@ require 'action_controller' # console_app uses 'action_controller/integration' unless defined? ApplicationController class ApplicationController < ActionController::Base; end + ActionController::Base.session_store = nil end require 'dispatcher' |