aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-13 10:07:37 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-13 10:07:37 +0000
commit6a0e41c158d327967e75fc93f001452449e8afe1 (patch)
treeda3c23709353ad237aa710443b69d96aaf0e1bd0
parent6e8e9c20cb9ad2ec3c880ad81e3ecead0bc3cf28 (diff)
downloadrails-6a0e41c158d327967e75fc93f001452449e8afe1.tar.gz
rails-6a0e41c158d327967e75fc93f001452449e8afe1.tar.bz2
rails-6a0e41c158d327967e75fc93f001452449e8afe1.zip
Reformed environments files to the new config style
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/environments/development.rb17
-rw-r--r--railties/environments/environment.rb4
-rw-r--r--railties/environments/production.rb21
-rw-r--r--railties/environments/test.rb12
4 files changed, 33 insertions, 21 deletions
diff --git a/railties/environments/development.rb b/railties/environments/development.rb
index d214c666d0..a151c3ba11 100644
--- a/railties/environments/development.rb
+++ b/railties/environments/development.rb
@@ -1,14 +1,17 @@
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
+config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
-require 'active_support/whiny_nil'
+config.whiny_nils = true
-# Reload code; show full error reports; disable caching.
-Dependencies.mechanism = :load
-ActionController::Base.consider_all_requests_local = true
-ActionController::Base.perform_caching = false
+# Enable the breakpoint server that script/breakpointer connects to
+config.breakpoint_server = true
-# The breakpoint server port that script/breakpointer connects to.
-BREAKPOINT_SERVER_PORT = 42531
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching = false
+
+# Don't care if the mailer can't send
+config.action_mailer.raise_delivery_errors = false
diff --git a/railties/environments/environment.rb b/railties/environments/environment.rb
index ea381a158a..716659decd 100644
--- a/railties/environments/environment.rb
+++ b/railties/environments/environment.rb
@@ -20,11 +20,11 @@ Rails::Initializer.run do |config|
# Use the database for sessions instead of the file system
# (create the session table with 'rake create_sessions_table')
- # config.session_store = :active_record_store
+ # config.action_controller.session_store = :active_record_store
# Enable page/fragment caching by setting a file-based store
# (remember to create the caching directory and make it readable to the application)
- # config.fragment_store = :file_store, "#{RAILS_ROOT}/cache"
+ # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
# See Rails::Configuration for more options
end
diff --git a/railties/environments/production.rb b/railties/environments/production.rb
index 4fc13b05ed..f2b9ed6810 100644
--- a/railties/environments/production.rb
+++ b/railties/environments/production.rb
@@ -1,8 +1,17 @@
# The production environment is meant for finished, "live" apps.
-# Code is not reloaded between requests, full error reports are disabled,
-# and caching is turned on.
+# Code is not reloaded between requests
+config.cache_classes = true
-# Don't reload code; don't show full error reports; enable caching.
-Dependencies.mechanism = :require
-ActionController::Base.consider_all_requests_local = false
-ActionController::Base.perform_caching = true
+# Use a different logger for distributed setups
+# config.logger = SyslogLogger.new
+
+
+# Full error reports are disabled and caching is turned on
+config.action_controller.consider_all_requests_local = false
+config.action_controller.perform_caching = true
+
+# Enable serving of images, stylesheets, and javascripts from an asset server
+# config.action_controller.asset_host = "http://assets.example.com"
+
+# Disable delivery errors if you bad email addresses should just be ignored
+# config.action_mailer.raise_delivery_errors = false
diff --git a/railties/environments/test.rb b/railties/environments/test.rb
index fea6fdff42..5402d88f81 100644
--- a/railties/environments/test.rb
+++ b/railties/environments/test.rb
@@ -2,16 +2,16 @@
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
+config.cache_classes = true
# Log error messages when you accidentally call methods on nil.
-require 'active_support/whiny_nil'
+config.whiny_nils = true
-# Don't reload code; show full error reports; disable caching.
-Dependencies.mechanism = :require
-ActionController::Base.consider_all_requests_local = true
-ActionController::Base.perform_caching = false
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching = false
# Tell ActionMailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
-ActionMailer::Base.delivery_method = :test
+config.action_mailer.delivery_method = :test