diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
| commit | e0a7e0fec760ba12c8067a37e10c96f1f05876e2 (patch) | |
| tree | d0cf745592a46aee4d4913911fd34c7c24515220 /config/environments | |
| parent | 6424e10be5a89f175a74c71c55660412a169b8b8 (diff) | |
Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgrade
- Converted plugins to gems (Gemfile)
- Updated config structure (application.rb, boot.rb, environment.rb)
- Converted routes to Rails 3 DSL
- Converted named_scope to scope throughout models
- Converted find(:all, :conditions) to where() chains
- Fixed has_many :order to use ordering scope
- Updated session store and secret token configuration
- Fixed exception_notification middleware configuration
- Patched Ruby 2.4 / Rails 3.2 incompatibilities:
- Integer/Float duration arithmetic (ActiveSupport)
- Arel visit_Integer for PostgreSQL adapter
- create_database String/Integer coercion
- ActionController consider_all_requests_local
- Migrated taggings schema for acts-as-taggable-on
- Replaced dynamic_form gem with custom form_error_messages helper
- Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for)
- Fixed admin layout yield
- Updated test suite for Rails 3 APIs
Diffstat (limited to 'config/environments')
| -rw-r--r-- | config/environments/development.rb | 27 | ||||
| -rw-r--r-- | config/environments/production.rb | 53 | ||||
| -rw-r--r-- | config/environments/test.rb | 45 |
3 files changed, 68 insertions, 57 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb index 85c9a60..6446686 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb | |||
| @@ -1,17 +1,20 @@ | |||
| 1 | # Settings specified here will take precedence over those in config/environment.rb | 1 | # Settings specified here will take precedence over those in config/environment.rb |
| 2 | 2 | ||
| 3 | # In the development environment your application's code is reloaded on | 3 | Cccms::Application.configure do |
| 4 | # every request. This slows down response time but is perfect for development | 4 | # In the development environment your application's code is reloaded on |
| 5 | # since you don't have to restart the webserver when you make code changes. | 5 | # every request. This slows down response time but is perfect for development |
| 6 | config.cache_classes = false | 6 | # since you don't have to restart the webserver when you make code changes. |
| 7 | config.cache_classes = false | ||
| 7 | 8 | ||
| 8 | # Log error messages when you accidentally call methods on nil. | 9 | # Log error messages when you accidentally call methods on nil. |
| 9 | config.whiny_nils = true | 10 | config.whiny_nils = true |
| 10 | 11 | ||
| 11 | # Show full error reports and disable caching | 12 | # Show full error reports and disable caching |
| 12 | config.action_controller.consider_all_requests_local = true | 13 | config.action_controller.consider_all_requests_local = true |
| 13 | config.action_view.debug_rjs = true | 14 | config.action_controller.perform_caching = false |
| 14 | config.action_controller.perform_caching = false | ||
| 15 | 15 | ||
| 16 | # Don't care if the mailer can't send | 16 | # Don't care if the mailer can't send |
| 17 | config.action_mailer.raise_delivery_errors = false \ No newline at end of file | 17 | config.action_mailer.raise_delivery_errors = false |
| 18 | |||
| 19 | config.active_support.deprecation = :log | ||
| 20 | end | ||
diff --git a/config/environments/production.rb b/config/environments/production.rb index 1768ab7..2f933de 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb | |||
| @@ -1,36 +1,39 @@ | |||
| 1 | # Settings specified here will take precedence over those in config/environment.rb | 1 | # Settings specified here will take precedence over those in config/environment.rb |
| 2 | 2 | ||
| 3 | # The production environment is meant for finished, "live" apps. | 3 | Cccms::Application.configure do |
| 4 | # Code is not reloaded between requests | 4 | # The production environment is meant for finished, "live" apps. |
| 5 | config.cache_classes = true | 5 | # Code is not reloaded between requests |
| 6 | config.cache_classes = true | ||
| 6 | 7 | ||
| 7 | # Full error reports are disabled and caching is turned on | 8 | # Full error reports are disabled and caching is turned on |
| 8 | config.action_controller.consider_all_requests_local = false | 9 | config.action_controller.consider_all_requests_local = false |
| 9 | config.action_controller.perform_caching = true | 10 | config.action_controller.perform_caching = true |
| 10 | 11 | ||
| 11 | # See everything in the log (default is :info) | 12 | # See everything in the log (default is :info) |
| 12 | config.log_level = :info | 13 | config.log_level = :info |
| 13 | 14 | ||
| 14 | # Use a different logger for distributed setups | 15 | config.active_support.deprecation = :notify |
| 15 | # config.logger = SyslogLogger.new | ||
| 16 | 16 | ||
| 17 | # Use a different cache store in production | 17 | # Use a different logger for distributed setups |
| 18 | # config.cache_store = :mem_cache_store | 18 | # config.logger = SyslogLogger.new |
| 19 | 19 | ||
| 20 | # Enable serving of images, stylesheets, and javascripts from an asset server | 20 | # Use a different cache store in production |
| 21 | # config.action_controller.asset_host = "http://assets.example.com" | 21 | # config.cache_store = :mem_cache_store |
| 22 | 22 | ||
| 23 | # Disable delivery errors, bad email addresses will be ignored | 23 | # Enable serving of images, stylesheets, and javascripts from an asset server |
| 24 | # config.action_mailer.raise_delivery_errors = false | 24 | # config.action_controller.asset_host = "http://assets.example.com" |
| 25 | 25 | ||
| 26 | # Enable threaded mode | 26 | # Disable delivery errors, bad email addresses will be ignored |
| 27 | # config.threadsafe! | 27 | # config.action_mailer.raise_delivery_errors = false |
| 28 | 28 | ||
| 29 | ActionMailer::Base.delivery_method = :sendmail | 29 | # Enable threaded mode |
| 30 | ActionMailer::Base.sendmail_settings = { | 30 | # config.threadsafe! |
| 31 | :location => '/usr/sbin/sendmail', | ||
| 32 | :arguments => '-i -t' | ||
| 33 | } | ||
| 34 | ActionMailer::Base.perform_deliveries = true | ||
| 35 | ActionMailer::Base.raise_delivery_errors = true | ||
| 36 | 31 | ||
| 32 | ActionMailer::Base.delivery_method = :sendmail | ||
| 33 | ActionMailer::Base.sendmail_settings = { | ||
| 34 | :location => '/usr/sbin/sendmail', | ||
| 35 | :arguments => '-i -t' | ||
| 36 | } | ||
| 37 | ActionMailer::Base.perform_deliveries = true | ||
| 38 | ActionMailer::Base.raise_delivery_errors = true | ||
| 39 | end | ||
diff --git a/config/environments/test.rb b/config/environments/test.rb index 496eb95..728e147 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb | |||
| @@ -1,27 +1,32 @@ | |||
| 1 | # Settings specified here will take precedence over those in config/environment.rb | 1 | # Settings specified here will take precedence over those in config/environment.rb |
| 2 | 2 | ||
| 3 | # The test environment is used exclusively to run your application's | 3 | Cccms::Application.configure do |
| 4 | # test suite. You never need to work with it otherwise. Remember that | ||
| 5 | # your test database is "scratch space" for the test suite and is wiped | ||
| 6 | # and recreated between test runs. Don't rely on the data there! | ||
| 7 | config.cache_classes = true | ||
| 8 | 4 | ||
| 9 | # Log error messages when you accidentally call methods on nil. | 5 | # The test environment is used exclusively to run your application's |
| 10 | config.whiny_nils = true | 6 | # test suite. You never need to work with it otherwise. Remember that |
| 7 | # your test database is "scratch space" for the test suite and is wiped | ||
| 8 | # and recreated between test runs. Don't rely on the data there! | ||
| 9 | config.cache_classes = true | ||
| 11 | 10 | ||
| 12 | # Show full error reports and disable caching | 11 | # Log error messages when you accidentally call methods on nil. |
| 13 | config.action_controller.consider_all_requests_local = true | 12 | config.whiny_nils = true |
| 14 | config.action_controller.perform_caching = false | ||
| 15 | 13 | ||
| 16 | # Disable request forgery protection in test environment | 14 | # Show full error reports and disable caching |
| 17 | config.action_controller.allow_forgery_protection = false | 15 | config.action_controller.consider_all_requests_local = true |
| 16 | config.action_controller.perform_caching = false | ||
| 18 | 17 | ||
| 19 | # Tell Action Mailer not to deliver emails to the real world. | 18 | # Disable request forgery protection in test environment |
| 20 | # The :test delivery method accumulates sent emails in the | 19 | config.action_controller.allow_forgery_protection = false |
| 21 | # ActionMailer::Base.deliveries array. | ||
| 22 | config.action_mailer.delivery_method = :test | ||
| 23 | 20 | ||
| 24 | # Use SQL instead of Active Record's schema dumper when creating the test database. | 21 | # Tell Action Mailer not to deliver emails to the real world. |
| 25 | # This is necessary if your schema can't be completely dumped by the schema dumper, | 22 | # The :test delivery method accumulates sent emails in the |
| 26 | # like if you have constraints or database-specific column types | 23 | # ActionMailer::Base.deliveries array. |
| 27 | # config.active_record.schema_format = :sql \ No newline at end of file | 24 | config.action_mailer.delivery_method = :test |
| 25 | |||
| 26 | # Use SQL instead of Active Record's schema dumper when creating the test database. | ||
| 27 | # This is necessary if your schema can't be completely dumped by the schema dumper, | ||
| 28 | # like if you have constraints or database-specific column types | ||
| 29 | # config.active_record.schema_format = :sql | ||
| 30 | |||
| 31 | config.active_support.deprecation = :raise | ||
| 32 | end | ||
